Add Routescan verification provider
Describe the feature
Summary
Introduce a new verification provider Routescan alongside Etherscan and Blockscout. Routescan exposes Etherscan-compatible APIs, so the integration mirrors the existing Etherscan flow (no API key required). This lets users verify contracts on networks where Routescan is available using the standard Hardhat v3 verify UX.
Motivation
- Many L2s/testnets/chains use routescan ase default or backup explorer.
- Users want a first-party verification flow that “just works” without custom scripts.
- Aligns with v3’s multi-provider design (enable/disable providers + per-chain descriptors).
Proposed change (high-level)
-
New provider:
routescan- File:
v-next/hardhat-verify/src/internal/routescan.ts - Implements
VerificationProvider(isVerified/verify/pollVerificationStatus). - Etherscan-compatible request/response handling; no API key.
- File:
-
Wire up config & types:
v-next/hardhat-verify/src/type-extensions.ts: addroutescantoVerificationProvidersUserConfigandVerificationProvidersConfig(enabled: boolean).v-next/hardhat-verify/src/internal/hook-handlers/config.ts: validate/resolveverify.routescan.enabled(default true).
-
Register tasks:
v-next/hardhat-verify/src/internal/tasks/verify/routescan/index.tsv-next/hardhat-verify/src/internal/tasks/verify/routescan/task-action.ts- Keep umbrella
verifybehavior: runs across enabled providers, or target explicitly via:npx hardhat verify routescan --network <network> <address> --contract <FQN>
-
Provider name export:
ROUTESCAN_PROVIDER_NAME: keyof VerificationProvidersConfig = "routescan"(exported fromroutescan.ts).
-
Chain descriptors:
- Update (examples added) in
v-next/hardhat/src/internal/builtin-plugins/network-manager/chain-descriptors.tswith:blockExplorers: { // ... routescan: { name: "Routescan", url: "<browser-viewer-url>", apiUrl: "https://api.routescan.io/v2/network/<env>/evm/<chainId>/etherscan/api", }, }
- Update (examples added) in
-
Index registration:
v-next/hardhat-verify/src/index.ts: include the Routescan task alongside Etherscan/Blockscout.
Notes
- No changes to Hardhat core types required; plugin extends types via
type-extensions.ts.
Search terms
No response
Hey @Migl992, thanks for opening the feature request. Let me ask in the team and then I will update this issue with notes on adding verifiers to HH3.
Appreciate it @kanej working on a PR already. Let me know
Hey @kanej any news on this?
Hey @Migl992, sorry for taking so long to get back to this - we have been heads down getting ready for devconnect.
Our goal is to generalise the hardhat-verify plugin to allow third party plugins to add additional providers. But we don't have a timeline for this.
For the moment, you have the option to create a routescan verification plugin based on the current hardhat-verify code.