-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathhardhat.config.ts
97 lines (90 loc) · 2.7 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
/**
* @type import('hardhat/config').HardhatUserConfig
*/
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-etherscan";
import "@nomiclabs/hardhat-solhint";
import "@typechain/hardhat";
import "dotenv/config";
import "solidity-coverage";
import "hardhat-storage-layout";
import "hardhat-tracer";
import { ethers } from "ethers";
const OPTIMISTIC_ETHERSCAN_API_KEY = process.env.OPTIMISTIC_ETHERSCAN_API_KEY;
const BASE_ETHERSCAN_API_KEY = process.env.BASE_ETHERSCAN_API_KEY;
const GOERLI_ETHERSCAN_API_KEY = process.env.GOERLI_ETHERSCAN_API_KEY;
const GOERLI_URL = process.env.L1_PROVIDER_URL ?? "";
const DEPLOYER_PRIVATE_KEY = process.env.DEPLOYER_PRIVATE_KEY ?? ethers.Wallet.createRandom().privateKey;
module.exports = {
defaultNetwork: "hardhat",
networks: {
optimismGoerli: {
url: "https://goerli.optimism.io",
accounts: [DEPLOYER_PRIVATE_KEY],
},
baseGoerli: {
url: "https://goerli.base.org",
accounts: [DEPLOYER_PRIVATE_KEY],
},
goerli: {
url: GOERLI_URL,
accounts: [DEPLOYER_PRIVATE_KEY],
},
localhost: {},
},
etherscan: {
apiKey: {
optimismGoerli: OPTIMISTIC_ETHERSCAN_API_KEY,
baseGoerli: BASE_ETHERSCAN_API_KEY,
goerli: GOERLI_ETHERSCAN_API_KEY
},
customChains: [
{
network: "optimismGoerli",
chainId: 420,
urls: {
apiURL: "https://api-goerli-optimism.etherscan.io/api",
browserURL: "https://goerli-optimism.etherscan.io"
}
},
{
network: "baseGoerli",
chainId: 84531,
urls: {
browserURL: "https://goerli.basescan.org",
apiURL: "https://api-goerli.basescan.org/api",
}
}
]
},
namedAccounts: {
deployer: {
default: 0, // here this will by default take the first account as deployer
},
},
solidity: {
compilers: [
{
version: '0.8.17',
settings: {
viaIR: true,
optimizer: {
enabled: true,
details: {
yulDetails: {
optimizerSteps: 'u',
},
},
},
},
},
],
},
mocha: {
timeout: 100000,
},
typechain: {
outDir: "typechain",
target: "ethers-v5",
},
};