forked from selfxyz/self
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
89 lines (87 loc) · 2.21 KB
/
hardhat.config.ts
File metadata and controls
89 lines (87 loc) · 2.21 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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import dotenv from "dotenv";
dotenv.config({
path: process.env.CI ? ".env.test" : ".env",
});
import "hardhat-contract-sizer";
import "@nomicfoundation/hardhat-ignition-ethers";
import "solidity-coverage";
import "hardhat-gas-reporter";
import "hardhat-contract-sizer";
const config: HardhatUserConfig = {
solidity: {
version: "0.8.28",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
metadata: {
bytecodeHash: "none",
},
},
},
contractSizer: {
runOnCompile: true,
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
defaultNetwork: "hardhat",
networks: {
localhost: {
chainId: 31337,
url: "http://127.0.0.1:8545",
accounts: {
mnemonic: "test test test test test test test test test test test test",
count: 20,
},
},
mainnet: {
chainId: 1,
url: process.env.MAINNET_RPC_URL || "https://eth.llamarpc.com",
accounts: [process.env.PRIVATE_KEY as string],
},
sepolia: {
chainId: 11155111,
url: process.env.SEPOLIA_RPC_URL || "https://eth-sepolia.public.blastapi.io",
accounts: [process.env.PRIVATE_KEY as string],
},
celo: {
chainId: 42220,
url: process.env.CELO_RPC_URL || "https://forno.celo.org",
accounts: [process.env.PRIVATE_KEY as string],
},
alfajores: {
chainId: 44787,
url: process.env.CELO_ALFAJORES_RPC_URL || "https://alfajores-forno.celo-testnet.org",
accounts: [process.env.PRIVATE_KEY as string],
},
},
etherscan: {
apiKey: process.env.CELOSCAN_API_KEY as string,
customChains: [
{
network: "celo",
chainId: 42220,
urls: {
apiURL: "https://api.etherscan.io/v2/api?chainid=42220",
browserURL: "https://celoscan.io/",
},
},
{
network: "alfajores",
chainId: 44787,
urls: {
apiURL: "https://api.etherscan.io/v2/api?chainid=44787",
browserURL: "https://alfajores.celoscan.io",
},
},
],
},
};
export default config;