-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.cjs
37 lines (35 loc) · 987 Bytes
/
hardhat.config.cjs
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
36
37
require("@nomicfoundation/hardhat-toolbox");
require('ts-node/register');
require('dotenv').config();
// Get API key from environment variable
const INFURA_API_KEY = process.env.INFURA_API_KEY || "";
const PRIVATE_KEY = process.env.PRIVATE_KEY || "";
/** @type {import('hardhat/config').HardhatUserConfig} */
module.exports = {
solidity: "0.8.19",
networks: {
hardhat: {
chainId: 1337
},
localhost: {
url: "http://127.0.0.1:8545"
},
sepolia: {
url: `https://sepolia.infura.io/v3/${INFURA_API_KEY}`,
accounts: [PRIVATE_KEY],
chainId: 11155111
},
mainnet: {
url: `https://mainnet.infura.io/v3/${INFURA_API_KEY}`,
accounts: [PRIVATE_KEY],
chainId: 1,
gasPrice: 580000000 // 0.58 gwei, you can change this to your desired gas price or follow https://etherscan.io/gastracker
}
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts"
}
};