-
Notifications
You must be signed in to change notification settings - Fork 11
/
hardhat.config.js
47 lines (43 loc) · 970 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
36
37
38
39
40
41
42
43
44
45
46
47
require("dotenv").config({ path: "./.env.local" });
require("@nomiclabs/hardhat-ethers");
if (process.env.CHAIN_SCAN_TOKEN) {
require("@nomiclabs/hardhat-etherscan");
}
/**
* @type import('hardhat/config').HardhatUserConfig
*/
if (process.env.CHAIN_SCAN_TOKEN) {
module.exports = {
solidity: "0.8.4",
paths: {
artifacts: "./artifacts",
},
networks: {
hardhat: {
chainId: 1337,
forking: {
url: "https://rpc.ftm.tools/",
blockNumber: 24066833,
},
},
mainnet: {
url: process.env.NETWORK_RPC,
accounts: [`0x${process.env.WALLET_PK}`],
},
testnet: {
url: `https://rpc.testnet.fantom.network/`,
accounts: [`0x${process.env.WALLET_PK}`],
},
},
etherscan: {
apiKey: process.env.CHAIN_SCAN_TOKEN,
},
};
} else {
module.exports = {
solidity: "0.8.4",
paths: {
artifacts: "./artifacts",
},
};
}