-
Notifications
You must be signed in to change notification settings - Fork 2.7k
/
hardhat.config.ts
83 lines (79 loc) · 2 KB
/
hardhat.config.ts
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
import '@nomiclabs/hardhat-waffle';
import '@nomiclabs/hardhat-solpp';
import '@nomiclabs/hardhat-etherscan';
import 'hardhat-typechain';
import 'hardhat-contract-sizer';
const prodConfig = {
// UPGRADE_NOTICE_PERIOD: 0,
MAX_AMOUNT_OF_REGISTERED_TOKENS: 127,
// PRIORITY_EXPIRATION: 101,
DUMMY_VERIFIER: false,
UPGRADE_FROM_V3: true
};
const testnetConfig = {
UPGRADE_NOTICE_PERIOD: 0,
MAX_AMOUNT_OF_REGISTERED_TOKENS: 127,
// PRIORITY_EXPIRATION: 101,
DUMMY_VERIFIER: false,
UPGRADE_FROM_V3: true
};
const testConfig = {
UPGRADE_NOTICE_PERIOD: 0,
MAX_AMOUNT_OF_REGISTERED_TOKENS: 5,
PRIORITY_EXPIRATION: 101,
DUMMY_VERIFIER: true
};
const localConfig = Object.assign({}, prodConfig);
// @ts-ignore
localConfig.UPGRADE_NOTICE_PERIOD = 0;
localConfig.DUMMY_VERIFIER = process.env.CONTRACTS_TEST_DUMMY_VERIFIER === 'true';
// @ts-ignore
localConfig.EASY_EXODUS = process.env.CONTRACTS_TEST_EASY_EXODUS === 'true';
const contractDefs = {
rinkeby: testnetConfig,
ropsten: testnetConfig,
mainnet: prodConfig,
test: testConfig,
localhost: localConfig
};
export default {
solidity: {
version: '0.7.6',
settings: {
optimizer: {
enabled: true,
runs: 200
},
outputSelection: {
'*': {
'*': ['storageLayout']
}
}
}
},
contractSizer: {
runOnCompile: false
},
paths: {
sources: './contracts'
},
solpp: {
defs: (() => {
if (process.env.CONTRACT_TESTS) {
return contractDefs.test;
}
return contractDefs[process.env.CHAIN_ETH_NETWORK];
})()
},
networks: {
env: {
url: process.env.ETH_CLIENT_WEB3_URL?.split(',')[0]
},
hardhat: {
allowUnlimitedContractSize: true
}
},
etherscan: {
apiKey: process.env.MISC_ETHERSCAN_API_KEY
}
};