From de74d62e8c8d42e362aa234094b66e58f1201529 Mon Sep 17 00:00:00 2001 From: blindchaser Date: Sun, 8 Dec 2024 23:12:34 -0500 Subject: [PATCH] unit test --- x/evm/keeper/fee_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/x/evm/keeper/fee_test.go b/x/evm/keeper/fee_test.go index 78e0595422..a3eee484ea 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()) +}