-
Notifications
You must be signed in to change notification settings - Fork 1
/
truffle.js
26 lines (24 loc) · 904 Bytes
/
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
var WalletProvider = require("truffle-wallet-provider");
// var keystore = require('fs').readFileSync('./test/keystore/key.json').toString();
// var pass = require('fs').readFileSync('./test/keystore/pass').toString();
// var wallet = require('ethereumjs-wallet').fromV3(keystore, pass);
var pkey_str = require('fs').readFileSync('./test/keystore/key').toString();
var prkey_buff = new Buffer(pkey_str, 'hex')
var wallet = require('ethereumjs-wallet').fromPrivateKey(prkey_buff)
const defaultGas = 6e6;
const defaultGasPrice = 5e9;
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
network_id: "*" // Match any network id
},
rinkeby: {
provider: new WalletProvider(wallet, "https://rinkeby.infura.io/SNWrFm1CMX7BfYqvkFXf"),
network_id: 3,
gas: defaultGas,
gasPrice: defaultGasPrice
}
}
};