Commit e56097ec authored by Elena Gesheva's avatar Elena Gesheva Committed by GitHub

Merge pull request #1398 from ethereum-optimism/add-etherscan-verification-support

Add etherscan verification support
parents 41509617 888dafca
---
'@eth-optimism/contracts': patch
---
Add etherscan verification support
...@@ -10,6 +10,7 @@ import { ...@@ -10,6 +10,7 @@ import {
// Hardhat plugins // Hardhat plugins
import '@nomiclabs/hardhat-ethers' import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-waffle' import '@nomiclabs/hardhat-waffle'
import '@nomiclabs/hardhat-etherscan'
import 'hardhat-deploy' import 'hardhat-deploy'
import '@typechain/hardhat' import '@typechain/hardhat'
import '@eth-optimism/hardhat-ovm' import '@eth-optimism/hardhat-ovm'
...@@ -24,6 +25,8 @@ import 'hardhat-gas-reporter' ...@@ -24,6 +25,8 @@ import 'hardhat-gas-reporter'
dotenv.config() dotenv.config()
const enableGasReport = !!process.env.ENABLE_GAS_REPORT const enableGasReport = !!process.env.ENABLE_GAS_REPORT
const privateKey = process.env.PRIVATE_KEY ||
"0x0000000000000000000000000000000000000000000000000000000000000000"; // this is to avoid hardhat error
const config: HardhatUserConfig = { const config: HardhatUserConfig = {
networks: { networks: {
...@@ -41,6 +44,20 @@ const config: HardhatUserConfig = { ...@@ -41,6 +44,20 @@ const config: HardhatUserConfig = {
ovm: true, ovm: true,
saveDeployments: false, saveDeployments: false,
}, },
'optimism-kovan': {
chainId: 69,
url: 'https://kovan.optimism.io',
accounts: [privateKey],
gasPrice: 15000000,
ovm: true,
},
'optimism-mainnet': {
chainId: 10,
url: 'https://mainnet.optimism.io',
accounts: [privateKey],
gasPrice: 15000000,
ovm: true,
},
}, },
mocha: { mocha: {
timeout: 50000, timeout: 50000,
...@@ -81,6 +98,9 @@ const config: HardhatUserConfig = { ...@@ -81,6 +98,9 @@ const config: HardhatUserConfig = {
gasPrice: 100, gasPrice: 100,
outputFile: process.env.CI ? 'gas-report.txt' : undefined, outputFile: process.env.CI ? 'gas-report.txt' : undefined,
}, },
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
} }
if ( if (
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
"@ethersproject/abstract-signer": "^5.4.1", "@ethersproject/abstract-signer": "^5.4.1",
"@ethersproject/contracts": "^5.4.1", "@ethersproject/contracts": "^5.4.1",
"@ethersproject/hardware-wallets": "^5.4.0", "@ethersproject/hardware-wallets": "^5.4.0",
"@nomiclabs/hardhat-etherscan": "^2.1.5",
"glob": "^7.1.6" "glob": "^7.1.6"
}, },
"devDependencies": { "devDependencies": {
......
...@@ -734,7 +734,7 @@ ...@@ -734,7 +734,7 @@
"@ethersproject/logger" "^5.4.0" "@ethersproject/logger" "^5.4.0"
"@ethersproject/properties" "^5.4.0" "@ethersproject/properties" "^5.4.0"
"@ethersproject/address@5.4.0", "@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.0", "@ethersproject/address@^5.0.4", "@ethersproject/address@^5.4.0": "@ethersproject/address@5.4.0", "@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.0", "@ethersproject/address@^5.0.2", "@ethersproject/address@^5.0.4", "@ethersproject/address@^5.4.0":
version "5.4.0" version "5.4.0"
resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.4.0.tgz#ba2d00a0f8c4c0854933b963b9a3a9f6eb4a37a3" resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.4.0.tgz#ba2d00a0f8c4c0854933b963b9a3a9f6eb4a37a3"
integrity sha512-SD0VgOEkcACEG/C6xavlU1Hy3m5DGSXW3CUHkaaEHbAPPsgi0coP5oNPsxau8eTlZOk/bpa/hKeCNoK5IzVI2Q== integrity sha512-SD0VgOEkcACEG/C6xavlU1Hy3m5DGSXW3CUHkaaEHbAPPsgi0coP5oNPsxau8eTlZOk/bpa/hKeCNoK5IzVI2Q==
...@@ -1900,6 +1900,19 @@ ...@@ -1900,6 +1900,19 @@
resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.2.tgz#c472abcba0c5185aaa4ad4070146e95213c68511" resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.2.tgz#c472abcba0c5185aaa4ad4070146e95213c68511"
integrity sha512-6quxWe8wwS4X5v3Au8q1jOvXYEPkS1Fh+cME5u6AwNdnI4uERvPlVjlgRWzpnb+Rrt1l/cEqiNRH9GlsBMSDQg== integrity sha512-6quxWe8wwS4X5v3Au8q1jOvXYEPkS1Fh+cME5u6AwNdnI4uERvPlVjlgRWzpnb+Rrt1l/cEqiNRH9GlsBMSDQg==
"@nomiclabs/hardhat-etherscan@^2.1.5":
version "2.1.5"
resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-2.1.5.tgz#bfd09784dbd0982dbab27f28ca4fb4671b1cd5f6"
integrity sha512-Vxm1hcVrpgNg1yf/oBjkMuOpjz88cq9UiFUHdmnLNDgXfGNb+J/BtuZSCiVnRaS81OeEeXfjrTA5B31UiscaLA==
dependencies:
"@ethersproject/abi" "^5.1.2"
"@ethersproject/address" "^5.0.2"
cbor "^5.0.2"
debug "^4.1.1"
fs-extra "^7.0.1"
node-fetch "^2.6.0"
semver "^6.3.0"
"@nomiclabs/hardhat-waffle@^2.0.1": "@nomiclabs/hardhat-waffle@^2.0.1":
version "2.0.1" version "2.0.1"
resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-waffle/-/hardhat-waffle-2.0.1.tgz#5d43654fba780720c5033dea240fe14f70ef4bd2" resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-waffle/-/hardhat-waffle-2.0.1.tgz#5d43654fba780720c5033dea240fe14f70ef4bd2"
...@@ -4560,6 +4573,14 @@ caseless@^0.12.0, caseless@~0.12.0: ...@@ -4560,6 +4573,14 @@ caseless@^0.12.0, caseless@~0.12.0:
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
cbor@^5.0.2:
version "5.2.0"
resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.2.0.tgz#4cca67783ccd6de7b50ab4ed62636712f287a67c"
integrity sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A==
dependencies:
bignumber.js "^9.0.1"
nofilter "^1.0.4"
chai-as-promised@^7.1.1: chai-as-promised@^7.1.1:
version "7.1.1" version "7.1.1"
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0" resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0"
...@@ -10785,6 +10806,11 @@ node-releases@^1.1.75: ...@@ -10785,6 +10806,11 @@ node-releases@^1.1.75:
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.75.tgz#6dd8c876b9897a1b8e5a02de26afa79bb54ebbfe" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.75.tgz#6dd8c876b9897a1b8e5a02de26afa79bb54ebbfe"
integrity sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw== integrity sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==
nofilter@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz#78d6f4b6a613e7ced8b015cec534625f7667006e"
integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA==
noms@0.0.0: noms@0.0.0:
version "0.0.0" version "0.0.0"
resolved "https://registry.yarnpkg.com/noms/-/noms-0.0.0.tgz#da8ebd9f3af9d6760919b27d9cdc8092a7332859" resolved "https://registry.yarnpkg.com/noms/-/noms-0.0.0.tgz#da8ebd9f3af9d6760919b27d9cdc8092a7332859"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment