Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkocapo committed Mar 7, 2018
1 parent 9b50b5c commit 53b43cc
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,25 @@ var createRawTx = function (eosContractAddress, value, web3) {
.then(block => {
gasLimit = block.gasLimit

const recipient = process.env.testWallet
const recipient = process.env.testWallet // || eosContractAddress

// Calculate the ether we want to send, into wei
const wei = logWeiAmountBeingSent(value, web3)
const rawTx = {
nonce: hex(txCount),
gas: web3.utils.toHex("21000"),
gasPrice: web3.utils.toHex(web3.utils.toWei('10', 'gwei')),
// gasPrice : hex(gasPrice),
// gasLimit: hex(gasLimit),
to: recipient, // for testing send to Account Address, for prod send to Contract Address:eosContractAddress,
to: recipient,
value: hex(wei)
// chainId: chain
// data:""
}

}

// didnt work when used this. github issue's debating, said in mid-2017 chainId became mandatory but its failing for me:
// chainId: chain
// this combo didn't work:
// gasPrice : hex(gasPrice),
// gasLimit: hex(gasLimit),
// not needed, can be used for deploying smart contracts:
// data:""
logRawTxInputsAndHexes({nonce: txCount,gasPrice,gasLimit, to: recipient,value,chain, data: ""}, rawTx)

return new EthTx(rawTx) // Transaction: { raw: [ <Buffer >], _fields: ['nonce',]}
Expand Down

0 comments on commit 53b43cc

Please sign in to comment.