Yesterday I deployed a contract to Ropsten (https://ropsten.etherscan.io/address/0x1fe59c223fa4e9781237f0f49a15ca598069cc30) that relies on V2 of the ABI encoder. Thus it includes statement

pragma experimental ABIEncoderV2;

I tried to run Etherscan's code verification (https://ropsten.etherscan.io/verifyContract2) with a flattened version of my Solidity code, matching compiler version, optimization flag, optimizer runs etc. The code verification result, however, is negative.

Back in June when I also deployed contracts with the same pragma I got message from Etherscan helpdesk that they don't support ABIEncoderV2. This despite the fact that compilation at Remix only issues a warning and Etherscan claims to support contracts that compile at Remix.

So I am looking for alternatives. Can anyone lend support to the hypothesis that it is lack of support for ABIEncoderV2 that is still causing code verification problems? Also are there other alternatives for public code verification of smart contracts?


Jens Ivar

  • etherchain.org also allows you to verify contracts. Maybe try it there?
    – JBrouwer
    Commented Sep 7, 2018 at 21:19
  • I wish I could, @MathematicalRain. But as far as I can tell etherchain.org only tracks the mainnet.
    – jijordre
    Commented Sep 7, 2018 at 21:25

3 Answers 3


Verifying source code not worked for me when I tried to flatten source code to single file and upload it to etherscan.io. I think thats because pragma experimental ABIEncoderV2; in multi-file project is applied to only to some files but when you flatten files to single it applied to the whole source code.

Solved this issue by deploying binary got by compiling pre-flattened version:

  1. Flatten source code with truffle-flattener or etherlime flatten
  2. Compile and deploy smart contract from flat file (can use https://remix.ethereum.org)
  3. Verify source code of https://etherscan.io

Have you tried compiling with 0.4.25? After doing so, I was able to remove ABIEncoderV2 and my verifications started working.


Make sure you put the pragma experimental ABIEncoderV2; line after the line with the Solidity version. For some reason it compiles differently if it's before the version number.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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