I use hardhat to verify proxy contract but they said things like
"@nomiclabs/hardhat-etherscan: The address provided as argument contains a contract, but its bytecode doesn't match any of your local contracts."
Hi
I follow what is can via link you did provide.. here is what I try on
I do fresh deploy with clean code , removed all comment
remove all artifacts and other contract npx hardhat clean
verify implement contract via npx hardhat verify --network rinkeby 0x58Bd8Dc8a85fcb34E63C41Ca4254C42E4d3E990A
which virified as it always did
this is implement contract
verify Proxy via npx hardhat verify --network rinkeby 0x01921c4864a233B485A4619fDb876e2F4fb66E98
this is Proxy contract
which still got hardhat error
"Error in plugin @nomiclabs/hardhat-etherscan: The address provided as argument contains a contract, but its bytecode doesn't match any of your local contracts."
I need more help..
i think about ABI generation issue here
"When you meet this error, please check the following one by one, making sure that it matches what you used to deploy exactly: contract source code, compiler version, compiler optimizations and runs number, constructor parameters, address of libraries."
well i did check on contract source code, compiler version. its seem ok
and contract have no constructor
so no idea where and how to check "compiler optimizations and runs number"
It may be possible but we only provide support for up to "similar match". Note that similar match is generally good enough for proxies. Unless someone requests an exact match there is no reason for you to go the extra mile in my opinion.
If you want to give it a shot you can use the JSON input I shared here:
i see this mention in Proxy verify link you send me..
but How i can included those dependencies in the verification request via ether scan plugin? npx hardhat verify --network mainnet DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1"
in "Constructor argument 1" right?? do to have to turn Json into kind of string??
Sorry @Anthony_Joe, just saw this. But imports do not go as arguments to hardhat verify. Only constructor arguments. Imports are handled automatically by Hardhat.
For other questions related to verification of proxies please refer to our guide: