OpenZeppelin / openzeppelin-sdk

OpenZeppelin SDK repository for CLI and upgrades.js. No longer actively developed.
MIT License
432 stars 200 forks source link

'zos verify' seems to go on wrong contract address #1062

Open itinance opened 5 years ago

itinance commented 5 years ago

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

What I did:

$ zos verify --remote etherscan --network ropsten --api-key XXXXXXXXX
? Pick a contract xxxToken
? Was the optimizer enabled when you compiled your contracts? Yes
? Specify the optimizer runs 200
✓ Contract source code of xxxToken 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 including its name (ERC20), where still 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" can't not be used therefor.

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

Obviously 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?

abcoathup commented 5 years ago

See the discussion in the forum: https://forum.zeppelin.solutions/t/zos-verify-goes-on-wrong-address/949/2

Currently only logic contracts are verified. zeppelinos/zos#937

spalladino commented 5 years ago

Possible duplicate of #937

spalladino commented 5 years ago

(heh, I just noted you thumbs-up'ed that one @itinance!)

itinance commented 5 years ago

Yes :) @spalladino

itinance commented 5 years ago

@abcoathup sent me to this issue