How to verify an implementation contract of a proxy?

I'm trying to verify two implementation contracts:
1 - 0xc9315D92Fa99FA76047e16D194b6c5CccE128df7
2 - 0xD26F8df7147aDd0dF6b50Db79727420B0d898313
on Rinkeby.
How can I do this using hardhat?
I'm trying to run the following command:

npx hardhat verify 0xD26F8df7147aDd0dF6b50Db79727420B0d898313 --network rinkeby

But I'm receiving this error:

[Error: ENOENT: no such file or directory, open '/Users/nick/Documents/Tesi/Blockchain/Upgrade/artifacts/build-info/281f2067fb83a6b26740a1acca551840.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/nick/Documents/Tesi/Blockchain/Upgrade/artifacts/build-info/281f2067fb83a6b26740a1acca551840.json'
}

Here's the solution: https://ethereum.stackexchange.com/questions/121176/error-when-trying-to-verify-contract

Also consult the proxy section in our guide on verification:

Hardhat is really having problem with those caches, they make you feel you have an error

1 Like