-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle-config.js
69 lines (65 loc) · 2.12 KB
/
truffle-config.js
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
const HDWalletProvider = require("@truffle/hdwallet-provider");
const fs = require("fs");
const mnemonic = fs.readFileSync(".secret").toString().trim();
module.exports = {
plugins: ["truffle-plugin-verify"],
networks: {
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 7545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
},
// Useful for deploying to a public network.
// Note: It's important to wrap the provider as a function to ensure truffle uses a new provider every time.
testbnb: {
provider: () =>
new HDWalletProvider(
mnemonic,
"https://data-seed-prebsc-1-s1.bnbchain.org:8545"
),
network_id: 97,
confirmations: 1,
timeoutBlocks: 200,
skipDryRun: true,
},
matic: {
provider: () =>
new HDWalletProvider(
mnemonic,
`https://polygon-mumbai.g.alchemy.com/v2/bSo8uRanqGbniOrDUntxo6ycFm7QKF-A`
),
network_id: 80001, // Matic's id
confirmations: 1, // # of confirmations to wait between deployments. (default: 0)
networkCheckTimeout: 10000,
timeoutBlocks: 200,
gas: 1000000,
gasPrice: 10000000000,
skipDryRun: true, // Skip dry run before migrations? (default: false for public nets )
},
goerli: {
provider: () =>
new HDWalletProvider(
mnemonic,
`https://eth-goerli.g.alchemy.com/v2/m1MzTp6gqvLngZae6SHQBMYLRoE1Uet5`
),
network_id: 5, // Goerli's id
confirmations: 1, // # of confirmations to wait between deployments. (default: 0)
timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
gas: 4465030,
gasPrice: 10000000000,
skipDryRun: true, // Skip dry run before migrations? (default: false for public nets )
},
},
contracts_directory: "./src/contracts/",
contracts_build_directory: "./src/abis/",
// Configure your compilers
compilers: {
solc: {
version: "0.8.13",
optimizer: {
enabled: true,
runs: 200,
},
},
},
};