referrerpolicy=no-referrer-when-downgrade

Trait Config

Source
pub trait Config<I: 'static = ()>: Config + Config<RuntimeEvent: From<Event<Self, I>>> {
    type WeightInfo: WeightInfo;
    type Original: Member + Parameter + MaxEncodedLen;
    type Derivative: Member + Parameter + MaxEncodedLen;
    type DerivativeExtra: Member + Parameter + MaxEncodedLen;
    type CreateOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type CreateOp: Create<DeriveAndReportId<Self::Original, Option<SaveMappingTo<Self::Derivative>>>>;
    type DestroyOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type DestroyOp: AssetDefinition<Id = Self::Original> + Destroy<NoParams>;
}
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

Source

type Original: Member + Parameter + MaxEncodedLen

The type of an original

Source

type Derivative: Member + Parameter + MaxEncodedLen

The type of a derivative

Source

type DerivativeExtra: Member + Parameter + MaxEncodedLen

Optional derivative extra data

Source

type CreateOrigin: EnsureOrigin<Self::RuntimeOrigin>

An Origin allowed to create a new derivative.

Source

type CreateOp: Create<DeriveAndReportId<Self::Original, Option<SaveMappingTo<Self::Derivative>>>>

Derivative creation operation. Used in the create_derivative extrinsic.

Can be configured to save the mapping between the original and the derivative if it returns Some(SaveMappingTo(DERIVATIVE)).

If the extrinsic isn’t used, this type can be set to DisabledOps.

Source

type DestroyOrigin: EnsureOrigin<Self::RuntimeOrigin>

An Origin allowed to destroy a derivative.

Source

type DestroyOp: AssetDefinition<Id = Self::Original> + Destroy<NoParams>

Derivative destruction operation. Used in the destroy_derivative extrinsic.

If the extrinsic isn’t used, this type can be set to DisabledOps.

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.

Implementors§