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§
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: WeightInfo
type WeightInfo: WeightInfo
Benchmarks results from runtime we’re plugged into.
sourcetype DestinationVersion: GetVersion
type DestinationVersion: GetVersion
Checks the XCM version for the destination.
sourcetype MessageExporter: SendXcm
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 sendsExportMessage
, e.g.,SovereignPaidRemoteExporter
. - The local chain, in which case we need an implementation for
T::MessageExporter
that does not useExportMessage
but instead directly calls theExportXcm
implementation.
sourcetype BridgeIdResolver: ResolveBridgeId
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
.
sourcetype UpdateBridgeStatusOrigin: EnsureOriginWithArg<Self::RuntimeOrigin, BridgeIdOf<Self, I>>
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.