#token #substrate #orml-tokens

no-std orml-tokens

Fungible tokens module that implements MultiCurrency trait

25 releases (5 stable)

new 1.4.0 Apr 28, 2025
1.3.0 Feb 9, 2025
1.2.1 Jan 14, 2025
1.1.0 Dec 10, 2024
0.1.1 Jun 5, 2020

#417 in #token

Download history 70/week @ 2025-01-08 136/week @ 2025-01-15 35/week @ 2025-01-22 23/week @ 2025-01-29 152/week @ 2025-02-05 45/week @ 2025-02-12 73/week @ 2025-02-19 59/week @ 2025-02-26 4/week @ 2025-03-05 76/week @ 2025-03-12 22/week @ 2025-03-19 29/week @ 2025-03-26 34/week @ 2025-04-09 4/week @ 2025-04-16 129/week @ 2025-04-23

169 downloads per month
Used in pallet-mixer

Apache-2.0 and GPL-3.0-only

315KB
8K SLoC

Tokens Module

Overview

The tokens module provides fungible multi-currencies 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.

lib.rs:

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.

Dependencies

~23–37MB
~630K SLoC