Trait pallet_nft_fractionalization::pallet::Config

source ·
pub trait Config: Config {
Show 16 associated items type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>; type Currency: InspectFungible<Self::AccountId> + MutateFungible<Self::AccountId> + HoldMutateFungible<Self::AccountId, Reason = Self::RuntimeHoldReason>; type RuntimeHoldReason: From<HoldReason>; type Deposit: Get<DepositOf<Self>>; type NftCollectionId: Member + Parameter + MaxEncodedLen + Copy + Display; type NftId: Member + Parameter + MaxEncodedLen + Copy + Display; type AssetBalance: AssetBalance; type AssetId: AssetId; type Assets: Inspect<Self::AccountId, AssetId = Self::AssetId, Balance = Self::AssetBalance> + Create<Self::AccountId> + Destroy<Self::AccountId> + Mutate<Self::AccountId> + MutateMetadata<Self::AccountId> + MetadataDeposit<DepositOf<Self>>; type Nfts: NonFungiblesInspect<Self::AccountId, ItemId = Self::NftId, CollectionId = Self::NftCollectionId> + Transfer<Self::AccountId>; type PalletId: Get<PalletId>; type NewAssetSymbol: Get<BoundedVec<u8, Self::StringLimit>>; type NewAssetName: Get<BoundedVec<u8, Self::StringLimit>>; type StringLimit: Get<u32>; type BenchmarkHelper: BenchmarkHelper<Self::AssetId, Self::NftCollectionId, Self::NftId>; 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.

Required Associated Types§

source

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

The overarching event type.

source

type Currency: InspectFungible<Self::AccountId> + MutateFungible<Self::AccountId> + HoldMutateFungible<Self::AccountId, Reason = Self::RuntimeHoldReason>

The currency mechanism, used for paying for deposits.

source

type RuntimeHoldReason: From<HoldReason>

Overarching hold reason.

source

type Deposit: Get<DepositOf<Self>>

The deposit paid by the user locking an NFT. The deposit is returned to the original NFT owner when the asset is unified and the NFT is unlocked.

source

type NftCollectionId: Member + Parameter + MaxEncodedLen + Copy + Display

Identifier for the collection of NFT.

source

type NftId: Member + Parameter + MaxEncodedLen + Copy + Display

The type used to identify an NFT within a collection.

source

type AssetBalance: AssetBalance

The type used to describe the amount of fractions converted into assets.

source

type AssetId: AssetId

The type used to identify the assets created during fractionalization.

source

type Assets: Inspect<Self::AccountId, AssetId = Self::AssetId, Balance = Self::AssetBalance> + Create<Self::AccountId> + Destroy<Self::AccountId> + Mutate<Self::AccountId> + MutateMetadata<Self::AccountId> + MetadataDeposit<DepositOf<Self>>

Registry for the minted assets.

source

type Nfts: NonFungiblesInspect<Self::AccountId, ItemId = Self::NftId, CollectionId = Self::NftCollectionId> + Transfer<Self::AccountId>

Registry for minted NFTs.

source

type PalletId: Get<PalletId>

The pallet’s id, used for deriving its sovereign account ID.

source

type NewAssetSymbol: Get<BoundedVec<u8, Self::StringLimit>>

The newly created asset’s symbol.

source

type NewAssetName: Get<BoundedVec<u8, Self::StringLimit>>

The newly created asset’s name.

source

type StringLimit: Get<u32>

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

source

type BenchmarkHelper: BenchmarkHelper<Self::AssetId, Self::NftCollectionId, Self::NftId>

A set of helper functions for benchmarking.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

Object Safety§

This trait is not object safe.

Implementors§