forked from ourzora/nft-editions
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.ts
70 lines (64 loc) · 1.51 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
import "@nomiclabs/hardhat-waffle";
import "@typechain/hardhat";
import "hardhat-gas-reporter";
import "hardhat-deploy";
import "@nomiclabs/hardhat-etherscan";
import { HardhatUserConfig } from "hardhat/config";
import dotenv from 'dotenv';
import "solidity-coverage";
import "hardhat-contract-sizer";
dotenv.config();
const goerliBaseUrl = process.env.GOERLI_URL || "";
const mainnetBaseUrl = process.env.MAINNET_URL || "";
const apiKey = process.env.INFURA_API_KEY || "";
const goerliUrl = goerliBaseUrl.concat(apiKey);
const mainnetUrl = mainnetBaseUrl.concat(apiKey);
/**
* Go to https://hardhat.org/config/ to learn more
* @type import('hardhat/config').HardhatUserConfig
*/
const config: HardhatUserConfig = {
defaultNetwork: 'hardhat',
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
gasReporter: {
currency: 'USD',
gasPrice: 60,
},
networks: {
hardhat: {
forking: {
url: mainnetUrl,
},
},
goerli: {
url: goerliUrl,
accounts:
process.env.TREASURY_PRIVATE_KEY !== undefined
? [process.env.TREASURY_PRIVATE_KEY]
: [],
},
mainnet: {
url: mainnetUrl,
accounts:
process.env.TREASURY_PRIVATE_KEY !== undefined
? [process.env.TREASURY_PRIVATE_KEY]
: [],
},
},
namedAccounts: {
deployer: 0,
purchaser: 0,
},
solidity: {
version: "0.8.19",
settings: {
optimizer: {
enabled: true,
runs: 100,
},
},
},
};
export default config;