forked from rsksmart/rif-relay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle.js
77 lines (73 loc) · 2.13 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
require('ts-node/register/transpile-only')
var HDWalletProvider = require('truffle-hdwallet-provider')
var mnemonic = 'digital unknown jealous mother legal hedgehog save glory december universe spread figure custom found six'
const secretMnemonicFile = './secret_mnemonic'
const fs = require('fs')
let secretMnemonic
if (fs.existsSync(secretMnemonicFile)) {
secretMnemonic = fs.readFileSync(secretMnemonicFile, { encoding: 'utf8' })
}
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
networks: {
development: {
provider: undefined,
verbose: process.env.VERBOSE,
host: '127.0.0.1',
port: 8545,
network_id: '*'
},
coverage: { // coverage/trace provider. note that it currently can't run extrnal-process relay.
provider: require('./coverage-prov.js'),
verbose: process.env.VERBOSE,
network_id: '*'
},
npmtest: { // used from "npm test". see pakcage.json
verbose: process.env.VERBOSE,
host: '127.0.0.1',
port: 8544,
network_id: '*'
},
mainnet: {
provider: function () {
return new HDWalletProvider(mnemonic, 'https://mainnet.infura.io/v3/f40be2b1a3914db682491dc62a19ad43')
},
network_id: 1
},
kovan: {
provider: function () {
return new HDWalletProvider(mnemonic, 'https://kovan.infura.io/v3/f40be2b1a3914db682491dc62a19ad43')
},
network_id: 42
},
ropsten: {
provider: function () {
return new HDWalletProvider(mnemonic, 'https://ropsten.infura.io/v3/f40be2b1a3914db682491dc62a19ad43')
},
network_id: 3
},
xdai_poa_mainnet: {
provider: function () {
const wallet = new HDWalletProvider(secretMnemonic, 'https://dai.poa.network')
return wallet
},
network_id: 100
}
},
mocha: {
slow: 1000
},
compilers: {
solc: {
version: '0.6.10',
settings: {
evmVersion: 'istanbul',
optimizer: {
enabled: true,
runs: 200 // Optimize for how many times you intend to run the code
}
}
}
}
}