Hey guys, anyone ever had issues with ganache/testrpc where sending a transaction produces a base fee exceeds gas limit error?
It seems to get thrown no matter what gas limit I push into the transaction, even when matching it with the gas limit of the running ganache instance.
Oct 1, 2018, 12:37 PM
Restart your testrpc with flag --gasLimit 99999999
Oct 1, 2018, 12:39 PM
I've exceeded that actually
Here's the actual transaction being sent
Oct 1, 2018, 12:41 PM
What kind of transaction are you sending?
Maybe you have an error on your code, and that's why is telling you about gas
Oct 1, 2018, 12:43 PM
Just an ETH transfer.
const value = web3.utils.toWei(amount.toString());
web3.eth.sendTransaction({from:account.publicKey, to, value, gasLimit:'8000000'})
const value = web3.utils.toWei(amount.toString());
web3.eth.sendTransaction({from:account.publicKey, to, value, gasLimit:'8000000'})
Is it possible a signature error would throw that?
( this is coming from a project with an injected signature provider using HookedWallet )
Oct 1, 2018, 12:44 PM
Amount.tostring? Are you sure about that?
Oct 1, 2018, 12:45 PM
removed toString(), produces the same value, and error though.
Here's what it's saying the parameters are after flowing into the signature provider
Oct 1, 2018, 12:48 PM
If you remove that line you need to give a value to "value"
Oct 1, 2018, 12:49 PM
Try to set gas and gasprice
Oct 1, 2018, 12:49 PM
Should be able to just do 21000 for gas no?
( yeah, that method just takes in a decimal parameter of usd value converted to eth. So something like 0.004, so I'm converting to ether BN )
Oct 1, 2018, 12:51 PM
Not sure if it was changed on your web3 version, but I have seen it as web3.utils.toWei(amount, 'ether')
Oct 1, 2018, 12:52 PM
Yeah I changed it to that a second ago too to see if that made any difference. No cigar :(
const value = web3.utils.toWei(amount, 'ether');
const gasPrice = web3.utils.toWei('50');
const sent = await web3.eth.sendTransaction({from:account.publicKey, to, value, gasLimit:'8000000', gas:'21000', gasPrice})
const gasPrice = web3.utils.toWei('50');
const sent = await web3.eth.sendTransaction({from:account.publicKey, to, value, gasLimit:'8000000', gas:'21000', gasPrice})
Still throwing same error
I'm gonna take out the signature provider and see if it's just that. Maybe the error is just a diversion
Oct 1, 2018, 12:57 PM
Gasprice is wrong
Oct 1, 2018, 12:58 PM
'ether' is by default and u can change it in seconds param
Oct 1, 2018, 12:59 PM
Ok, didn't know that one...
Oct 1, 2018, 1:00 PM
I see the gas price from ethgasstation info/json/ethgasAPI.json is shown in whole numbers, but not sure what the conversion web3 expects it to be should be.
What's a recommended gas price for testing?
What's a recommended gas price for testing?
Oct 1, 2018, 1:02 PM
For testing on RPC you don't need ethgasststion...
Oct 1, 2018, 1:06 PM
Yes, I'm aware of that.
Oct 1, 2018, 1:38 PM