I forgot to verify the ERC20 token contract after deploying it. Now after 5 months, Im doing it again and completely forget which compiler and if I accidently change anything on the code.

After playing with Remix, I found out I use v0.5.11 as the Bold hex text 0b mean 11 in decimal. You can see the ByteCode almost the same, except the hex in BOLD. This is the very end of the whole Bytecode. Please help if you have any clue.

ByteCode expected:
...... 6f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a7231582055d977d29270099c12d5a11dea2a02d7991cc2c05448c6bd893bc1564278a96a64736f6c634300050b0032526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373

ByteCode compiled from Remix:
...... 6f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a723158203fb4a2175649a2bc0e44a5cac18a7cafc7728139b46c3c1922298c8a2df8a0ab64736f6c634300050b0032526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373


Let's see what happens here.

In solidity v0.5.11, the end of the bytecode includes the following :



627a7a7231 => "bzzr1" in hex



<32 bytes swarm hash>


736f6c63 -> "solc" in hex


<3 byte version encoding>



That's exactly what you have. In your two bytecodes 55d977d29270099c12d5a11dea2a02d7991cc2c05448c6bd893bc1564278a96a and 3fb4a2175649a2bc0e44a5cac18a7cafc7728139b46c3c1922298c8a2df8a0ab are 32 bytes swarm hash, also called metadata. The metadata part differs according to the development environment and has no impact on the smart contract code. Therefore the two bytecodes match the same smart contract, you are good.

Note that the part after 0x0032 (526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373) refers to the constructor arguments. Indeed, your two bytecodes are creation bytecodes passed as the data parameter of the deployment transaction. The runtime (or deployed) bytecode results from the creation bytecode and does not include the constructor part.

  • 1
    thanks alot Its really helpful – Brian Nguyen Mar 3 at 1:39

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.