From 7600aff80cd24b695956c20c64b9a533d7196848 Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Sun, 2 May 2021 15:09:22 -0400 Subject: [PATCH] Add truffle-plug-verify for new contract verifications --- README.md | 2 +- example.secrets.json | 3 ++- package-lock.json | 60 +++++++++++++++++++++++++++++++++++++++++--- package.json | 3 ++- truffle-config.js | 8 +++++- 5 files changed, 68 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 88eeba0..3965c1c 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ An Ethereum ERC20 token minted by my cat, Karma. -[Ropsten ERC20 Token](https://ropsten.etherscan.io/token/0x6f502849750960cdb3c225bedab6a05065f85855) +[Ropsten ERC20 Token](https://ropsten.etherscan.io/token/0x5Fd2d64C7223D2D67eA287EA1c4Cb95e03209c84) diff --git a/example.secrets.json b/example.secrets.json index 9027824..e7b8093 100644 --- a/example.secrets.json +++ b/example.secrets.json @@ -1,4 +1,5 @@ { "alchemyApiUrl": "https://eth-ropsten.alchemyapi.io/v2/YOUR_ALCHEMY_API_KEY", - "mnemonic": "word word word word word word word word word word word" + "mnemonic": "word word word word word word word word word word word", + "etherscanApiKey": "SOMEREALLYLONGKEYFROMETHERSCAN" } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index fc5cd63..3ed16f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7382,6 +7382,12 @@ "safe-buffer": "^5.0.1" } }, + "circular": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/circular/-/circular-1.0.5.tgz", + "integrity": "sha1-fad6+Yu96c5LWzWM1Va13e0tMUk=", + "dev": true + }, "circular-json": { "version": "0.5.9", "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.9.tgz", @@ -7412,6 +7418,22 @@ "restore-cursor": "^2.0.0" } }, + "cli-logger": { + "version": "0.5.40", + "resolved": "https://registry.npmjs.org/cli-logger/-/cli-logger-0.5.40.tgz", + "integrity": "sha1-CX8OEbByx8aYomxH9YiinCC0iws=", + "dev": true, + "requires": { + "circular": "^1.0.5", + "cli-util": "~1.1.27" + } + }, + "cli-regexp": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/cli-regexp/-/cli-regexp-0.1.2.tgz", + "integrity": "sha1-a82TsJ+y7RAl0woRVdWZeVSlNRI=", + "dev": true + }, "cli-spinners": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.0.tgz", @@ -7419,6 +7441,15 @@ "dev": true, "optional": true }, + "cli-util": { + "version": "1.1.27", + "resolved": "https://registry.npmjs.org/cli-util/-/cli-util-1.1.27.tgz", + "integrity": "sha1-QtaeNqBAoyH8nPhRwVE8rcUJMFQ=", + "dev": true, + "requires": { + "cli-regexp": "~0.1.0" + } + }, "cliui": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", @@ -8112,8 +8143,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", - "dev": true, - "optional": true + "dev": true }, "delayed-stream": { "version": "1.0.0", @@ -9871,8 +9901,7 @@ "version": "1.14.0", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.0.tgz", "integrity": "sha512-0vRwd7RKQBTt+mgu87mtYeofLFZpTas2S9zY+jIeuLJMNvudIgF52nr19q40HOwH5RrhWIPuj9puybzSJiRrVg==", - "dev": true, - "optional": true + "dev": true }, "for-each": { "version": "0.3.3", @@ -19112,6 +19141,29 @@ "original-require": "^1.0.1" } }, + "truffle-plugin-verify": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/truffle-plugin-verify/-/truffle-plugin-verify-0.5.7.tgz", + "integrity": "sha512-q26VTkrpzI0lS8D1j8nKG2+2cmTwc7rkDkdtvbWKAdUV+5Ijemgeo8PeQBNKKFsTqYo1ebG7IWTLE+B/7KFo1A==", + "dev": true, + "requires": { + "axios": "^0.21.1", + "cli-logger": "^0.5.40", + "delay": "^5.0.0", + "querystring": "^0.2.1" + }, + "dependencies": { + "axios": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "dev": true, + "requires": { + "follow-redirects": "^1.10.0" + } + } + } + }, "ts-invariant": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.4.4.tgz", diff --git a/package.json b/package.json index 1c44720..41ae76a 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "devDependencies": { "@openzeppelin/contracts": "^4.0.0", "@truffle/hdwallet-provider": "^1.3.0", - "truffle": "^5.3.3" + "truffle": "^5.3.3", + "truffle-plugin-verify": "^0.5.7" } } diff --git a/truffle-config.js b/truffle-config.js index e28d069..9e9a838 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -19,13 +19,19 @@ */ const HDWalletProvider = require('@truffle/hdwallet-provider'); -const { alchemyApiUrl, mnemonic } = require('./secrets.json'); +const { alchemyApiUrl, mnemonic, etherscanApiKey } = require('./secrets.json'); // const infuraKey = "fj4jll3k....."; // // const fs = require('fs'); // const mnemonic = fs.readFileSync(".secret").toString().trim(); module.exports = { + plugins: [ + 'truffle-plugin-verify' + ], + api_keys: { + etherscan: etherscanApiKey + }, /** * Networks define how you connect to your ethereum client and let you set the * defaults web3 uses to send transactions. If you don't specify one truffle