#auction #substrate #traits #module #run-time #token #orml

no-std orml-traits

Shared traits including BasicCurrency, MultiCurrency, Auction and more

22 releases (1 stable)

1.0.0 Aug 1, 2024
0.13.0 Jun 26, 2024
0.12.0 Jun 3, 2024
0.8.0 Mar 18, 2024
0.1.1 Jun 5, 2020

#1 in #orml

Download history 147/week @ 2024-07-20 413/week @ 2024-07-27 110/week @ 2024-08-03 159/week @ 2024-08-10 151/week @ 2024-08-17 108/week @ 2024-08-24 71/week @ 2024-08-31 56/week @ 2024-09-07 136/week @ 2024-09-14 152/week @ 2024-09-21 181/week @ 2024-09-28 113/week @ 2024-10-05 104/week @ 2024-10-12 133/week @ 2024-10-19 68/week @ 2024-10-26 106/week @ 2024-11-02

424 downloads per month
Used in 15 crates (14 directly)

Apache-2.0 and GPL-3.0-only

86KB
2K SLoC

open-runtime-module-library

Crates.io codecov GitHub

The Open Runtime Module Library (ORML) is a community maintained collection of Substrate runtime modules.

Runtime Modules Overview

Utility

  • auction
    • Implements a generalized auction interface, used by Acala for liquidation auctions.
  • authority
    • Allow more advanced permission configuration such as timelock for governance actions.
  • gradually-update
    • Provides way to adjust numeric parameter gradually over a period of time.
  • oracle
    • Allow offchain oracle providers to feed data to be consumed by onchain pallets.
  • rewards
    • Implements ability to calculate and distribute token staking rewards.
  • traits
    • Implements various utility traits including BasicCurrency, MultiCurrency, Auction and more. Used by other ORML pallets.

Tokens

  • asset-registry
    • Register asset / token metadata including name, decimals, and XCM Location
    • Partially based on the Acala’s asset-registry pallet, which includes some Acala specific code (e.g. EVM+) so not suitable for other teams.
  • currencies
    • Provide an unified interface to combine pallet-balances and orml-tokens
  • nft
    • Provide a non-fungible-token implementation
  • payments
    • This pallet allows users to create secure reversible payments that keep funds locked in a merchant’s account until the off-chain goods are confirmed to be received. Each payment gets assigned its own judge that can help resolve any disputes between the two parties.
  • tokens
    • Implements fungible tokens pallet with compatibility with Substrate tokens abstractions
  • vesting
    • Provides scheduled balance locking mechanism, in a graded vesting way.

XCM

  • xcm-support
    • Provides supporting traits, types and implementations, to support cross-chain message(XCM) integration with ORML modules.
  • xcm
    • Provides a way for governance body to dispatch XCM.
  • xtokens
    • Provide crosschain token transfer functionality.
    • Used by multiple parachains for their XCM token transfer implementation.

Benchmarking

  • benchmarking
    • Fork of frame-benchmarking in Substrate to allow implement runtime specific benchmarks

Example

Checkout orml-workshop for example usage.

Development

Makefile targets

  • make check
    • Type check the code, without std feature, excluding tests.
  • make check-tests
    • Type check the code, with std feature, including tests.
  • make test
    • Run tests.

Cargo.toml

ORML use Cargo.dev.toml to avoid workspace conflicts with project cargo config. To use cargo commands in ORML workspace, create Cargo.toml by running

  • cp Cargo.dev.toml Cargo.toml, or
  • make Cargo.toml, or
  • change the command to make dev-check etc which does the copy. (For the full list of make commands, check Makefile)

Web3 Foundation Grant Project

ORML is part of the bigger Open-Web3-Stack initiative, that is currently under a General Grant from Web3 Foundation. See Application details here. The 1st milestone has been delivered.

Projects using ORML

In alphabetical order

Dependencies

~20–34MB
~561K SLoC