[][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 in a way that is optimized for assets that are expected to be traded frequently.

Dispatchable Functions

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

  • burn - Destroy a commodity. May only be called by commodity owner.

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

Re-exports

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

Modules

nft

Unique Assets Interface

Structs

Commodity

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

DefaultInstance

Default module instance

GenesisConfig

Genesis config for the module, allow to build genesis storage.

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

Trait

Type Definitions

CommodityFor

An alias for this pallet's NFT implementation.

CommodityId

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

Event

RawEvent specialized for the configuration Trait