How to verify upgradable contract on ropsten in etherscan?

Hello everyone,

I managed to create an upgradable contract and deploy it to ropsten with zos. I’m now trying to verify it manually on etherscan, I’m using truffle-flattener to generate a flatten version of the contract but when I try to verify it etherscan says:

Sorry! The Compiled Contract ByteCode for ' **Gateway** ' does  **NOT**  match the Contract Creation Code for Address [0x9afb3cec8889cac85110f5732e0d9d22eeb4889d](
 Found the following ContractName(s) in source code: DexI, Gateway, GlobalVar, IERC20, Initializable, Ownable. 

Unable to Verify Contract Source Code.

What am I missing?

hi @Alexintosh welcome to the community :slight_smile: I am tagging @frangio to check this for you. In the meantime would like to hear more about you on this thread.
Please do drop by to say hi :slight_smile:

1 Like

Hey @Alexintosh! Have you tried directly with the zos verify command? It will ask you for an etherscan API key to run the verification, but it should handle everything automatically (flattenning included) for you. The only caveat is that it does not support external solidity libraries at the moment, but if that is not your case, give it a shot!

Yeah I tried with zos verify --network ropsten --api-key <KEY> <NAME Contract> but I get:
Invalid network. Currently, etherchain supports only mainnet

Make sure to add --remote etherscan, otherwise zos verify defaults to etherchain instead of etherscan.

1 Like

@Alexintosh any luck? :slight_smile:

I managed thanks guys!

1 Like