Trait pallet_bridge_messages::pallet::Config

source ·
pub trait Config<I: 'static = ()>: Config {
Show 16 associated items type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>; type WeightInfo: WeightInfoExt; type BridgedChainId: Get<ChainId>; type ActiveOutboundLanes: Get<&'static [LaneId]>; type MaxUnrewardedRelayerEntriesAtInboundLane: Get<MessageNonce>; type MaxUnconfirmedMessagesAtInboundLane: Get<MessageNonce>; type MaximalOutboundPayloadSize: Get<u32>; type OutboundPayload: Parameter + Size; type InboundPayload: Decode; type InboundRelayer: Parameter + MaxEncodedLen; type DeliveryPayments: DeliveryPayments<Self::AccountId>; type TargetHeaderChain: TargetHeaderChain<Self::OutboundPayload, Self::AccountId>; type DeliveryConfirmationPayments: DeliveryConfirmationPayments<Self::AccountId>; type OnMessagesDelivered: OnMessagesDelivered; type SourceHeaderChain: SourceHeaderChain; type MessageDispatch: MessageDispatch<DispatchPayload = Self::InboundPayload>;
}
Expand description

Configuration trait of this pallet.

The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.

Consequently, a runtime that wants to include this pallet must implement this trait.

Required Associated Types§

source

type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>

The overarching event type.

source

type WeightInfo: WeightInfoExt

Benchmarks results from runtime we’re plugged into.

source

type BridgedChainId: Get<ChainId>

Gets the chain id value from the instance.

source

type ActiveOutboundLanes: Get<&'static [LaneId]>

Get all active outbound lanes that the message pallet is serving.

source

type MaxUnrewardedRelayerEntriesAtInboundLane: Get<MessageNonce>

Maximal number of unrewarded relayer entries at inbound lane. Unrewarded means that the relayer has delivered messages, but either confirmations haven’t been delivered back to the source chain, or we haven’t received reward confirmations yet.

This constant limits maximal number of entries in the InboundLaneData::relayers. Keep in mind that the same relayer account may take several (non-consecutive) entries in this set.

source

type MaxUnconfirmedMessagesAtInboundLane: Get<MessageNonce>

Maximal number of unconfirmed messages at inbound lane. Unconfirmed means that the message has been delivered, but either confirmations haven’t been delivered back to the source chain, or we haven’t received reward confirmations for these messages yet.

This constant limits difference between last message from last entry of the InboundLaneData::relayers and first message at the first entry.

There is no point of making this parameter lesser than MaxUnrewardedRelayerEntriesAtInboundLane, because then maximal number of relayer entries will be limited by maximal number of messages.

This value also represents maximal number of messages in single delivery transaction. Transaction that is declaring more messages than this value, will be rejected. Even if these messages are from different lanes.

source

type MaximalOutboundPayloadSize: Get<u32>

Maximal encoded size of the outbound payload.

source

type OutboundPayload: Parameter + Size

Payload type of outbound messages. This payload is dispatched on the bridged chain.

source

type InboundPayload: Decode

Payload type of inbound messages. This payload is dispatched on this chain.

source

type InboundRelayer: Parameter + MaxEncodedLen

Identifier of relayer that deliver messages to this chain. Relayer reward is paid on the bridged chain.

source

type DeliveryPayments: DeliveryPayments<Self::AccountId>

Delivery payments.

source

type TargetHeaderChain: TargetHeaderChain<Self::OutboundPayload, Self::AccountId>

Target header chain.

source

type DeliveryConfirmationPayments: DeliveryConfirmationPayments<Self::AccountId>

Delivery confirmation payments.

source

type OnMessagesDelivered: OnMessagesDelivered

Delivery confirmation callback.

source

type SourceHeaderChain: SourceHeaderChain

Source header chain, as it is represented on target chain.

source

type MessageDispatch: MessageDispatch<DispatchPayload = Self::InboundPayload>

Message dispatch.

Object Safety§

This trait is not object safe.

Implementors§