NomicFoundation / hardhat

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
https://hardhat.org
Other
7k stars 1.35k forks source link

Linking proxy with its implementation - hardhat verify:verify #5405

Open reddigszymon opened 2 weeks ago

reddigszymon commented 2 weeks ago

Hello. I've got a contract that is using the UUPS proxy pattern.

I am able to deploy it without a problem, but when trying to verify it using verify:verify i get this warning in the console:

Warning 1: Failed to link proxy XXX with its implementation. Reason: This contract does not look like it contains any delegatecall opcode sequence.

I've searched everywhere for this error/warning but didn't find anything about it.

My contract has the initialize function + _authorizeUpgrade function, also it inherits correctly from UUPSUpgradeable/Initializable/OwnableUpgradeable.

Has anyone seen this issue before?

kanej commented 2 weeks ago

I don't think this error is coming from Hardhat verify, instead it is likely coming from the underlying block explorer.

Is the contract showing up as verified on the block explorer?

reddigszymon commented 2 weeks ago

It does show as verified, but it also has this written: This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

I am just wondering if this warning is in any way dangerous to me, and the smart contracts that I've created.

This is happening on the Sepolia Testnet.

kanej commented 1 week ago

I suspect this is additional functionality that etherscan provides to add information for proxies.

I would check the Etherscan docs and knowledge guide: https://info.etherscan.com/