Open michbil opened 9 years ago
Hmm, I'll have to look into this. I think 'gas' is required with most Ethereum clients as the underlying method is not sendTransaction in geth, for example, but pushTx. Because it's raw and not treated I believe a 'gas' value must be specified.
Overcame this problem by manually setting gas price in signTransaction()
if (!tx_params.gasPrice) {
tx_params.gasPrice = formatHex(new BigNumber(web3.toWei(60, 'gwei')).toString(16));
}
But another question, how to set optimal gas price, if i set gas price lower than 50 gwei, my transaction is rejected with 'Gas price too low for acceptance'
@michbil are you using the testnet or live frontier net? Is it local? Are you setting the gasprice in a gen-block.
I think there are still gasLimit (gas) restrictions on the frontier net, although I could be wrong. The gasPrice should be set to the default price. You can retrieve the default gas price like so:
web3.eth.getGasPrice(err, result){ if(!err) var gasPrice = result; }
Many dApps will grab this and save it locally first, and use the saved value with their tx's elsewhere in the app.
I'm using live network. Will try using getGasPrice one more time.
When making signTransaction for transaction like that:
getting error Gas price too low for acceptance. So here is the question, how to process correctly transactions without specified gasPrice in txParams