-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
70 lines (63 loc) · 1.8 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
/**
* @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 DEPLOYER_PRIVATE_KEY = process.env.DEPLOYER_PRIVATE_KEY ?? ethers.Wallet.createRandom().privateKey;
const SIGNER_PRIVATE_KEY = process.env.SIGNER_PRIVATE_KEY ?? ethers.Wallet.createRandom().privateKey;
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY;
const L1_PROVIDER_URL = process.env.L1_PROVIDER_URL;
module.exports = {
defaultNetwork: "hardhat",
networks: {
goerli: {
url: L1_PROVIDER_URL,
accounts: [DEPLOYER_PRIVATE_KEY, SIGNER_PRIVATE_KEY],
},
mainnet: {
url: L1_PROVIDER_URL,
accounts: [DEPLOYER_PRIVATE_KEY, SIGNER_PRIVATE_KEY],
},
localhost: {},
},
etherscan: {
apiKey: ETHERSCAN_API_KEY
},
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",
},
};