pub trait BridgeRuntimeFilterCall<AccountId, Call> {
type ToPostDispatch;
// Required method
fn validate(
who: &AccountId,
call: &Call,
) -> (Self::ToPostDispatch, TransactionValidity);
// Provided method
fn post_dispatch(
_who: &AccountId,
_has_failed: bool,
_to_post_dispatch: Self::ToPostDispatch,
) { ... }
}
Expand description
A duplication of the FilterCall
trait.
We need this trait in order to be able to implement it for the messages pallet, since the implementation is done outside of the pallet crate.
Required Associated Types§
sourcetype ToPostDispatch
type ToPostDispatch
Data that may be passed from the validate to post_dispatch
.
Required Methods§
sourcefn validate(
who: &AccountId,
call: &Call,
) -> (Self::ToPostDispatch, TransactionValidity)
fn validate( who: &AccountId, call: &Call, ) -> (Self::ToPostDispatch, TransactionValidity)
Called during validation. Needs to checks whether a runtime call, submitted
by the who
is valid. Transactions not signed are not validated.
Provided Methods§
sourcefn post_dispatch(
_who: &AccountId,
_has_failed: bool,
_to_post_dispatch: Self::ToPostDispatch,
)
fn post_dispatch( _who: &AccountId, _has_failed: bool, _to_post_dispatch: Self::ToPostDispatch, )
Called after transaction is dispatched.
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl<T, I: 'static> BridgeRuntimeFilterCall<<T as Config>::AccountId, <T as Config>::RuntimeCall> for Pallet<T, I>where
T: Config<I>,
T::RuntimeCall: GrandpaCallSubType<T, I>,
impl<T, I: 'static> BridgeRuntimeFilterCall<<T as Config>::AccountId, <T as Config>::RuntimeCall> for Pallet<T, I>where
T: Config<I>,
T::RuntimeCall: GrandpaCallSubType<T, I>,
source§impl<T, I: 'static> BridgeRuntimeFilterCall<<T as Config>::AccountId, <T as Config>::RuntimeCall> for Pallet<T, I>where
T: Config<I>,
T::RuntimeCall: ParachainsCallSubtype<T, I>,
impl<T, I: 'static> BridgeRuntimeFilterCall<<T as Config>::AccountId, <T as Config>::RuntimeCall> for Pallet<T, I>where
T: Config<I>,
T::RuntimeCall: ParachainsCallSubtype<T, I>,
source§impl<T: Config<I>, I: 'static> BridgeRuntimeFilterCall<<T as Config>::AccountId, <T as Config>::RuntimeCall> for Pallet<T, I>where
T::RuntimeCall: MessagesCallSubType<T, I>,
impl<T: Config<I>, I: 'static> BridgeRuntimeFilterCall<<T as Config>::AccountId, <T as Config>::RuntimeCall> for Pallet<T, I>where
T::RuntimeCall: MessagesCallSubType<T, I>,
source§fn validate(
_who: &T::AccountId,
call: &T::RuntimeCall,
) -> ((), TransactionValidity)
fn validate( _who: &T::AccountId, call: &T::RuntimeCall, ) -> ((), TransactionValidity)
Validate messages in order to avoid “mining” messages delivery and delivery confirmation transactions, that are delivering outdated messages/confirmations. Without this validation, even honest relayers may lose their funds if there are multiple relays running and submitting the same messages/confirmations.