Skip to content

Conversation

@daveroga
Copy link
Contributor

@daveroga daveroga commented Feb 12, 2026

  • Update hardhat version
  • Update hardhat-verify version
  • Update hardhat-ledger version
  • Fix verification scripts that now requires explicit provider

@coveralls
Copy link

coveralls commented Feb 12, 2026

Pull Request Test Coverage Report for Build 21958227451

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 74 unchanged lines in 24 files lost coverage.
  • Overall coverage decreased (-0.7%) to 93.324%

Files with Coverage Reduction New Missed Lines %
contracts/lib/ClaimBuilder.sol 1 98.55%
contracts/lib/groth16-verifiers/Groth16VerifierAuthV2Wrapper.sol 1 83.33%
contracts/lib/groth16-verifiers/Groth16VerifierLinkedMultiQuery10Wrapper.sol 1 83.33%
contracts/lib/groth16-verifiers/Groth16VerifierMTPWrapper.sol 1 83.33%
contracts/lib/groth16-verifiers/Groth16VerifierSigWrapper.sol 1 83.33%
contracts/lib/groth16-verifiers/Groth16VerifierV3Wrapper.sol 1 83.33%
contracts/lib/PrimitiveTypeUtils.sol 1 89.74%
contracts/payment/VCPayment.sol 1 99.22%
contracts/test-helpers/RequestValidatorStub.sol 1 95.83%
contracts/validators/auth/EthIdentityValidator.sol 1 80.0%
Totals Coverage Status
Change from base Build 21939099728: -0.7%
Covered Lines: 2796
Relevant Lines: 2996

💛 - Coveralls

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Hardhat toolchain (Hardhat + verify + ledger) and adapts the contract verification helper/config to work with the updated hardhat-verify behavior that requires an explicit provider.

Changes:

  • Bump Hardhat and related plugins (hardhat-verify, hardhat-ledger) and refresh the lockfile accordingly.
  • Remove patch-package usage and delete the previously-applied hardhat-ledger patch.
  • Update verification helper to pass an explicit verification provider (etherscan / blockscout) and update Hardhat network account configuration to be shared across networks.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
patches/README.md Removes documentation for the removed patch-package workflow.
patches/@nomicfoundation+hardhat-ledger+3.0.1.patch Deletes the hardhat-ledger patch previously applied during postinstall.
package.json Updates Hardhat/plugin versions and removes patch-package + postinstall.
package-lock.json Lockfile refresh to reflect dependency upgrades/removals.
helpers/helperUtils.ts Adds explicit provider selection for verification calls (etherscan/blockscout).
hardhat.config.ts Refactors network account configuration and updates Blockscout explorer URLs for Billions networks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 95 to 135
@@ -102,6 +103,7 @@ export async function verifyContract(
contract: opts.contract,
constructorArgs: opts.constructorArgsProxy,
libraries: opts.libraries,
provider: chainDescriptor?.blockExplorers?.etherscan ? "etherscan" : "blockscout",
},
hre,
);
@@ -116,6 +118,7 @@ export async function verifyContract(
contract: opts.contract,
constructorArgs: opts.constructorArgsProxyAdmin,
libraries: opts.libraries,
provider: chainDescriptor?.blockExplorers?.etherscan ? "etherscan" : "blockscout",
},
hre,
);
@@ -129,6 +132,7 @@ export async function verifyContract(
contract: opts.contract,
constructorArgs: opts.constructorArgsImplementation,
libraries: opts.libraries,
provider: chainDescriptor?.blockExplorers?.etherscan ? "etherscan" : "blockscout",
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provider selection logic defaults to "blockscout" when chainDescriptor is undefined or doesn't have an etherscan blockExplorer. However, chainDescriptors in hardhat.config.ts only contains entries for chain IDs 6913 and 45056 (billions networks). For all other networks (polygon-mainnet, ethereum-mainnet, etc.) that use Etherscan, chainDescriptor will be undefined, causing the provider to incorrectly default to "blockscout" instead of "etherscan". This will likely cause verification to fail on networks like Polygon Mainnet (137), Ethereum Mainnet (1), etc.

Consider either:

  1. Adding chainDescriptor entries for all networks with proper blockExplorer configuration
  2. Reversing the logic to default to "etherscan" when chainDescriptor is undefined
  3. Using a different mechanism to determine the correct provider for each network

Copilot uses AI. Check for mistakes.

export const LEDGER_ACCOUNT =
process.env.LEDGER_ACCOUNT || "0x0000000000000000000000000000000000000000";
export const LEDGER_ACCOUNT = process.env.LEDGER_ACCOUNT || undefined;
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing LEDGER_ACCOUNT default from "0x0000000000000000000000000000000000000000" to undefined is a breaking change. In hardhat.config.ts, the accounts configuration now uses LEDGER_ACCOUNT in a conditional check. If LEDGER_ACCOUNT is undefined, the condition LEDGER_ACCOUNT ? { ledgerAccounts: [LEDGER_ACCOUNT] } : { ... } will work correctly. However, if users had LEDGER_ACCOUNT set to an empty string in their environment, it will now be treated as truthy and cause ledgerAccounts: [""] to be set, which could lead to errors. Consider checking for both undefined and empty string: LEDGER_ACCOUNT && LEDGER_ACCOUNT.trim() ? ...

Copilot uses AI. Check for mistakes.
Comment on lines 306 to 317
@@ -322,8 +313,8 @@ export default defineConfig({
blockExplorers: {
blockscout: {
name: "billions-mainnet",
url: "https://billions-rpc.eu-north-2.gateway.fm",
apiUrl: "https://billions-rpc.eu-north-2.gateway.fm/api/",
url: "https://explorer.billions.network",
apiUrl: "https://explorer.billions.network/api/",
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The block explorer URLs for billions networks have been updated from gateway.fm endpoints to billions.network endpoints. Please ensure these new endpoints are accessible and support the same API as the old ones, as the verification scripts depend on these URLs being correct.

Copilot uses AI. Check for mistakes.
Comment on lines +23 to +25
"@nomicfoundation/hardhat-ledger": "^3.0.2",
"@nomicfoundation/hardhat-toolbox-mocha-ethers": "^3.0.2",
"@nomicfoundation/hardhat-verify": "^3.0.8",
"@nomicfoundation/hardhat-verify": "^3.0.10",
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch for hardhat-ledger that handled unsupported eth_accounts RPC method in zkEVM networks has been removed with the upgrade to version 3.0.2. Please verify that zkEVM networks (zkevm-mainnet at chainId 1101 and zkevm-cardona at chainId 2442) still work correctly with Ledger accounts after this change. The patch was specifically addressing the fact that zkEVM RPC or CDK chains don't support eth_accounts. If the upstream package hasn't fixed this, deployments to these networks using Ledger accounts may fail.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants