Skip to content
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

hardhat-verify support for L2 testnets #4607

Closed
michalinacienciala opened this issue Nov 21, 2023 · 7 comments
Closed

hardhat-verify support for L2 testnets #4607

michalinacienciala opened this issue Nov 21, 2023 · 7 comments
Labels
status:ready This issue is ready to be worked on

Comments

@michalinacienciala
Copy link

michalinacienciala commented Nov 21, 2023

Describe the feature

As Goerli testnet deprecates with the end of the year, a lot of L2 networks change their testnets from Goerli-based to Sepolia-based. Along with those changes, the scan websites also add the support for Sepolia-based L2 testnets. But so far hardhat-verify does not include those new chains in https://github.com/NomicFoundation/hardhat/blob/main/packages/hardhat-verify/src/internal/chain-config.ts, which I think means that hardhat-verify will not work for them.
Here are some L2 testnets I would like to see supported:

Search terms

hardhard-verify sepolia arbitrumSepolia baseSepolia optimisticSepolia

@github-project-automation github-project-automation bot moved this to Backlog in Hardhat Nov 21, 2023
@ChristopherDedominici ChristopherDedominici added status:ready This issue is ready to be worked on and removed status:triaging labels Nov 24, 2023
@ChristopherDedominici ChristopherDedominici moved this from Backlog to To-do in Hardhat Nov 24, 2023
@michalinacienciala
Copy link
Author

Btw, the Mumbai testnet is also planned to be deprecated and replaced by the Amoy testnet (name: amoy, chain id: 80002). Not sure when will that happen and when will the polygonscan support it.
Read more:
maticnetwork/heimdall#1096
maticnetwork/bor#1072

@jacek0x
Copy link

jacek0x commented Feb 5, 2024

It would be cool if Base Sepolia were supported.

@schaable
Copy link
Member

schaable commented Feb 5, 2024

Btw, until these networks are added to the chain list, you can still verify contracts by adding them to your hardhat config as custom chains, for example:

etherscan: {
  apiKey: {
    optimismSepolia: "<optimism-sepolia-api-key>"
  },
  customChains: [
    {
      network: "optimismSepolia",
      chainId: 11155420,
      urls: {
        apiURL: "https://api-sepolia-optimistic.etherscan.io/api",
        browserURL: "https://sepolia-optimism.etherscan.io/"
      }
    }
  ]
}

You can read more here.

@jacek0x
Copy link

jacek0x commented Feb 5, 2024

@schaable Awesome, thanks! That worked.

@tazous
Copy link

tazous commented Mar 8, 2024

Btw, the Mumbai testnet is also planned to be deprecated and replaced by the Amoy testnet (name: amoy, chain id: 80002). Not sure when will that happen and when will the polygonscan support it. Read more: maticnetwork/heimdall#1096 maticnetwork/bor#1072

It seems that amoy block explorer won't be polygonscan but oklink as refered here: https://polygon.technology/blog/introducing-the-amoy-testnet-for-polygon-pos
Is there a plan for this plugin to support oklink block explorer as a source verifier api to target ? (the same way sourcify was added)... I found this project if it is helping: https://github.com/enjinstarter/hardhat-oklink-verify/tree/main/src but I would be more confident in using an hardhat supported plugin inside my production environment...

@iPaulPro
Copy link

Goerli is down and https://amoy.polygonscan.com/ is up. Any eta on this?

@schaable
Copy link
Member

schaable commented May 6, 2024

Amoy has been added to the chain list in hardhat-verify and will be available on the next release of the plugin: #5163

@schaable schaable closed this as completed May 6, 2024
@github-project-automation github-project-automation bot moved this from To-do to Done in Hardhat May 6, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:ready This issue is ready to be worked on
Projects
Archived in project
Development

No branches or pull requests

6 participants