From 647ec082cf9cc0eebd2053fa2e6496471e672788 Mon Sep 17 00:00:00 2001 From: Felipe Forbeck Date: Tue, 2 Apr 2024 15:37:49 -0300 Subject: [PATCH] feat: add polygonscan to truffle-verify config --- tasks/verify.ts | 4 ++-- truffle-config.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tasks/verify.ts b/tasks/verify.ts index 8fbcc9442..882afbd16 100755 --- a/tasks/verify.ts +++ b/tasks/verify.ts @@ -30,9 +30,9 @@ const skipContracts = [ const args = process.argv.slice(2); if (!args || args.length === 0) - throw Error("Missing one of the network names: [goerli, mainnet]"); + throw Error("Missing one of the network names: [polygon, mainnet]"); -const network = args[0] || "goerli"; +const network = args[0] || "polygon"; log(`Selected Network: ${network}`); const sleep = (msec: number) => { diff --git a/truffle-config.js b/truffle-config.js index 8b022ceea..4ce8225d7 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -93,8 +93,10 @@ module.exports = { }, }, }, + // Supported chains: https://github.com/rkalis/truffle-plugin-verify?tab=readme-ov-file#supported-chains api_keys: { etherscan: process.env.ETHERSCAN_API_KEY, // Obtain one at https://etherscan.io/myapikey + polygonscan: process.env.POLYGONSCAN_API_KEY, // Obtain one at https://polygonscan.com/myapikey }, plugins: ["truffle-plugin-verify"], };