"zos verify" goes on wrong address

Hi. I have deployed my contracts on Ropsten, created an instance of each and did zos verify.
However, while verification was successful, it is combined with a different address then the token finally has.

What I did:

$ zos verify --remote etherscan --network ropsten --api-key XXXXXXXXX
? Pick a contract NCDToken
? Was the optimizer enabled when you compiled your contracts? Yes
? Specify the optimizer runs 200
✓ Contract source code of NCDToken verified and published successfully. You can check it here: https://ropsten.etherscan.io/address/0xc7db35F95af0eaD09f556305e28affB12cB2FA1E#code

At the URL from the response listed above the contract code can be viewed. But it is not linked to the final contract code.

Looking at “internal transactions” at https://ropsten.etherscan.io/address/0xc7db35F95af0eaD09f556305e28affB12cB2FA1E#internaltx gives some initial minting-operations on my token contract.

But, looking at these operations with a click on the transaction ID at etherscan.io will list another address for the token, where no contract-code is visible:

https://ropsten.etherscan.io/tx/0x9ca9c9295f4333b7e4e8c99dc6de744704a0995480c7fb72f79e0aaf36a5a962

It lists the token address with its proper name as: https://ropsten.etherscan.io/token/0x84e62624c28bf55b1dcc70b0c957b0e8479a20b7

But there is no contract code available and “read contract” and “write contract” aren’t any useful:

“Sorry, we were unable to locate a matching Contract ABI or SourceCode for this contract.”

I have to verify the code here again. Can we make zos verify working that etherscan.io can properly handle it? Or did I miss something here?

1 Like

Hi @itinance

Currently only logic contracts are verified. https://github.com/zeppelinos/zos/issues/937

I assume that this is the Proxy contract for NCDToken
https://ropsten.etherscan.io/token/0x84e62624c28bf55b1dcc70b0c957b0e8479a20b7

Whilst this is the Logic contract (with verified code) for NCDToken
https://ropsten.etherscan.io/address/0xc7db35F95af0eaD09f556305e28affB12cB2FA1E#contracts

I can see that you have created https://github.com/zeppelinos/zos/issues/1062

I’m curious if I should verify the contract then manually also for the Proxy contract as this is the final contract that people will see on etherscan.io following the transaction. What do you think?

1 Like

You should be able to manually verify the Proxy contract, though assume you would want to provide a guide to the tokens users that the smart contract is upgradeable and where they can find the Proxy contract and the Logic contract.

1 Like

Btw, haven’t tried it out yet to update a contract. Can you recommend a good tutorial?

1 Like

Hi @itinance

A first upgrade tutorial:

A tutorial on testing the upgrade on a public testnet:

1 Like

Hi @itinance,

Guide on how to verify the Proxy contract:

1 Like