-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
119 lines (116 loc) · 3.46 KB
/
hardhat.config.ts
File metadata and controls
119 lines (116 loc) · 3.46 KB
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
111
112
113
114
115
116
117
118
119
import { HardhatUserConfig } from "hardhat/config";
import "@matterlabs/hardhat-zksync";
import "@nomicfoundation/hardhat-toolbox";
import '@nomiclabs/hardhat-solhint';
import '@openzeppelin/hardhat-upgrades';
import "hardhat-deploy";
import 'dotenv/config';
import 'hardhat-contract-sizer';
import './scripts/tasks/deploy.task';
import './scripts/tasks/wallet.task';
import './scripts/tasks/control.task';
import { zk_mainnets } from "./zk-networks/zkNetworks";
let localTestMnemonic = "test test test test test test test test test test test junk";
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
solidity: {
compilers: [
{ version: "0.8.19", settings: { optimizer: { enabled: true, runs: 2000 }, viaIR: true } },
]
},
networks: {
hardhat: {
accounts: {
mnemonic: localTestMnemonic,
accountsBalance: "10000000000000000000000000",
},
gas: 100_000_000,
allowUnlimitedContractSize: true,
blockGasLimit: 1_000_000_000_000,
},
localhost: {
url: "http://localhost:8545",
accounts: {
mnemonic: localTestMnemonic,
count: 10,
},
treasuryAddress: process.env.HARDHAT_TREASURY_ADDRESS,
collectionAddress: process.env.HARDHAT_COLLECTION_ADDRESS,
workerHubAddress: process.env.HARDHAT_WORKER_HUB_ADDRESS,
// issue: https://github.com/NomicFoundation/hardhat/issues/3136
// workaround: https://github.com/NomicFoundation/hardhat/issues/2672#issuecomment-1167409582
timeout: 500_000_000,
gas: 90_000_000,
blockGasLimit: 2_500_000_000,
} as any,
regtest3: {
url: "https://eternal-ai3.tc.l2aas.com/rpc",
accounts: [
process.env.REGTEST3_PRIVATE_KEY || "",
],
treasuryAddress: process.env.REGTEST3_TREASURY_ADDRESS,
collectionAddress: process.env.REGTEST3_COLLECTION_ADDRESS,
workerHubAddress: process.env.REGTEST3_WORKER_HUB_ADDRESS,
timeout: 600_000,
gas: 90_000_000,
gasPrice: "auto",
} as any,
cudatest: {
url: "https://cuda-eternalai.testnet.l2aas.com/rpc",
accounts: [
process.env.CUDATEST_PRIVATE_KEY || "",
],
treasuryAddress: process.env.CUDATEST_TREASURY_ADDRESS,
collectionAddress: process.env.CUDATEST_COLLECTION_ADDRESS,
workerHubAddress: process.env.CUDATEST_WORKER_HUB_ADDRESS,
timeout: 600_000,
gas: 90_000_000,
gasPrice: "auto",
} as any,
mainnet: {
url: "https://node.eternalai.org/",
chainId: 43338,
accounts: [process.env.MAINNET_PRIVATE_KEY],
treasuryAddress: process.env.MAINNET_TREASURY_ADDRESS,
collectionAddress: process.env.MAINNET_COLLECTION_ADDRESS,
workerHubAddress: process.env.MAINNET_WORKER_HUB_ADDRESS,
timeout: 600_000,
gas: 90_000_000,
gasPrice: "auto",
} as any,
...zk_mainnets
},
namedAccounts: {
deployer: 0,
},
paths: {
sources: './contracts',
tests: './tests',
cache: './cache',
artifacts: './artifacts',
},
etherscan: {
apiKey: {
regtest3: 'abc123',
},
customChains: [
{
network: 'regtest3',
chainId: 20156,
urls: {
apiURL: 'https://eternal-ai3.tc.l2aas.com/api',
browserURL: 'https://eternal-ai3.tc.l2aas.com'
}
}
],
},
mocha: {
timeout: 2000000,
color: true,
reporter: 'mocha-multi-reporters',
reporterOptions: {
configFile: './mocha-report.json',
},
},
};
export default config;