pub trait Config: Config + Config<RuntimeEvent: From<Event<Self>>> {
type Fungibles: FungiblesMutate<Self::AccountId, AssetId = Self::AssetId> + FungiblesMetadataInspect<Self::AccountId>;
type AssetId: Parameter + Member + Clone + MaybeSerializeDeserialize + MaxEncodedLen + Ord;
type MaximumIssuance: Get<<<Self as Config>::Fungibles as FungiblesInspect<<Self as Config>::AccountId>>::Balance>;
type ManagerOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = PsmManagerLevel>;
type WeightInfo: WeightInfo;
type InternalAsset: FungibleMutate<Self::AccountId, Balance = <<Self as Config>::Fungibles as FungiblesInspect<<Self as Config>::AccountId>>::Balance> + FungibleMetadataInspect<Self::AccountId>;
type FeeDestination: Get<Self::AccountId>;
type PalletId: Get<PalletId>;
type MinSwapAmount: Get<<<Self as Config>::Fungibles as FungiblesInspect<<Self as Config>::AccountId>>::Balance>;
type MaxExternalAssets: 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>
type Fungibles: FungiblesMutate<Self::AccountId, AssetId = Self::AssetId> + FungiblesMetadataInspect<Self::AccountId>
Fungibles implementation for both internal and external stablecoins.
Sourcetype AssetId: Parameter + Member + Clone + MaybeSerializeDeserialize + MaxEncodedLen + Ord
type AssetId: Parameter + Member + Clone + MaybeSerializeDeserialize + MaxEncodedLen + Ord
Asset identifier type.
Sourcetype MaximumIssuance: Get<<<Self as Config>::Fungibles as FungiblesInspect<<Self as Config>::AccountId>>::Balance>
type MaximumIssuance: Get<<<Self as Config>::Fungibles as FungiblesInspect<<Self as Config>::AccountId>>::Balance>
Maximum allowed internal issuance across the entire system.
Sourcetype ManagerOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = PsmManagerLevel>
type ManagerOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = PsmManagerLevel>
Origin allowed to update PSM parameters.
Returns PsmManagerLevel to distinguish privilege levels:
Full(via GeneralAdmin): Can modify all parametersEmergency(via EmergencyAction): Can modify circuit breaker status, per-asset ceiling weights, and the global max PSM debt ratio.
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
A type representing the weights required by the dispatchables of this pallet.
Sourcetype InternalAsset: FungibleMutate<Self::AccountId, Balance = <<Self as Config>::Fungibles as FungiblesInspect<<Self as Config>::AccountId>>::Balance> + FungibleMetadataInspect<Self::AccountId>
type InternalAsset: FungibleMutate<Self::AccountId, Balance = <<Self as Config>::Fungibles as FungiblesInspect<<Self as Config>::AccountId>>::Balance> + FungibleMetadataInspect<Self::AccountId>
The internal asset as a single-asset fungible type.
Typically ItemOf<Asset, InternalAssetId, AccountId>.
Must use the same Balance type as Asset.
Sourcetype FeeDestination: Get<Self::AccountId>
type FeeDestination: Get<Self::AccountId>
Account that receives internal fees from minting and redemption.
Must exist before any swap; initialized at genesis and migration
via Pallet::ensure_account_exists.
Sourcetype MinSwapAmount: Get<<<Self as Config>::Fungibles as FungiblesInspect<<Self as Config>::AccountId>>::Balance>
type MinSwapAmount: Get<<<Self as Config>::Fungibles as FungiblesInspect<<Self as Config>::AccountId>>::Balance>
Minimum swap amount.
Sourcetype MaxExternalAssets: Get<u32>
type MaxExternalAssets: Get<u32>
Maximum number of approved external assets.
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.