Expand description
§Tokens Module
§Overview
The tokens module provides fungible multi-currency functionality that
implements MultiCurrency
trait.
The tokens module provides functions for:
- Querying and setting the balance of a given account.
- Getting and managing total issuance.
- Balance transfer between accounts.
- Depositing and withdrawing balance.
- Slashing an account balance.
§Implementations
The tokens module provides implementations for following traits.
MultiCurrency
- Abstraction over a fungible multi-currency system.MultiCurrencyExtended
- ExtendedMultiCurrency
with additional helper types and methods, like updating balance by a given signed integer amount.
§Interface
§Dispatchable Functions
transfer
- Transfer some balance to another account.transfer_all
- Transfer all balance to another account.
§Genesis Config
The tokens module depends on the GenesisConfig
. Endowed accounts could be
configured in genesis configs.
Re-exports§
pub use module::*;
Modules§
- module
- The
pallet
module in each FRAME pallet hosts the most important items needed to construct this pallet.
Structs§
- Account
Data - balance information for an account.
- Balance
Lock - A single lock on a balance. There can be many of these on an account and they “overlap”, so the same balance is frozen by multiple locks.
- Burn
Dust - Combiner
- Currency
Adapter - Mapper
- Negative
Imbalance - Opaque, move-only struct with private fields that serves as a token denoting that funds have been destroyed without any equal and opposite accounting.
- Positive
Imbalance - Opaque, move-only struct with private fields that serves as a token denoting that funds have been created without any equal and opposite accounting.
- Reserve
Data - Store named reserved balance.
- Transfer
Dust
Traits§
- Convert
Balance - Weight
Info - Weight functions needed for orml_tokens.