-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.ts
64 lines (58 loc) · 1.4 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
import { HardhatUserConfig } from 'hardhat/config';
import { networkConfig } from './utils/config-loader';
import * as dotenv from 'dotenv';
import '@nomiclabs/hardhat-truffle5';
import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-web3';
import '@nomiclabs/hardhat-etherscan';
import '@nomicfoundation/hardhat-chai-matchers';
import 'hardhat-gas-reporter';
import 'solidity-coverage';
dotenv.config();
loadAndValidateEnvironment();
const config: HardhatUserConfig = {
solidity: {
compilers: [{ version: '0.8.17' }],
settings: {
optimizer: {
enabled: true,
runs: 999999,
details: {
yul: true
}
}
}
},
paths: {
root: 'src',
tests: 'tests'
},
networks: {
// Define here to easily specify private keys
localhost: {
url: 'http://127.0.0.1:8545',
accounts: []
},
devnet: {
url: 'https://rpc.dev.immutable.com',
accounts: []
},
testnet: {
url: 'https://rpc.testnet.immutable.com',
accounts: []
},
mainnet: {
url: 'https://rpc.immutable.com',
accounts: []
},
},
mocha: {
timeout: process.env.COVERAGE ? 15 * 60 * 1000 : 30 * 1000
},
};
export default config;
function loadAndValidateEnvironment(): boolean {
return !!process.env.DEPLOYER_PRIV_KEY &&
!!process.env.WALLET_IMPL_CHANGER_PRIV_KEY &&
!!process.env.DEPLOYER_CONTRACT_ADDRESS;
}