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
hqwangningbo authored Feb 22, 2024
2 parents 5b2c25f + 91942bc commit 2ae7c49
Show file tree
Hide file tree
Showing 54 changed files with 455 additions and 892 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
- uses: taiki-e/install-action@v2
with:
tool: cargo-release
- run: make Cargo.toml
- run: cargo update
- uses: chainguard-dev/actions/setup-gitsign@main
- uses: cargo-bins/release-pr@v2
with:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,5 @@ jobs:
run: cargo clippy -- -D warnings
- name: Check for Wasm
run: make dev-check
- name: Install Zepter
run: cargo install zepter --version 0.15.0 --locked -q -f --no-default-features && zepter --version
- name: Check Rust features
run: make dev-features-check
- name: Run tests
run: make dev-test
33 changes: 33 additions & 0 deletions .github/workflows/zepter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Zepter

on:
pull_request:
branches:
- master
- polkadot-**
paths-ignore:
- '**/README.md'
push:
branches:
- master
- polkadot-**
paths-ignore:
- '**/README.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
- 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
- name: Check Rust features
run: make dev-features-check
113 changes: 38 additions & 75 deletions Cargo.dev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,25 @@ members = [
"auction",
"authority",
"benchmarking",
"build-script-utils",
"currencies",
"gradually-update",
"nft",
"oracle",
"oracle/runtime-api",
"parameters",
"payments",
"rewards",
"tokens",
"tokens/runtime-api",
"traits",
"unknown-tokens",
"utilities",
"vesting",
"rewards",
"nft",
"xcm-mock-message-queue",
"xcm-support",
"xcm",
"xtokens",
"xcm-support",
"unknown-tokens",
"build-script-utils",
"payments",
"parameters",
]

