2

Is below function can be called by a hacker after deploy

constructor() public
{
    test = true;
}
ashwin
  • 389
  • 6
  • 14

1 Answers1

3

No. A constructor is special.

It is executed on deployment but the bytecode isn't deployed to the contract address, so it can't be run again.

Hope it helps.

Rob Hitchens
  • 55,151
  • 11
  • 89
  • 145