-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
78 lines (75 loc) · 1.95 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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
require("@nomicfoundation/hardhat-verify");
require('dotenv').config();
const {
TESTNET_PRIVATE_KEY,
MAINNET_PRIVATE_KEY,
SEPOLIA_API_URL,
BASE_SEPOLIA_API_URL,
MAINNET_API_URL,
BSC_TESTNET_API_URL,
ETHERSCAN_API_KEY,
BASE_SEPOLIA_API_KEY,
} = process.env;
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
},
sepolia: {
url: `${SEPOLIA_API_URL}`,
accounts: [`0x${TESTNET_PRIVATE_KEY}`],
allowUnlimitedContractSize: true,
},
mainnet: {
url: `${MAINNET_API_URL}`,
accounts: [`0x${MAINNET_PRIVATE_KEY}`],
allowUnlimitedContractSize: true,
},
base_sepolia: {
url: `${BASE_SEPOLIA_API_URL}`,
accounts: [`0x${TESTNET_PRIVATE_KEY}`],
allowUnlimitedContractSize: true,
// gasPrice: 1000000000,
},
bsc_testnet: {
url: `${BSC_TESTNET_API_URL}`,
chainId: 97,
accounts: [`0x${TESTNET_PRIVATE_KEY}`],
allowUnlimitedContractSize: true,
gasPrice: 10000000000, // 10 gwei
gas: 30000000, // Block gas limit of BSC testnet
},
},
solidity: {
version: "0.8.27",
settings: {
optimizer: {
enabled: true, // Enable optimizer
runs: 200, // Optimization runs
},
viaIR: true, // Enable Intermediate Representation pipeline
},
},
paths: {
sources: "./contracts",
cache: "./cache",
artifacts: "./artifacts",
tests: "./test",
ignition: "./ignition/modules", // Add the Ignition directory for deployment modules
},
mocha: {
timeout: 40000, // Set test timeout in milliseconds
},
etherscan: {
apiKey: {
mainnet: `${ETHERSCAN_API_KEY}`,
baseSepolia: `${BASE_SEPOLIA_API_KEY}`, // Replace with the correct API key
},
},
sourcify: {
enabled: true, // Enable automatic source code verification
},
};
export default config;