Fail to verify with zos verify


I’m trying to verify our logic contract 0xf8146b5796135faa7929a5c0e91fd4bfcc01ab9e used as the implementation of proxy contract 0x6fe56c0bcdd471359019fcbc48863d6c3e9d4f41

I’ve tried the verify option but there’s an error:
zos --verbose verify PropsToken
? Pick a network mainnet
? Was your contract compiled with optimizations enabled? No
? Choose a remote endpoint etherscan
? Enter your Etherscan API key (get one at XXXXXXXXXXVRRB
[2020-08-09T18:34:24.573Z@NetworkController.js#verifyAndPublishContract] Verifying and publishing contract source code of PropsToken on etherscan (this usually takes under 30 seconds)

[2020-08-10T14:02:32.558Z@errors.js#call] Error: Error while trying to verify contract: Fail - Unable to verify
at /Users/jretina/.nvm/versions/node/v8.11.1/lib/node_modules/@openzeppelin/cli/lib/models/Verifier.js:119:19
at Generator.throw ()
at rejected (/Users/jretina/.nvm/versions/node/v8.11.1/lib/node_modules/@openzeppelin/cli/lib/models/Verifier.js:6:65)
at process._tickCallback (internal/process/next_tick.js:188:7)

I also tried to do this on etherscan manually by outputting In Verifier.js the “flattened” contract.
At first it didn’t compile due to missing _approve function.
I added it and tried again but failed due to bytecode not matching (see image)

:computer: Environment
Zos 2.8 (was deployed with 2.2)
Compiler 0.4.24? I’m

Source code for contracts:

1 Like

Hey @jachai! I’ve just managed to verify the contract using etherscan’s UI, using 0.4.24 with optimization disabled. Not sure what the problem was in the first place.

1 Like

Hi @jachai,

Welcome to the community. :wave:

Thanks @spalladino for verifying the implementation contract :pray:

Etherscan has implemented reading and writing for proxy contracts.
It can be found in More Options -> Is this a Proxy.

I have set this for your contract so that the community can read/write as a proxy.