referrerpolicy=no-referrer-when-downgrade
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§

source

type ToPostDispatch

Data that may be passed from the validate to post_dispatch.

Required Methods§

source

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§

source

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>,

§

type ToPostDispatch = ()

source§

fn validate( _who: &T::AccountId, call: &T::RuntimeCall, ) -> ((), TransactionValidity)

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>,

§

type ToPostDispatch = ()

source§

fn validate( _who: &T::AccountId, call: &T::RuntimeCall, ) -> ((), TransactionValidity)

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>,

source§

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.

§

type ToPostDispatch = ()

Implementors§

source§

impl<T, I: 'static, Priority: Get<TransactionPriority>, SlashAccount: Get<T::AccountId>> BridgeRuntimeFilterCall<<T as Config>::AccountId, <T as Config>::RuntimeCall> for CheckAndBoostBridgeGrandpaTransactions<T, I, Priority, SlashAccount>
where T: Config + Config<I>, T::RuntimeCall: GrandpaCallSubType<T, I>,

§

type ToPostDispatch = Option<<<T as Config<I>>::BridgedChain as Chain>::BlockNumber>

source§

impl<T, ParachainsInstance, Para, Priority: Get<TransactionPriority>, SlashAccount: Get<T::AccountId>> BridgeRuntimeFilterCall<<T as Config>::AccountId, <T as Config>::RuntimeCall> for CheckAndBoostBridgeParachainsTransactions<T, ParachainsInstance, Para, Priority, SlashAccount>
where T: Config + Config<ParachainsInstance>, ParachainsInstance: 'static, Para: Parachain, T::RuntimeCall: ParachainsCallSubtype<T, ParachainsInstance>,

§

type ToPostDispatch = Option<SubmitParachainHeadsInfo>