-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtruffle-config.js
More file actions
43 lines (39 loc) · 1.19 KB
/
Copy pathtruffle-config.js
File metadata and controls
43 lines (39 loc) · 1.19 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
const HDWalletProvider = require("@truffle/hdwallet-provider");
require("dotenv").config();
const alchemyApiKey = process.env.REACT_APP_ALCHEMY_API_KEY;
const mnemonic = process.env.REACT_APP_MNEMONIC;
if (!alchemyApiKey || !mnemonic) {
throw new Error(
"Missing Alchemy API key or mnemonic in environment variables"
);
}
module.exports = {
networks: {
// holesky Testnet
holesky: {
networkCheckTimeout: 1000000, // NB: this option does nothing
provider: () =>
new HDWalletProvider(
mnemonic,
`https://eth-holesky.g.alchemy.com/v2/${alchemyApiKey}` // Use HTTP endpoint
),
network_id: 17000, // Holesky's id
gas: 5500000, // Gas limit - adjust as needed
confirmations: 2, // # of confirmations to wait between deployments
timeoutBlocks: 50000, // Increase timeout // # of blocks before a deployment times out
skipDryRun: true, // Skip dry run before migrations
},
},
compilers: {
solc: {
version: "0.8.21", // Specify the Solidity compiler version
settings: {
optimizer: {
enabled: true,
runs: 200,
},
evmVersion: "istanbul",
},
},
},
};