Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds config for base networks on testing and prod. #227

Merged
merged 3 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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=
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fill these out with examples as well (like you did for Sepolia and Ethereum) 🤔

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