Skip to content

Commit

Permalink
Merge branch 'master' into add-lock-events
Browse files Browse the repository at this point in the history
  • Loading branch information
sea212 authored Jan 26, 2023
2 parents ed7103f + 05f0007 commit 0529ff5
Show file tree
Hide file tree
Showing 128 changed files with 3,312 additions and 1,831 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,32 @@ env:
jobs:
test:
name: Coverage Report
runs-on: custom-runner-AWS
runs-on: [self-hosted]
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/cancel-workflow-action@0.9.0
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Clean
run: |
df -h
curl -s https://raw.githubusercontent.com/apache/flink/master/tools/azure-pipelines/free_disk_space.sh | bash
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly-2022-05-15
toolchain: nightly-2022-10-30
components: rustfmt
target: wasm32-unknown-unknown
default: true
- name: Generate code coverage
run: |
wget https://github.com/xd009642/tarpaulin/releases/download/${{ env.TARPAULIN_VERSION }}/cargo-tarpaulin-${{ env.TARPAULIN_VERSION }}-travis.tar.gz
tar -zxvf cargo-tarpaulin-${{ env.TARPAULIN_VERSION }}-travis.tar.gz -C $HOME/.cargo/bin
make Cargo.toml
cargo tarpaulin --verbose --no-fail-fast --workspace --timeout 300 --out Xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
7 changes: 2 additions & 5 deletions .github/workflows/master.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly-2022-05-15
override: true
default: true
toolchain: nightly-2022-10-30
- name: Install cargo-unleash
run: cargo install cargo-unleash --git https://github.com/xlc/cargo-unleash.git # https://github.com/paritytech/cargo-unleash/pull/38
- name: Prepare
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/publish_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true
- run: make Cargo.toml
- run: cargo install cargo-unleash --git https://github.com/xlc/cargo-unleash.git # https://github.com/paritytech/cargo-unleash/pull/38
- run: cargo unleash em-dragons
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ on:
pull_request:
branches:
- master
- polkadot-**
paths-ignore:
- '**/README.md'
push:
branches:
- master
- polkadot-**
paths-ignore:
- '**/README.md'

Expand All @@ -19,25 +21,22 @@ jobs:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/cancel-workflow-action@0.9.0
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
build:
runs-on: custom-runner-AWS
runs-on: [self-hosted]
env:
SCCACHE_CACHE_SIZE: "50G"
needs: cancel
steps:
- uses: actions/checkout@v3
- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly-2022-05-15
toolchain: nightly-2022-10-30
components: rustfmt
target: wasm32-unknown-unknown
override: true
default: true
- name: Install Wasm toolchain
run: rustup target add wasm32-unknown-unknown
- name: Check format
Expand Down
134 changes: 69 additions & 65 deletions Cargo.dev.toml

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ dev-check: Cargo.toml check

dev-check-tests: Cargo.toml
cargo check --tests --all
cargo check --tests --features=bench --package=orml-weight-meter --package=orml-bencher-test

dev-test: Cargo.toml
cargo test --all --features runtime-benchmarks
cargo test --all --features=runtime-benchmarks
cargo test --features=bench --package=orml-weight-meter --package=orml-bencher-test

# run benchmarks via Acala node
benchmark-all:
Expand Down
75 changes: 53 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,53 @@ The Open Runtime Module Library (ORML) is a community maintained collection of S

## Runtime Modules Overview

- [orml-auction](./auction)
- Auction module that implements `Auction` trait.
- [orml-currencies](./currencies)
- Provide `MultiCurrency` implementation using `pallet-balances` and `orml-tokens` module.
- [orml-gradually-update](./gradually-update)
#### Utility
- [auction](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/auction)
- Implements a generalized auction interface, used by Acala for liquidation auctions.
- [authority](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/authority)
- Allow more advanced permission configuration such as timelock for governance actions.
- [gradually-update](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/gradually-update)
- Provides way to adjust numeric parameter gradually over a period of time.
- [orml-nft](./nft)
- Non-fungible-token module provides basic functions to create and manager NFT(non fungible token) such as `create_class`, `transfer`, `mint`, `burn`, `destroy_class`.
- [orml-oracle](./oracle)
- Oracle module that makes off-chain data available on-chain.
- [orml-tokens](./tokens)
- Fungible tokens module that implements `MultiCurrency` trait.
- [orml-traits](./traits)
- Shared traits including `BasicCurrency`, `MultiCurrency`, `Auction` and more.
- [orml-utilities](./utilities)
- Various utilities including `OrderSet`.
- [orml-vesting](./vesting)
- [oracle](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/oracle)
- Allow offchain oracle providers to feed data to be consumed by onchain pallets.
- [rewards](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/rewards)
- Implements ability to calculate and distribute token staking rewards.
- [traits](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/traits)
- Implements various utility traits including BasicCurrency, MultiCurrency, Auction and more. Used by other ORML pallets.

