The Ethereum JSON-PRC spec contains an eth_getCode method, but it is not specified what is being retrieved:
- Init bytecode (including constructor)
- Deployed bytecode (without constructor)
Which one is it?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
eth_getCode returns the bytecode associated with the address in the Ethereum world state, that will be the deployed bytecode (or runtime bytecode).
The init bytecode could be obtained from the deployment transaction's data field, unless it was created by a contract in which case you have to trace the transaction to obtain the details.