Closed pstuermlinger closed 6 years ago
Thanks for the write up @haggins! We really appreciate it!! Issue #26 already is covering this. I'm going to close this in favor of #26, but CC'ing @davidmurdoch so he can read this and make sure he's not missing anything in the implementation of #26 or #147.
@haggins OOG errors due to transactions with refunds (from setting storage to 0 or a selfdestruct) should be fixed by https://github.com/trufflesuite/ganache-core/pull/141 and will be available in the next release.
Thank you both for the super quick replies!
Expected Behavior
The gas estimation should be accurate.
Current Behavior
Gas estimation is off under some circumstances. Probably when Storage gets freed. It's working when MetaMask is talking with Geth, but not when Ganache is running. By following the steps below, the 2nd transaction fails because it runs out of gas.
Steps to Reproduce (for bugs)
I've created an example contract. Connect Remix to your local Ganache and deploy
MyContract
.SafeMath16.sol:
MyContract.sol:
build
with parameters: 0, 0, 1, 1demolish
with parameter: 0Context
I'm trying to delete structs from an array while maintaining index- and ID-mapping arrays.
Your Environment