#### Tokens
- [asset-registry](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/asset-registry)
- Register asset / token metadata including name, decimals, and XCM MultiLocation
- 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](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/currencies)
- Provide an unified interface to combine pallet-balances and orml-tokens
- [nft](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/nft)
- Provide a non-fungible-token implementation
- [payments](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/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](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/tokens)
- Implements fungible tokens pallet with compatibility with Substrate tokens abstractions
- [vesting](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/vesting)
- Provides scheduled balance locking mechanism, in a *graded vesting* way.
- [orml-xcm-support](./xcm-support)
- Provides traits, types, and implementations to support XCM integration.
- [orml-xtokens](./xtokens)
- Provides way to do cross-chain assets transfer.
- [Step-by-Step guide](https://github.com/open-web3-stack/open-runtime-module-library/wiki/xtokens) to make XCM cross-chain fungible asset transfer available on your parachain

#### XCM
- [xcm-support](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xcm-support)
- Provides supporting traits, types and implementations, to support cross-chain message(XCM) integration with ORML modules.
- [xcm](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xcm)
- Provides a way for governance body to dispatch XCM.
- [xtokens](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xtokens)
- Provide crosschain token transfer functionality.
- Used by multiple parachains for their XCM token transfer implementation.

#### Benchmarking
- [bencher](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/bencher)
- Benchmarking tool using cargo bench for benchmarking
- [benchmarking](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/benchmarking)
- Fork of frame-benchmarking in Substrate to allow implement runtime specific benchmarks
- [weight-gen](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/weight-gen)
- Weight meter file generation
- [weight-meter](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/weight-meter)
- A low overhead dynamic weight meter

## Example

Expand Down Expand Up @@ -64,18 +88,25 @@ ORML is part of the bigger `Open-Web3-Stack` initiative, that is currently under
_In alphabetical order_

- [Acala Network](https://github.com/AcalaNetwork/Acala)
- [Astar Network](https://github.com/AstarNetwork)
- [Bifrost Finance](https://github.com/bifrost-finance/bifrost)
- [Bit.Country](https://github.com/bit-country/Bit-Country-Blockchain)
- [Centrifuge](https://github.com/centrifuge/centrifuge-chain)
- [ChainX](https://github.com/chainx-org/ChainX)
- [Crust](https://github.com/crustio/crust)
- [GameDAO Protocol](https://github.com/gamedaoco)
- [HydraDX](https://github.com/galacticcouncil/hack.HydraDX-node)
- [Interlay and Kintsugi](https://github.com/interlay/interbtc)
- [KodaDot: MetaPrime Network](https://github.com/kodadot/metaprime.network)
- [Laminar Chain](https://github.com/laminar-protocol/laminar-chain)
- [Libra](https://github.com/atscaletech/libra)
- [Listen](https://github.com/listenofficial)
- [Manta Network](https://github.com/Manta-Network)
- [Mangata Finance](https://github.com/mangata-finance)
- [Minterest](https://github.com/minterest-finance/minterest-chain-node)
- [Plasm Network](https://github.com/PlasmNetwork)
- [Moonbeam](https://github.com/PureStake/moonbeam/)
- [OAK](https://github.com/OAK-Foundation/OAK-blockchain)
- [Parallel Finance](https://github.com/parallel-finance/)
- [PolkaFoundry Network](https://github.com/PolkaFoundry)
- [Setheum Network](https://github.com/Setheum-Labs/Setheum)
- [Valiu Liquidity Network](https://github.com/valibre-org/vln-node)
Expand Down
57 changes: 32 additions & 25 deletions asset-registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,64 +13,71 @@ serde = { version = "1.0.136", optional = true }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] }

# substrate
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.37" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.37" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.37" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.37" }

# polkadot
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.26" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.26" }
xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.26" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.26" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.37" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.37" }
xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.37" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.37" }

# orml
orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false }

[dev-dependencies]
# substrate
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.37" }

# cumulus
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.26" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.26" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.26" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.26" }
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.26" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37" }
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37" }

# polkadot
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.26" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.26" }
xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.26" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37" }
xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37" }

# orml
orml-tokens = { path = "../tokens" }
orml-xtokens = { path = "../xtokens" }
orml-xcm = { path = "../xcm" }
orml-xcm-support = { path = "../xcm-support", default-features = false }
orml-xtokens = { path = "../xtokens" }

[features]
default = ["std"]
std = [
"serde",

"codec/std",
"scale-info/std",
"sp-runtime/std",
"sp-std/std",
"frame-support/std",
"frame-system/std",
"orml-traits/std",
"pallet-xcm/std",
"xcm/std",
"scale-info/std",
"sp-runtime/std",
"sp-std/std",
"xcm-builder/std",
"xcm-executor/std",
"xcm/std",
]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-xcm/try-runtime",
]
try-runtime = ["frame-support/try-runtime"]
Loading

0 comments on commit 0529ff5

Please sign in to comment.