[][src]Crate orml_tokens

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 - Extended MultiCurrency 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.

Structs

AccountData

balance information for an account.

Accounts

The balance of a token type under an account.

BalanceLock

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.

CurrencyAdapter
GenesisConfig

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

Locks

Any liquidity locks of a token type under an account. NOTE: Should only be accessed when setting, changing and freeing a lock.

Module
NegativeImbalance

Opaque, move-only struct with private fields that serves as a token denoting that funds have been destroyed without any equal and opposite accounting.

PositiveImbalance

Opaque, move-only struct with private fields that serves as a token denoting that funds have been created without any equal and opposite accounting.

TotalIssuance

The total issuance of a token type.

Enums

Call

Dispatchable calls.

Error

Error for token module.

RawEvent

Events for this module.

Traits

Trait
WeightInfo

Type Definitions

Event

RawEvent specialized for the configuration Trait