pub trait Config: Config {
    type WeightInfo: WeightInfo;
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
    type CreateOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type RemoveOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type UpdateOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type Currency: Inspect<Self::AccountId>;
    type AssetKind: Parameter + MaxEncodedLen;
    type BenchmarkHelper: AssetKindFactory<Self::AssetKind>;
}
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 WeightInfo: WeightInfo

The Weight information for extrinsics in this pallet.

source

type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

The runtime event type.

source

type CreateOrigin: EnsureOrigin<Self::RuntimeOrigin>

The origin permissioned to create a conversion rate for an asset.

source

type RemoveOrigin: EnsureOrigin<Self::RuntimeOrigin>

The origin permissioned to remove an existing conversion rate for an asset.

source

type UpdateOrigin: EnsureOrigin<Self::RuntimeOrigin>

The origin permissioned to update an existiing conversion rate for an asset.

source

type Currency: Inspect<Self::AccountId>

The currency mechanism for this pallet.

source

type AssetKind: Parameter + MaxEncodedLen

The type for asset kinds for which the conversion rate to native balance is set.

source

type BenchmarkHelper: AssetKindFactory<Self::AssetKind>

Helper type for benchmarks.

Implementors§