-
Notifications
You must be signed in to change notification settings - Fork 60
/
hardhat.config.ts
84 lines (80 loc) · 2.03 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
import { config as dotEnvConfig } from 'dotenv';
import type { HardhatUserConfig } from 'hardhat/types';
import '@nomicfoundation/hardhat-ethers';
import '@nomicfoundation/hardhat-network-helpers';
import '@nomicfoundation/hardhat-verify';
import '@nomicfoundation/hardhat-chai-matchers';
import '@typechain/hardhat';
import '@openzeppelin/hardhat-upgrades';
import 'hardhat-deploy';
import 'solidity-coverage';
dotEnvConfig();
const CONTRACTS_DEPLOYER_KEY = process.env.CONTRACTS_DEPLOYER_KEY || '';
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY || '';
const INFURA_API_KEY = process.env.INFURA_API_KEY || '';
const RPC_URL = process.env.RPC_URL || 'http://127.0.0.1:8545';
const config: HardhatUserConfig = {
defaultNetwork: 'hardhat',
solidity: {
compilers: [
{
version: '0.8.9',
settings: {
optimizer: {
enabled: true,
runs: 10000,
},
},
},
],
},
mocha: {
timeout: 180_000,
},
networks: {
hardhat: {
accounts: {
count: 128,
},
},
localhost: {
url: 'http://127.0.0.1:8545/',
},
custom: {
url: 'http://127.0.0.1:8545/',
},
sepolia: {
url: `https://sepolia.infura.io/v3/${INFURA_API_KEY}`,
accounts: CONTRACTS_DEPLOYER_KEY ? [CONTRACTS_DEPLOYER_KEY] : [],
},
beta5: {
url: RPC_URL,
accounts: CONTRACTS_DEPLOYER_KEY
? [CONTRACTS_DEPLOYER_KEY]
: {
mnemonic:
'test test test test test test test test test test test junk',
},
deploy: ['deploy/beta5'],
chainId: 11155111,
},
beta5devnet: {
url: RPC_URL,
accounts: CONTRACTS_DEPLOYER_KEY
? [CONTRACTS_DEPLOYER_KEY]
: {
mnemonic:
'test test test test test test test test test test test junk',
},
deploy: ['deploy/beta5devnet'],
chainId: 11155111,
},
},
typechain: {
outDir: 'typechain',
},
etherscan: {
apiKey: ETHERSCAN_API_KEY,
},
};
export default config;