Skip to content

Modernize Etherscan verification with a supported Hardhat plugin #185

Open

Description

@mswilkison

PR #125 proposed moving contract verification from hardhat-deploy's etherscan-verify task to @nomiclabs/hardhat-etherscan. That plugin is now deprecated in favor of @nomicfoundation/hardhat-verify. This issue retains the requirement for a supported verification flow for contracts that are still maintained and deployed.

As clarified in cygnusv's comment, the retired TokenStaking deployment and its proxy do not need to be reconciled or verified as part of this work. PR #173 is therefore not a prerequisite. Keep this verification task coordinated with the toolchain refresh in #182.

Acceptance criteria:

  • Identify the contracts and networks that still require deployment verification, excluding the retired TokenStaking deployment/proxy from this issue's required scope.
  • Select a supported @nomicfoundation/hardhat-verify version compatible with the maintained Hardhat/Ethers stack and register/configure it explicitly.
  • Replace the current etherscan-verify integration in deployment/CI for those active contracts, preserving their constructor arguments and deployment metadata.
  • Document the verification commands and configuration, and validate against an existing supported testnet deployment.
  • Audit @openzeppelin/hardhat-upgrades usage before removing it. Current deployment scripts and tests still import it, and pending Support safe Sepolia staking upgrades and operator setup #176/fix(deploy): make published scripts compatible with ethers v5/v6 and replay #186 use proxy tooling; removal must account for retained consumer/testnet behavior rather than follow solely from mainnet TokenStaking retirement.

The artifact/action upgrades from #170/#164 are consolidated in #182; they are CI maintenance and do not add verification requirements here.

References: #125, #182; plugin deprecation notice.

Activity

  1. linear commented on Sep 8, 2026

    @linear
  2. cygnusv commented on Sep 8, 2026

    @cygnusv
    Contributor

    No need to reconcile with tokenstaking since that contract (and associated proxy) is no longer used. That also implies that OZ upgrades plugin is not required, I think, because AFAIK, it was only used for that contract. If that's accurate, that should greatly simplify the tasks ahead.

  3. mswilkison commented on Sep 8, 2026

    @mswilkison
    ContributorAuthor

    Implementation: #190, stacked on #182's Hardhat 2 / ethers 5 toolchain. It registers @nomicfoundation/hardhat-verify 2.1.3, replaces the legacy CI task for the four non-staking deployment records, preserves constructor arguments and compiler artifacts, documents the commands, and retains the upgrades plugin for existing consumers/tests.

    Validation passes locally (388 tests, including the real verification plugin with local deployments and stubbed explorer responses). A read-only preflight also matched the existing Sepolia T deployment at 0x4f261630173D2FA1e2b081c460636DE9672B7149 to its source and compiler. An authenticated Etherscan submission still needs the configured CI API key; no key is available in this session, so this final acceptance check remains open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions