open-runtime-module-library
The Open Runtime Module Library (ORML) is a community maintained collection of Substrate runtime modules.
Runtime Modules Overview
-
orml-traits
- Shared traits including
BasicCurrency
,MultiCurrency
,Auction
and more.
- Shared traits including
-
orml-utilities
- Various utilities including
FixedU128
andLinkedList
.
- Various utilities including
-
orml-tokens
- Fungible tokens module that implements
MultiCurrency
trait.
- Fungible tokens module that implements
-
orml-currencies
- Provide
MultiCurrency
implementation usingpallet-balances
andorml-tokens
module.
- Provide
-
orml-oracle
- Oracle module that makes off-chain data available on-chain.
-
orml-prices
- Provide basic asset price abstraction.
-
orml-auction
- Auction module that implements
Auction
trait.
- Auction module that implements
-
orml-vesting
- Provides scheduled balance locking mechanism, in a graded vesting way.
-
orml-gradually-update
- Provides way to adjust numeric parameter gradually over a period of time.
-
orml-schedule-update
- Provides way to schedule a call to be dispatched at later block.
Installation
Cargo.toml
Runtime To add an ORML
module to your runtime, simply include the following to your runtime's Cargo.toml
file. For instance, to add orml-tokens
module:
[dependencies]
# --snip--
orml-tokens = { git = "https://github.com/laminar-protocol/open-runtime-module-library.git", default-features = false }
and update your runtime's std
feature to include this module:
std = [
# --snip--
'orml-tokens/std',
]
lib.rs
Runtime You should implement it's trait like so:
/// Used for orml_tokens
impl orml_tokens::Trait for Runtime {
type Event = Event;
// --snip--
}
and include it in your construct_runtime!
macro:
Tokens: orml_tokens::{Module, Storage, Call, Event<T>, Config<T>},
Development
Makefile targets
-
make check
- Type check the code, without std feature, exclduing tests.
-
make check-tests
- Type check the code, with std feature, including tests.
-
make test
- Run tests.