Skip to content
Snippets Groups Projects
user avatar
Jipyeongseon Geunyang Samgagbeob authored
* authority add runtime-benchmarks

* make-orml-oracle-instantiable

make sure all Trait have I parameter

fix rpc

create macro for AggregatedDataProviderImpl

undo change

undo change

add todo

change name trait name from DataProviderExtended to DataFeeder

implement DataProviderExtended for macro create_median_value_data_provider

fix comments

Update oracle/src/default_combine_data.rs

Co-authored-by: default avatarShaopeng Wang <spxwang@gmail.com>

Update oracle/src/lib.rs

Co-authored-by: default avatarShaopeng Wang <spxwang@gmail.com>

Update traits/src/lib.rs

Co-authored-by: default avatarShaopeng Wang <spxwang@gmail.com>

keep this blank line

filter out None value here to reduce a traverse in retain, define a generic find_median fn to DRY

* fix dep version

* add comments to prove won't panic by using indexing []

* test write

* Fix oracle mocks.

* Rework median value provider and some traits.

* fmt

* Use sp_std Vec.

* Update oracle rpc.

* Fix typo.

Co-authored-by: default avatarzjb0807 <zjb0807@qq.com>
Co-authored-by: default avatarBryan Chen <xlchen1291@gmail.com>
Co-authored-by: default avatarShaopeng Wang <spxwang@gmail.com>
62d7a529
History

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.
  • orml-utilities
    • Various utilities including OrderSet.
  • orml-tokens
    • Fungible tokens module that implements MultiCurrency trait.
  • orml-currencies
    • Provide MultiCurrency implementation using pallet-balances and orml-tokens module.
  • orml-oracle
    • Oracle module that makes off-chain data available on-chain.
  • orml-auction
    • Auction module that implements Auction trait.
  • 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.

Installation

Runtime Cargo.toml

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',
]

Runtime lib.rs

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.