ante, evm: update gas consumption logic (#178)

* clean up logic by ignoring cosmos gas meter

* set gas used in txResponse

* reset and set the gas in context

* rename ante handler

* fix refundedgas logic

* remove gas update logic in keeper

* update context in keeper

* add test for EthSetupContextDecorator

* fix broken test due to gas logic change
This commit is contained in:
Thomas Nguy
2021-06-30 05:31:30 -04:00
committed by GitHub
parent 036ffb7a39
commit 5ba8ffe669
8 changed files with 169 additions and 165 deletions
+1 -5
View File
@@ -667,11 +667,7 @@ func (e *PublicAPI) EstimateGas(args rpctypes.CallArgs) (hexutil.Uint64, error)
return 0, rpctypes.ErrRevertedWith(data.Ret)
}
// TODO: Add Gas Info from state transition to MsgEthereumTxResponse fields and return that instead
estimatedGas := simRes.GasInfo.GasUsed
gas := estimatedGas + 200000
return hexutil.Uint64(gas), nil
return hexutil.Uint64(data.GasUsed), nil
}
// GetBlockByHash returns the block identified by hash.