@@ -3,11 +3,11 @@ package ante_test
33import (
44 "testing"
55
6+ "github.com/ethereum/go-ethereum/common"
67 "github.com/stretchr/testify/require"
78
89 "github.com/cosmos/evm/ante"
910 ethante "github.com/cosmos/evm/ante/evm"
10- evmdante "github.com/cosmos/evm/evmd/ante"
1111 "github.com/cosmos/evm/evmd/tests/integration"
1212 "github.com/cosmos/evm/testutil/integration/evm/network"
1313 "github.com/cosmos/evm/types"
@@ -18,25 +18,25 @@ func RunValidateHandlerOptionsTest(t *testing.T, create network.CreateEvmApp, op
1818 nw := network .NewUnitTestNetwork (create , options ... )
1919 cases := []struct {
2020 name string
21- options evmdante .HandlerOptions
21+ options ante .HandlerOptions
2222 expPass bool
2323 }{
2424 {
2525 "fail - empty options" ,
26- evmdante .HandlerOptions {},
26+ ante .HandlerOptions {},
2727 false ,
2828 },
2929 {
3030 "fail - empty account keeper" ,
31- evmdante .HandlerOptions {
31+ ante .HandlerOptions {
3232 Cdc : nw .App .AppCodec (),
3333 AccountKeeper : nil ,
3434 },
3535 false ,
3636 },
3737 {
3838 "fail - empty bank keeper" ,
39- evmdante .HandlerOptions {
39+ ante .HandlerOptions {
4040 Cdc : nw .App .AppCodec (),
4141 AccountKeeper : nw .App .GetAccountKeeper (),
4242 BankKeeper : nil ,
@@ -45,7 +45,7 @@ func RunValidateHandlerOptionsTest(t *testing.T, create network.CreateEvmApp, op
4545 },
4646 {
4747 "fail - empty IBC keeper" ,
48- evmdante .HandlerOptions {
48+ ante .HandlerOptions {
4949 Cdc : nw .App .AppCodec (),
5050 AccountKeeper : nw .App .GetAccountKeeper (),
5151 BankKeeper : nw .App .GetBankKeeper (),
@@ -55,7 +55,7 @@ func RunValidateHandlerOptionsTest(t *testing.T, create network.CreateEvmApp, op
5555 },
5656 {
5757 "fail - empty fee market keeper" ,
58- evmdante .HandlerOptions {
58+ ante .HandlerOptions {
5959 Cdc : nw .App .AppCodec (),
6060 AccountKeeper : nw .App .GetAccountKeeper (),
6161 BankKeeper : nw .App .GetBankKeeper (),
@@ -66,7 +66,7 @@ func RunValidateHandlerOptionsTest(t *testing.T, create network.CreateEvmApp, op
6666 },
6767 {
6868 "fail - empty EVM keeper" ,
69- evmdante .HandlerOptions {
69+ ante .HandlerOptions {
7070 Cdc : nw .App .AppCodec (),
7171 AccountKeeper : nw .App .GetAccountKeeper (),
7272 BankKeeper : nw .App .GetBankKeeper (),
@@ -78,7 +78,7 @@ func RunValidateHandlerOptionsTest(t *testing.T, create network.CreateEvmApp, op
7878 },
7979 {
8080 "fail - empty signature gas consumer" ,
81- evmdante .HandlerOptions {
81+ ante .HandlerOptions {
8282 Cdc : nw .App .AppCodec (),
8383 AccountKeeper : nw .App .GetAccountKeeper (),
8484 BankKeeper : nw .App .GetBankKeeper (),
@@ -91,7 +91,7 @@ func RunValidateHandlerOptionsTest(t *testing.T, create network.CreateEvmApp, op
9191 },
9292 {
9393 "fail - empty signature mode handler" ,
94- evmdante .HandlerOptions {
94+ ante .HandlerOptions {
9595 Cdc : nw .App .AppCodec (),
9696 AccountKeeper : nw .App .GetAccountKeeper (),
9797 BankKeeper : nw .App .GetBankKeeper (),
@@ -105,7 +105,7 @@ func RunValidateHandlerOptionsTest(t *testing.T, create network.CreateEvmApp, op
105105 },
106106 {
107107 "fail - empty tx fee checker" ,
108- evmdante .HandlerOptions {
108+ ante .HandlerOptions {
109109 Cdc : nw .App .AppCodec (),
110110 AccountKeeper : nw .App .GetAccountKeeper (),
111111 BankKeeper : nw .App .GetBankKeeper (),
@@ -118,9 +118,28 @@ func RunValidateHandlerOptionsTest(t *testing.T, create network.CreateEvmApp, op
118118 },
119119 false ,
120120 },
121+ {
122+ "fail - empty pending tx listener" ,
123+ ante.HandlerOptions {
124+ Cdc : nw .App .AppCodec (),
125+ AccountKeeper : nw .App .GetAccountKeeper (),
126+ BankKeeper : nw .App .GetBankKeeper (),
127+ ExtensionOptionChecker : types .HasDynamicFeeExtensionOption ,
128+ EvmKeeper : nw .App .GetEVMKeeper (),
129+ FeegrantKeeper : nw .App .GetFeeGrantKeeper (),
130+ IBCKeeper : nw .App .GetIBCKeeper (),
131+ FeeMarketKeeper : nw .App .GetFeeMarketKeeper (),
132+ SignModeHandler : nw .GetEncodingConfig ().TxConfig .SignModeHandler (),
133+ SigGasConsumer : ante .SigVerificationGasConsumer ,
134+ MaxTxGasWanted : 40000000 ,
135+ TxFeeChecker : ethante .NewDynamicFeeChecker (nw .App .GetFeeMarketKeeper ()),
136+ PendingTxListener : nil ,
137+ },
138+ false ,
139+ },
121140 {
122141 "success - default app options" ,
123- evmdante .HandlerOptions {
142+ ante .HandlerOptions {
124143 Cdc : nw .App .AppCodec (),
125144 AccountKeeper : nw .App .GetAccountKeeper (),
126145 BankKeeper : nw .App .GetBankKeeper (),
@@ -133,6 +152,7 @@ func RunValidateHandlerOptionsTest(t *testing.T, create network.CreateEvmApp, op
133152 SigGasConsumer : ante .SigVerificationGasConsumer ,
134153 MaxTxGasWanted : 40000000 ,
135154 TxFeeChecker : ethante .NewDynamicFeeChecker (nw .App .GetFeeMarketKeeper ()),
155+ PendingTxListener : func (hash common.Hash ) {},
136156 },
137157 true ,
138158 },
0 commit comments