Skip to content

Commit

Permalink
Adds config for base networks on testing and prod.
Browse files Browse the repository at this point in the history
  • Loading branch information
steven2308 committed Aug 15, 2023
1 parent de41370 commit df7b4d3
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 21 deletions.
10 changes: 7 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
ETHERSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
SEPOLIA_URL=
ETHEREUM_URL=
SEPOLIA_URL=https://eth-sepolia.g.alchemy.com/v2/<YOUR ALCHEMY KEY>
ETHEREUM_URL=https://eth-mainnet.g.alchemy.com/v2/<YOUR ALCHEMY KEY>
POLYGON_URL=https://polygon-mainnet.g.alchemy.com/v2/<YOUR API KEY>
MUMBAI_URL=
BASE_URL=
BASE_GOERLI_URL=
PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1
MOONRIVER_MOONSCAN_APIKEY=ABC123
MOONBEAM_MOONSCAN_APIKEY=ABC123
POLYGONSCAN_API_KEY=ABC123
POLYGONSCAN_API_KEY=ABC123
BASE_API_KEY=ABC123
71 changes: 53 additions & 18 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const config: HardhatUserConfig = {
evmVersion: 'london',
optimizer: {
enabled: true,
runs: 200,
runs: 100,
},
outputSelection: {
'*': {
Expand All @@ -41,20 +41,14 @@ const config: HardhatUserConfig = {
},
},
networks: {
moonbaseAlpha: {
url: 'https://rpc.testnet.moonbeam.network',
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
gasPrice: 1000000000,
},
moonriver: {
url: 'https://rpc.api.moonriver.moonbeam.network',
chainId: 1285, // (hex: 0x505),
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
hardhat: {
allowUnlimitedContractSize: true,
},
moonbeam: {
url: 'https://rpc.api.moonbeam.network',
chainId: 1284, // (hex: 0x504),
moonbaseAlpha: {
url: 'https://rpc.testnet.moonbeam.network/',
chainId: 1287,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
gasPrice: 1100000000,
},
sepolia: {
url: process.env.SEPOLIA_URL || '',
Expand All @@ -67,18 +61,39 @@ const config: HardhatUserConfig = {
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
gasPrice: 135000000000,
},
baseGoerli: {
chainId: 84531,
url: process.env.BASE_GOERLI_URL || 'https://goerli.base.org',
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
gasPrice: 2000000000,
},
moonriver: {
url: 'https://rpc.api.moonriver.moonbeam.network',
chainId: 1285, // (hex: 0x505),
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
moonbeam: {
url: 'https://rpc.api.moonbeam.network',
chainId: 1284, // (hex: 0x504),
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
mainnet: {
url: process.env.ETHEREUM_URL || '',
chainId: 1,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
gasPrice: 12000000000,
gasPrice: 13000000000,
},
polygon: {
url: process.env.POLYGON_URL || '',
chainId: 137,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
gasPrice: 120000000000,
},
base: {
chainId: 8453,
url: process.env.BASE_URL,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
},
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
Expand All @@ -88,14 +103,34 @@ const config: HardhatUserConfig = {
},
etherscan: {
apiKey: {
moonriver: process.env.MOONRIVER_MOONSCAN_APIKEY || '', // Moonriver Moonscan API Key
moonbaseAlpha: process.env.MOONBEAM_MOONSCAN_APIKEY || '', // Moonbeam Moonscan API Key
moonbeam: process.env.MOONBEAM_MOONSCAN_APIKEY || '', // Moonbeam Moonscan API Key
sepolia: process.env.ETHERSCAN_API_KEY || '', // Sepolia Etherscan API Key
polygonMumbai: process.env.POLYGONSCAN_API_KEY || '', // Polygon Mumbai Etherscan API Key
polygonMumbai: process.env.POLYGON_ETHERSCAN_API_KEY || '', // Polygon Mumbai Etherscan API Key
baseGoerli: process.env.BASE_API_KEY || '', // Base Goerli Etherscan API Key
moonriver: process.env.MOONRIVER_MOONSCAN_APIKEY || '', // Moonriver Moonscan API Key
moonbeam: process.env.MOONBEAM_MOONSCAN_APIKEY || '', // Moonbeam Moonscan API Key
mainnet: process.env.ETHERSCAN_API_KEY || '', // Ethereum Etherscan API Key
polygon: process.env.POLYGONSCAN_API_KEY || '', // Polygon Etherscan API Key
polygon: process.env.POLYGON_ETHERSCAN_API_KEY || '', // Polygon Etherscan API Key
base: process.env.BASE_API_KEY || '', // Base Etherscan API Key
},
customChains: [
{
network: "baseGoerli",
chainId: 84531,
urls: {
apiURL: "https://api-goerli.basescan.org/api",
browserURL: "https://goerli.basescan.org"
}
},
{
network: "base",
chainId: 8453,
urls: {
apiURL: "https://api.basescan.org/api",
browserURL: "https://basescan.org"
}
}
]
},
dodoc: {
runOnCompile: false,
Expand Down

0 comments on commit df7b4d3

Please sign in to comment.