fix gas fee calcuation error (#798)
Co-authored-by: Daniel Choi <13338103+araskachoi@users.noreply.github.com>
This commit is contained in:
parent
e31fcc7012
commit
2294a19e23
@ -44,6 +44,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
|||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
|
* (evm) [\#799](https://github.com/cosmos/ethermint/issues/799) Fix wrong precision in calculation of gas fee.
|
||||||
* (evm) [\#760](https://github.com/cosmos/ethermint/issues/760) Fix Failed to call function EstimateGas.
|
* (evm) [\#760](https://github.com/cosmos/ethermint/issues/760) Fix Failed to call function EstimateGas.
|
||||||
* (evm) [\#767](https://github.com/cosmos/ethermint/issues/767) Fix error of timeout when using Truffle to deploy contract.
|
* (evm) [\#767](https://github.com/cosmos/ethermint/issues/767) Fix error of timeout when using Truffle to deploy contract.
|
||||||
* (evm) [\#751](https://github.com/cosmos/ethermint/issues/751) Fix misused method to calculate block hash in evm related function.
|
* (evm) [\#751](https://github.com/cosmos/ethermint/issues/751) Fix misused method to calculate block hash in evm related function.
|
||||||
|
@ -99,7 +99,7 @@ func (emfd EthMempoolFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula
|
|||||||
evmDenom := emfd.evmKeeper.GetParams(ctx).EvmDenom
|
evmDenom := emfd.evmKeeper.GetParams(ctx).EvmDenom
|
||||||
|
|
||||||
// fee = gas price * gas limit
|
// fee = gas price * gas limit
|
||||||
fee := sdk.NewDecCoin(evmDenom, sdk.NewIntFromBigInt(msgEthTx.Fee()))
|
fee := sdk.NewDecCoinFromDec(evmDenom, sdk.NewDecFromBigIntWithPrec(msgEthTx.Fee(), sdk.Precision))
|
||||||
|
|
||||||
minGasPrices := ctx.MinGasPrices()
|
minGasPrices := ctx.MinGasPrices()
|
||||||
minFees := minGasPrices.AmountOf(evmDenom).MulInt64(int64(msgEthTx.Data.GasLimit))
|
minFees := minGasPrices.AmountOf(evmDenom).MulInt64(int64(msgEthTx.Data.GasLimit))
|
||||||
|
Loading…
Reference in New Issue
Block a user