forked from zerodevapp/kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
92 lines (88 loc) · 2.59 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
import * as dotenv from 'dotenv'
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-foundry";
import "@nomiclabs/hardhat-ethers";
import "hardhat-deploy";
import '@typechain/hardhat'
import "./tasks/test_userOp"
dotenv.config()
function getAccounts(): string[] | { mnemonic: string } {
const accs = []
if (process.env.DEPLOYER_PRIVATE_KEY !== undefined) {
accs.push(process.env.DEPLOYER_PRIVATE_KEY)
}
if (process.env.PAYMASTER_OWNER_PRIVATE_KEY !== undefined) {
accs.push(process.env.PAYMASTER_OWNER_PRIVATE_KEY)
}
return accs
}
const config: HardhatUserConfig = {
solidity: {
version: "0.8.18",
settings: {
optimizer: {
enabled: true,
runs: 1000000
},
metadata: {
bytecodeHash: "none"
},
viaIR: true
}
},
networks: {
mumbai: {
url: `https://polygon-mumbai.infura.io/v3/${process.env.INFURA_ID}`,
accounts: getAccounts(),
},
polygon: {
url: `https://polygon-mainnet.infura.io/v3/${process.env.INFURA_ID}`,
accounts: getAccounts(),
},
goerli: {
url: `https://goerli.infura.io/v3/${process.env.INFURA_ID}`,
accounts: getAccounts(),
},
ethereum: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_ID}`,
accounts: getAccounts(),
},
avalanche: {
url: `https://avalanche-mainnet.infura.io/v3/${process.env.INFURA_ID}`,
accounts: getAccounts(),
},
fuji: {
url: `https://avalanche-fuji.infura.io/v3/${process.env.INFURA_ID}`,
accounts: getAccounts(),
},
arbitrum: {
url: `https://arbitrum-mainnet.infura.io/v3/${process.env.INFURA_ID}`,
accounts: getAccounts(),
},
arbitrumGoerli: {
url: `https://arbitrum-goerli.infura.io/v3/${process.env.INFURA_ID}`,
accounts: getAccounts(),
},
optimism: {
url: `https://optimism-mainnet.infura.io/v3/${process.env.INFURA_ID}`,
accounts: getAccounts(),
},
optimismGoerli: {
url: `https://optimism-goerli.infura.io/v3/${process.env.INFURA_ID}`,
accounts: getAccounts(),
},
bscTestnet: {
url: `https://sly-indulgent-paper.bsc-testnet.discover.quiknode.pro/ab7e00c229f5967334160958e40fd6a4d893fb93`,
accounts: getAccounts(),
},
bsc: {
url: `https://wandering-quaint-reel.bsc.quiknode.pro/508c3d245c14adb8689ed4073d29aa5795dfa24e`,
accounts: getAccounts(),
},
baseGoerli: {
url: `https://icy-long-mountain.base-goerli.quiknode.pro/5b80d93e97cc9412a63c10a30841869abbef9596`,
accounts: getAccounts(),
},
}
};
export default config;