The constructor has public visibility and doesn’t do anything. When we compile this contract, solidity compiler generates some gibberish characters (bytecode) The bytecode includes everything to successfully deploy/initialize the code, persists state and some sanity checks. It is never meant for EVM and isn’t executed by the EVM. To create this contract on-chain, we execute a send transaction (RPC call) where the `“to”` address is null and the “data” `Auxdata` is the hash of the source code used for source verification.
Tags
How to Exploit a Solidity Constructor
Source: Trends Pinoy
0 Comments