[][src]Crate pallet_commodities

Unique Assets Implementation: Commodities

This pallet exposes capabilities for managing unique assets, also known as non-fungible tokens (NFTs).

Overview

Assets that share a common metadata structure may be created and distributed by an asset admin. Asset owners may burn assets or transfer their ownership. Configuration parameters are used to limit the total number of a type of asset that may exist as well as the number that any one account may own. Assets are uniquely identified by the hash of the info that defines them, as calculated by the runtime system's hashing algorithm.

This pallet implements the UniqueAssets trait and is optimized for assets that are expected to be traded frequently.

Dispatchable Functions

  • mint - Use the provided asset info to create a new unique asset for the specified user. May only be called by the asset admin.

  • burn - Destroy an asset. May only be called by asset owner.

  • transfer - Transfer ownership of an asset to another account. May only be called by current asset owner.

Re-exports

pub use crate::nft::UniqueAssets;
pub use crate::nft::NFT;

Modules

nft

Unique Assets Interface

Structs

DefaultInstance

Default module instance

IdentifiedAsset

A generic definition of an NFT that will be used by this pallet.

Instance0

Module instance

Instance1

Module instance

Instance2

Module instance

Instance3

Module instance

Instance4

Module instance

Instance5

Module instance

Instance6

Module instance

Instance7

Module instance

Instance8

Module instance

Instance9

Module instance

Instance10

Module instance

Instance11

Module instance

Instance12

Module instance

Instance13

Module instance

Instance14

Module instance

Instance15

Module instance

Module

Enums

Call

Dispatchable calls.

Error
RawEvent

Events for this module.

Traits

Instance

Tag a type as an instance of a module.

Trait

Type Definitions

AssetId

The runtime system's hashing algorithm is used to uniquely identify assets.

Event

RawEvent specialized for the configuration Trait

IdentifiedAssetFor

An alias for this pallet's NFT implementation.