forked from GNSPS/solidity-bytes-utils
-
Notifications
You must be signed in to change notification settings - Fork 6
/
truffle.js
executable file
·49 lines (47 loc) · 1.56 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
const HDWalletProvider = require('@truffle/hdwallet-provider')
const fs = require('fs')
// First read in the secrets.json to get our mnemonic
let secrets
let mnemonic
if (fs.existsSync('secrets.json')) {
secrets = JSON.parse(fs.readFileSync('secrets.json', 'utf8'))
mnemonic = secrets.mnemonic
} else {
console.log('No secrets.json found. If you are trying to publish EPM ' +
'this will fail. Otherwise, you can ignore this message!')
// Example mnemonic below. PLEASE DON'T USE FOR ANYTHING ELSE!
mnemonic = 'wrist find shock leisure stand barely field sunset script evidence key idea diesel journey gravity'
}
module.exports = {
networks: {
live: {
provider: () => new HDWalletProvider(mnemonic, 'https://mainnet.infura.io/v3/130dfea36eb541b79694f0b6c003b2b2'),
network_id: 1 // Ethereum public network
// optional config values
// host - defaults to "localhost"
// port - defaults to 8545
// gas
// gasPrice
// from - default address to use for any transaction Truffle makes during migrations
},
ropsten: {
provider: () => new HDWalletProvider(mnemonic, 'https://ropsten.infura.io/v3/130dfea36eb541b79694f0b6c003b2b2'),
network_id: '3'
},
development: {
host: "localhost",
port: 8545,
network_id: "*" // Match any network id
},
// ganache: {
// host: "localhost",
// port: 7545,
// network_id: "*" // Match any network id
// },
},
compilers: {
solc: {
version: "0.8.3", // A version or constraint - Ex. "^0.5.0"
}
}
};