make sepolia and mainnet hardhat networks optional
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 33s Details

This commit is contained in:
Ladd Hoffman 2024-04-18 14:12:50 -05:00
parent 4e2ce3a261
commit 2b480a63f2
2 changed files with 18 additions and 8 deletions

View File

@ -107,6 +107,12 @@ or
npm install
1. Copy the example configuration file
cp .env.example .env
1. In `.env`, set a value for `SEED_PHRASE` or `LOCAL_PRIVATE_KEY`
1. Run a hardhat node
npx hardhat node

View File

@ -12,14 +12,18 @@ module.exports = {
: [process.env.LOCAL_PRIVATE_KEY],
chainId: 1337,
},
sepolia: {
url: `https://sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: [process.env.SEPOLIA_PRIVATE_KEY],
},
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: [process.env.MAINNET_PRIVATE_KEY],
},
...process.env.SEPOLIA_PRIVATE_KEY ? {
sepolia: {
url: `https://sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: [process.env.SEPOLIA_PRIVATE_KEY],
},
} : {},
...process.env.MAINNET_PRIVATE_KEY ? {
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: [process.env.MAINNET_PRIVATE_KEY],
},
} : {},
},
etherscan: {
apiKey: {