Skip to content

Commit ce76f2e

Browse files
committed
Merge remote-tracking branch 'origin/master' into add-existence-requirement
2 parents 6f59368 + 286c731 commit ce76f2e

File tree

32 files changed

+126
-102
lines changed

32 files changed

+126
-102
lines changed

.github/workflows/coverage.yml

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
tar -zxvf cargo-tarpaulin-x86_64-unknown-linux-musl.tar.gz -C $HOME/.cargo/bin
3838
make Cargo.toml
3939
cargo update
40-
cargo update -p frame-support-procedural --precise 30.0.2
4140
cargo tarpaulin --verbose --no-fail-fast --workspace --timeout 300 --out Xml
4241
- name: Upload to codecov.io
4342
uses: codecov/codecov-action@v3

.github/workflows/test.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ jobs:
3434
- name: Install clippy
3535
run: rustup component add clippy
3636
- name: Update
37-
run: |
38-
cargo update
39-
cargo update -p frame-support-procedural --precise 30.0.2
37+
run: cargo update
4038
- name: Run clippy
4139
run: cargo clippy -- -D warnings
4240
- name: Check for Wasm

.github/workflows/zepter.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ jobs:
2828
- name: Install Zepter
2929
run: cargo install zepter --version 0.15.0 --locked -q -f --no-default-features && zepter --version
3030
- run: make Cargo.toml
31-
- run: |
32-
cargo update
33-
cargo update -p frame-support-procedural --precise 30.0.2
31+
- run: cargo update
3432
- name: Check Rust features
3533
run: make dev-features-check

Cargo.dev.toml

