Trait pallet_bridge_messages::CallSubType
source · pub trait CallSubType<T: Config<I, RuntimeCall = Self>, I: 'static>: IsSubType<CallableCallFor<Pallet<T, I>, T>> {
// Required methods
fn receive_messages_proof_info(
&self,
) -> Option<ReceiveMessagesProofInfo<T::LaneId>>;
fn receive_messages_delivery_proof_info(
&self,
) -> Option<ReceiveMessagesDeliveryProofInfo<T::LaneId>>;
fn call_info(&self) -> Option<MessagesCallInfo<T::LaneId>>;
fn call_info_for(
&self,
lane_id: T::LaneId,
) -> Option<MessagesCallInfo<T::LaneId>>;
fn check_obsolete_call(&self) -> TransactionValidity;
}
Expand description
Trait representing a call that is a sub type of pallet_bridge_messages::Call
.
Required Methods§
sourcefn receive_messages_proof_info(
&self,
) -> Option<ReceiveMessagesProofInfo<T::LaneId>>
fn receive_messages_proof_info( &self, ) -> Option<ReceiveMessagesProofInfo<T::LaneId>>
Create a new instance of ReceiveMessagesProofInfo
from a ReceiveMessagesProof
call.
sourcefn receive_messages_delivery_proof_info(
&self,
) -> Option<ReceiveMessagesDeliveryProofInfo<T::LaneId>>
fn receive_messages_delivery_proof_info( &self, ) -> Option<ReceiveMessagesDeliveryProofInfo<T::LaneId>>
Create a new instance of ReceiveMessagesDeliveryProofInfo
from
a ReceiveMessagesDeliveryProof
call.
sourcefn call_info(&self) -> Option<MessagesCallInfo<T::LaneId>>
fn call_info(&self) -> Option<MessagesCallInfo<T::LaneId>>
Create a new instance of MessagesCallInfo
from a ReceiveMessagesProof
or a ReceiveMessagesDeliveryProof
call.
sourcefn call_info_for(
&self,
lane_id: T::LaneId,
) -> Option<MessagesCallInfo<T::LaneId>>
fn call_info_for( &self, lane_id: T::LaneId, ) -> Option<MessagesCallInfo<T::LaneId>>
Create a new instance of MessagesCallInfo
from a ReceiveMessagesProof
or a ReceiveMessagesDeliveryProof
call, if the call is for the provided lane.
sourcefn check_obsolete_call(&self) -> TransactionValidity
fn check_obsolete_call(&self) -> TransactionValidity
Ensures that a ReceiveMessagesProof
or a ReceiveMessagesDeliveryProof
call:
-
does not deliver already delivered messages. We require all messages in the
ReceiveMessagesProof
call to be undelivered; -
does not submit empty
ReceiveMessagesProof
call with zero messages, unless the lane needs to be unblocked by providing relayer rewards proof; -
brings no new delivery confirmations in a
ReceiveMessagesDeliveryProof
call. We require at least one new delivery confirmation in the unrewarded relayers set; -
does not violate some basic (easy verifiable) messages pallet rules obsolete (like submitting a call when a pallet is halted or delivering messages when a dispatcher is inactive).
If one of above rules is violated, the transaction is treated as invalid.