openzeppelin-sdk icon indicating copy to clipboard operation
openzeppelin-sdk copied to clipboard

Source code verification on etherscan via API not working

Open spalladino opened this issue 5 years ago • 2 comments

On CLI 2.7, in Rinkeby at least, verifying a contract source code on Etherscan is not working, as it fails with an unable to verify error.

✖ Verifying and publishing contract source code of Box on etherscan (this usually takes under 30 seconds)
Error while trying to verify contract: Fail - Unable to verify

The issue seems to be on Etherscan's side: testing verification via their API demo page does not work, while setting the same parameters in their UI works. We are currently following this issue with Kaven from their team.

spalladino avatar Feb 06 '20 19:02 spalladino

I am unable to verify contract source code on Ethereum when using Kovan.

❯ oz verify ? Pick a network kovan ? Was your contract compiled with optimizations enabled? Yes ? Specify the optimizer 'runs' parameter 200 ? Choose a remote endpoint etherscan ? Enter your Etherscan API key (get one at https://etherscan.io/myapikey) MY API JET ? Pick a contract to verify CustomGovernanceTokenDeployer ✖ Verifying and publishing contract source code of CustomGovernanceTokenDeployer on etherscan (this usually takes under 30 seconds) Error while trying to verify contract: Fail - Unable to verify

I have the same failure when having the optimization set to "no" and optimizer set to false in config.

crazyrabbitLTC avatar Jul 31 '20 14:07 crazyrabbitLTC

To add more context to this, source code verification also does not work if you have previously deployed a regular contract instance.

If afterward you deploy an upgradable instance this does not seem to be caught by the CLI.

As for the max rate limit error, I'm not sure why this would be happening.

Screen Shot 2020-07-31 at 6 03 59 PM

crazyrabbitLTC avatar Jul 31 '20 22:07 crazyrabbitLTC