-
Notifications
You must be signed in to change notification settings - Fork 5
/
hardhat.config.ts
87 lines (79 loc) · 2.02 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
import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-etherscan';
import '@typechain/hardhat';
import dotenv from 'dotenv';
import fs from 'fs';
import 'hardhat-deploy';
import { HardhatUserConfig } from 'hardhat/config';
dotenv.config();
if (fs.existsSync('typechain-types')) {
// bluebonnet merkle tree generation
require('./scripts/bluebonnet-01-fetch-minters');
require('./scripts/bluebonnet-02-download-images');
require('./scripts/bluebonnet-03-gen-nft-json');
require('./scripts/bluebonnet-04-prepare-merkle');
require('./scripts/bluebonnet-05-gen-merkle-tree');
// bluebonnet admin tasks
require('./scripts/bluebonnet-start-mint');
require('./scripts/classic-merkle');
require('./scripts/end-mint');
require('./scripts/get-nft-owners');
require('./scripts/gas-price');
require('./scripts/mint');
require('./scripts/mint-special');
require('./scripts/reset-has-minted');
require('./scripts/set-merkle-root');
require('./scripts/start-mint');
require('./scripts/sweep-eth');
}
const {
MAINNET_RPC_URL,
ROPSTEN_RPC_URL,
PRIVATE_KEY,
ETHERSCAN_API_KEY,
RINKEBY_RPC_URL,
SEPOLIA_RPC_URL,
} = process.env;
const privateKeys = PRIVATE_KEY ? [`0x${PRIVATE_KEY}`] : undefined;
const config: HardhatUserConfig = {
solidity: {
version: '0.8.9',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
paths: {
sources: 'contracts/',
tests: 'contracts/test',
},
networks: {
hardhat: {},
ropsten: {
url: ROPSTEN_RPC_URL,
accounts: privateKeys,
},
rinkeby: {
url: RINKEBY_RPC_URL,
accounts: privateKeys,
},
mainnet: {
url: MAINNET_RPC_URL,
accounts: privateKeys,
},
sepolia: {
url: SEPOLIA_RPC_URL,
chainId: 11155111,
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;