resolver = "2"
Expand All @@ -35,72 +36,34 @@ 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-dmp-queue = { version = "0.4.0", default-features = false }
cumulus-pallet-parachain-system = { version = "0.4.0", default-features = false }
cumulus-pallet-xcm = { version = "0.4.0", default-features = false }
cumulus-pallet-xcmp-queue = { version = "0.4.0", default-features = false }
cumulus-primitives-core = { version = "0.4.0", default-features = false }
frame-benchmarking = { version = "25.0.0", default-features = false }
frame-support = { version = "25.0.0", default-features = false }
frame-system = { version = "25.0.0", default-features = false }
pallet-authority-discovery = { version = "25.0.0", default-features = false }
pallet-authorship = { version = "25.0.0", default-features = false }
pallet-babe = { version = "25.0.0", default-features = false }
pallet-balances = { version = "25.0.0", default-features = false }
pallet-elections-phragmen = { version = "26.0.0", default-features = false }
pallet-message-queue = { version = "28.0.0", default-features = false }
pallet-preimage = { version = "25.0.0", default-features = false }
pallet-root-testing = { version = "1.0.0", default-features = false }
pallet-scheduler = { version = "26.0.0", default-features = false }
pallet-session = { version = "25.0.0", default-features = false }
pallet-staking = { version = "25.0.0", default-features = false }
pallet-timestamp = { version = "24.0.0", default-features = false }
pallet-transaction-payment = { version = "25.0.0", default-features = false }
pallet-treasury = { version = "24.0.0", default-features = false }
pallet-vesting = { version = "25.0.0", default-features = false }
pallet-xcm = { version = "4.0.0", default-features = false }
parachain-info = { package = "staging-parachain-info", version = "0.4.0", default-features = false }
polkadot-core-primitives = { version = "4.0.0", default-features = false }
polkadot-parachain-primitives = { version = "3.0.0", default-features = false }
polkadot-primitives = { version = "4.0.0", default-features = false }
polkadot-runtime-common = { version = "4.0.0", default-features = false }
polkadot-runtime-parachains = { version = "4.0.0", default-features = false }
sp-api = { version = "23.0.0", default-features = false }
sp-application-crypto = { version = "27.0.0", default-features = false }
sp-arithmetic = { version = "20.0.0", default-features = false }
sp-authority-discovery = { version = "23.0.0", default-features = false }
sp-blockchain = { version = "25.0.0", default-features = false }
sp-consensus = { version = "0.29.0", default-features = false }
sp-consensus-slots = { version = "0.29.0", default-features = false }
sp-core = { version = "25.0.0", default-features = false }
sp-debug-derive = { version = "12.0.0", default-features = false }
sp-externalities = { version = "0.23.0", default-features = false }
sp-inherents = { version = "23.0.0", default-features = false }
sp-io = { version = "27.0.0", default-features = false }
sp-keystore = { version = "0.31.0", default-features = false }
sp-maybe-compressed-blob = { version = "9.0.0", default-features = false }
sp-npos-elections = { version = "23.0.0", default-features = false }
sp-panic-handler = { version = "12.0.0", default-features = false }
sp-runtime = { version = "28.0.0", default-features = false }
sp-runtime-interface = { version = "21.0.0", default-features = false }
sp-session = { version = "24.0.0", default-features = false }
sp-staking = { version = "23.0.0", default-features = false }
sp-state-machine = { version = "0.32.0", default-features = false }
sp-std = { version = "12.0.0", default-features = false }
sp-storage = { version = "17.0.0", default-features = false }
sp-timestamp = { version = "23.0.0", default-features = false }
sp-tracing = { version = "14.0.0", default-features = false }
sp-trie = { version = "26.0.0", default-features = false }
sp-version = { version = "26.0.0", default-features = false }
sp-wasm-interface = { version = "18.0.0", default-features = false }
sp-weights = { version = "24.0.0", default-features = false }
xcm = { package = "staging-xcm", version = "4.0.0", default-features = false }
xcm-builder = { package = "staging-xcm-builder", version = "4.0.0", default-features = false }
xcm-executor = { package = "staging-xcm-executor", version = "4.0.0", default-features = false }
cumulus-pallet-xcm = { version = "0.7.0", default-features = false }
cumulus-primitives-core = { version = "0.7.0", default-features = false }
frame-benchmarking = { version = "28.0.0", default-features = false }
frame-support = { version = "28.0.0", default-features = false }
frame-system = { version = "28.0.0", default-features = false }
pallet-balances = { version = "28.0.0", default-features = false }
pallet-elections-phragmen = { version = "29.0.0", default-features = false }
pallet-message-queue = { version = "31.0.0", default-features = false }
pallet-preimage = { version = "28.0.0", default-features = false }
pallet-root-testing = { version = "4.0.0", default-features = false }
pallet-scheduler = { version = "29.0.0", default-features = false }
pallet-treasury = { version = "27.0.0", default-features = false }
pallet-xcm = { version = "7.0.0", default-features = false }
polkadot-parachain-primitives = { version = "6.0.0", default-features = false }
polkadot-runtime-common = { version = "7.0.0", default-features = false }
polkadot-runtime-parachains = { version = "7.0.0", default-features = false }
sp-api = { version = "26.0.0", default-features = false }
sp-application-crypto = { version = "30.0.0", default-features = false }
sp-arithmetic = { version = "23.0.0", default-features = false }
sp-core = { version = "28.0.0", default-features = false }
sp-io = { version = "30.0.0", default-features = false }
sp-runtime = { version = "31.0.1", default-features = false }
sp-runtime-interface = { version = "24.0.0", default-features = false }
sp-staking = { version = "26.0.0", default-features = false }
sp-std = { version = "14.0.0", default-features = false }
sp-storage = { version = "19.0.0", default-features = false }
xcm = { package = "staging-xcm", version = "7.0.0", default-features = false }
xcm-builder = { package = "staging-xcm-builder", version = "7.0.0", default-features = false }
xcm-executor = { package = "staging-xcm-executor", version = "7.0.0", default-features = false }

sc-client-api = { version = "25.0.0" }
sc-client-db = { version = "0.32.0" }
sc-executor = { version = "0.29.0" }
sc-executor-common = { version = "0.26.0" }
sc-utils = { version = "11.0.0" }
xcm-simulator = { version = "4.0.0" }
xcm-simulator = { version = "7.0.0" }
9 changes: 3 additions & 6 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.6.7"
version = "0.7.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.6.7", default-features = false }
orml-traits = { path = "../traits", version = "0.7.0", default-features = false }

