pub trait Config<I: 'static = ()>: Config {
Show 18 associated items type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>; type Balance: Member + Parameter + AtLeast32BitUnsigned + Default + Copy + MaybeSerializeDeserialize + MaxEncodedLen + TypeInfo; type RemoveItemsLimit: Get<u32>; type AssetId: Member + Parameter + Clone + MaybeSerializeDeserialize + MaxEncodedLen; type AssetIdParameter: Parameter + From<Self::AssetId> + Into<Self::AssetId> + MaxEncodedLen; type Currency: ReservableCurrency<Self::AccountId>; type CreateOrigin: EnsureOriginWithArg<Self::RuntimeOrigin, Self::AssetId, Success = Self::AccountId>; type ForceOrigin: EnsureOrigin<Self::RuntimeOrigin>; type AssetDeposit: Get<<<Self as Config<I>>::Currency as Currency<<Self as SystemConfig>::AccountId>>::Balance>; type AssetAccountDeposit: Get<<<Self as Config<I>>::Currency as Currency<<Self as SystemConfig>::AccountId>>::Balance>; type MetadataDepositBase: Get<<<Self as Config<I>>::Currency as Currency<<Self as SystemConfig>::AccountId>>::Balance>; type MetadataDepositPerByte: Get<<<Self as Config<I>>::Currency as Currency<<Self as SystemConfig>::AccountId>>::Balance>; type ApprovalDeposit: Get<<<Self as Config<I>>::Currency as Currency<<Self as SystemConfig>::AccountId>>::Balance>; type StringLimit: Get<u32>; type Freezer: FrozenBalance<Self::AssetId, Self::AccountId, Self::Balance>; type Extra: Member + Parameter + Default + MaxEncodedLen; type CallbackHandle: AssetsCallback<Self::AssetId, Self::AccountId>; type WeightInfo: WeightInfo;
}
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. The module configuration trait.

Required Associated Types§

source

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

The overarching event type.

source

type Balance: Member + Parameter + AtLeast32BitUnsigned + Default + Copy + MaybeSerializeDeserialize + MaxEncodedLen + TypeInfo

The units in which we record balances.

source

type RemoveItemsLimit: Get<u32>

Max number of items to destroy per destroy_accounts and destroy_approvals call.

Must be configured to result in a weight that makes each call fit in a block.

source

type AssetId: Member + Parameter + Clone + MaybeSerializeDeserialize + MaxEncodedLen

Identifier for the class of asset.

source

type AssetIdParameter: Parameter + From<Self::AssetId> + Into<Self::AssetId> + MaxEncodedLen

Wrapper around Self::AssetId to use in dispatchable call signatures. Allows the use of compact encoding in instances of the pallet, which will prevent breaking changes resulting from the removal of HasCompact from Self::AssetId.

This type includes the From<Self::AssetId> bound, since tightly coupled pallets may want to convert an AssetId into a parameter for calling dispatchable functions directly.

source

type Currency: ReservableCurrency<Self::AccountId>

The currency mechanism.

source

type CreateOrigin: EnsureOriginWithArg<Self::RuntimeOrigin, Self::AssetId, Success = Self::AccountId>

Standard asset class creation is only allowed if the origin attempting it and the asset class are in this set.

source

type ForceOrigin: EnsureOrigin<Self::RuntimeOrigin>

The origin which may forcibly create or destroy an asset or otherwise alter privileged attributes.

source

type AssetDeposit: Get<<<Self as Config<I>>::Currency as Currency<<Self as SystemConfig>::AccountId>>::Balance>

The basic amount of funds that must be reserved for an asset.

source

type AssetAccountDeposit: Get<<<Self as Config<I>>::Currency as Currency<<Self as SystemConfig>::AccountId>>::Balance>

The amount of funds that must be reserved for a non-provider asset account to be maintained.

source

type MetadataDepositBase: Get<<<Self as Config<I>>::Currency as Currency<<Self as SystemConfig>::AccountId>>::Balance>

The basic amount of funds that must be reserved when adding metadata to your asset.

source

type MetadataDepositPerByte: Get<<<Self as Config<I>>::Currency as Currency<<Self as SystemConfig>::AccountId>>::Balance>

The additional funds that must be reserved for the number of bytes you store in your metadata.

source

type ApprovalDeposit: Get<<<Self as Config<I>>::Currency as Currency<<Self as SystemConfig>::AccountId>>::Balance>

The amount of funds that must be reserved when creating a new approval.

source

type StringLimit: Get<u32>

The maximum length of a name or symbol stored on-chain.

source

type Freezer: FrozenBalance<Self::AssetId, Self::AccountId, Self::Balance>

A hook to allow a per-asset, per-account minimum balance to be enforced. This must be respected in all permissionless operations.

source

type Extra: Member + Parameter + Default + MaxEncodedLen

Additional data to be stored with an account’s asset balance.

source

type CallbackHandle: AssetsCallback<Self::AssetId, Self::AccountId>

Callback methods for asset state change (e.g. asset created or destroyed)

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

Object Safety§

This trait is not object safe.

Implementors§