Skip to content

Commit

Permalink
Merge branch 'open-web3-stack:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
SunTiebing authored Oct 28, 2024
2 parents 4a6dcd7 + 7d60899 commit 02b28d7
Show file tree
Hide file tree
Showing 36 changed files with 100 additions and 92 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
- '**/README.md'

env:
TARPAULIN_VERSION: 0.19.1
TARPAULIN_VERSION: 0.31.0

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -33,9 +33,11 @@ jobs:
uses: dtolnay/rust-toolchain@nightly
- 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
wget https://github.com/xd009642/tarpaulin/releases/download/${{ env.TARPAULIN_VERSION }}/cargo-tarpaulin-x86_64-unknown-linux-musl.tar.gz
tar -zxvf cargo-tarpaulin-x86_64-unknown-linux-musl.tar.gz -C $HOME/.cargo/bin
make Cargo.toml
cargo update
cargo update -p frame-support-procedural --precise 30.0.2
cargo tarpaulin --verbose --no-fail-fast --workspace --timeout 300 --out Xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ jobs:
- name: Install clippy
run: rustup component add clippy
- name: Update
run: cargo update
run: |
cargo update
cargo update -p frame-support-procedural --precise 30.0.2
- name: Run clippy
run: cargo clippy -- -D warnings
- name: Check for Wasm
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/zepter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
- name: Install Zepter
run: cargo install zepter --version 0.15.0 --locked -q -f --no-default-features && zepter --version
- run: make Cargo.toml
- run: cargo update
- run: |
cargo update
cargo update -p frame-support-procedural --precise 30.0.2
- name: Check Rust features
run: make dev-features-check
52 changes: 26 additions & 26 deletions Cargo.dev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,35 @@ scale-info = { version = "2.10.0", default-features = false, features = ["derive
serde = { version = "1.0.189" }
parity-scale-codec = { version = "3.6.5", default-features = false, features = ["max-encoded-len"] }

cumulus-pallet-xcm = { version = "0.14.0", default-features = false }
cumulus-primitives-core = { version = "0.14.0", default-features = false }
frame-benchmarking = { version = "35.0.0", default-features = false }
frame-support = { version = "35.0.0", default-features = false }
frame-system = { version = "35.0.0", default-features = false }
pallet-balances = { version = "36.0.0", default-features = false }
pallet-elections-phragmen = { version = "36.0.0", default-features = false }
pallet-message-queue = { version = "38.0.0", default-features = false }
pallet-preimage = { version = "35.0.0", default-features = false }
pallet-root-testing = { version = "11.0.0", default-features = false }
pallet-scheduler = { version = "36.0.0", default-features = false }
pallet-timestamp = { version = "34.0.0", default-features = false }
pallet-treasury = { version = "34.0.0", default-features = false }
pallet-xcm = { version = "14.0.0", default-features = false }
polkadot-parachain-primitives = { version = "13.0.0", default-features = false }
polkadot-runtime-common = { version = "14.0.0", default-features = false }
polkadot-runtime-parachains = { version = "14.0.0", default-features = false }
sp-api = { version = "33.0.0", default-features = false }
sp-application-crypto = { version = "37.0.0", default-features = false }
cumulus-pallet-xcm = { version = "0.16.0", default-features = false }
cumulus-primitives-core = { version = "0.15.0", default-features = false }
frame-benchmarking = { version = "37.0.0", default-features = false }
frame-support = { version = "37.0.0", default-features = false }
frame-system = { version = "37.0.0", default-features = false }
pallet-balances = { version = "38.0.0", default-features = false }
pallet-elections-phragmen = { version = "38.0.0", default-features = false }
pallet-message-queue = { version = "40.0.0", default-features = false }
pallet-preimage = { version = "37.0.0", default-features = false }
pallet-root-testing = { version = "13.0.0", default-features = false }
pallet-scheduler = { version = "38.0.0", default-features = false }
pallet-timestamp = { version = "36.0.0", default-features = false }
pallet-treasury = { version = "36.0.0", default-features = false }
pallet-xcm = { version = "16.0.0", default-features = false }
polkadot-parachain-primitives = { version = "14.0.0", default-features = false }
polkadot-runtime-common = { version = "16.0.0", default-features = false }
polkadot-runtime-parachains = { version = "16.0.0", default-features = false }
sp-api = { version = "34.0.0", default-features = false }
sp-application-crypto = { version = "38.0.0", default-features = false }
sp-arithmetic = { version = "26.0.0", default-features = false }
sp-core = { version = "34.0.0", default-features = false }
sp-io = { version = "37.0.0", default-features = false }
sp-runtime = { version = "38.0.0", default-features = false }
sp-io = { version = "38.0.0", default-features = false }
sp-runtime = { version = "39.0.0", default-features = false }
sp-runtime-interface = { version = "28.0.0", default-features = false }
sp-staking = { version = "33.0.0", default-features = false }
sp-staking = { version = "34.0.0", default-features = false }
sp-std = { version = "14.0.0", default-features = false }
sp-storage = { version = "21.0.0", default-features = false }
xcm = { version = "14.0.0", package = "staging-xcm", default-features = false }
xcm-builder = { version = "14.0.0", package = "staging-xcm-builder", default-features = false }
xcm-executor = { version = "14.0.0", package = "staging-xcm-executor", default-features = false }
xcm = { version = "14.1.0", package = "staging-xcm", default-features = false }
xcm-builder = { version = "16.0.0", package = "staging-xcm-builder", default-features = false }
xcm-executor = { version = "16.0.0", package = "staging-xcm-executor", default-features = false }

xcm-simulator = { version = "14.0.0" }
xcm-simulator = { version = "16.0.0" }
4 changes: 2 additions & 2 deletions asset-registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "orml-asset-registry"
description = "Registry for (foreign) assets"
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/asset-registry"
license = "Apache-2.0"
version = "0.13.0"
version = "1.0.0"
authors = ["Interlay Ltd, etc"]
edition = "2021"

Expand All @@ -27,7 +27,7 @@ xcm-builder = { workspace = true }
xcm-executor = { workspace = true }

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

# for runtime-benchmarks
polkadot-runtime-common = { workspace = true, optional = true }
Expand Down
4 changes: 2 additions & 2 deletions auction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "orml-auction"
description = "Auction module that implements `Auction` trait."
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/auction"
license = "Apache-2.0"
version = "0.13.0"
version = "1.0.0"
authors = ["Acala Developers"]
edition = "2021"

Expand All @@ -17,7 +17,7 @@ frame-system = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }

orml-traits = { path = "../traits", version = "0.13.0", default-features = false }
orml-traits = { path = "../traits", version = "1.0.0", default-features = false }

[dev-dependencies]
sp-core = { workspace = true, features = ["std"] }
Expand Down
2 changes: 1 addition & 1 deletion authority/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "orml-authority"
description = "Utility pallet to perform ROOT calls in a PoA network"
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/auction"
license = "Apache-2.0"
version = "0.13.0"
version = "1.0.0"
authors = ["Acala Developers"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion benchmarking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "orml-benchmarking"
description = "Provide macro to benchmark Substrate runtime."
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/benchmarking"
license = "Apache-2.0"
version = "0.13.0"
version = "1.0.0"
authors = ["Laminar Developers <hello@laminar.one>"]
edition = "2021"

Expand Down
2 changes: 2 additions & 0 deletions benchmarking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ pub use frame_benchmarking::{
Recording,
};

#[cfg(not(feature = "std"))]
extern crate alloc;
#[cfg(feature = "std")]
pub use frame_benchmarking::{Analysis, BenchmarkSelector};
#[doc(hidden)]
Expand Down
2 changes: 1 addition & 1 deletion build-script-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "orml-build-script-utils"
description = "Crate with utility functions for `build.rs` scripts."
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/build-script-utils"
license = "Apache-2.0"
version = "0.13.0"
version = "1.0.0"
authors = ["Parity Technologies <admin@parity.io>", "Laminar Developers <hello@laminar.one>"]
edition = "2021"

Expand Down
6 changes: 3 additions & 3 deletions currencies/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "orml-currencies"
description = "Provide `MultiCurrency` implementation using `pallet-balances` and `orml-tokens` module."
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/currencies"
license = "Apache-2.0"
version = "0.13.0"
version = "1.0.0"
authors = ["Laminar Developers <hello@laminar.one>"]
edition = "2021"

Expand All @@ -18,8 +18,8 @@ sp-io = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }

orml-traits = { path = "../traits", version = "0.13.0", default-features = false }
orml-utilities = { path = "../utilities", version = "0.13.0", default-features = false }
orml-traits = { path = "../traits", version = "1.0.0", default-features = false }
orml-utilities = { path = "../utilities", version = "1.0.0", default-features = false }

[dev-dependencies]
pallet-balances = { workspace = true, features = ["std"] }
Expand Down
6 changes: 2 additions & 4 deletions currencies/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
//!
//! - `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.
//! types and methods, like updating balance by a given signed integer amount.
//!
//! ## Interface
//!
Expand All @@ -31,8 +30,7 @@
//! - `transfer` - Transfer some balance to another account, in a given
//! currency.
//! - `transfer_native_currency` - Transfer some balance to another account, in
//! native currency set in
//! `Config::NativeCurrency`.
//! native currency set in `Config::NativeCurrency`.
//! - `update_balance` - Update balance by signed integer amount, in a given
//! currency, root origin required.
Expand Down
2 changes: 1 addition & 1 deletion gradually-update/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "orml-gradually-update"
description = "Provides way to adjust numeric parameter gradually over a period of time."
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/gradually-update"
license = "Apache-2.0"
version = "0.13.0"
version = "1.0.0"
authors = ["Laminar Developers <hello@laminar.one>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion nft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "orml-nft"
description = "Non-fungible token pallet provides basic functions to create and manager NFT"
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/nft"
license = "Apache-2.0"
version = "0.13.0"
version = "1.0.0"
authors = ["Acala Developers"]
edition = "2021"

Expand Down
6 changes: 3 additions & 3 deletions oracle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "orml-oracle"
description = "Oracle module that makes off-chain data available on-chain."
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/oracle"
license = "Apache-2.0"
version = "0.13.0"
version = "1.0.0"
authors = ["Laminar Developers <hello@laminar.one>"]
edition = "2021"

Expand All @@ -20,8 +20,8 @@ sp-runtime = { workspace = true }
sp-std = { workspace = true }
frame-benchmarking = { workspace = true, optional = true }

orml-traits = { path = "../traits", version = "0.13.0", default-features = false }
orml-utilities = { path = "../utilities", version = "0.13.0", default-features = false }
orml-traits = { path = "../traits", version = "1.0.0", default-features = false }
orml-utilities = { path = "../utilities", version = "1.0.0", default-features = false }

[dev-dependencies]
sp-core = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion oracle/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "orml-oracle-runtime-api"
version = "0.13.0"
version = "1.0.0"
authors = ["Laminar Developers <hello@laminar.one>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions parameters/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "orml-parameters"
description = "Offer a centra place to store and configure parameters."
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/parameters"
license = "Apache-2.0"
version = "0.13.0"
version = "1.0.0"
authors = ["Acala Developers"]
edition = "2021"

Expand All @@ -18,7 +18,7 @@ sp-runtime = { workspace = true }
sp-core = { workspace = true }
sp-std = { workspace = true }

orml-traits = { path = "../traits", version = "0.13.0", default-features = false }
orml-traits = { path = "../traits", version = "1.0.0", default-features = false }

[dev-dependencies]
sp-core = { workspace = true, features = ["std"] }
Expand Down
8 changes: 4 additions & 4 deletions payments/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Virto Network <we@virto.team>"]
edition = '2021'
name = "orml-payments"
version = "0.13.0"
version = "1.0.0"
license = "Apache-2.0"
homepage = "https://github.com/virto-network/virto-node"
repository = "https://github.com/virto-network/virto-node"
Expand All @@ -13,17 +13,16 @@ readme = "README.md"
parity-scale-codec = { workspace = true }
log = { workspace = true }
scale-info = { workspace = true }
serde = { workspace = true, optional = true }

frame-support = { workspace = true }
frame-system = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }

orml-traits = {path = "../traits", version = "0.13.0", default-features = false }
orml-traits = {path = "../traits", version = "1.0.0", default-features = false }

[dev-dependencies]
serde = "1.0.136"

sp-core = { workspace = true }
sp-io = { workspace = true }

Expand All @@ -38,6 +37,7 @@ std = [
'orml-traits/std',
'parity-scale-codec/std',
'scale-info/std',
'serde',
'sp-runtime/std',
'sp-std/std',
]
Expand Down
2 changes: 2 additions & 0 deletions payments/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
//! - CancelBufferBlockLength: This is the time window where the recipient can
//! dispute a cancellation request from the payment creator.
//!
//! Extrinsics
//!
//! - `pay` - Create an payment for the given currencyid/amount
Expand All @@ -42,6 +43,7 @@
//! - `accept_and_pay` - Allows the sender to fulfill a payment request created
//! by a recipient
//!
//! Types
//!
//! The `PaymentDetail` struct stores information about the payment/escrow. A
Expand Down
7 changes: 5 additions & 2 deletions payments/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ use parity_scale_codec::{Decode, Encode, HasCompact, MaxEncodedLen};
use scale_info::TypeInfo;
use sp_runtime::{DispatchResult, Percent};

#[cfg(feature = "std")]
use serde::{Deserialize, Serialize};

/// The PaymentDetail struct stores information about the payment/escrow
/// A "payment" in virto network is similar to an escrow, it is used to
/// guarantee proof of funds and can be released once an agreed upon condition
Expand All @@ -13,7 +16,7 @@ use sp_runtime::{DispatchResult, Percent};
#[derive(Encode, Decode, Debug, Clone, PartialEq, Eq, MaxEncodedLen, TypeInfo)]
#[scale_info(skip_type_params(T))]
#[codec(mel_bound(T: pallet::Config))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub struct PaymentDetail<T: pallet::Config> {
/// type of asset used for payment
pub asset: AssetIdOf<T>,
Expand All @@ -38,7 +41,7 @@ pub struct PaymentDetail<T: pallet::Config> {
#[derive(Encode, Decode, Debug, Clone, PartialEq, Eq, MaxEncodedLen, TypeInfo)]
#[scale_info(skip_type_params(T))]
#[codec(mel_bound(T: pallet::Config))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub enum PaymentState<T: pallet::Config> {
/// Amounts have been reserved and waiting for release/cancel
Created,
Expand Down
6 changes: 3 additions & 3 deletions rate-limit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "orml-rate-limit"
description = "Provides way to config rate limiter for limit some operation."
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/rate-limit"
license = "Apache-2.0"
version = "0.13.0"
version = "1.0.0"
authors = ["Laminar Developers <hello@laminar.one>"]
edition = "2021"

Expand All @@ -19,8 +19,8 @@ sp-io = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }

orml-traits = { path = "../traits", version = "0.13.0", default-features = false }
orml-utilities = { path = "../utilities", version = "0.13.0", default-features = false }
orml-traits = { path = "../traits", version = "1.0.0", default-features = false }
orml-utilities = { path = "../utilities", version = "1.0.0", default-features = false }

[dev-dependencies]
pallet-timestamp = { workspace = true, features = ["std"] }
Expand Down
Loading

0 comments on commit 02b28d7

Please sign in to comment.