-
Notifications
You must be signed in to change notification settings - Fork 16
/
truffle-config.js
82 lines (80 loc) · 2.51 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
70
71
72
73
74
75
76
77
78
79
80
81
82
const HDWalletProvider = require("@truffle/hdwallet-provider");
const INFURA_KEY = "...";
const mnemonic = "...";
module.exports = {
// Uncommenting the defaults below
// provides for an easier quick-start with Ganache.
// You can also follow this format for other networks;
// see <http://truffleframework.com/docs/advanced/configuration>
// for more details on how to specify configuration options!
compilers: {
solc: {
version: "0.8.9",
settings: {
optimizer: {
enabled: true,
runs: 200
},
}
}
},
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*",
disableConfirmationListener: true
},
ropsten: {
provider: () => new HDWalletProvider(mnemonic, "https://ropsten.infura.io/v3/"+INFURA_KEY),
network_id: 3,
gas: 5000000,
gasPrice: 3000000000,
confirmations: 1,
sipDryRun: true
},
goerli: {
provider: () => new HDWalletProvider(mnemonic, "https://goerli.infura.io/v3/"+INFURA_KEY),
network_id: 5,
gas: 5000000,
gasPrice: 50000000000, // 50 Gwei
confirmations: 1,
skipDryRun: true
},
ethereum: {
provider: () => new HDWalletProvider(mnemonic, "https://mainnet.infura.io/v3/"+INFURA_KEY),
network_id: 1,
gas: 4000000,
gasPrice: 80000000000, // 80 Gwei
confirmations: 1,
skipDryRun: true
},
polygon: {
provider: () => new HDWalletProvider(mnemonic, "https://polygon-mainnet.infura.io/v3/"+INFURA_KEY),
network_id: 137,
gas: 4000000,
gasPrice: 40000000000, // 40 Gwei
confirmations: 1,
skipDryRun: true
},
mumbai: {
provider: () => new HDWalletProvider(mnemonic, "https://polygon-mumbai.infura.io/v3/"+INFURA_KEY),
network_id: 80001,
gas: 5000000,
gasPrice: 1110000000, // 1.1 Gwei
confirmations: 1,
skipDryRun: true
},
test: {
host: "127.0.0.1",
port: 8545,
network_id: "*"
},
e2e: {
host: "ganache",
port: 8545,
network_id: "*",
disableConfirmationListener: true
}
}
};