forked from gitcoinco/Kudos721Contract
-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle.js
71 lines (68 loc) · 2 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
const HDWalletProvider = require('truffle-hdwallet-provider')
const HDWalletProviderPriv = require('truffle-hdwallet-provider-privkey')
const fs = require('fs')
// First read in the secrets.json to get our mnemonic
let secrets
let mnemonic
let privkeys
if (fs.existsSync('secrets.json')) {
secrets = JSON.parse(fs.readFileSync('secrets.json', 'utf8'))
mnemonic = secrets.mnemonic
token = secrets.token
privkeys = secrets.privKeys
} else {
console.log('No secrets.json found. If you are trying to publish EPM ' +
'this will fail. Otherwise, you can ignore this message!')
mnemonic = ''
token = ''
privkeys = []
}
module.exports = {
networks: {
live: {
provider: function() {
return new HDWalletProviderPriv(privkeys, 'https://mainnet.infura.io/' + token)
},
network_id: 1, // Ethereum public network
from: '0x6239ff1040e412491557a7a02b2cbcc5ae85dc8f',
// Needed to set the gasPrice and Nonce in the console for this to work
// var contract = Kudos.new({gasPrice:5000000000, nonce: 64})
gasPrice: 5000000000,
// nonce: 64
// gas: 5612388,
// gas: 4612388
// 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: function() {
return new HDWalletProvider(mnemonic, 'https://ropsten.infura.io/' + token)
},
network_id: 3,
from: '0xd386793f1db5f21609571c0164841e5ea2d33ad8',
// gas: 5612388
// gas: 4612388
},
rinkeby: {
provider: function() {
return new HDWalletProviderPriv(privkeys, 'https://rinkeby.infura.io/' + token)
},
network_id: 4,
from: '0x6239ff1040e412491557a7a02b2cbcc5ae85dc8f',
},
development: {
host: "localhost",
port: 8545,
network_id: 'default'
}
},
compilers: {
solc: {
version: "0.4.24"
}
}
}