-
Notifications
You must be signed in to change notification settings - Fork 32
/
hardhat.config.ts
110 lines (104 loc) · 3.32 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
import * as dotenv from "dotenv";
import { HardhatUserConfig, task } from "hardhat/config";
// This adds support for typescript paths mappings
// import "tsconfig-paths/register";
import "@nomiclabs/hardhat-etherscan";
import "@nomiclabs/hardhat-waffle";
import "@nomiclabs/hardhat-web3";
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-solhint";
// import "@openzeppelin/hardhat-upgrades";
import "hardhat-contract-sizer";
import "hardhat-gas-reporter";
import "@typechain/hardhat";
import "solidity-coverage";
require("hardhat-tracer");
dotenv.config();
import * as tdly from "@tenderly/hardhat-tenderly";
tdly.setup();
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
const config: HardhatUserConfig = {
solidity: {
version: "0.8.13",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
// // About the gas reporter options ---> https://github.com/cgewecke/eth-gas-reporter/blob/master/README.md
// gasReporter: {
// currency: "USD",
// token: "MATIC",
// gasPriceApi:
// "https://api.polygonscan.com/api?module=proxy&action=eth_gasPrice",
// rst: true, // Output with a reStructured text code-block directive
// rstTitle: true, // "Gas Usage",
// showTimeSpent: true,
// },
networks: {
hardhat: {
forking: {
url: process.env.POLYGON_NODE_URL || "",
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
enabled: true,
chainId: 10,
},
},
polygon: {
url: process.env.POLYGON_NODE_URL,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
blockGasLimit: 20000000,
gasPrice: 100000000000
},
optimism: {
url: process.env.OPTIMISM_NODE_URL,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
blockGasLimit: 20000000,
},
maticmum: {
url: process.env.MUMBAI_NODE_URL,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
blockGasLimit: 20000000,
},
localhost: {
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
url: 'http://127.0.0.1:8545/'
},
tenderly: {
chainId: Number(process.env.TENDERLY_NETWORK_ID),
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
url: process.env.TENDERLY_NODE_URL,
},
},
mocha: {
timeout: 0,
},
etherscan: {
// Your API key for Etherscan/Polygonscan
// Obtain one at https://etherscan.io/, https://polygonscan.com/
apiKey: process.env.ETHERSCAN_API_KEY,
},
contractSizer: {
alphaSort: true,
runOnCompile: true,
disambiguatePaths: false,
},
tenderly: {
username: process.env.TENDERLY_USERNAME,
project: "ricochet",
forkNetwork: process.env.TENDERLY_NETWORK_ID,
privateVerification: false,
},
plugins: ["solidity-coverage"],
namedAccounts: {
deployer: {
default: "0x3226C9EaC0379F04Ba2b1E1e1fcD52ac26309aeA", // here this will by default take the first account as deployer
"localhost": '0x3226C9EaC0379F04Ba2b1E1e1fcD52ac26309aeA', // but for rinkeby it will be a specific address
},
// TODO: Alice, Bob, Carl, Karen
}
};
export default config;