-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.config.ts
104 lines (101 loc) · 2.54 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
import '@nomiclabs/hardhat-waffle';
import '@nomiclabs/hardhat-ethers';
import '@typechain/hardhat';
import '@nomiclabs/hardhat-etherscan';
import { config as dotEnvConfig } from 'dotenv';
import { HardhatUserConfig } from 'hardhat/types';
import 'solidity-coverage';
dotEnvConfig();
const PRIVATE_KEY: string =
process.env.PRIVATE_KEY ??
'0x0000000000000000000000000000000000000000000000000000000000000000';
const INFURA_API_KEY: string = process.env.INFURA_API_KEY ?? '';
const ETHERSCAN_API_KEY: string = process.env.ETHERSCAN_API_KEY ?? '';
const POLYSCAN_API_KEY: string = process.env.POLYSCAN_API_KEY ?? '';
const config: HardhatUserConfig = {
defaultNetwork: 'hardhat',
networks: {
hardhat: {},
mainnet: {
url: 'https://mainnet.infura.io/v3/' + INFURA_API_KEY,
accounts: [PRIVATE_KEY],
},
sepolia: {
url: 'https://sepolia.infura.io/v3/' + INFURA_API_KEY,
accounts: [PRIVATE_KEY],
},
polygon: {
url: 'https://polygon-mainnet.infura.io/v3/' + INFURA_API_KEY,
accounts: [PRIVATE_KEY],
},
polygonAmoy: {
url: 'https://polygon-amoy.infura.io/v3/' + INFURA_API_KEY,
accounts: [PRIVATE_KEY],
},
bellecour: {
url: 'https://bellecour.iex.ec',
accounts: [PRIVATE_KEY],
},
'dev-native': {
chainId: 65535,
gasPrice: 0,
blockGasLimit: 6_700_000,
hardfork: 'berlin',
url: process.env.RPC_URL ?? 'http://localhost:8545',
accounts: [PRIVATE_KEY],
},
},
etherscan: {
apiKey: {
mainnet: ETHERSCAN_API_KEY,
sepolia: ETHERSCAN_API_KEY,
polygon: POLYSCAN_API_KEY,
polygonAmoy: POLYSCAN_API_KEY,
bellecour: 'abc',
},
customChains: [
{
network: 'bellecour',
chainId: 134,
urls: {
apiURL: 'https://blockscout-bellecour.iex.ec/api',
browserURL: 'https://blockscout-bellecour.iex.ec',
},
},
{
network: 'polygonAmoy',
chainId: 80002,
urls: {
apiURL: 'https://api-amoy.polygonscan.com/api',
browserURL: 'https://amoy.polygonscan.com/',
},
},
],
},
solidity: {
compilers: [
{
version: '0.6.12',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: '0.8.15',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
typechain: {
outDir: 'typechain',
},
};
module.exports = config;