diff --git a/README.md b/README.md index f24d11c..be15980 100644 --- a/README.md +++ b/README.md @@ -7,19 +7,18 @@ Please, read [extra guides here](guides-examples.md). ## Networks - Avalanche Fuji (43113) -- Optimism Goerli (420) ## Contracts ### Avalanche Fuji (43113) -- AccessManagement: [0x7953C478A5F5d53C263Bd1251BfC4c418d8C5568](https://avalanche.testnet.routescan.io/address/0x7953C478A5F5d53C263Bd1251BfC4c418d8C5568#code) (✅ verified) -- Hub: [0xE69cEa099bde1f729a13C4D9eD41E0E6C5b8873b](https://avalanche.testnet.routescan.io/address/0xE69cEa099bde1f729a13C4D9eD41E0E6C5b8873b#code) (✅ verified) +- AccessManagement: +- Hub: -### Optimism Goerli (420) +### Mumbai (80001) -- AccessManagement: [0x483E5D5a59EeB5dB9c2AAC502Da40fab173b8DF2](https://goerli-optimism.etherscan.io/address/0x483E5D5a59EeB5dB9c2AAC502Da40fab173b8DF2#code) (✅verified) -- Hub: [0x27aAd1692fD0F11C39c69c5412E52cCEf15045BD](https://goerli-optimism.etherscan.io/address/0x27aAd1692fD0F11C39c69c5412E52cCEf15045BD#code) (✅verified) +- AccessManagement: +- Hub: ## Getting Started diff --git a/config/accounts.ts b/config/accounts.ts index 30cea4d..0f999cd 100644 --- a/config/accounts.ts +++ b/config/accounts.ts @@ -1,3 +1,4 @@ -export const evmAccounts = [ - String(process.env.ACCOUNTS_PRIVATE_KEY_1) // owner +export const evmAccounts: string[] = [ + process.env.ACCOUNTS_PRIVATE_KEY_1!, + process.env.ACCOUNTS_PRIVATE_KEY_2! ] diff --git a/config/chains.ts b/config/chains.ts index 9a8253a..40c42c4 100644 --- a/config/chains.ts +++ b/config/chains.ts @@ -32,39 +32,42 @@ export const avalancheFuji: Chain = { gasPrice: 25000000000 } -export const optimismGoerli: Chain = { - id: 420, - name: 'Optimism Goerli', - network: 'optimism-goerli', - nativeCurrency: { name: 'Goerli Ether', symbol: 'ETH', decimals: 18 }, +export const polygonMumbai: Chain = { + id: 80_001, + name: 'Polygon Mumbai', + network: 'maticmum', accounts: evmAccounts, + nativeCurrency: { name: 'MATIC', symbol: 'MATIC', decimals: 18 }, rpcUrls: { protocol: { - http: [process.env.PUBLIC_NETWORK_420_HTTP_RPC!] + http: [process.env.PUBLIC_NETWORK_80001_HTTP_RPC!] + }, + infura: { + http: ['https://polygon-mumbai.infura.io/v3'] }, default: { - http: ['https://goerli.optimism.io'] + http: ['https://rpc.ankr.com/polygon_mumbai'] }, public: { - http: ['https://goerli.optimism.io'] + http: ['https://rpc.ankr.com/polygon_mumbai'] } }, blockExplorers: { etherscan: { - name: 'Etherscan', - url: 'https://goerli-optimism.etherscan.io' + name: 'PolygonScan', + url: 'https://mumbai.polygonscan.com' }, default: { - name: 'Etherscan', - url: 'https://goerli-optimism.etherscan.io' + name: 'PolygonScan', + url: 'https://mumbai.polygonscan.com' } }, contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', - blockCreated: 49461 + blockCreated: 25770160 } }, testnet: true, - gasPrice: 210000 + gasPrice: 25000000000 } diff --git a/config/config.ts b/config/config.ts index f084f01..a9c360d 100644 --- a/config/config.ts +++ b/config/config.ts @@ -1,8 +1,8 @@ import { reduce } from 'lodash' -import { avalancheFuji, optimismGoerli } from './chains' +import { avalancheFuji, polygonMumbai } from './chains' import { Chain } from './types' -export const allowedChains = [avalancheFuji, optimismGoerli] +export const allowedChains = [avalancheFuji, polygonMumbai] export const allowedChainsConfig = reduce( allowedChains, diff --git a/hardhat.config.ts b/hardhat.config.ts index 51b8935..b58f6f8 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -42,7 +42,7 @@ const config: HardhatUserConfig = { settings: { optimizer: { enabled: true, - runs: 800 + runs: 200 } } }, @@ -52,10 +52,10 @@ const config: HardhatUserConfig = { }, etherscan: { apiKey: { - mainnet: process.env.ETHERSCAN_API_KEY!, + ethereum: process.env.ETHERSCAN_API_KEY!, + polygonMumbai: process.env.POLYGON_MUMBAI_API_KEY!, // comment if use custom chain - avalancheFujiTestnet: process.env.AVALANCHE_FUJI_API_KEY!, - optimisticGoerli: process.env.OPTIMISM_GOERLI_API_KEY! + avalancheFujiTestnet: process.env.AVALANCHE_FUJI_API_KEY! // uncomment snowtrace if any issue with avalanche fuji // snowtrace: 'snowtrace' }