-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathhardhat.config.js
97 lines (93 loc) · 2.4 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
require('@nomiclabs/hardhat-ethers');
require('@openzeppelin/hardhat-upgrades');
require("@nomiclabs/hardhat-etherscan");
require('hardhat-abi-exporter');
require('hardhat-contract-sizer');
const { deployerWalletPrivateKey } = require('./secrets.json');
const { bscscanAPIkey, polygonscanAPIkey, avaAPIkey, etherscan } = require('./secrets.json');
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
version: "0.8.11",
settings: {
optimizer: {
enabled: true,
runs: 20
}
}
},
defaultNetwork: "bsctestnet",
hardhat: {
loggingEnabled: true,
mining: {
auto: false,
interval: 10
},
accounts: {
accountsBalance: "100000000000000000000000"
}
},
networks: {
ethmainnet: {
url: "https://mainnet.infura.io/v3/aedc2f89691644c5ad87877903d280b8",
accounts: [deployerWalletPrivateKey],
},
bsctestnet: {
url: "https://speedy-nodes-nyc.moralis.io/cb02b6b8ff2cdd26f1db08a4/bsc/testnet",
chainId: 97,
accounts: [deployerWalletPrivateKey],
},
bscmainnet: {
url: `https://bsc-dataseed1.binance.org/`,
accounts: [deployerWalletPrivateKey],
},
polygonmainnet: {
url: `https://rpc-mainnet.maticvigil.com/`,
accounts: [deployerWalletPrivateKey],
},
polygontestnet: {
url: `https://rpc-mumbai.maticvigil.com/`,
accounts: [deployerWalletPrivateKey],
},
avalancheTestnet: {
url: 'https://api.avax-test.network/ext/bc/C/rpc',
gasPrice: 225000000000,
//gas: 10000000,
chainId: 43113,
accounts: [deployerWalletPrivateKey],
},
avalancheMainnet: {
url: 'https://api.avax.network/ext/bc/C/rpc',
gasPrice: 225000000000,
chainId: 43114,
accounts: [deployerWalletPrivateKey]
}
},
etherscan: {
apiKey: bscscanAPIkey
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts"
},
chai: {
enableTimeouts: false,
timeout: 200000,
before_timeout: 120000 // Here is 2min but can be whatever timeout is suitable for you.
},
mocha: {
enableTimeouts: false,
timeout: 200000,
before_timeout: 120000 // Here is 2min but can be whatever timeout is suitable for you.
},
contractSizer: {
alphaSort: true,
disambiguatePaths: false,
runOnCompile: true,
strict: true
}
};