Skip to content

Commit

Permalink
feat: Add contract verification
Browse files Browse the repository at this point in the history
  • Loading branch information
wsdt committed Feb 14, 2024
1 parent 2c6f6a8 commit ffafa57
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ LIGHTBRIDGE_AIRDROP_ENABLED=false
# Optional
LIGHTBRIDGE_POLLING_INTERVAL=
LIGHTBRIDGE_BLOCK_RANGE_PER_POLLING=

# Etherscan
ETHERSCAN_API_KEY=

54 changes: 53 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,41 @@
import { HardhatUserConfig } from 'hardhat/types'
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-waffle'
import "@nomiclabs/hardhat-etherscan";

require('dotenv').config()

const LOCAL_PK = '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'

const config: HardhatUserConfig = {
const config: HardhatUserConfig & {etherscan: {apiKey: any, customChains: any}} = {
mocha: {
timeout: 200000,
},
networks: {
mainnet: {
url: 'https://eth.llamarpc.com',
accounts: [process.env.DEPLOYER_PK ?? LOCAL_PK],
},
bsc: {
url: 'https://binance.llamarpc.com',
accounts: [process.env.DEPLOYER_PK ?? LOCAL_PK],
},
arbitrumOne: {
url: 'https://1rpc.io/arb',
accounts: [process.env.DEPLOYER_PK ?? LOCAL_PK],
},
optimisticEthereum: {
url: 'https://rpc.optimism.gateway.fm',
accounts: [process.env.DEPLOYER_PK ?? LOCAL_PK],
},
boba_eth_mainnet: {
url: 'https://boba-ethereum.gateway.tenderly.co',
accounts: [process.env.DEPLOYER_PK ?? LOCAL_PK],
},
boba_bnb_mainnet: {
url: 'https://gateway.tenderly.co/public/boba-bnb',
accounts: [process.env.DEPLOYER_PK ?? LOCAL_PK],
},
boba_sepolia: {
url: 'https://sepolia.boba.network',
accounts: [process.env.DEPLOYER_PK ?? LOCAL_PK],
Expand Down Expand Up @@ -44,6 +69,33 @@ const config: HardhatUserConfig = {
cache: "./cache",
artifacts: "./artifacts"
},
etherscan: {
apiKey: {
sepolia: process.env.ETHERSCAN_API_KEY,
arbitrumOne: "",
bsc: "",
mainnet: process.env.ETHERSCAN_API_KEY,
optimisticEthereum: "",
},
customChains: [
{
network: "boba_eth_mainnet",
chainId: 288,
urls: {
apiURL: "",
browserURL: "",
},
},
{
network: "boba_bnb_mainnet",
chainId: 56288,
urls: {
apiURL: "",
browserURL: "",
},
}
],
}
}

export default config
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@bobanetwork/contracts": "0.0.2",
"@eth-optimism/core-utils": "0.8.1",
"@nomiclabs/hardhat-ethers": "^2.0.2",
"@nomiclabs/hardhat-etherscan": "^3.1.8",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"@types/chai": "^4.3.10",
"@types/mocha": "^8.2.3",
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,7 @@
resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz#b41053e360c31a32c2640c9a45ee981a7e603fe0"
integrity sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg==

"@nomiclabs/hardhat-etherscan@^3.1.0":
"@nomiclabs/hardhat-etherscan@^3.1.0", "@nomiclabs/hardhat-etherscan@^3.1.8":
version "3.1.8"
resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.8.tgz#3c12ee90b3733e0775e05111146ef9418d4f5a38"
integrity sha512-v5F6IzQhrsjHh6kQz4uNrym49brK9K5bYCq2zQZ729RYRaifI9hHbtmK+KkIVevfhut7huQFEQ77JLRMAzWYjQ==
Expand Down

0 comments on commit ffafa57

Please sign in to comment.