-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Issues verifying contract on etherscan #1984
Comments
We are working on some new updates which should address most of these issues and will be released shortly. I suspect this might have some thing to do with your evmversion (i.e. non default). Do you know which evmversion was the contract compiled with on truffle ? You can also open a ticket via our help desk for additional assistance and most of times we should be able to narrow down the issue. In general though, if it compiles on remix and the code matches what is on the blockchain then the contract will verify |
@Amxx you should add Default is "byzantium" and Etherscan fails to verify your code.
|
@Amxx We've just released an updated contractverifier for all the testnets .i.e https://ropsten.etherscan.io/verifyContract You can now specifically "configure" the EvmVersion , if left blank it defaults to compiler default. In addition to that we also now support standard-json-input format. |
Just pushed the latest updates to mainnet https://etherscan.io/verifycontract for custom evmVersions among others |
Hi @Amxx, do you still need help with this? Thanks! |
Just including this for reference: https://github.com/rkalis/truffle-plugin-verify (Can we close this yet? Thanks all.) |
Going once Thanks for playing. (But seriously, let us know and we can re-open :) |
I know this issue was discussed in #456 and #475, but it is still a pain to verify deployment on etherscan. Works out of the box with remix, it should work with truffle to!
Issue
After a migration using
truffle migrate
(which is a pain, but that is not the point here), my contract are deployed and visible on etherscan. I'm trying to verify the code so my users can trust the deployment and use the read/write features of etherscan.when I past my contract code, and give the compiler version and optimization options, it tells me the bytecode is not the correct one. If I deploy using remix, the verification happens well ... which makes me wonder, why isn't the same source, with the same compiler not giving the same result?
For the THESE contracts (flatten version here) the deployed addresses are (for example)
0x6FDcfA51758205E9D717dce7B8F416447D612174 AppRegistry (empty constructor)
0x22e0b72EA21D4DfF26F075c291cECc00cb01e978 IexecODBLibOrders (library, so no constructor)
using:
truffle version
): 5.0.13node --version
): 11.12.0npm --version
): 6.9.0EDIT:
I've tried with evmVersion "petersburg" and "byzantium", none of these give me the same bytecode as remix (with same compiler version and optimisation)
The text was updated successfully, but these errors were encountered: