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§
sourcetype RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype WeightInfo: WeightInfoExt
type WeightInfo: WeightInfoExt
Benchmarks results from runtime we’re plugged into.
sourcetype BridgedChainId: Get<ChainId>
type BridgedChainId: Get<ChainId>
Gets the chain id value from the instance.
sourcetype ActiveOutboundLanes: Get<&'static [LaneId]>
type ActiveOutboundLanes: Get<&'static [LaneId]>
Get all active outbound lanes that the message pallet is serving.
sourcetype MaxUnrewardedRelayerEntriesAtInboundLane: Get<MessageNonce>
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.
sourcetype MaxUnconfirmedMessagesAtInboundLane: Get<MessageNonce>
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.
sourcetype MaximalOutboundPayloadSize: Get<u32>
type MaximalOutboundPayloadSize: Get<u32>
Maximal encoded size of the outbound payload.
sourcetype OutboundPayload: Parameter + Size
type OutboundPayload: Parameter + Size
Payload type of outbound messages. This payload is dispatched on the bridged chain.
sourcetype InboundPayload: Decode
type InboundPayload: Decode
Payload type of inbound messages. This payload is dispatched on this chain.
sourcetype InboundRelayer: Parameter + MaxEncodedLen
type InboundRelayer: Parameter + MaxEncodedLen
Identifier of relayer that deliver messages to this chain. Relayer reward is paid on the bridged chain.
sourcetype DeliveryPayments: DeliveryPayments<Self::AccountId>
type DeliveryPayments: DeliveryPayments<Self::AccountId>
Delivery payments.
sourcetype TargetHeaderChain: TargetHeaderChain<Self::OutboundPayload, Self::AccountId>
type TargetHeaderChain: TargetHeaderChain<Self::OutboundPayload, Self::AccountId>
Target header chain.
sourcetype DeliveryConfirmationPayments: DeliveryConfirmationPayments<Self::AccountId>
type DeliveryConfirmationPayments: DeliveryConfirmationPayments<Self::AccountId>
Delivery confirmation payments.
sourcetype OnMessagesDelivered: OnMessagesDelivered
type OnMessagesDelivered: OnMessagesDelivered
Delivery confirmation callback.
sourcetype SourceHeaderChain: SourceHeaderChain
type SourceHeaderChain: SourceHeaderChain
Source header chain, as it is represented on target chain.
sourcetype MessageDispatch: MessageDispatch<DispatchPayload = Self::InboundPayload>
type MessageDispatch: MessageDispatch<DispatchPayload = Self::InboundPayload>
Message dispatch.