-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhardhat.config.js
80 lines (76 loc) · 1.75 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
require('@nomiclabs/hardhat-waffle');
require('hardhat-deploy');
require('hardhat-deploy-ethers');
require('solidity-coverage');
// Truffle and Web3.js plugin
require('@nomiclabs/hardhat-web3');
require('@nomiclabs/hardhat-truffle5');
require('@nomiclabs/hardhat-etherscan');
require('dotenv').config();
const fs = require('fs');
let key_beta;
try {
key_beta = fs
.readFileSync('.secret_beta')
.toString()
.trim();
} catch (err) {
console.log('No available .secret_beta');
}
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
compilers: [
{
version: '0.8.10',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
namedAccounts: {
deployer: {
default: 0,
},
},
networks: {
beta: {
accounts: key_beta ? [key_beta] : [],
chainId: 137,
url: 'https://polygon-beta.furucombo.app/',
},
hardhat: {
forking: {
url: process.env.POLYGON_MAINNET_NODE,
},
chainId: 137, // hardhat sets 31337 as chainId rather than a forked chainId, so we set here.
accounts: {
mnemonic:
'dice shove sheriff police boss indoor hospital vivid tenant method game matter',
path: "m/44'/60'/0'/0",
initialIndex: 0,
},
initialBaseFeePerGas: 0,
gasPrice: 0,
gas: 30000000,
},
prod: {
url: process.env.PROD_URL || 'https://rpc.ankr.com/polygon/',
chainId: process.env.PROD_CHAIN_ID || 137,
accounts:
process.env.PROD_SECRET !== undefined ? [process.env.PROD_SECRET] : [],
},
},
mocha: {
timeout: 900000,
},
etherscan: {
apiKey: process.env.ETHERSCAN_KEY || '',
},
};