Module tokens
Expand description
Traits for working with tokens and their associated datastructures.
Modules§
- asset_
ops  - Abstract asset operations traits.
 - currency
 - The Currency trait and associated types.
 - fungible
 - The traits for dealing with a single fungible token class and any associated types.
 - fungibles
 - The traits for sets of 
fungibletokens and any associated types. - imbalance
 - The imbalance trait type and its associates, which handles keeps everything adding up properly with unbalanced operations.
 - nonfungible
 - Traits for dealing with a single non-fungible collection of items.
 - nonfungible_
v2  - Traits for dealing with a single non-fungible item.
 - nonfungibles
 - Traits for dealing with multiple collections of non-fungible items.
 - nonfungibles_
v2  - Traits for dealing with multiple collections of non-fungible items.
 - pay
 - The Pay trait and associated types.
 
Structs§
- Convert
Rank  - Adapter for a rank-to-salary 
Convertimplementation into aGetSalaryimplementation. - IdAmount
 - An identifier and balance.
 - PayFrom
Account  - Simple implementation of 
Paywhich makes a payment from a “pot” - i.e. a single account. - Unity
Asset Balance Conversion  - Implements 
ConversionFromAssetBalance, enabling a 1:1 conversion of the asset balance value to the balance. - Unity
OrOuter Conversion  - Implements 
ConversionFromAssetBalance, allowing for a 1:1 balance conversion of the asset when it meets the conditions specified byC. If the conditions are not met, the conversion is delegated toO. - Withdraw
Reasons  - Reasons for moving funds out of an account.
 
Enums§
- Balance
Status  - Status of funds.
 - Deposit
Consequence  - One of a number of consequences of withdrawing a fungible from an account.
 - Existence
Requirement  - Simple boolean for whether an account needs to be kept in existence.
 - Fortitude
 - The privilege with which a withdraw operation is conducted.
 - Payment
Status  - Status for making a payment via the 
Pay::paytrait function. - Precision
 - The precision required of an operation generally involving some aspect of quantitative fund withdrawal or transfer.
 - Preservation
 - The mode by which we describe whether an operation should keep an account alive.
 - Provenance
 - The origin of funds to be used for a deposit operation.
 - Restriction
 - The mode under which usage of funds may be restricted.
 - Withdraw
Consequence  - One of a number of consequences of withdrawing a fungible from an account.
 
Traits§
- AssetId
 - Simple amalgamation trait to collect together properties for an AssetId under one roof.
 - Balance
 - Simple amalgamation trait to collect together properties for a Balance under one roof.
 - Conversion
From Asset Balance  - Converts an asset balance value into balance.
 - Conversion
ToAsset Balance  - Converts a balance value into an asset balance.
 - GetSalary
 - Retrieve the salary for a member of a particular rank.
 - Imbalance
 - A trait for a not-quite Linear Type that tracks an imbalance.
 - Locker
 - Trait to handle NFT locking mechanism to ensure interactions with the asset can be implemented downstream to extend logic of Uniques/Nfts current functionality.
 - Pay
 - Can be implemented by 
PayFromAccountusing afungibleimpl, but can also be implemented with XCM/Asset and made generic over assets.