I'm not able to verify my smart contract on Rinkeby and Ropsten Testnet Network.

Rinkeby Link - https://rinkeby.etherscan.io/address/0x029798a8c21050cbaaa2d5ecbd5e06622b602b82

Ropsten Link - https://ropsten.etherscan.io/address/0xe25a62f72b5415977e1bbcc8eb1c1bc787341db3

Important: I'm using oraclize services in my smart contract.

I have recently noticed that when I remove/comment oraclize related lines from my contract. It get's verified successfully. But I can't verify my contract when Oraclize is implemented!

  • Can you elaborate what issues are you facing? – Prashant Prabhakar Singh Apr 4 '18 at 16:46
  • You'll have to give more details as to what you've tried that has failed. However a couple of suggestions, make sure you are using the proper compiler version and optimization settings in etherscan when verifying the contract. I have had problems verifying contracts build with IDE tool kits. I find the beest way is to compile yourself with solc – hextet Apr 4 '18 at 19:27
  • @hextet Kindly let me know what other information is needed. I have been gone through the process before for some of my projects but this time I'm getting an error saying, "Error! Unable to generate Contract ByteCode and ABI". I'm unable to figure out the reason behind this. I tried to redeploy the contract and filled the verifying fields carefully but still got same error. Please help! – Gagan Apr 5 '18 at 6:01
  • @PrashantPrabhakarSingh Hi Prashant. Please see above reply and let me know what information is needed so that I can provide you with that. Thanks. – Gagan Apr 5 '18 at 6:02
  • Did you use Parity node by chance to deploy your contract? – hextet Apr 6 '18 at 15:18

When compiling with Remix, you likely just used the oraclizeAPI import statement. However, for verifying with etherscan, you need to have the whole plaintext code there in replacement of the import statement.

Likewise, ensure you've set the exact Solc version it was compiled with. There were some updates to the Oraclize API in the last few days, so beware of that as well when copying the plain text over, you may need to copy it from an earlier commit. If you continue to have trouble, you can contact Oraclize on their gitter channel https://gitter.im/oraclize/ethereum-api, and ask someone there to verify it for you, assuming you are able to provide the exact code and compiler you deployed it with.

| improve this answer | |

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.