Verify Standalone contracts in OpenZeppelin Contracts Ethereum Package (2.4)?

I get “a contract alias must be specified”, when I try to run sudo npx oz verify

Im doing a simple StandaloneERC20…

What should I do?

1 Like

ok I have manged to verify the proxy contract using manual command Verify with OpenZeppelin SDK

But I still can’t see the ERC20 functions… What do I need to do?

Thanks,

CAA

1 Like

Hey @CIX, can you ellaborate a bit more? What do you mean by see the ERC20 functions? Also, can you share the commands you've run, or the address of your contract(s)?

1 Like

Hi,

@spalladino

This is the proxy contract:

I guess what Im asking is where can I read the Name(), symbol() etc. of the standaloneERC20?

1 Like

@CIX that one looks like a proxy to the Counter contract, not an ERC20. Check out the "read as proxy" etherscan tab, which leads you to the Counter implementation contract.

1 Like

@spalladino

sorry correct address: https://ropsten.etherscan.io/address/0x4a837dd1a2d1f74094a84d23e559db2059500e61#code

I don’t see anything there… I don’t see a tab called “read as proxy”

1 Like

Hey @CIX! You’re right: before the Read as Proxy option is available, you first have to instruct Etherscan to recognise this contract as a Proxy. There is a Is this a proxy? button on the interface: hit it, and follow the instructions. After that, you should be able to Read as Proxy your contract.

2 Likes

Hi @spalladino,

is there a guide to manually do this last step?
seems to me I need to compile the full StandaloneERC20, I managed to flatten StandaloneERC20.sol however Im struggling to get the ABI-encoded…

If I try to do it with “sudo npx oz verify”, I get “A contract alias must be specified”

any idea?

thanks,

CAA

1 Like

That's odd, oz verify should prompt for the name of the contract you want to verify. What version of oz are you using? Are you running the command in your project folder?

The flattened source should be all you need if you are verifying manually, since an implementation contract does not have any constructor parameters (it's handled in a separate initializer).

1 Like

Im running version 2.5.3

1 Like

{
“contracts”: {},
“solidityLibs”: {},
“proxies”: {
@openzeppelin/contracts-ethereum-package/StandaloneERC20”: [
{
“address”: “0x4a837Dd1A2d1f74094a84d23E559Db2059500e61”,
“version”: “2.4.0”,
“implementation”: “0x92B3388fF9f2021aF0Ae3c18CEfcEbB869DA8Fac”,
“admin”: “0xd6eA0c7fb13A3B8eE36DEf2558bBe88C57961Ccf”,
“kind”: “Upgradeable”
}
]
},
“manifestVersion”: “2.2”,
“version”: “1.0.0”,
“dependencies”: {
@openzeppelin/contracts-ethereum-package”: {
“package”: “0x2a9e7B63514438906A83a1e320dBBD814D417002”,
“version”: “2.4.0”
}
},
“proxyAdmin”: {
“address”: “0xd6eA0c7fb13A3B8eE36DEf2558bBe88C57961Ccf”
}
}

this is my ropsten.json

1 Like

Seems like @openzeppelin/contracts-ethereum-package@2.4.0 was not verified on Ropsten. @nventuro could I ask you to verify at least StandaloneERC20?

1 Like

ok let me know if I have to do anything

thanks,

CAA

1 Like

I tried to but failed, regardless of the compiler version I selected (according to the repository information it should be 0.5.11). Apparently @abcoathup had the same issue when verifying the 2.4.0 contracts

1 Like

Hi @nventuro,

what do you recommend, should I move to 2.3.0?

thanks,

CAA

1 Like

Hi @CIX,

Still investigating how to verify version 2.4.0.

There was an issue with version 2.3.0, so I wouldn’t use that.

I verified OpenZeppelin Contracts Ethereum Package version 2.2.3 standalone contracts.

thanks @abcoathup will wait a little and if we can’t verify 2.4.0 I will move to 2.2.3

@CIX we will be working on this early next week. If we cannot solve the issue, we may deploy a new 2.4.1 version with verified contracts, so you can upgrade to it without losing access to the 2.4 features.

2 Likes