diff --git a/x/evm/keeper/fee_test.go b/x/evm/keeper/fee_test.go index 78e059542..a3eee484e 100644 --- a/x/evm/keeper/fee_test.go +++ b/x/evm/keeper/fee_test.go @@ -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" ) @@ -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()) +}