-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
57 lines (53 loc) · 1.14 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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "hardhat-gas-reporter";
import "solidity-coverage";
import "dotenv/config";
import "./scripts/deploy-contract";
const getForkInfo = () => {
if (process.env["FORK"]) {
return {
forking: { url: process.env["FORK"] },
};
}
return {};
};
const accounts = process.env.PRIVATE_KEY
? [process.env.PRIVATE_KEY]
: undefined;
const config: HardhatUserConfig = {
solidity: {
version: "0.8.17",
settings: {
optimizer: {
enabled: true,
runs: 10000,
},
},
},
etherscan: {
apiKey: {
mainnet: process.env.MAINNET_ETHERSCAN_API_KEY!,
base: process.env.BASE_ETHERSCAN_API_KEY!
},
},
networks: {
hardhat: {
...getForkInfo(),
},
mainnet: {
name: "Ethereum Mainnet",
chainId: 1,
url: "https://ethereum-rpc.publicnode.com",
etherScanApi: "https://api.etherscan.io",
accounts,
},
base: {
name: "Base Mainnet",
chainId: 8453,
url: "https://base.publicnode.com",
accounts,
},
},
};
export default config;