pub trait Config<I: 'static = ()>: Config {
Show 17 associated items
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>;
type CollectionId: Member + Parameter + MaxEncodedLen;
type ItemId: Member + Parameter + MaxEncodedLen + Copy;
type Currency: ReservableCurrency<Self::AccountId>;
type ForceOrigin: EnsureOrigin<Self::RuntimeOrigin>;
type CreateOrigin: EnsureOriginWithArg<Self::RuntimeOrigin, Self::CollectionId, Success = Self::AccountId>;
type Locker: Locker<Self::CollectionId, Self::ItemId>;
type CollectionDeposit: Get<DepositBalanceOf<Self, I>>;
type ItemDeposit: Get<DepositBalanceOf<Self, I>>;
type MetadataDepositBase: Get<DepositBalanceOf<Self, I>>;
type AttributeDepositBase: Get<DepositBalanceOf<Self, I>>;
type DepositPerByte: Get<DepositBalanceOf<Self, I>>;
type StringLimit: Get<u32>;
type KeyLimit: Get<u32>;
type ValueLimit: Get<u32>;
type Helper: BenchmarkHelper<Self::CollectionId, Self::ItemId>;
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§
Sourcetype RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
Sourcetype CollectionId: Member + Parameter + MaxEncodedLen
type CollectionId: Member + Parameter + MaxEncodedLen
Identifier for the collection of item.
Sourcetype ItemId: Member + Parameter + MaxEncodedLen + Copy
type ItemId: Member + Parameter + MaxEncodedLen + Copy
The type used to identify a unique item within a collection.
Sourcetype Currency: ReservableCurrency<Self::AccountId>
type Currency: ReservableCurrency<Self::AccountId>
The currency mechanism, used for paying for reserves.
Sourcetype ForceOrigin: EnsureOrigin<Self::RuntimeOrigin>
type ForceOrigin: EnsureOrigin<Self::RuntimeOrigin>
The origin which may forcibly create or destroy an item or otherwise alter privileged attributes.
Sourcetype CreateOrigin: EnsureOriginWithArg<Self::RuntimeOrigin, Self::CollectionId, Success = Self::AccountId>
type CreateOrigin: EnsureOriginWithArg<Self::RuntimeOrigin, Self::CollectionId, Success = Self::AccountId>
Standard collection creation is only allowed if the origin attempting it and the collection are in this set.
Sourcetype Locker: Locker<Self::CollectionId, Self::ItemId>
type Locker: Locker<Self::CollectionId, Self::ItemId>
Locker trait to enable Locking mechanism downstream.
Sourcetype CollectionDeposit: Get<DepositBalanceOf<Self, I>>
type CollectionDeposit: Get<DepositBalanceOf<Self, I>>
The basic amount of funds that must be reserved for collection.
Sourcetype ItemDeposit: Get<DepositBalanceOf<Self, I>>
type ItemDeposit: Get<DepositBalanceOf<Self, I>>
The basic amount of funds that must be reserved for an item.
Sourcetype MetadataDepositBase: Get<DepositBalanceOf<Self, I>>
type MetadataDepositBase: Get<DepositBalanceOf<Self, I>>
The basic amount of funds that must be reserved when adding metadata to your item.
Sourcetype AttributeDepositBase: Get<DepositBalanceOf<Self, I>>
type AttributeDepositBase: Get<DepositBalanceOf<Self, I>>
The basic amount of funds that must be reserved when adding an attribute to an item.
Sourcetype DepositPerByte: Get<DepositBalanceOf<Self, I>>
type DepositPerByte: Get<DepositBalanceOf<Self, I>>
The additional funds that must be reserved for the number of bytes store in metadata, either “normal” metadata or attribute metadata.
Sourcetype StringLimit: Get<u32>
type StringLimit: Get<u32>
The maximum length of data stored on-chain.
Sourcetype ValueLimit: Get<u32>
type ValueLimit: Get<u32>
The maximum length of an attribute value.
Sourcetype Helper: BenchmarkHelper<Self::CollectionId, Self::ItemId>
type Helper: BenchmarkHelper<Self::CollectionId, Self::ItemId>
A set of helper functions for benchmarking.
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
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.