mirror of
https://github.com/semaphore-protocol/semaphore.git
synced 2026-01-09 14:48:12 -05:00
chore: add etherscan verification after deployments
Former-commit-id: 03b9aa4198
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import "@nomiclabs/hardhat-ethers"
|
||||
import "@nomiclabs/hardhat-etherscan"
|
||||
import "@nomiclabs/hardhat-waffle"
|
||||
import "@typechain/hardhat"
|
||||
import { config as dotenvConfig } from "dotenv"
|
||||
@@ -64,6 +65,9 @@ const hardhatConfig: HardhatUserConfig = {
|
||||
typechain: {
|
||||
outDir: config.paths.build.typechain,
|
||||
target: "ethers-v5"
|
||||
},
|
||||
etherscan: {
|
||||
apiKey: process.env.ETHERSCAN_API_KEY
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@ async function main() {
|
||||
name: `Verifier${treeDepth}`,
|
||||
address
|
||||
})
|
||||
|
||||
// Verify verifier.
|
||||
await run("verify:verify", { address })
|
||||
}
|
||||
|
||||
// Deploy Semaphore.
|
||||
@@ -19,6 +22,14 @@ async function main() {
|
||||
verifiers: deployedContracts.map((c) => ({ merkleTreeDepth: c.name.substring(8), contractAddress: c.address }))
|
||||
})
|
||||
|
||||
// Verify Semaphore.
|
||||
await run("verify:verify", {
|
||||
address,
|
||||
constructorArguments: [
|
||||
deployedContracts.map((c) => ({ merkleTreeDepth: c.name.substring(8), contractAddress: c.address }))
|
||||
]
|
||||
})
|
||||
|
||||
deployedContracts.push({
|
||||
name: `Semaphore`,
|
||||
address
|
||||
|
||||
Reference in New Issue
Block a user