2

Is there any possibility to get the "creation bytecode" of the contract when it's not yet verified?

I have a token smart contract: https://ropsten.etherscan.io/address/0xae78b6e1231e7a852af60047a2ab16a40cefafb3#code

It's not verified by the owner, and the current bytecode as I understand is the "Runtime Bytecode". Because I want to verify the source code of this deployed smart contract matches with my local one.

Ender
  • 265
  • 2
  • 6

1 Answers1

0

I think my approach is a bit odd. We should not compare the runtime bytecode which is still problematic, explained by Bytecode on block chain different from the one used when deploying

The proper way to do is to compare the compiled byte code with the input data of the tx. In local, we can just use solc --bin --optimize <filename>.sol > op.bin and compare the output with the Input Data . enter image description here

Explained by How can I verify that a contract on the blockchain matches the source code? and web3.eth.getCode doesn't return the data shown on etherscan

Ender
  • 265
  • 2
  • 6
  • There is an issue to compare the exact bytecode: https://github.com/trufflesuite/truffle-compile/issues/77 – Ender Oct 19 '20 at 09:15