-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.config.ts
108 lines (96 loc) · 2.66 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/* eslint-disable no-constant-condition */
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { resolve } from 'path';
import 'hardhat-deploy-ethers';
import 'hardhat-storage-layout';
import {
addPublicNetwork,
setForkingUrl,
} from '@jarvis-network/hardhat-utils/dist/networks';
import { addEtherscanApiKeys } from '@jarvis-network/hardhat-utils/dist/etherscan';
import {
modifiyGetMinimumBuild,
modifiyVerifyMinimumBuild,
modifyCompile,
modifyTest,
modifyAccounts,
modifyDeploy,
compile,
} from '@jarvis-network/hardhat-utils/dist/tasks';
modifiyGetMinimumBuild();
modifiyVerifyMinimumBuild();
modifyCompile(
require.resolve('./contracts/test/ImportAll.sol'),
resolve('./deploy'),
);
modifyTest(
require.resolve('./contracts/test/ImportAll.sol'),
resolve('./deploy'),
);
modifyAccounts();
modifyDeploy(resolve('.'));
compile();
export const config = {
solidity: {
compilers: [
{
version: '0.8.9',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
paths: {
root: '.',
sources: './deploy',
artifacts: './artifacts',
cache: './cache',
tests: './test',
},
networks: {
hardhat: {
gas: 11500000,
blockGasLimit: 11500000,
allowUnlimitedContractSize: false,
},
localhost: {
url: 'http://127.0.0.1:8545',
},
},
mocha: {
timeout: 18000000,
},
};
addEtherscanApiKeys(config);
addPublicNetwork(config, 1, process.env.ETHEREUM_PROJECT_ID!);
addPublicNetwork(config, 3, process.env.ETHEREUM_PROJECT_ID!);
addPublicNetwork(config, 4, process.env.ETHEREUM_PROJECT_ID!);
addPublicNetwork(config, 42, process.env.ETHEREUM_PROJECT_ID!);
addPublicNetwork(config, 5, process.env.ETHEREUM_PROJECT_ID!);
addPublicNetwork(config, 56);
addPublicNetwork(config, 77);
addPublicNetwork(config, 97);
addPublicNetwork(config, 100);
addPublicNetwork(config, 137, process.env.POLYGON_PROJECT_ID!);
addPublicNetwork(config, 250);
addPublicNetwork(config, 4002);
addPublicNetwork(config, 80001, process.env.POLYGON_PROJECT_ID!);
addPublicNetwork(config, 43113);
addPublicNetwork(config, 43114);
addPublicNetwork(config, 420, process.env.OPTIMISM_GOERLI_PROJECT_ID!);
addPublicNetwork(config, 10, process.env.OPTIMISM_PROJECT_ID!);
addPublicNetwork(config, 421613, process.env.ARBITRUM_GOERLI_PROJECT_ID!);
addPublicNetwork(config, 42161, process.env.ARBITRUM_PROJECT_ID!);
// set hardat forking for public testnets
if (process.env.FORKCHAINID) {
setForkingUrl(
config,
parseInt(process.env.FORKCHAINID, 10),
process.env.BLOCK ? parseInt(process.env.BLOCK, 10) : undefined,
);
}
export default config;