Skip to content

Commit 6699f36

Browse files
author
Grigoriy Simonov
committed
docs: add documentation to OnCheckEvmTransaction trait
1 parent b7aad7b commit 6699f36

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

frame/evm/src/lib.rs

+7
Original file line numberDiff line numberDiff line change
@@ -1051,13 +1051,20 @@ impl<T> OnCreate<T> for Tuple {
10511051
}
10521052
}
10531053

1054+
/// Implements additional EVM transaction validation logic
10541055
pub trait OnCheckEvmTransaction<T: Config> {
1056+
/// Validate EVM transaction.
1057+
///
1058+
/// This method should be called before frontier's built-in validations.
1059+
///
1060+
/// - `v`: Transaction data to validate. Method can modify transaction data before frontier's built-in validations.
10551061
fn on_check_evm_transaction(
10561062
v: &mut CheckEvmTransaction,
10571063
origin: &H160,
10581064
) -> Result<(), TransactionValidationError>;
10591065
}
10601066

1067+
/// Implementation for () does not specify any additional validations.
10611068
impl<T: Config> OnCheckEvmTransaction<T> for () {
10621069
fn on_check_evm_transaction(
10631070
_v: &mut CheckEvmTransaction,

0 commit comments

Comments
 (0)