-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.config.js
35 lines (31 loc) · 968 Bytes
/
hardhat.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require("@nomicfoundation/hardhat-toolbox");
var task = require("hardhat/config").task;
require("dotenv").config({ path: ".env" });
const privateKeys = process.env.METAMASK_PRIVATE_KEYS || ""
/** @type import('hardhat/config').HardhatUserConfig */
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
module.exports = {
solidity: "0.8.18",
networks: {
localhost: {
chainId: 1337
},
ethereum: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: privateKeys.split(",")
},
sepolia: {
url: `https://sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: privateKeys.split(",")
},
goerli: {
url: `https://goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: privateKeys.split(",")
}
}
};