generated from peersky/bootstrap_solidity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
115 lines (113 loc) · 3.2 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
105
106
107
108
109
110
111
112
113
114
115
import { task } from "hardhat/config";
import "@nomicfoundation/hardhat-chai-matchers";
import "@nomicfoundation/hardhat-toolbox";
import "hardhat-abi-exporter";
import "hardhat-gas-reporter";
import "hardhat-contract-sizer";
import "hardhat-deploy";
import "solidity-docgen";
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
export default {
docgen: {
outputDir: "./docs/contracts",
pages: "single",
sourcesDir: "./src",
pageExtension: ".md",
exclude: ["mocks", "initializers", "vendor", "modifiers", "fixtures"],
},
gasReporter: {
currency: "USD",
gasPrice: 21,
token: "MATIC",
gasPriceApi:
"https://api.polygonscan.com/api?module=proxy&action=eth_gasPrice",
enabled: false,
coinmarketcap: process.env.COINMARKETCAP_KEY,
},
namedAccounts: {
deployer: {
hardhat: "0xF52E5dF676f51E410c456CC34360cA6F27959420",
anvil: "0x6Cf8d74C7875de8C2FfB09228F4bf2A21b25e583",
default: "0xF52E5dF676f51E410c456CC34360cA6F27959420", //TODO this must be set for networks
},
owner: {
default: "0x520E00225C4a43B6c55474Db44a4a44199b4c3eE",
anvil: "0x507c2d32185667156de5B4C440FEEf3800078bDb",
},
},
defaultNetwork: "hardhat",
networks: {
hardhat: {
accounts: {
mnemonic:
"casual vacant letter raw trend tool vacant opera buzz jaguar bridge myself",
}, // ONLY LOCAL
},
mumbai: {
url: "https://matic-mumbai.chainstacklabs.com",
accounts: process.env.PRIVATE_KEY && [process.env.PRIVATE_KEY],
},
matic: {
url: process.env.RPC_URL ?? "",
accounts: process.env.PRIVATE_KEY && [process.env.PRIVATE_KEY],
},
ganache: {
url: process.env.GANACHE_RPC_URL ?? "",
accounts: process.env.PRIVATE_KEY && [process.env.PRIVATE_KEY],
},
goerli: {
url: process.env.RPC_URL ?? "",
accounts: process.env.PRIVATE_KEY && [process.env.PRIVATE_KEY],
},
localhost: {
url: "http://127.0.0.1:8545",
accounts: {
mnemonic:
"casual vacant letter raw trend tool vacant opera buzz jaguar bridge myself",
}, // ONLY LOCAL
},
anvil: {
url: process.env.ANVIL_RPC_URL ?? "",
accounts: {
mnemonic: process.env.ANVIL_MNEMONIC ?? "x",
},
},
},
paths: {
sources: "./src",
},
solidity: {
compilers: [
{
version: "0.8.20",
settings: {
optimizer: {
enabled: true,
runs: 200000,
},
},
},
],
},
typechain: {
outDir: "types",
target: "ethers-v5",
alwaysGenerateOverloads: true, // should overloads with full signatures like deposit(uint256) be generated always, even if there are no overloads?
// externalArtifacts: ["externalArtifacts/*.json"], // optional array of glob patterns with external artifacts to process (for example external libs from node_modules)
},
abiExporter: {
path: "./abi",
runOnCompile: true,
clear: true,
format: "json",
// flat: true,
// only: [":ERC20$"],
spacing: 2,
pretty: false,
},
};