diff --git a/core/appmodule/v2/module.go b/core/appmodule/v2/module.go index 47d581257753..4a3dece06ed9 100644 --- a/core/appmodule/v2/module.go +++ b/core/appmodule/v2/module.go @@ -47,10 +47,10 @@ type HasEndBlocker interface { EndBlock(context.Context) error } -// HasTxValidation is the extension interface that modules should implement to run +// HasTxValidator is the extension interface that modules should implement to run // custom logic for validating transactions. // It was previously known as AnteHandler/Decorator. -type HasTxValidation[T transaction.Tx] interface { +type HasTxValidator[T transaction.Tx] interface { AppModule // TxValidator is a method that will be run on each transaction. diff --git a/core/appmodule/v2/tx_validator.go b/core/appmodule/v2/tx_validator.go new file mode 100644 index 000000000000..0ef877af00a8 --- /dev/null +++ b/core/appmodule/v2/tx_validator.go @@ -0,0 +1,13 @@ +package appmodule + +import ( + "context" + + "cosmossdk.io/core/transaction" +) + +// TxValidator represent the method that a TxValidator should implement. +// It was previously known as AnteHandler/Decorator.AnteHandle +type TxValidator[T transaction.Tx] interface { + ValidateTx(ctx context.Context, tx T) error +}