Trait pallet_xcm_bridge_router::pallet::Config

source ·
pub trait Config<I: 'static = ()>: Config {
    type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>;
    type WeightInfo: WeightInfo;
    type DestinationVersion: GetVersion;
    type MessageExporter: SendXcm;
    type BridgeIdResolver: ResolveBridgeId;
    type UpdateBridgeStatusOrigin: EnsureOriginWithArg<Self::RuntimeOrigin, BridgeIdOf<Self, I>>;
    type ByteFee: Get<u128>;
    type FeeAsset: Get<Option<AssetId>>;
}
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: WeightInfo

Benchmarks results from runtime we’re plugged into.

source

type DestinationVersion: GetVersion

Checks the XCM version for the destination.

source

type MessageExporter: SendXcm

The bridge hub may be:

  • A system (sibling) bridge hub parachain (or another chain), in which case we need an implementation for T::MessageExporter that sends ExportMessage, e.g., SovereignPaidRemoteExporter.
  • The local chain, in which case we need an implementation for T::MessageExporter that does not use ExportMessage but instead directly calls the ExportXcm implementation.
source

type BridgeIdResolver: ResolveBridgeId

Resolves a specific BridgeId for dest, used for identifying the bridge in cases of congestion and dynamic fees. If it resolves to None, it means no congestion or dynamic fees are handled for dest.

source

type UpdateBridgeStatusOrigin: EnsureOriginWithArg<Self::RuntimeOrigin, BridgeIdOf<Self, I>>

Origin that is allowed to update bridge status, e.g. the sibling bridge hub or governance as root.

source

type ByteFee: Get<u128>

Additional fee that is paid for every byte of the outbound message. See calculate_message_size_fee for more details.

source

type FeeAsset: Get<Option<AssetId>>

Asset used to pay the ByteFee. If not specified, the ByteFee is ignored. See calculate_fees for more details.

Object Safety§

This trait is not object safe.

Implementors§