+22-22
Original file line numberDiff line numberDiff line change
@@ -37,35 +37,35 @@ scale-info = { version = "2.10.0", default-features = false, features = ["derive
3737
serde = { version = "1.0.189" }
3838
parity-scale-codec = { version = "3.6.5", default-features = false, features = ["max-encoded-len"] }
3939

40-
cumulus-pallet-xcm = { version = "0.16.0", default-features = false }
41-
cumulus-primitives-core = { version = "0.15.0", default-features = false }
42-
frame-benchmarking = { version = "37.0.0", default-features = false }
43-
frame-support = { version = "37.0.0", default-features = false }
44-
frame-system = { version = "37.0.0", default-features = false }
45-
pallet-balances = { version = "38.0.0", default-features = false }
46-
pallet-elections-phragmen = { version = "38.0.0", default-features = false }
47-
pallet-message-queue = { version = "40.0.0", default-features = false }
48-
pallet-preimage = { version = "37.0.0", default-features = false }
49-
pallet-root-testing = { version = "13.0.0", default-features = false }
50-
pallet-scheduler = { version = "38.0.0", default-features = false }
51-
pallet-timestamp = { version = "36.0.0", default-features = false }
52-
pallet-treasury = { version = "36.0.0", default-features = false }
53-
pallet-xcm = { version = "16.0.0", default-features = false }
40+
cumulus-pallet-xcm = { version = "0.17.0", default-features = false }
41+
cumulus-primitives-core = { version = "0.16.0", default-features = false }
42+
frame-benchmarking = { version = "38.0.0", default-features = false }
43+
frame-support = { version = "38.0.0", default-features = false }
44+
frame-system = { version = "38.0.0", default-features = false }
45+
pallet-balances = { version = "39.0.0", default-features = false }
46+
pallet-elections-phragmen = { version = "39.0.0", default-features = false }
47+
pallet-message-queue = { version = "41.0.1", default-features = false }
48+
pallet-preimage = { version = "38.0.0", default-features = false }
49+
pallet-root-testing = { version = "14.0.0", default-features = false }
50+
pallet-scheduler = { version = "39.0.0", default-features = false }
51+
pallet-timestamp = { version = "37.0.0", default-features = false }
52+
pallet-treasury = { version = "37.0.0", default-features = false }
53+
pallet-xcm = { version = "17.0.0", default-features = false }
5454
polkadot-parachain-primitives = { version = "14.0.0", default-features = false }
55-
polkadot-runtime-common = { version = "16.0.0", default-features = false }
56-
polkadot-runtime-parachains = { version = "16.0.0", default-features = false }
55+
polkadot-runtime-common = { version = "17.0.0", default-features = false }
56+
polkadot-runtime-parachains = { version = "17.0.1", default-features = false }
5757
sp-api = { version = "34.0.0", default-features = false }
5858
sp-application-crypto = { version = "38.0.0", default-features = false }
5959
sp-arithmetic = { version = "26.0.0", default-features = false }
6060
sp-core = { version = "34.0.0", default-features = false }
6161
sp-io = { version = "38.0.0", default-features = false }
62-
sp-runtime = { version = "39.0.0", default-features = false }
62+
sp-runtime = { version = "39.0.1", default-features = false }
6363
sp-runtime-interface = { version = "28.0.0", default-features = false }
64-
sp-staking = { version = "34.0.0", default-features = false }
64+
sp-staking = { version = "36.0.0", default-features = false }
6565
sp-std = { version = "14.0.0", default-features = false }
6666
sp-storage = { version = "21.0.0", default-features = false }
67-
xcm = { version = "14.1.0", package = "staging-xcm", default-features = false }
68-
xcm-builder = { version = "16.0.0", package = "staging-xcm-builder", default-features = false }
69-
xcm-executor = { version = "16.0.0", package = "staging-xcm-executor", default-features = false }
67+
xcm = { version = "14.2.0", package = "staging-xcm", default-features = false }
68+
xcm-builder = { version = "17.0.1", package = "staging-xcm-builder", default-features = false }
69+
xcm-executor = { version = "17.0.0", package = "staging-xcm-executor", default-features = false }
7070

71-
xcm-simulator = { version = "16.0.0" }
71+
xcm-simulator = { version = "17.0.0" }

asset-registry/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "orml-asset-registry"
33
description = "Registry for (foreign) assets"
44
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/asset-registry"
55
license = "Apache-2.0"
6-
version = "1.0.0"
6+
version = "1.1.0"
77
authors = ["Interlay Ltd, etc"]
88
edition = "2021"
99

@@ -27,7 +27,7 @@ xcm-builder = { workspace = true }
2727
xcm-executor = { workspace = true }
2828

2929
# orml
30-
orml-traits = { path = "../traits", version = "1.0.0", default-features = false }
30+
orml-traits = { path = "../traits", version = "1.1.0", default-features = false }
3131

3232
# for runtime-benchmarks
3333
polkadot-runtime-common = { workspace = true, optional = true }

auction/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "orml-auction"
33
description = "Auction module that implements `Auction` trait."
44
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/auction"
55
license = "Apache-2.0"
6-
version = "1.0.0"
6+
version = "1.1.0"
77
authors = ["Acala Developers"]
88
edition = "2021"
99

@@ -17,7 +17,7 @@ frame-system = { workspace = true }
1717
sp-runtime = { workspace = true }
1818
sp-std = { workspace = true }
1919

20-
orml-traits = { path = "../traits", version = "1.0.0", default-features = false }
20+
orml-traits = { path = "../traits", version = "1.1.0", default-features = false }
2121

2222
[dev-dependencies]
2323
sp-core = { workspace = true, features = ["std"] }

authority/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "orml-authority"
33
description = "Utility pallet to perform ROOT calls in a PoA network"
44
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/auction"
55
license = "Apache-2.0"
6-
version = "1.0.0"
6+
version = "1.1.0"
77
authors = ["Acala Developers"]
88
edition = "2021"
99

benchmarking/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "orml-benchmarking"
33
description = "Provide macro to benchmark Substrate runtime."
44
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/benchmarking"
55
license = "Apache-2.0"
6-
version = "1.0.0"
6+
version = "1.1.0"
77
authors = ["Laminar Developers <[email protected]>"]
88
edition = "2021"
99

build-script-utils/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "orml-build-script-utils"
33
description = "Crate with utility functions for `build.rs` scripts."
44
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/build-script-utils"
55
license = "Apache-2.0"
6-
version = "1.0.0"
6+
version = "1.1.0"
77
authors = ["Parity Technologies <[email protected]>", "Laminar Developers <[email protected]>"]
88
edition = "2021"
99

currencies/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "orml-currencies"
33
description = "Provide `MultiCurrency` implementation using `pallet-balances` and `orml-tokens` module."
44
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/currencies"
55
license = "Apache-2.0"
6-
version = "1.0.0"
6+
version = "1.1.0"
77
authors = ["Laminar Developers <[email protected]>"]
88
edition = "2021"
99

@@ -18,8 +18,8 @@ sp-io = { workspace = true }
1818
sp-runtime = { workspace = true }
1919
sp-std = { workspace = true }
2020

21-
orml-traits = { path = "../traits", version = "1.0.0", default-features = false }
22-
orml-utilities = { path = "../utilities", version = "1.0.0", default-features = false }
21+
orml-traits = { path = "../traits", version = "1.1.0", default-features = false }
22+
orml-utilities = { path = "../utilities", version = "1.1.0", default-features = false }
2323

2424
[dev-dependencies]
2525
pallet-balances = { workspace = true, features = ["std"] }

gradually-update/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "orml-gradually-update"
33
description = "Provides way to adjust numeric parameter gradually over a period of time."
44
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/gradually-update"
55
license = "Apache-2.0"
6-
version = "1.0.0"
6+
version = "1.1.0"
77
authors = ["Laminar Developers <[email protected]>"]
88
edition = "2021"
99

nft/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "orml-nft"
33
description = "Non-fungible token pallet provides basic functions to create and manager NFT"
44
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/nft"
55
license = "Apache-2.0"
6-
version = "1.0.0"
6+
version = "1.1.0"
77
authors = ["Acala Developers"]
88
edition = "2021"
99

oracle/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "orml-oracle"
33
description = "Oracle module that makes off-chain data available on-chain."
44
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/oracle"
55
license = "Apache-2.0"
6-
version = "1.0.0"
6+
version = "1.1.0"
77
authors = ["Laminar Developers <[email protected]>"]
88
edition = "2021"
99

@@ -20,8 +20,8 @@ sp-runtime = { workspace = true }
2020
sp-std = { workspace = true }
2121
frame-benchmarking = { workspace = true, optional = true }
2222

23-
orml-traits = { path = "../traits", version = "1.0.0", default-features = false }
24-
orml-utilities = { path = "../utilities", version = "1.0.0", default-features = false }
23+
orml-traits = { path = "../traits", version = "1.1.0", default-features = false }
24+
orml-utilities = { path = "../utilities", version = "1.1.0", default-features = false }
2525

2626
[dev-dependencies]
2727
sp-core = { workspace = true }

oracle/runtime-api/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "orml-oracle-runtime-api"
3-
version = "1.0.0"
3+
version = "1.1.0"
44
authors = ["Laminar Developers <[email protected]>"]
55
edition = "2021"
66
license = "Apache-2.0"

parameters/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "orml-parameters"
33
description = "Offer a centra place to store and configure parameters."
44
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/parameters"
55
license = "Apache-2.0"
6-
version = "1.0.0"
6+
version = "1.1.0"
77
authors = ["Acala Developers"]
88
edition = "2021"
99

@@ -18,7 +18,7 @@ sp-runtime = { workspace = true }
1818
sp-core = { workspace = true }
1919
sp-std = { workspace = true }
2020

21-
orml-traits = { path = "../traits", version = "1.0.0", default-features = false }
21+
orml-traits = { path = "../traits", version = "1.1.0", default-features = false }
2222

2323
[dev-dependencies]
2424
sp-core = { workspace = true, features = ["std"] }

payments/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
authors = ["Virto Network <[email protected]>"]
33
edition = '2021'
44
name = "orml-payments"
5-
version = "1.0.0"
5+
version = "1.1.0"
66
license = "Apache-2.0"
77
homepage = "https://github.com/virto-network/virto-node"
88
repository = "https://github.com/virto-network/virto-node"
@@ -20,7 +20,7 @@ frame-system = { workspace = true }
2020
sp-runtime = { workspace = true }
2121
sp-std = { workspace = true }
2222

23-
orml-traits = {path = "../traits", version = "1.0.0", default-features = false }
23+
orml-traits = {path = "../traits", version = "1.1.0", default-features = false }
2424

2525
[dev-dependencies]
2626
sp-core = { workspace = true }

rate-limit/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "orml-rate-limit"
33
description = "Provides way to config rate limiter for limit some operation."
44
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/rate-limit"
55
license = "Apache-2.0"
6-
version = "1.0.0"
6+
version = "1.1.0"
77
authors = ["Laminar Developers <[email protected]>"]
88
edition = "2021"
99

@@ -19,8 +19,8 @@ sp-io = { workspace = true }
1919
sp-runtime = { workspace = true }
2020
sp-std = { workspace = true }
2121

22-
orml-traits = { path = "../traits", version = "1.0.0", default-features = false }
23-
orml-utilities = { path = "../utilities", version = "1.0.0", default-features = false }
22+
orml-traits = { path = "../traits", version = "1.1.0", default-features = false }
23+
orml-utilities = { path = "../utilities", version = "1.1.0", default-features = false }
2424

2525
[dev-dependencies]
2626
pallet-timestamp = { workspace = true, features = ["std"] }

rewards/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "orml-rewards"
33
description = "Store and manage shares and rewards"
44
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/rewards"
55
license = "Apache-2.0"
6-
version = "1.0.0"
6+
version = "1.1.0"
77
authors = ["Acala Developers"]
88
edition = "2021"
99

@@ -19,7 +19,7 @@ sp-io = { workspace = true }
1919
sp-runtime = { workspace = true, features = ["serde"] }
2020
sp-std = { workspace = true }
2121

22-
orml-traits = { path = "../traits", version = "1.0.0", default-features = false }
22+
orml-traits = { path = "../traits", version = "1.1.0", default-features = false }
2323

2424
[dev-dependencies]
2525
sp-core = { workspace = true, features = ["std"] }

tokens/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "orml-tokens"
33
description = "Fungible tokens module that implements `MultiCurrency` trait."
44
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/tokens"
55
license = "Apache-2.0"
6-
version = "1.0.0"
6+
version = "1.1.0"
77
authors = ["Laminar Developers <[email protected]>"]
88
edition = "2021"
99

@@ -19,7 +19,7 @@ sp-arithmetic = { workspace = true }
1919
sp-runtime = { workspace = true }
2020
sp-std = { workspace = true }
2121

22-
orml-traits = { path = "../traits", version = "1.0.0", default-features = false }
22+
orml-traits = { path = "../traits", version = "1.1.0", default-features = false }
2323

2424
[dev-dependencies]
2525
pallet-elections-phragmen = { workspace = true, features = ["std"] }

tokens/runtime-api/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "orml-tokens-runtime-api"
3-
version = "1.0.0"
3+
version = "1.1.0"
44
authors = ["Laminar Developers <[email protected]>"]
55
edition = "2021"
66
license = "Apache-2.0"

tokens/src/imbalances.rs

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// wrapping these imbalances in a private module is necessary to ensure absolute
22
// privacy of the inner member.
33
use crate::{Config, TotalIssuance};
4-
use frame_support::traits::{Get, Imbalance, SameOrOther, TryDrop};
4+
use frame_support::traits::{tokens::imbalance::TryMerge, Get, Imbalance, SameOrOther, TryDrop};
55
use sp_runtime::traits::{Saturating, Zero};
66
use sp_std::{marker, mem, result};
77

@@ -184,3 +184,14 @@ impl<T: Config, GetCurrencyId: Get<T::CurrencyId>> Drop for NegativeImbalance<T,
184184
TotalIssuance::<T>::mutate(GetCurrencyId::get(), |v| *v = v.saturating_sub(self.0));
185185
}
186186
}
187+
188+
impl<T: Config, GetCurrencyId: Get<T::CurrencyId>> TryMerge for PositiveImbalance<T, GetCurrencyId> {
189+
fn try_merge(self, other: Self) -> Result<Self, (Self, Self)> {
190+
Ok(self.merge(other))
191+
}
192+
}
193+
impl<T: Config, GetCurrencyId: Get<T::CurrencyId>> TryMerge for NegativeImbalance<T, GetCurrencyId> {
194+
fn try_merge(self, other: Self) -> Result<Self, (Self, Self)> {
195+
Ok(self.merge(other))
196+
}
197+
}

