-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.js
33 lines (29 loc) · 901 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
require("@nomiclabs/hardhat-waffle");
require("dotenv").config();
const fs = require("fs");
const privateKey = fs.readFileSync(".secret").toString();
// 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);
// }
// });
// https://docs.polygon.technology/docs/develop/network-details/network
module.exports = {
solidity: "0.8.4",
networks: {
hardhat: {
chainId: 1337,
},
mumbai: {
// Polygon mumbai
url: `https://polygon-mumbai.infura.io/v3/${process.env.INFURA_POLYGON_MUMBAI_PROJECT_ID}`,
accounts: [privateKey],
},
mainnet: {
// Polygon Mainnet
url: `https://polygon-mainnet.infura.io/v3/${process.env.INFURA_POLYGON_MUMBAI_PROJECT_ID}`,
accounts: [privateKey],
},
},
};