-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unrelated Etherscan verification message appears when verifying with a custom Sourcify instance #4776
Comments
Hey @acuarica, what's going on here is that Etherscan is enabled by default (and Sourcify is disabled by default). If you want to only use Sourcify, then you need to explicitly disable Etherscan: etherscan: {
enabled: false,
} |
@fvictorio this appears to work when I run from CLI (thanks!) but not when I run programmatically
❓ is there a way to disable
and for reference, here's the hardhat config used: const hardhatConfig = {
solidity: {
version: '0.8.20',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
networks: {
hardhat: {
accounts,
},
hederatestnet: {
chainId: 296,
url: rpcUrlHederatestnet,
gasMultiplier: 1.1,
accounts,
},
},
sourcify: {
enabled: true,
apiUrl: 'https://server-verify.hashscan.io',
browserUrl: 'https://repository-verify.hashscan.io',
},
etherscan: {
enabled: false,
},
mocha: {
timeout: 6_000_000,
},
}; and the code used within await hre.run('verify:verify', {
address: deployedAddress,
}); Note that if I replace the above const shellExecStr = `npx hardhat verify --network "${hre.network.name}" "${deployedAddress}"`;
const { stdout, stderr } = await childProcessExecAsPromise(shellExecStr);
console.log(stdout);
console.error(stderr); |
Self answering my previous question:
On a lark, I tried await hre.run('verify:sourcify', {
address: deployedAddress,
}); So it looks like the remedy will likely need to be some combination of the following:
|
@fvictorio do you want me to open a new/separate github issue for the programmatic thing described above? |
Hi @bguiz, the behavior you described for the programmatic verification was implemented the last week, it will be available in the next release. Regarding the doc, feel free to send a PR :) |
Version of Hardhat
2.19.4
What happened?
I'm working on the verification service for the Hedera network, which uses a custom instance of Sourcify. I wanted to validate that the
hardhat-verify
plugin works with our instance. It works well, but theverify
task shows an unrelated Etherscan error message.I created a new project, configure it with Hedera testnet, and deploy the sample contract. When I want to verify it with the
hardhat-verify
plugin, I got the following outputI expected the first part of the output, but the Etherscan message seems unrelated.
Minimal reproduction steps
Create a new Hardhat project, install its dependencies and use the following
hardhat.config.js
Then run
Verification in the custom Sourcify instance works well, but an unrelated Etherscan error message is displayed.
Search terms
verify hardhat-verify hedera sourcify etherscan
The text was updated successfully, but these errors were encountered: