pub trait Config: Config + Config<RuntimeEvent: From<Event<Self>>> {
type Fungibles: FungiblesMutate<Self::AccountId, AssetId = Self::AssetId> + FungiblesMetadataInspect<Self::AccountId> + FungiblesRolesInspect<Self::AccountId>;
type Consideration: Consideration<Self::AccountId, Footprint>;
type CreateOrigin: EnsureOriginWithArg<<Self as Config>::RuntimeOrigin, Self::AssetId, Success = Option<Self::AccountId>>;
type RuntimeOrigin: OriginTrait<PalletsOrigin = Self::PalletsOrigin> + From<Self::PalletsOrigin> + IsType<<Self as Config>::RuntimeOrigin>;
type PalletsOrigin: Parameter + From<RawOrigin<Self::AccountId>> + CallerTrait<Self::AccountId> + MaxEncodedLen;
type AssetId: Parameter + Member + Clone + MaybeSerializeDeserialize + MaxEncodedLen + Ord;
type WeightInfo: WeightInfo;
type PalletId: Get<PalletId>;
type MaxExternals: Get<u32>;
type BenchmarkHelper: BenchmarkHelper<Self::AssetId, Self::AccountId>;
}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 Fungibles: FungiblesMutate<Self::AccountId, AssetId = Self::AssetId> + FungiblesMetadataInspect<Self::AccountId> + FungiblesRolesInspect<Self::AccountId>
type Fungibles: FungiblesMutate<Self::AccountId, AssetId = Self::AssetId> + FungiblesMetadataInspect<Self::AccountId> + FungiblesRolesInspect<Self::AccountId>
Fungibles implementation for both internal and external assets.
Sourcetype Consideration: Consideration<Self::AccountId, Footprint>
type Consideration: Consideration<Self::AccountId, Footprint>
Consideration for PSM creation. Runtimes can price this from the PSM footprint or anything else they choose.
Sourcetype CreateOrigin: EnsureOriginWithArg<<Self as Config>::RuntimeOrigin, Self::AssetId, Success = Option<Self::AccountId>>
type CreateOrigin: EnsureOriginWithArg<<Self as Config>::RuntimeOrigin, Self::AssetId, Success = Option<Self::AccountId>>
Origin permitted to create a PSM for a given internal asset; succeeds with the
optional account that pays the creation consideration. Returning None creates without
a deposit, useful for privileged origins such as Root.
Sourcetype RuntimeOrigin: OriginTrait<PalletsOrigin = Self::PalletsOrigin> + From<Self::PalletsOrigin> + IsType<<Self as Config>::RuntimeOrigin>
type RuntimeOrigin: OriginTrait<PalletsOrigin = Self::PalletsOrigin> + From<Self::PalletsOrigin> + IsType<<Self as Config>::RuntimeOrigin>
The aggregated origin, tying the runtime origin to Config::PalletsOrigin so PSM
admins can be matched against incoming origins.
Sourcetype PalletsOrigin: Parameter + From<RawOrigin<Self::AccountId>> + CallerTrait<Self::AccountId> + MaxEncodedLen
type PalletsOrigin: Parameter + From<RawOrigin<Self::AccountId>> + CallerTrait<Self::AccountId> + MaxEncodedLen
The caller origin, overarching type of all pallets’ origins. Stored as a PSM’s
full_admin / emergency_admin and matched against incoming origins.
Sourcetype AssetId: Parameter + Member + Clone + MaybeSerializeDeserialize + MaxEncodedLen + Ord
type AssetId: Parameter + Member + Clone + MaybeSerializeDeserialize + MaxEncodedLen + Ord
Asset identifier type.
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
A type representing the weights required by the dispatchables of this pallet.
Sourcetype MaxExternals: Get<u32>
type MaxExternals: Get<u32>
Maximum number of approved external assets per PSM instance.
Sourcetype BenchmarkHelper: BenchmarkHelper<Self::AssetId, Self::AccountId>
type BenchmarkHelper: BenchmarkHelper<Self::AssetId, Self::AccountId>
Helper for benchmarks to create an external asset with correct metadata.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.