-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
56 lines (54 loc) · 1.33 KB
/
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
48
49
50
51
52
53
54
55
56
require('@nomiclabs/hardhat-etherscan');
require('@nomiclabs/hardhat-ethers');
require('@nomiclabs/hardhat-waffle');
require("@nomiclabs/hardhat-truffle5");
require("@nomiclabs/hardhat-ganache");
require('hardhat-deploy');
require('hardhat-deploy-ethers');
require('hardhat-tracer');
require("dotenv").config();
const PRIVATE_KEY = process.env.PRIVATE_KEY;
const ANOTHER_PRIVATE_KEY = process.env.ANOTHER_PRIVATE_KEY;
const FTM_KEY = process.env.FTM_KEY;
if (!process.env.PRIVATE_KEY) {
throw new Error("ENV Variable PRIVATE_KEY not set!");
}
if (!process.env.ANOTHER_PRIVATE_KEY) {
throw new Error("ENV Variable ANOTHER_PRIVATE_KEY not set!");
}
if (!process.env.FTM_KEY) {
throw new Error("ENV Variable FTM_KEY not set!");
}
module.exports = {
solidity: {
version: '0.8.11',
settings: {
optimizer: {
enabled: true,
runs: 800,
}
}
},
networks: {
hardhat: {
forking: {
url: "http://localhost:8545",
// url: 'https://rpc.ftm.tools',
},
chainId: 250
},
localhost: {
url: "http://localhost:8545",
timeout: 2000000000,
accounts: [PRIVATE_KEY, ANOTHER_PRIVATE_KEY]
},
fantom: {
chainId: 250,
url: 'https://rpc.ftm.tools',
accounts: [PRIVATE_KEY, ANOTHER_PRIVATE_KEY]
}
},
etherscan: {
apiKey: FTM_KEY
}
}