diff --git a/frame/evm/src/lib.rs b/frame/evm/src/lib.rs index d01faaae1d..804e907cbf 100644 --- a/frame/evm/src/lib.rs +++ b/frame/evm/src/lib.rs @@ -1051,13 +1051,20 @@ impl OnCreate for Tuple { } } +/// Implements additional EVM transaction validation logic pub trait OnCheckEvmTransaction { + /// Validate EVM transaction. + /// + /// This method should be called before frontier's built-in validations. + /// + /// - `v`: Transaction data to validate. Method can modify transaction data before frontier's built-in validations. fn on_check_evm_transaction( v: &mut CheckEvmTransaction, origin: &H160, ) -> Result<(), TransactionValidationError>; } +/// Implementation for () does not specify any additional validations. impl OnCheckEvmTransaction for () { fn on_check_evm_transaction( _v: &mut CheckEvmTransaction,