-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle-config.js
68 lines (58 loc) · 1.81 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
const HDWalletProvider = require("@truffle/hdwallet-provider")
// const keys = require("./keys.json")
module.exports = {
contracts_build_directory: "./public/contracts",
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*",
},
goerli: {
provider: () =>
new HDWalletProvider({
mnemonic: {
phrase: keys.MNEMONIC
},
providerOrUrl: `HTTP://127.0.0.1:7545`,
addressIndex: 0
}),
network_id: 5,
gas: 5500000, // Gas Limit, How much gas we are willing to spent
gasPrice: 20000000000, // how much we are willing to spent for unit of gas
confirmations: 2, // number of blocks to wait between deployment
timeoutBlocks: 200 // number of blocks before deployment times out
},
live: {
provider: () =>
new HDWalletProvider({
mnemonic: {
phrase: keys.MNEMONIC
},
providerOrUrl: `HTTP://127.0.0.1:7545`,
addressIndex: 0
}),
network_id: 1,
gas: 2500000, // Gas Limit, How much gas we are willing to spent
gasPrice: 71000000000, // how much we are willing to spent for unit of gas
confirmations: 2, // number of blocks to wait between deployment
timeoutBlocks: 200, // number of blocks before deployment times out
skipDryRun: true
}
},
compilers: {
solc: {
version: "0.8.4",
}
}
}
// BASE FEE (determnd by ethereum) => 39.791392694
// Max Priority Fee Per Gas(tip) => 2
// GAS PRICE = BASE FEE + TIP => 41.791392694
// GAS USED 21000
// Transaction Fee = GAS USED * GAS PRICE =
// 41.791392694 * 21000
// BURNT FEE => BASE FEE * GAS USED
// 39.791392694 * 21000
// REST TO MINER => TIP * GAS USED
// 2 * 21000