Closed Enigmatic331 closed 5 years ago
This should now be fixed in the latest beta tagged releases of ganache-cli and ganache-core.
This fix involved pretty significant code changes; check out the release notes for details.
We'd love it if you'd test this beta out to make sure things are good to go before we release to stable.
If you using ganache-cli
, run:
npm install -g ganache-cli@beta
If you are using ganache-core
, run:
npm install ganache-core@beta
Let us know if you discover any bugs with this new beta release! Thanks!
Hi, sorry reopen this ticket. But trying out the above example still gives me a "Revert". Tested with ganache cli 6.4.4-beta.0
eth_sendTransaction
Transaction: 0x9bb3f74771f1778dfa567fe33039014f4a3586bb8ea7cc55c5546a622ef8d75c
Contract created: 0x3edd854c5fc429043a1ed2bbc8d656614f216732
Gas usage: 180460
Block Number: 1
Block Time: Tue May 07 2019 07:23:21 GMT+0200 (GMT+02:00)
Runtime Error: revert
Hey Sebastian :)
I tested the examples above on v6.4.3 and v6.4.4-beta but seems to work fine though (much thanks to the Truffle team!) - Or I misunderstood and it was something else you were running?
Hey Enigma :)
Thanks for your response! I've tested the contract in the issue ticket with Remix:
Before i ran ganache-cli
without any arguments and i see the following response:
Ah you're absolutely right Sebastian. I tested via Remix (also through Remix > Metamask on localhost:8545) and gotten the same issue too.
Looks like it might be reverting at the part where the contract attempts to create another contract - Will see if I could find anything, and open an issue later in the morning.
ADD: Yea... Had to manually increase the gas limit from its original estimates when I was on Metamask...
Transaction gas use:
got it to work :) i've found another bug for the REVERT stuff from my private factory. I'll open another ticket
Current Behavior
With the below Solidity code, running eth_estimateGas on Ganache returns a slightly lower gas estimate compared to client implementations, subsequently during the execution of the code an out of gas error is encountered.
Expected Behavior
In both cases client implementations provided a gas estimate of 28579, slightly higher than what is consumed at 28537; Whereas Ganache CLI provided an estimate of exactly 28537. Suspect it might be something to do with gas refunds (where Ganache CLI returns the gas estimates based off the final gas used post-transaction, instead of the highest gas used during the transaction).
Steps to Reproduce (for bugs)
Solidity Code:
Running estimates through Ganache CLI: Estimated gas amount isn't sufficient to complete transaction.
Comparing this through a private testnet (Geth 1.8.2):
Comparing this through Rinkeby:
Your Environment
Feel free to let me know if you'd like any additional information at all. Thanks in advance - And thanks for the Truffle suite! :D