-
Notifications
You must be signed in to change notification settings - Fork 1
/
truffle-config.js
65 lines (64 loc) · 2.05 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
const HDWalletProvider = require("@truffle/hdwallet-provider");
const mnemonicPhrase = process.env.TRUFFLE_MNEMONIC;
const mochaReporters = process.env.MOCHA_REPORTERS || "spec" // to get test output XML use MOCHA_REPORTERS="mocha-junit-reporter, spec"
const providerOrUrl = process.env.PROVIDER_OR_URL;
module.exports = {
contracts_directory: './src',
contracts_build_directory: './build',
migrations_directory: './migrations',
test_directory: './test',
test_file_extension_regexp: /.*\.spec\.js$/,
verboseRpc: false,
mocha: {
spec: './test/*.spec.js',
useColors: true,
reporter: "mocha-multi-reporters",
reporterOptions: {
"reporterEnabled": mochaReporters,
"mochaJunitReporterReporterOptions": {
"mochaFile": ".test-results.xml"
}
}
},
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*" // Match any network id
},
testnet: {
provider: () =>
new HDWalletProvider({
mnemonic: {
phrase: mnemonicPhrase
},
providerOrUrl: providerOrUrl || "https://nodeapi.test.energi.network",
derivationPath: "m/44'/49797'/0'/0/"
}),
network_id: "49797",
gas: 30000000
},
mainnet: {
provider: () =>
new HDWalletProvider({
mnemonic: {
phrase: mnemonicPhrase
},
providerOrUrl: providerOrUrl || "https://nodeapi.energi.network",
derivationPath: "m/44'/39797'/0'/0/"
}),
network_id: "39797",
gas: 30000000
}
},
compilers: {
solc: {
version: '0.5.16',
evmVersion: 'petersburg',
optimizer: {
enabled: true,
runs: 9999999999,
}
}
}
}