# for runtime-benchmarks
polkadot-runtime-common = { workspace = true, optional = true }
Expand All @@ -41,11 +41,7 @@ pallet-message-queue = { workspace = true, features = ["std"] }

# cumulus
cumulus-primitives-core = { workspace = true, features = ["std"] }
cumulus-pallet-dmp-queue = { workspace = true, features = ["std"] }
cumulus-pallet-xcmp-queue = { workspace = true, features = ["std"] }
cumulus-pallet-xcm = { workspace = true, features = ["std"] }
cumulus-pallet-parachain-system = { workspace = true, features = ["std"] }
parachain-info = { workspace = true, features = ["std"] }

# polkadot
polkadot-parachain-primitives = { workspace = true, features = ["std"] }
Expand All @@ -58,6 +54,7 @@ orml-tokens = { path = "../tokens" }
orml-xcm = { path = "../xcm" }
orml-xcm-support = { path = "../xcm-support" }
orml-xtokens = { path = "../xtokens" }
orml-xcm-mock-message-queue = { path = "../xcm-mock-message-queue" }

[features]
default = [ "std" ]
Expand Down
29 changes: 13 additions & 16 deletions asset-registry/src/mock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,35 +162,35 @@ pub type Amount = i128;
decl_test_parachain! {
pub struct ParaA {
Runtime = para::Runtime,
XcmpMessageHandler = para::XcmpQueue,
DmpMessageHandler = para::DmpQueue,
XcmpMessageHandler = para::MsgQueue,
DmpMessageHandler = para::MsgQueue,
new_ext = para_ext(1, None),
}
}

decl_test_parachain! {
pub struct ParaB {
Runtime = para::Runtime,
XcmpMessageHandler = para::XcmpQueue,
DmpMessageHandler = para::DmpQueue,
XcmpMessageHandler = para::MsgQueue,
DmpMessageHandler = para::MsgQueue,
new_ext = para_ext(2, None),
}
}

decl_test_parachain! {
pub struct ParaC {
Runtime = para::Runtime,
XcmpMessageHandler = para::XcmpQueue,
DmpMessageHandler = para::DmpQueue,
XcmpMessageHandler = para::MsgQueue,
DmpMessageHandler = para::MsgQueue,
new_ext = para_ext(3, None),
}
}

decl_test_parachain! {
pub struct ParaG {
Runtime = para::Runtime,
XcmpMessageHandler = para::XcmpQueue,
DmpMessageHandler = para::DmpQueue,
XcmpMessageHandler = para::MsgQueue,
DmpMessageHandler = para::MsgQueue,
new_ext = para_ext(4, Some((
vec![(
4,
Expand Down Expand Up @@ -248,18 +248,12 @@ pub type ParaTokens = orml_tokens::Pallet<para::Runtime>;
pub type ParaXTokens = orml_xtokens::Pallet<para::Runtime>;

pub fn para_ext(para_id: u32, asset_data: Option<(Vec<(u32, Vec<u8>)>, u32)>) -> TestExternalities {
use para::{Runtime, System};
use para::{MsgQueue, Runtime, System};

let mut t = frame_system::GenesisConfig::<Runtime>::default()
.build_storage()
.unwrap();

let parachain_info_config = parachain_info::GenesisConfig::<Runtime> {
_config: Default::default(),
parachain_id: para_id.into(),
};
parachain_info_config.assimilate_storage(&mut t).unwrap();

orml_tokens::GenesisConfig::<Runtime> {
balances: vec![(ALICE, CurrencyId::R, 1_000)],
}
Expand All @@ -273,7 +267,10 @@ pub fn para_ext(para_id: u32, asset_data: Option<(Vec<(u32, Vec<u8>)>, u32)>) ->
}

let mut ext = TestExternalities::new(t);
ext.execute_with(|| System::set_block_number(1));
ext.execute_with(|| {
System::set_block_number(1);
MsgQueue::set_para_id(para_id.into());
});
ext
}

Expand Down
Loading

0 comments on commit 2ae7c49

Please sign in to comment.