Skip to content

Commit

Permalink
Remove unused ante handler
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianBorst committed Apr 24, 2024
1 parent 6bf4026 commit 3b2bf93
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 187 deletions.
10 changes: 1 addition & 9 deletions app/ante/handler_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ import (
"github.com/cosmos/cosmos-sdk/x/auth/ante"
authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"

ibcante "github.com/cosmos/ibc-go/v4/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper"

ethante "github.com/evmos/ethermint/app/ante"
evmkeeper "github.com/evmos/ethermint/x/evm/keeper"
evmtypes "github.com/evmos/ethermint/x/evm/types"

vestingtypes "github.com/Canto-Network/Canto/v5/x/vesting/types"

"github.com/AltheaFoundation/althea-L1/x/gasfree"
gasfreekeeper "github.com/AltheaFoundation/althea-L1/x/gasfree/keeper"
microtxkeeper "github.com/AltheaFoundation/althea-L1/x/microtx/keeper"
Expand All @@ -29,7 +28,6 @@ type HandlerOptions struct {
BankKeeper evmtypes.BankKeeper
IBCKeeper *ibckeeper.Keeper
FeeMarketKeeper evmtypes.FeeMarketKeeper
StakingKeeper vestingtypes.StakingKeeper
EvmKeeper *evmkeeper.Keeper
FeegrantKeeper ante.FeegrantKeeper
SignModeHandler authsigning.SignModeHandler
Expand All @@ -48,9 +46,6 @@ func (options HandlerOptions) Validate() error {
if options.BankKeeper == nil {
return sdkerrors.Wrap(sdkerrors.ErrLogic, "bank keeper is required for AnteHandler")
}
if options.StakingKeeper == nil {
return sdkerrors.Wrap(sdkerrors.ErrLogic, "staking keeper is required for AnteHandler")
}
if options.SignModeHandler == nil {
return sdkerrors.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder")
}
Expand Down Expand Up @@ -81,7 +76,6 @@ func newEthAnteHandler(options HandlerOptions) sdk.AnteHandler {
NewEthSetPubkeyDecorator(options.AccountKeeper, options.EvmKeeper),
NewSetAccountTypeDecorator(options.AccountKeeper, options.EvmKeeper.AccountProtoFn),
ethante.NewCanTransferDecorator(options.EvmKeeper),
NewEthVestingTransactionDecorator(options.AccountKeeper),
ethante.NewEthGasConsumeDecorator(options.EvmKeeper, options.MaxTxGasWanted),
ethante.NewEthIncrementSenderSequenceDecorator(options.AccountKeeper),
ethante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper),
Expand All @@ -107,7 +101,6 @@ func newCosmosAnteHandler(options HandlerOptions) sdk.AnteHandler {
gasfree.NewSelectiveBypassDecorator(*options.GasfreeKeeper, ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper)),
// Charge gas fees for gasfree messages
NewChargeGasfreeFeesDecorator(options.AccountKeeper, *options.GasfreeKeeper, *options.MicrotxKeeper),
NewVestingDelegationDecorator(options.AccountKeeper, options.StakingKeeper, options.Cdc),
NewValidatorCommissionDecorator(options.Cdc),
// SetPubKeyDecorator must be called before all signature verification decorators
ante.NewSetPubKeyDecorator(options.AccountKeeper),
Expand All @@ -133,7 +126,6 @@ func newCosmosAnteHandlerEip712(options HandlerOptions) sdk.AnteHandler {
ante.NewValidateMemoDecorator(options.AccountKeeper),
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper),
NewVestingDelegationDecorator(options.AccountKeeper, options.StakingKeeper, options.Cdc),
NewValidatorCommissionDecorator(options.Cdc),
// SetPubKeyDecorator must be called before all signature verification decorators
ante.NewSetPubKeyDecorator(options.AccountKeeper),
Expand Down
177 changes: 0 additions & 177 deletions app/ante/vesting.go

This file was deleted.

1 change: 0 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,6 @@ func (app *AltheaApp) NewAnteHandlerOptions(appOpts servertypes.AppOptions) ante
BankKeeper: app.BankKeeper,
IBCKeeper: app.IbcKeeper,
FeeMarketKeeper: app.FeemarketKeeper,
StakingKeeper: app.StakingKeeper,
EvmKeeper: app.EvmKeeper,
FeegrantKeeper: nil,
SignModeHandler: app.EncodingConfig.TxConfig.SignModeHandler(),
Expand Down

0 comments on commit 3b2bf93

Please sign in to comment.