Simple question, but I couldn’t find the answer anywhere. How to get the exact bytecode of a smart contract (not creation bytecode) when the source code of contract is available on https://etherscan.io ?

This is for already deployed contracts.

  • Even without any constructor, the creation bytecode contains more function than the resulting contract. – user2284570 Jun 1 '18 at 12:38
  • Why don't you want the creation bytecode? It is the code of the contract, so...? – Florian Castelain Jun 1 '18 at 13:19
  • 1
    @Andromelus : creation bytecode contains the code of the contract, but it’s not the contract… ethereum.stackexchange.com/q/23092/25002 – user2284570 Jun 1 '18 at 13:22
  • The creation bycode is the contract. You are taking the comment made in the answer too far implying that these are two different things. The deployed contract seems to be missing only the opcodes of the constructor, so having the creation bycode you have everything you need. – Jaime Jun 1 '18 at 14:46
  • @Jaime : which require assembly knowledge to get where the actual contract starts from. – user2284570 Jun 1 '18 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.