-
Notifications
You must be signed in to change notification settings - Fork 59
/
truffle.js
62 lines (58 loc) · 1.46 KB
/
truffle.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
const LedgerWalletProvider = require('truffle-ledger-provider');
console.log(INFURA_APIKEY);
const kovanLedgerOptions = {
networkId: 42, // mainnet
// path: "44'/60'/0'/0", // ledger default derivation path
path: "44'/60'/0'/0/0", // ledger default derivation path
askConfirm: false,
accountsLength: 1,
accountsOffset: 0,
gasPrice: 100000000000
};
const mainnetLedgerOptions = {
networkId: 1, // mainnet
// path: "44'/60'/0'/0", // ledger default derivation path
path: "44'/60'/0'/0/0", // ledger default derivation path
askConfirm: false,
accountsLength: 1,
accountsOffset: 0,
gasPrice: 100000000000
};
const kovanProvider = new LedgerWalletProvider(kovanLedgerOptions, `https://kovan.infura.io/v3/${INFURA_APIKEY}`);
const mainnetProvider = new LedgerWalletProvider(mainnetLedgerOptions, `https://mainnet.infura.io/v3/${INFURA_APIKEY}`);
module.exports = {
networks: {
development: {
protocol: 'http',
host: 'localhost',
port: 8545,
gas: 5000000,
gasPrice: 5e9,
networkId: '*'
},
kovan: {
provider: kovanProvider,
network_id: 42,
gas: 4600000,
},
mainnet: {
provider: mainnetProvider,
network_id: 1,
gas: 9999999,
gasPrice: 100000000000
}
},
compilers: {
solc: {
version: "0.6.12",
docker: false,
settings: {
optimizer: {
enabled: true,
runs: 200
},
evmVersion: "byzantium"
}
}
}
};