-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
104 lines (100 loc) · 3.36 KB
/
hardhat.config.ts
File metadata and controls
104 lines (100 loc) · 3.36 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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-ethers";
import "@nomicfoundation/hardhat-verify";
import * as dotenv from "dotenv";
dotenv.config();
const DEPLOYER_PRIVATE_KEY = process.env.DEPLOYER_PRIVATE_KEY || "0x0000000000000000000000000000000000000000000000000000000000000001";
const config = {
solidity: {
version: "0.8.20",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
networks: {
// Cronos zkEVM Testnet
cronosZkevmTestnet: {
type: "http",
url: "https://testnet.zkevm.cronos.org",
chainId: 240,
accounts: [DEPLOYER_PRIVATE_KEY],
gasPrice: 2500000000, // 2.5 gwei
},
// Cronos zkEVM Mainnet
cronosZkevmMainnet: {
type: "http",
url: process.env.CRONOS_ZKEVM_RPC || "https://mainnet.zkevm.cronos.org",
chainId: 388,
accounts: [DEPLOYER_PRIVATE_KEY],
gasPrice: 2500000000, // 2.5 gwei
},
// Cronos Mainnet (EVM)
cronosMainnet: {
type: "http",
url: "https://evm.cronos.org",
chainId: 25,
accounts: [DEPLOYER_PRIVATE_KEY],
},
// Cronos Testnet (EVM)
cronosTestnet: {
type: "http",
url: "https://evm-t3.cronos.org",
chainId: 338,
accounts: [DEPLOYER_PRIVATE_KEY],
},
},
etherscan: {
apiKey: {
// Cronos zkEVM explorer
cronosZkevmTestnet: process.env.CRONOS_ZKEVM_API_KEY || "",
cronosZkevmMainnet: process.env.CRONOS_ZKEVM_API_KEY || "",
// Cronos EVM explorer - use separate keys for testnet and mainnet
cronosTestnet: process.env.CRONOS_EXPLORER_API_KEY_TESTNET || process.env.CRONOS_EXPLORER_API_KEY || "",
cronosMainnet: process.env.CRONOS_EXPLORER_API_KEY_MAINNET || process.env.CRONOS_EXPLORER_API_KEY || "",
},
customChains: [
{
network: "cronosTestnet",
chainId: 338,
urls: {
apiURL: "https://explorer-api.cronos.org/testnet3/api",
browserURL: "https://explorer.cronos.org/testnet"
}
},
{
network: "cronosMainnet",
chainId: 25,
urls: {
apiURL: "https://explorer-api.cronos.org/mainnet/api",
browserURL: "https://explorer.cronos.org"
}
},
{
network: "cronosZkevmTestnet",
chainId: 240,
urls: {
apiURL: "https://explorer-api.testnet.zkevm.cronos.org/api",
browserURL: "https://explorer.testnet.zkevm.cronos.org"
}
},
{
network: "cronosZkevmMainnet",
chainId: 388,
urls: {
apiURL: "https://explorer-api.zkevm.cronos.org/api",
browserURL: "https://explorer.zkevm.cronos.org"
}
}
]
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts"
}
};
export default config;