-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhardhat.config.js
More file actions
99 lines (95 loc) · 2.79 KB
/
hardhat.config.js
File metadata and controls
99 lines (95 loc) · 2.79 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//require("@nomiclabs/hardhat-waffle");
require('@nomiclabs/hardhat-ethers');
require('@openzeppelin/hardhat-upgrades');
require("@nomiclabs/hardhat-etherscan");
const ALCHEMY_API_KEY = "";
const ETH_ALCHEMY_API_KEY = "";
const fs = require('fs');
const MAINNET_PRIVATE_KEY = fs.readFileSync(".secret").toString().trim();
const TESTNET_PRIVATE_KEY = fs.readFileSync(".secret").toString().trim();
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
version: "0.8.18",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
networks: {
mainnet: {
// url: `https://goerli.infura.io/v3/3f6bc0d4637344c8b7efd24e118a5c45`,
url: `https://eth-mainnet.g.alchemy.com/v2/${ETH_ALCHEMY_API_KEY}`,
// url: `https://rpc.ankr.com/eth_goerli`,
accounts: [MAINNET_PRIVATE_KEY],
networkCheckTimeout: 999999,
timeoutBlocks: 200,
gas: 12400000,
gasPrice: 17000000000,
},
goerli: {
// url: `https://goerli.infura.io/v3/3f6bc0d4637344c8b7efd24e118a5c45`,
url: `https://eth-goerli.alchemyapi.io/v2/${ALCHEMY_API_KEY}`,
// url: `https://rpc.ankr.com/eth_goerli`,
accounts: [TESTNET_PRIVATE_KEY],
networkCheckTimeout: 999999,
timeoutBlocks: 200,
gas: 12400000,
gasPrice: 20000000000,
},
avalancheFujiTestnet: {
// url: `https://api.avax-test.network/ext/bc/C/rpc`,
url: `https://rpc.ankr.com/avalanche_fuji`,
accounts: [TESTNET_PRIVATE_KEY]
},
avalanche: {
url: `https://rpc.ankr.com/avalanche`,
accounts: [MAINNET_PRIVATE_KEY],
gasPrice: 28000000000,
},
fxTestnet: {
url: `https://testnet-fx-json-web3.functionx.io:8545`,
accounts: [TESTNET_PRIVATE_KEY],
networkCheckTimeout: 999999,
timeoutBlocks: 200,
gas: 12400000,
gasPrice: 600000000000,
},
local: {
url: `http://192.168.1.115:8545`,
accounts: [TESTNET_PRIVATE_KEY],
networkCheckTimeout: 999999,
timeoutBlocks: 200,
gas: 12400000,
gasPrice: 600000000000,
},
fxMainnet: {
url: `https://fx-json-web3.functionx.io:8545`,
accounts: [MAINNET_PRIVATE_KEY],
networkCheckTimeout: 999999,
timeoutBlocks: 200,
gas: 12400000,
gasPrice: 505000000000,
}
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
// apiKey: "5TQ86X5849114KV5WJXXM7WDYK3AMHSVV9"
apiKey: {
mainnet: "YOUR_ETHERSCAN_API_KEY",
optimisticEthereum: "YOUR_OPTIMISTIC_ETHERSCAN_API_KEY",
arbitrumOne: "YOUR_ARBISCAN_API_KEY",
bscTestnet: "YOUR_BSCSCAN_API_KEY",
avalancheFujiTestnet: "YOUR_SNOWTRACE_API_KEY",
avalanche: "YOUR_SNOWTRACE_API_KEY"
}
},
mocha: {
timeout: 40000
}
};