-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathhardhat.config.ts
98 lines (92 loc) · 1.9 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
/**
* @type import('hardhat/config').HardhatUserConfig
*/
import * as dotenv from "dotenv";
if (process.env.NODE_ENV !== "production") {
dotenv.config();
}
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-web3";
import "@nomiclabs/hardhat-waffle";
import "hardhat-deploy";
import "@openzeppelin/hardhat-upgrades";
import "hardhat-diamond-abi";
import "@typechain/hardhat";
import "hardhat-abi-exporter";
import "solidity-coverage";
import "./tasks/estimate_minting_gas";
const networks: any = {
local: {
gasPrice: 1000000000,
url: `http://localhost:8545`,
},
hardhat: {
deploy: ["deploy-hardhat/"],
},
};
if (process.env.INFURA_KEY) {
if (process.env.DEV_PRIVATE_KEY) {
networks["goerli"] = {
url: `https://goerli.infura.io/v3/${process.env.INFURA_KEY}`,
chainId: 5,
accounts: [process.env.DEV_PRIVATE_KEY],
deploy: ["deploy/"],
verify: {
etherscan: {
apiUrl: "https://api-goerli.etherscan.io/",
},
},
};
} else {
console.warn("Missing env.DEV_PRIVATE_KEY");
}
} else {
console.warn("Missing env.INFURA_KEY");
}
module.exports = {
networks,
solidity: {
version: "0.8.14",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
abiExporter: {
path: "./abi",
clear: true,
},
namedAccounts: {
diamondAdmin: {
default: 0,
},
user: {
default: 1,
},
bidder: {
default: 2,
},
treasury: {
5: "0xC8A14DEe867329D54E911e01561B984378c0675C",
},
},
diamondAbi: [
{
name: "RegistryDiamond",
include: [
"PCOLicenseClaimerFacet",
"GeoWebParcelFacet",
"PCOLicenseParamsFacet",
"ERC721Facet",
],
strict: false,
},
{
name: "PCOLicenseDiamond",
include: ["CFABasePCOFacet", "CFAPenaltyBidFacet"],
strict: true,
},
],
};