-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
68 lines (62 loc) · 1.41 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
import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-etherscan';
import '@nomiclabs/hardhat-waffle';
import '@typechain/hardhat';
import dotenv from 'dotenv';
import fs from 'fs';
import 'hardhat-abi-exporter';
import 'hardhat-deploy';
import { HardhatUserConfig } from 'hardhat/config';
dotenv.config();
if (fs.existsSync('typechain-types')) {
require('./scripts/end-mint');
require('./scripts/get-nft-owners');
require('./scripts/gas-price');
require('./scripts/mint');
require('./scripts/start-mint');
}
const {
MAINNET_RPC_URL,
ROPSTEN_RPC_URL,
PRIVATE_KEY,
ETHERSCAN_API_KEY,
RINKEBY_RPC_URL,
} = process.env;
const privateKeys = PRIVATE_KEY ? [`0x${PRIVATE_KEY}`] : undefined;
const config: HardhatUserConfig = {
solidity: {
version: '0.8.12',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
paths: {
sources: 'contracts/',
tests: 'contracts/tests',
},
networks: {
hardhat: {},
ropsten: {
url: ROPSTEN_RPC_URL,
accounts: privateKeys,
},
rinkeby: {
url: RINKEBY_RPC_URL,
accounts: privateKeys,
},
mainnet: {
url: MAINNET_RPC_URL,
accounts: privateKeys,
},
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: ETHERSCAN_API_KEY,
},
};
// eslint-disable-next-line import/no-default-export
export default config;