Skip to content

Commit

Permalink
unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
blindchaser committed Dec 9, 2024
1 parent bfbc7f1 commit de74d62
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions x/evm/keeper/fee_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"
testkeeper "github.com/sei-protocol/sei-chain/testutil/keeper"
"github.com/sei-protocol/sei-chain/x/evm/types"
"github.com/stretchr/testify/require"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
)
Expand Down Expand Up @@ -177,3 +178,15 @@ func TestAdjustBaseFeePerGas(t *testing.T) {
})
}
}

func TestGetDynamicBaseFeePerGasWithNilMinFee(t *testing.T) {
k := &testkeeper.EVMTestApp.EvmKeeper
ctx := testkeeper.EVMTestApp.GetContextForDeliverTx([]byte{})

// Get dynamic base fee
fee := k.GetDynamicBaseFeePerGas(ctx)

// Should return default minimum fee
require.Equal(t, types.DefaultParams().MinimumFeePerGas, fee)
require.False(t, fee.IsNil())
}

0 comments on commit de74d62

Please sign in to comment.