hashgraph / hedera-sourcify

Tools for verifying Hedera smart contracts using standard open source libraries.
Apache License 2.0
6 stars 7 forks source link

Ensure `hardhat-verify` plugin works properly in our Sourcify instance #109

Closed acuarica closed 5 months ago

acuarica commented 6 months ago

There is a Hardhat plugin that allows developers to verify contracts using Etherscan and Sourcify.

Developers who use Hardhat in their workflow may use this plugin for verification. So it's important for our users to support this plugin as well. Moreover, we can leverage this plugin as an e2e test when we expose API access for our Sourcify instance.

It looks like this plugin allows for API endpoint customization. See https://github.com/NomicFoundation/hardhat/blob/377796b177deb1bb3585d4460c0dc9bd0f3a98b1/packages/hardhat-verify/src/internal/config.ts#L34-L46. We may be able to use this to point to our instance.

Ultimately, we need to ensure a developer who installs hardhat-verify and configure the verification with our instance, can run npx hardhat verify successfully.

svienot commented 6 months ago

I made a very quick tour of the toolsets listed by sourcify.dev in this issue: #597

acuarica commented 6 months ago

They added this new configuration recently https://github.com/NomicFoundation/hardhat/commit/8ce560230f766e1acbc3f9218000ddea75d922ce 😄 . We should be able to integrate with this plugin.

acuarica commented 5 months ago

Confirmed that our sourcify instance works with hardhat-verify plugin. Docs have been added in

acuarica commented 5 months ago

Although it works, there might be an unrelated Etherscan error showing in the hardhat output. To suppress it, it is needed to manually disable Etherscan verification since hardhat doesn't do it automatically[1]

etherscan: {
  enabled: false,
}

[1] https://github.com/NomicFoundation/hardhat/issues/4776#issuecomment-1914860689