tokens/src/mock.rs

-24
Original file line numberDiff line numberDiff line change
@@ -56,30 +56,6 @@ thread_local! {
5656
]);
5757
}
5858

59-
pub struct TenToFourteen;
60-
impl SortedMembers<AccountId> for TenToFourteen {
61-
fn sorted_members() -> Vec<AccountId> {
62-
TEN_TO_FOURTEEN.with(|v| v.borrow().clone())
63-
}
64-
#[cfg(feature = "runtime-benchmarks")]
65-
fn add(new: &AccountId) {
66-
TEN_TO_FOURTEEN.with(|v| {
67-
let mut members = v.borrow_mut();
68-
members.push(new.clone());
69-
members.sort();
70-
})
71-
}
72-
}
73-
74-
impl ContainsLengthBound for TenToFourteen {
75-
fn max_len() -> usize {
76-
TEN_TO_FOURTEEN.with(|v| v.borrow().len())
77-
}
78-
fn min_len() -> usize {
79-
0
80-
}
81-
}
82-
8359
parameter_types! {
8460
pub const ProposalBond: Permill = Permill::from_percent(5);
8561
pub const Burn: Permill = Permill::from_percent(50);

traits/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "orml-traits"
33
description = "Shared traits including `BasicCurrency`, `MultiCurrency`, `Auction` and more."
44
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/traits"
55
license = "Apache-2.0"
6-
version = "1.0.0"
6+
version = "1.1.0"
77
authors = ["Laminar Developers <[email protected]>"]
88
edition = "2021"
99

@@ -23,7 +23,7 @@ frame-support = { workspace = true }
2323

2424
xcm = { workspace = true }
2525

26-
orml-utilities = { path = "../utilities", version = "1.0.0", default-features = false }
26+
orml-utilities = { path = "../utilities", version = "1.1.0", default-features = false }
2727

2828
[features]
2929
default = [ "std" ]

0 commit comments

Comments
 (0)