diff --git a/CHANGELOG.md b/CHANGELOG.md index 8389cdee7..a316c53f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -134,6 +134,7 @@ Use effective gas price in RefundGas and make sure that units are properly reflected on all occurences of "base fee" in the codebase. This fixes [#2059](https://github.com/NibiruChain/nibiru/issues/2059) and the [related comments from @Unique-Divine and @berndartmueller](https://github.com/NibiruChain/nibiru/issues/2059#issuecomment-2408625724). - [#2084](https://github.com/NibiruChain/nibiru/pull/2084) - feat(evm-forge): foundry support and template for Nibiru EVM develoment +- [#2088](https://github.com/NibiruChain/nibiru/pull/2088) - refactor(evm): remove outdated comment and improper error message text #### Dapp modules: perp, spot, oracle, etc diff --git a/app/evmante/evmante_gas_consume.go b/app/evmante/evmante_gas_consume.go index a10ad8f2f..527d6fdaf 100644 --- a/app/evmante/evmante_gas_consume.go +++ b/app/evmante/evmante_gas_consume.go @@ -157,8 +157,8 @@ func (anteDec AnteDecEthGasConsume) AnteHandle( return next(newCtx, tx, simulate) } -// deductFee checks if the fee payer has enough funds to pay for the fees and deducts them. -// If the spendable balance is not enough, it tries to claim enough staking rewards to cover the fees. +// deductFee checks if the fee payer has enough funds to pay for the fees and +// deducts them. func (anteDec AnteDecEthGasConsume) deductFee( ctx sdk.Context, fees sdk.Coins, feePayer sdk.AccAddress, ) error { @@ -166,9 +166,9 @@ func (anteDec AnteDecEthGasConsume) deductFee( return nil } - // If the account balance is not sufficient, try to withdraw enough staking rewards - - if err := anteDec.evmKeeper.DeductTxCostsFromUserBalance(ctx, fees, gethcommon.BytesToAddress(feePayer)); err != nil { + if err := anteDec.evmKeeper.DeductTxCostsFromUserBalance( + ctx, fees, gethcommon.BytesToAddress(feePayer), + ); err != nil { return errors.Wrapf(err, "failed to deduct transaction costs from user balance") } return nil diff --git a/x/evm/precompile/oracle.go b/x/evm/precompile/oracle.go index 7c3a57af5..b7d283ed7 100644 --- a/x/evm/precompile/oracle.go +++ b/x/evm/precompile/oracle.go @@ -112,8 +112,8 @@ func (p precompileOracle) decomposeQueryExchangeRateArgs(args []any) ( pair string, err error, ) { - if len(args) != 1 { - err = fmt.Errorf("expected 3 arguments but got %d", len(args)) + if e := assertNumArgs(len(args), 1); e != nil { + err = e return }