Skip to content

Commit

Permalink
Merge branch 'main' into ud/evm-forge
Browse files Browse the repository at this point in the history
  • Loading branch information
Unique-Divine committed Oct 22, 2024
2 parents 6ad7277 + 0e5f2fc commit 6ca5d9c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions app/evmante/evmante_gas_consume.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,18 @@ 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 {
if fees.IsZero() {
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
Expand Down
4 changes: 2 additions & 2 deletions x/evm/precompile/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 6ca5d9c

Please sign in to comment.