From cafa148d44e9c97b19e349c414b69a9a78fffa11 Mon Sep 17 00:00:00 2001 From: Bryan Chen Date: Tue, 8 Nov 2022 11:07:33 +1300 Subject: [PATCH 01/27] run CI for release branch --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 89ac1033e..ce030bdd7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,11 +4,13 @@ on: pull_request: branches: - master + - polkadot-** paths-ignore: - '**/README.md' push: branches: - master + - polkadot-** paths-ignore: - '**/README.md' From f4ef99fb108232c4c1fe9ed54d08be3681b77669 Mon Sep 17 00:00:00 2001 From: zjb0807 Date: Tue, 8 Nov 2022 11:17:23 +1300 Subject: [PATCH 02/27] Upgrade polkadot-v0.9.31 (#830) * Upgrade polkadot-v0.9.31 * Update authority/src/lib.rs Co-authored-by: Xiliang Chen * fix tests Co-authored-by: Xiliang Chen --- Cargo.dev.toml | 130 +++++++++++++++--------------- asset-registry/Cargo.toml | 38 ++++----- asset-registry/src/mock/mod.rs | 11 +-- asset-registry/src/tests.rs | 16 +--- auction/Cargo.toml | 12 +-- authority/Cargo.toml | 20 ++--- authority/src/lib.rs | 36 ++++++++- authority/src/mock.rs | 21 +++-- authority/src/tests.rs | 95 ++++++++++++++++++---- bencher/Cargo.toml | 24 +++--- bencher/test/Cargo.toml | 12 +-- benchmarking/Cargo.toml | 18 ++--- currencies/Cargo.toml | 14 ++-- currencies/src/mock.rs | 7 +- gradually-update/Cargo.toml | 12 +-- gradually-update/src/tests.rs | 4 +- nft/Cargo.toml | 12 +-- oracle/Cargo.toml | 14 ++-- oracle/rpc/Cargo.toml | 6 +- oracle/rpc/runtime-api/Cargo.toml | 4 +- payments/Cargo.toml | 14 ++-- rewards/Cargo.toml | 14 ++-- tokens/Cargo.toml | 16 ++-- tokens/rpc/Cargo.toml | 12 +-- tokens/rpc/runtime-api/Cargo.toml | 6 +- tokens/src/mock.rs | 16 +--- traits/Cargo.toml | 10 +-- unknown-tokens/Cargo.toml | 14 ++-- utilities/Cargo.toml | 10 +-- utilities/src/ordered_set.rs | 6 +- vesting/Cargo.toml | 14 ++-- weight-gen/Cargo.toml | 2 +- weight-gen/src/main.rs | 34 ++++---- weight-meter/Cargo.toml | 14 ++-- weight-meter/src/tests.rs | 2 +- xcm-support/Cargo.toml | 10 +-- xcm/Cargo.toml | 12 +-- xtokens/Cargo.toml | 40 ++++----- 38 files changed, 415 insertions(+), 337 deletions(-) diff --git a/Cargo.dev.toml b/Cargo.dev.toml index 5428a6949..1b99160a3 100644 --- a/Cargo.dev.toml +++ b/Cargo.dev.toml @@ -32,72 +32,72 @@ resolver = "2" split-debuginfo = "unpacked" [patch.'https://github.com/paritytech/substrate'] -frame-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -frame-support = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -frame-system = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -pallet-babe = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -pallet-balances = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -pallet-scheduler = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -pallet-session = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -pallet-staking = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -pallet-timestamp = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -pallet-treasury = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -pallet-vesting = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sc-client-api = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sc-client-db = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sc-executor = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sc-executor-common = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sc-executor-wasmi = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sc-utils = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-api = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-application-crypto = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-arithmetic = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-authorship = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-blockchain = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-consensus = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-consensus-slots = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-core = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-debug-derive = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-externalities = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-inherents = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-io = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-keystore = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-npos-elections = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-panic-handler = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-runtime = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-runtime-interface = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-session = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-staking = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-state-machine = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-std = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-storage = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-tasks = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-timestamp = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-trie = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-version = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-wasm-interface = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-tracing = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", rev = "a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" } +frame-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +frame-support = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +frame-system = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +pallet-babe = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +pallet-balances = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +pallet-scheduler = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +pallet-session = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +pallet-staking = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +pallet-timestamp = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +pallet-treasury = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +pallet-vesting = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sc-client-api = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sc-client-db = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sc-executor = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sc-executor-common = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sc-executor-wasmi = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sc-utils = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-api = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-application-crypto = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-arithmetic = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-authorship = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-blockchain = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-consensus = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-consensus-slots = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-core = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-debug-derive = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-externalities = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-inherents = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-io = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-keystore = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-npos-elections = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-panic-handler = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-runtime = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-runtime-interface = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-session = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-staking = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-state-machine = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-std = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-storage = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-tasks = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-timestamp = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-trie = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-version = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-wasm-interface = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-tracing = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } [patch.'https://github.com/paritytech/cumulus'] -cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", rev = "5fc9081ff72bfe2bc2f013fc7f83208a86e6826a" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "5fc9081ff72bfe2bc2f013fc7f83208a86e6826a" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "5fc9081ff72bfe2bc2f013fc7f83208a86e6826a" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", rev = "5fc9081ff72bfe2bc2f013fc7f83208a86e6826a" } -parachain-info = { git = "https://github.com/paritytech//cumulus", rev = "5fc9081ff72bfe2bc2f013fc7f83208a86e6826a" } +cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", rev = "a63ca3a370d0b1c2743b7d6fac4690a8a9ccff2d" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "a63ca3a370d0b1c2743b7d6fac4690a8a9ccff2d" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "a63ca3a370d0b1c2743b7d6fac4690a8a9ccff2d" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", rev = "a63ca3a370d0b1c2743b7d6fac4690a8a9ccff2d" } +parachain-info = { git = "https://github.com/paritytech//cumulus", rev = "a63ca3a370d0b1c2743b7d6fac4690a8a9ccff2d" } [patch.'https://github.com/paritytech/polkadot'] -pallet-xcm = { git = "https://github.com/paritytech//polkadot", rev = "064536093f5ff70d867f4bbce8d4c41a406d317a" } -polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", rev = "064536093f5ff70d867f4bbce8d4c41a406d317a" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", rev = "064536093f5ff70d867f4bbce8d4c41a406d317a" } -polkadot-parachain = { git = "https://github.com/paritytech//polkadot", rev = "064536093f5ff70d867f4bbce8d4c41a406d317a" } -polkadot-primitives = { git = "https://github.com/paritytech//polkadot", rev = "064536093f5ff70d867f4bbce8d4c41a406d317a" } -xcm = { git = "https://github.com/paritytech//polkadot", rev = "064536093f5ff70d867f4bbce8d4c41a406d317a" } -xcm-executor = { git = "https://github.com/paritytech//polkadot", rev = "064536093f5ff70d867f4bbce8d4c41a406d317a" } -xcm-builder = { git = "https://github.com/paritytech//polkadot", rev = "064536093f5ff70d867f4bbce8d4c41a406d317a" } -xcm-simulator = { git = "https://github.com/paritytech//polkadot", rev = "064536093f5ff70d867f4bbce8d4c41a406d317a" } +pallet-xcm = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } +polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } +polkadot-parachain = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } +polkadot-primitives = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } +xcm = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } +xcm-executor = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } +xcm-builder = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } +xcm-simulator = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } diff --git a/asset-registry/Cargo.toml b/asset-registry/Cargo.toml index 27eaa1031..4970ad8d3 100644 --- a/asset-registry/Cargo.toml +++ b/asset-registry/Cargo.toml @@ -13,37 +13,37 @@ 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.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } # polkadot -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.30" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.30" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.30" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.30" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } # 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.30" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } # cumulus -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.30" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.30" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.30" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.30" } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.30" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } # polkadot -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.30" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.30" } -xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.30" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } +xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } # orml orml-tokens = { path = "../tokens" } diff --git a/asset-registry/src/mock/mod.rs b/asset-registry/src/mock/mod.rs index ac9caa126..a9eecb939 100644 --- a/asset-registry/src/mock/mod.rs +++ b/asset-registry/src/mock/mod.rs @@ -84,7 +84,7 @@ impl Convert> for CurrencyIdConvert { }, _ => None, }; - currency_id.or_else(|| AssetRegistry::location_to_asset_id(&l).map(|id| CurrencyId::RegisteredAsset(id))) + currency_id.or_else(|| AssetRegistry::location_to_asset_id(&l).map(CurrencyId::RegisteredAsset)) } } impl Convert> for CurrencyIdConvert { @@ -208,12 +208,9 @@ pub fn para_ext(para_id: u32, asset_data: Option<(Vec<(u32, Vec)>, u32)>) -> .unwrap(); if let Some((assets, last_asset_id)) = asset_data { - GenesisConfig:: { - assets: assets, - last_asset_id: last_asset_id, - } - .assimilate_storage(&mut t) - .unwrap(); + GenesisConfig:: { assets, last_asset_id } + .assimilate_storage(&mut t) + .unwrap(); } let mut ext = TestExternalities::new(t); diff --git a/asset-registry/src/tests.rs b/asset-registry/src/tests.rs index a56999888..0ef593428 100644 --- a/asset-registry/src/tests.rs +++ b/asset-registry/src/tests.rs @@ -386,7 +386,7 @@ fn test_register_duplicate_location_returns_error() { None )); let register_asset = RuntimeCall::AssetRegistry(crate::Call::::register_asset { - metadata: metadata.clone(), + metadata, asset_id: None, }); assert_noop!( @@ -446,7 +446,7 @@ fn test_update_metadata_works() { Some(new_metadata.additional.clone()) )); - let old_location: MultiLocation = old_metadata.location.clone().unwrap().try_into().unwrap(); + let old_location: MultiLocation = old_metadata.location.unwrap().try_into().unwrap(); let new_location: MultiLocation = new_metadata.location.clone().unwrap().try_into().unwrap(); // check that the old location was removed and the new one added @@ -463,11 +463,7 @@ fn test_update_metadata_fails_with_unknown_asset() { ParaA::execute_with(|| { let old_metadata = dummy_metadata(); - assert_ok!(AssetRegistry::register_asset( - RuntimeOrigin::root(), - old_metadata.clone(), - None - )); + assert_ok!(AssetRegistry::register_asset(RuntimeOrigin::root(), old_metadata, None)); assert_noop!( AssetRegistry::update_asset(RuntimeOrigin::root(), 4, None, None, None, None, None, None,), @@ -518,11 +514,7 @@ fn test_asset_authority() { let metadata = dummy_metadata(); // Assert that root can register an asset with id 1 - assert_ok!(AssetRegistry::register_asset( - RuntimeOrigin::root(), - metadata.clone(), - Some(1) - )); + assert_ok!(AssetRegistry::register_asset(RuntimeOrigin::root(), metadata, Some(1))); // Assert that only Account42 can register asset with id 42 let metadata = AssetMetadata { diff --git a/auction/Cargo.toml b/auction/Cargo.toml index 8ff6100ce..004c5c905 100644 --- a/auction/Cargo.toml +++ b/auction/Cargo.toml @@ -12,16 +12,16 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/authority/Cargo.toml b/authority/Cargo.toml index 6d8b44268..e0468a06b 100644 --- a/authority/Cargo.toml +++ b/authority/Cargo.toml @@ -9,19 +9,20 @@ edition = "2021" [dependencies] scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -serde = { version = "1.0.136", optional = true } +serde = { version = "1.0.145", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } [features] default = ["std"] @@ -31,6 +32,7 @@ std = [ "scale-info/std", "sp-runtime/std", "sp-std/std", + "sp-io/std", "frame-support/std", "frame-system/std", ] diff --git a/authority/src/lib.rs b/authority/src/lib.rs index c895fd4ec..cc49a9074 100644 --- a/authority/src/lib.rs +++ b/authority/src/lib.rs @@ -25,9 +25,10 @@ use frame_support::{ dispatch::{DispatchClass, GetDispatchInfo, Pays}, pallet_prelude::*, traits::{ - schedule::{DispatchTime, Named as ScheduleNamed, Priority}, + schedule::{v1::Named as ScheduleNamed, DispatchTime, Priority}, EitherOfDiverse, EnsureOrigin, Get, IsType, OriginTrait, }, + weights::OldWeight, }; use frame_system::{pallet_prelude::*, EnsureRoot, EnsureSigned}; use scale_info::TypeInfo; @@ -413,6 +414,37 @@ pub mod module { }) } + #[pallet::weight(( + T::WeightInfo::trigger_call().saturating_add((*call_weight_bound).into()), + DispatchClass::Operational, + ))] + #[allow(deprecated)] + #[deprecated(note = "1D weight is used in this extrinsic, please migrate to `trigger_call`")] + pub fn trigger_old_call( + origin: OriginFor, + hash: T::Hash, + #[pallet::compact] call_weight_bound: OldWeight, + ) -> DispatchResultWithPostInfo { + let call_weight_bound: Weight = call_weight_bound.into(); + let who = ensure_signed(origin)?; + SavedCalls::::try_mutate_exists(hash, |maybe_call| { + let (call, maybe_caller) = maybe_call.take().ok_or(Error::::CallNotAuthorized)?; + if let Some(caller) = maybe_caller { + ensure!(who == caller, Error::::TriggerCallNotPermitted); + } + ensure!( + call_weight_bound.ref_time() >= call.get_dispatch_info().weight.ref_time(), + Error::::WrongCallWeightBound + ); + let result = call.dispatch(OriginFor::::root()); + Self::deposit_event(Event::TriggeredCallBy { hash, caller: who }); + Self::deposit_event(Event::Dispatched { + result: result.map(|_| ()).map_err(|e| e.error), + }); + Ok(Pays::No.into()) + }) + } + #[pallet::weight(( T::WeightInfo::trigger_call().saturating_add(*call_weight_bound), DispatchClass::Operational, @@ -420,7 +452,7 @@ pub mod module { pub fn trigger_call( origin: OriginFor, hash: T::Hash, - #[pallet::compact] call_weight_bound: Weight, + call_weight_bound: Weight, ) -> DispatchResultWithPostInfo { let who = ensure_signed(origin)?; SavedCalls::::try_mutate_exists(hash, |maybe_call| { diff --git a/authority/src/mock.rs b/authority/src/mock.rs index 760e3ba05..1301ba0cc 100644 --- a/authority/src/mock.rs +++ b/authority/src/mock.rs @@ -24,7 +24,7 @@ pub type BlockNumber = u64; parameter_types! { pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(Weight::from_ref_time(2_000_000_000_000)); + frame_system::limits::BlockWeights::simple_max(Weight::from_ref_time(2_000_000_000_000).set_proof_size(u64::MAX)); } impl frame_system::Config for Runtime { @@ -39,7 +39,7 @@ impl frame_system::Config for Runtime { type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = ConstU64<250>; - type BlockWeights = (); + type BlockWeights = BlockWeights; type BlockLength = (); type Version = (); type PalletInfo = PalletInfo; @@ -54,10 +54,17 @@ impl frame_system::Config for Runtime { type MaxConsumers = ConstU32<16>; } +impl pallet_preimage::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = (); + type Currency = (); + type ManagerOrigin = EnsureRoot; + type BaseDeposit = (); + type ByteDeposit = (); +} + parameter_types! { pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * BlockWeights::get().max_block; - // Retry a scheduled item every 10 blocks (1 minute) until the preimage exists. - pub const NoPreimagePostponement: Option = Some(10); } impl pallet_scheduler::Config for Runtime { type RuntimeEvent = RuntimeEvent; @@ -66,11 +73,10 @@ impl pallet_scheduler::Config for Runtime { type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = EnsureRoot; - type MaxScheduledPerBlock = (); + type MaxScheduledPerBlock = ConstU32<10>; type WeightInfo = (); type OriginPrivilegeCmp = EqualPrivilegeOnly; - type PreimageProvider = (); - type NoPreimagePostponement = NoPreimagePostponement; + type Preimages = Preimage; } #[derive(Clone, Encode, Decode, Eq, PartialEq, Ord, PartialOrd, Debug, TypeInfo)] @@ -175,6 +181,7 @@ frame_support::construct_runtime!( System: frame_system::{Pallet, Call, Config, Event}, Authority: authority::{Pallet, Call, Origin, Event}, Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event}, + Preimage: pallet_preimage::{Pallet, Call, Storage, Event}, } ); diff --git a/authority/src/tests.rs b/authority/src/tests.rs index 1cb2cb36c..f44c2a840 100644 --- a/authority/src/tests.rs +++ b/authority/src/tests.rs @@ -13,6 +13,7 @@ use mock::{ authority, run_to_block, Authority, BlockNumber, ExtBuilder, MockAsOriginId, OriginCaller, Runtime, RuntimeCall, RuntimeOrigin, System, }; +use sp_io::hashing::blake2_256; use sp_runtime::{traits::BadOrigin, Perbill}; #[test] @@ -57,7 +58,9 @@ fn dispatch_as_work() { #[test] fn schedule_dispatch_at_work() { ExtBuilder::default().build().execute_with(|| { - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { ratio: Perbill::one() }); + let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { + ratio: Perbill::from_percent(50), + }); let call = RuntimeCall::Authority(authority::Call::dispatch_as { as_origin: MockAsOriginId::Root, call: Box::new(ensure_root_call), @@ -93,7 +96,7 @@ fn schedule_dispatch_at_work() { System::assert_last_event(mock::RuntimeEvent::Scheduler( pallet_scheduler::Event::::Dispatched { task: (2, 0), - id: Some([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0].to_vec()), + id: Some(blake2_256([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0].as_ref())), result: Ok(()), }, )); @@ -115,7 +118,7 @@ fn schedule_dispatch_at_work() { System::assert_last_event(mock::RuntimeEvent::Scheduler( pallet_scheduler::Event::::Dispatched { task: (3, 0), - id: Some([0, 0, 1, 0, 0, 0].to_vec()), + id: Some(blake2_256([0, 0, 1, 0, 0, 0].as_ref())), result: Ok(()), }, )); @@ -125,7 +128,9 @@ fn schedule_dispatch_at_work() { #[test] fn schedule_dispatch_after_work() { ExtBuilder::default().build().execute_with(|| { - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { ratio: Perbill::one() }); + let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { + ratio: Perbill::from_percent(50), + }); let call = RuntimeCall::Authority(authority::Call::dispatch_as { as_origin: MockAsOriginId::Root, call: Box::new(ensure_root_call), @@ -161,7 +166,7 @@ fn schedule_dispatch_after_work() { System::assert_last_event(mock::RuntimeEvent::Scheduler( pallet_scheduler::Event::::Dispatched { task: (2, 0), - id: Some([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0].to_vec()), + id: Some(blake2_256([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0].as_ref())), result: Ok(()), }, )); @@ -183,7 +188,7 @@ fn schedule_dispatch_after_work() { System::assert_last_event(mock::RuntimeEvent::Scheduler( pallet_scheduler::Event::::Dispatched { task: (3, 0), - id: Some([0, 0, 1, 0, 0, 0].to_vec()), + id: Some(blake2_256([0, 0, 1, 0, 0, 0].as_ref())), result: Ok(()), }, )); @@ -194,7 +199,9 @@ fn schedule_dispatch_after_work() { fn fast_track_scheduled_dispatch_work() { ExtBuilder::default().build().execute_with(|| { System::set_block_number(1); - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { ratio: Perbill::one() }); + let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { + ratio: Perbill::from_percent(50), + }); let call = RuntimeCall::Authority(authority::Call::dispatch_as { as_origin: MockAsOriginId::Root, call: Box::new(ensure_root_call), @@ -271,7 +278,9 @@ fn fast_track_scheduled_dispatch_work() { fn delay_scheduled_dispatch_work() { ExtBuilder::default().build().execute_with(|| { System::set_block_number(1); - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { ratio: Perbill::one() }); + let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { + ratio: Perbill::from_percent(50), + }); let call = RuntimeCall::Authority(authority::Call::dispatch_as { as_origin: MockAsOriginId::Root, call: Box::new(ensure_root_call), @@ -347,7 +356,9 @@ fn delay_scheduled_dispatch_work() { #[test] fn cancel_scheduled_dispatch_work() { ExtBuilder::default().build().execute_with(|| { - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { ratio: Perbill::one() }); + let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { + ratio: Perbill::from_percent(50), + }); let call = RuntimeCall::Authority(authority::Call::dispatch_as { as_origin: MockAsOriginId::Root, call: Box::new(ensure_root_call), @@ -430,7 +441,9 @@ fn call_size_limit() { fn authorize_call_works() { ExtBuilder::default().build().execute_with(|| { run_to_block(1); - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { ratio: Perbill::one() }); + let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { + ratio: Perbill::from_percent(50), + }); let call = RuntimeCall::Authority(authority::Call::dispatch_as { as_origin: MockAsOriginId::Root, call: Box::new(ensure_root_call), @@ -455,7 +468,7 @@ fn authorize_call_works() { Box::new(call.clone()), Some(1) )); - assert_eq!(Authority::saved_calls(&hash), Some((call.clone(), Some(1)))); + assert_eq!(Authority::saved_calls(&hash), Some((call, Some(1)))); System::assert_last_event(mock::RuntimeEvent::Authority(Event::AuthorizedCall { hash, caller: Some(1), @@ -467,7 +480,9 @@ fn authorize_call_works() { fn trigger_call_works() { ExtBuilder::default().build().execute_with(|| { run_to_block(1); - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { ratio: Perbill::one() }); + let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { + ratio: Perbill::from_percent(50), + }); let call = RuntimeCall::Authority(authority::Call::dispatch_as { as_origin: MockAsOriginId::Root, call: Box::new(ensure_root_call), @@ -522,7 +537,7 @@ fn trigger_call_works() { Authority::trigger_call(RuntimeOrigin::signed(2), hash, call_weight_bound), Error::::TriggerCallNotPermitted ); - assert_eq!(Authority::saved_calls(&hash), Some((call.clone(), Some(1)))); + assert_eq!(Authority::saved_calls(&hash), Some((call, Some(1)))); // caller 1 triggering the call assert_ok!(Authority::trigger_call( @@ -543,7 +558,9 @@ fn trigger_call_works() { fn remove_authorized_call_works() { ExtBuilder::default().build().execute_with(|| { run_to_block(1); - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { ratio: Perbill::one() }); + let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { + ratio: Perbill::from_percent(50), + }); let call = RuntimeCall::Authority(authority::Call::dispatch_as { as_origin: MockAsOriginId::Root, call: Box::new(ensure_root_call), @@ -585,7 +602,7 @@ fn remove_authorized_call_works() { Authority::remove_authorized_call(RuntimeOrigin::signed(2), hash), Error::::CallNotAuthorized ); - assert_eq!(Authority::saved_calls(&hash), Some((call.clone(), Some(1)))); + assert_eq!(Authority::saved_calls(&hash), Some((call, Some(1)))); assert_ok!(Authority::remove_authorized_call(RuntimeOrigin::signed(1), hash)); assert_eq!(Authority::saved_calls(&hash), None); }); @@ -594,7 +611,9 @@ fn remove_authorized_call_works() { #[test] fn trigger_call_should_be_free_and_operational() { ExtBuilder::default().build().execute_with(|| { - let call = RuntimeCall::System(frame_system::Call::fill_block { ratio: Perbill::one() }); + let call = RuntimeCall::System(frame_system::Call::fill_block { + ratio: Perbill::from_percent(50), + }); let hash = ::Hashing::hash_of(&call); let call_weight_bound = call.get_dispatch_info().weight; let trigger_call = RuntimeCall::Authority(authority::Call::trigger_call { @@ -622,7 +641,49 @@ fn trigger_call_should_be_free_and_operational() { // successfull call doesn't pay fee assert_eq!( - trigger_call.clone().dispatch(RuntimeOrigin::signed(1)), + trigger_call.dispatch(RuntimeOrigin::signed(1)), + Ok(PostDispatchInfo { + actual_weight: None, + pays_fee: Pays::No + }) + ); + }); +} + +#[test] +fn trigger_old_call_should_be_free_and_operational() { + ExtBuilder::default().build().execute_with(|| { + let call = RuntimeCall::System(frame_system::Call::fill_block { + ratio: Perbill::from_percent(50), + }); + let hash = ::Hashing::hash_of(&call); + let call_weight_bound: OldWeight = OldWeight(call.get_dispatch_info().weight.ref_time()); + let trigger_old_call = RuntimeCall::Authority(authority::Call::trigger_old_call { + hash, + call_weight_bound, + }); + + assert_ok!(Authority::authorize_call( + RuntimeOrigin::root(), + Box::new(call), + Some(1) + )); + + // bad caller pays fee + assert_eq!( + trigger_old_call.clone().dispatch(RuntimeOrigin::signed(2)), + Err(DispatchErrorWithPostInfo { + post_info: PostDispatchInfo { + actual_weight: None, + pays_fee: Pays::Yes + }, + error: Error::::TriggerCallNotPermitted.into() + }) + ); + + // successfull call doesn't pay fee + assert_eq!( + trigger_old_call.dispatch(RuntimeOrigin::signed(1)), Ok(PostDispatchInfo { actual_weight: None, pays_fee: Pays::No diff --git a/bencher/Cargo.toml b/bencher/Cargo.toml index 72e569b12..6797f18ee 100644 --- a/bencher/Cargo.toml +++ b/bencher/Cargo.toml @@ -26,18 +26,18 @@ hash-db = { version = "0.15.2", default-features = false, optional = true } bencher-procedural = { path = "bencher-procedural", default-features = false } codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.30" } -sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["wasmtime"], optional = true , branch = "polkadot-v0.9.30" } -sc-executor-common = { git = "https://github.com/paritytech/substrate", optional = true , branch = "polkadot-v0.9.30" } -sc-client-db = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["rocksdb"], optional = true , branch = "polkadot-v0.9.30" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.30" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.30" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.31" } +sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["wasmtime"], optional = true , branch = "polkadot-v0.9.31" } +sc-executor-common = { git = "https://github.com/paritytech/substrate", optional = true , branch = "polkadot-v0.9.31" } +sc-client-db = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["rocksdb"], optional = true , branch = "polkadot-v0.9.31" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.31" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/bencher/test/Cargo.toml b/bencher/test/Cargo.toml index 5b4459a63..0c0ab28e3 100644 --- a/bencher/test/Cargo.toml +++ b/bencher/test/Cargo.toml @@ -15,16 +15,16 @@ required-features = ["bench"] serde = { version = "1.0.136", optional = true } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } orml-bencher = { path = "..", default-features = false } orml-weight-meter = { path = "../../weight-meter", default-features = false } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/benchmarking/Cargo.toml b/benchmarking/Cargo.toml index a28745289..c0e50e798 100644 --- a/benchmarking/Cargo.toml +++ b/benchmarking/Cargo.toml @@ -14,19 +14,19 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } [dev-dependencies] hex-literal = "0.3.4" -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } [features] default = [ "std" ] diff --git a/currencies/Cargo.toml b/currencies/Cargo.toml index c2c696a0c..68cdf1ee9 100644 --- a/currencies/Cargo.toml +++ b/currencies/Cargo.toml @@ -12,18 +12,18 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } orml_tokens = { package = "orml-tokens", path = "../tokens", version = "0.4.1-dev" } diff --git a/currencies/src/mock.rs b/currencies/src/mock.rs index 64a398a7a..62bd4da68 100644 --- a/currencies/src/mock.rs +++ b/currencies/src/mock.rs @@ -131,16 +131,11 @@ pub const ID_1: LockIdentifier = *b"1 "; pub const RID_1: ReserveIdentifier = [1u8; 8]; pub const RID_2: ReserveIdentifier = [2u8; 8]; +#[derive(Default)] pub struct ExtBuilder { balances: Vec<(AccountId, CurrencyId, Balance)>, } -impl Default for ExtBuilder { - fn default() -> Self { - Self { balances: vec![] } - } -} - impl ExtBuilder { pub fn balances(mut self, balances: Vec<(AccountId, CurrencyId, Balance)>) -> Self { self.balances = balances; diff --git a/gradually-update/Cargo.toml b/gradually-update/Cargo.toml index e36ff5d38..93591c3e8 100644 --- a/gradually-update/Cargo.toml +++ b/gradually-update/Cargo.toml @@ -12,12 +12,12 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/gradually-update/src/tests.rs b/gradually-update/src/tests.rs index 6cef7bf6f..17f84b84e 100644 --- a/gradually-update/src/tests.rs +++ b/gradually-update/src/tests.rs @@ -8,14 +8,14 @@ use frame_support::{assert_noop, assert_ok}; use mock::*; use sp_runtime::{FixedPointNumber, FixedU128, Permill}; -fn storage_set(key: &Vec, value: &Vec) { +fn storage_set(key: &[u8], value: &[u8]) { // let bounded_key: StorageValueBytes = // key.to_vec().try_into().unwrap(); let bounded_value: // StorageValueBytes = key.to_vec().try_into().unwrap(); frame_support::storage::unhashed::put(key, value); } -fn storage_get(key: &Vec) -> StorageValueBytes { +fn storage_get(key: &[u8]) -> StorageValueBytes { frame_support::storage::unhashed::get::>(key).unwrap_or_default() } diff --git a/nft/Cargo.toml b/nft/Cargo.toml index 96cccd5db..8b408a4b6 100644 --- a/nft/Cargo.toml +++ b/nft/Cargo.toml @@ -12,14 +12,14 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/oracle/Cargo.toml b/oracle/Cargo.toml index 255bd1992..a5c51f564 100644 --- a/oracle/Cargo.toml +++ b/oracle/Cargo.toml @@ -12,18 +12,18 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/oracle/rpc/Cargo.toml b/oracle/rpc/Cargo.toml index 44a7f74cf..2508a5c3a 100644 --- a/oracle/rpc/Cargo.toml +++ b/oracle/rpc/Cargo.toml @@ -12,8 +12,8 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } tracing = { version = "0.1.29" } tracing-core = { version = "0.1.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } orml-oracle-rpc-runtime-api = { path = "runtime-api", version = "0.4.1-dev" } diff --git a/oracle/rpc/runtime-api/Cargo.toml b/oracle/rpc/runtime-api/Cargo.toml index 2e1ae565f..d3d7f6a0a 100644 --- a/oracle/rpc/runtime-api/Cargo.toml +++ b/oracle/rpc/runtime-api/Cargo.toml @@ -8,8 +8,8 @@ description = "Runtime API module for orml-oracle-rpc." [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/payments/Cargo.toml b/payments/Cargo.toml index 9cb36750e..81044bc0a 100644 --- a/payments/Cargo.toml +++ b/payments/Cargo.toml @@ -12,20 +12,20 @@ readme = "README.md" [dependencies] parity-scale-codec = { version = "3.1.5", default-features = false, features = ["max-encoded-len"] } log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } orml-traits = {path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] serde = { version = "1.0.136" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } orml-tokens = { path = "../tokens", version = "0.4.1-dev", default-features = false } diff --git a/rewards/Cargo.toml b/rewards/Cargo.toml index 5ce213661..27e15bb17 100644 --- a/rewards/Cargo.toml +++ b/rewards/Cargo.toml @@ -12,17 +12,17 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index 71cc09f6c..e6573be1f 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -12,18 +12,18 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/tokens/rpc/Cargo.toml b/tokens/rpc/Cargo.toml index 348026496..758ccb05c 100644 --- a/tokens/rpc/Cargo.toml +++ b/tokens/rpc/Cargo.toml @@ -12,11 +12,11 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } tracing = { version = "0.1.29" } tracing-core = { version = "0.1.28" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } orml-tokens-rpc-runtime-api = { version = "0.4.1-dev", path = "./runtime-api" } diff --git a/tokens/rpc/runtime-api/Cargo.toml b/tokens/rpc/runtime-api/Cargo.toml index e9ee82f1c..5440d6b6e 100644 --- a/tokens/rpc/runtime-api/Cargo.toml +++ b/tokens/rpc/runtime-api/Cargo.toml @@ -8,9 +8,9 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } orml-tokens = { default-features = false, path = "../../../tokens" } [features] diff --git a/tokens/src/mock.rs b/tokens/src/mock.rs index 0a4346a27..74e962d86 100644 --- a/tokens/src/mock.rs +++ b/tokens/src/mock.rs @@ -282,7 +282,7 @@ impl OnSlash for OnSlashHook { } impl OnSlashHook { pub fn calls() -> u32 { - ON_SLASH_CALLS.with(|accounts| accounts.borrow().clone()) + ON_SLASH_CALLS.with(|accounts| *accounts.borrow()) } } @@ -295,7 +295,7 @@ impl OnDeposit for OnDepositHook OnDepositHook { pub fn calls() -> u32 { - ON_DEPOSIT_CALLS.with(|accounts| accounts.borrow().clone()) + ON_DEPOSIT_CALLS.with(|accounts| *accounts.borrow()) } } @@ -313,7 +313,7 @@ impl OnTransfer for OnTransferHook } impl OnTransferHook { pub fn calls() -> u32 { - ON_TRANSFER_CALLS.with(|accounts| accounts.borrow().clone()) + ON_TRANSFER_CALLS.with(|accounts| *accounts.borrow()) } } @@ -357,20 +357,12 @@ construct_runtime!( } ); +#[derive(Default)] pub struct ExtBuilder { balances: Vec<(AccountId, CurrencyId, Balance)>, treasury_genesis: bool, } -impl Default for ExtBuilder { - fn default() -> Self { - Self { - balances: vec![], - treasury_genesis: false, - } - } -} - impl ExtBuilder { pub fn balances(mut self, mut balances: Vec<(AccountId, CurrencyId, Balance)>) -> Self { self.balances.append(&mut balances); diff --git a/traits/Cargo.toml b/traits/Cargo.toml index 4659413b4..6acc8c615 100644 --- a/traits/Cargo.toml +++ b/traits/Cargo.toml @@ -14,12 +14,12 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = num-traits = { version = "0.2.14", default-features = false } impl-trait-for-tuples = "0.2.2" -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.30" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } diff --git a/unknown-tokens/Cargo.toml b/unknown-tokens/Cargo.toml index a4c4f75f2..07c8a610e 100644 --- a/unknown-tokens/Cargo.toml +++ b/unknown-tokens/Cargo.toml @@ -12,18 +12,18 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.30" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } orml-xcm-support = { path = "../xcm-support", default-features = false } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/utilities/Cargo.toml b/utilities/Cargo.toml index bd916aebd..4f4175652 100644 --- a/utilities/Cargo.toml +++ b/utilities/Cargo.toml @@ -12,15 +12,15 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } [dev-dependencies] serde_json = "1.0.64" -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/utilities/src/ordered_set.rs b/utilities/src/ordered_set.rs index b137fbe37..f54151824 100644 --- a/utilities/src/ordered_set.rs +++ b/utilities/src/ordered_set.rs @@ -25,7 +25,7 @@ impl Option> { } fn main() { - let matches = App::new("Weight Generator") + let matches = Command::new("Weight Generator") .version("1.0") .author("Laminar Developers ") .about("Generate rust weight info source file from JSON data generated by ORML bencher") .arg( - Arg::with_name("input") - .short("i") + Arg::new("input") + .short('i') .long("input") .value_name("PATH") .help("Input JSON data file") - .takes_value(true), + .num_args(1), ) .arg( - Arg::with_name("template") - .short("t") + Arg::new("template") + .short('t') .long("template") .value_name("PATH") .help("Handlebars template file") - .takes_value(true), + .num_args(1), ) .arg( - Arg::with_name("header") + Arg::new("header") .long("header") .value_name("PATH") .help("Header file path") - .takes_value(true), + .num_args(1), ) .arg( - Arg::with_name("output") - .short("o") + Arg::new("output") + .short('o') .long("output") .value_name("PATH") .help("Output file path") - .takes_value(true), + .num_args(1), ) .get_matches(); let mut benchmarks: Vec = { - if let Some(input_path) = matches.value_of("input") { + if let Some(input_path) = matches.get_one::("input") { let reader = std::fs::File::open(std::path::Path::new(&input_path.trim())).unwrap(); serde_json::from_reader(&reader).expect("Could not parse JSON data") } else { @@ -161,7 +161,7 @@ fn main() { // Use empty header if a header path is not given. let header = { - if let Some(path) = matches.value_of("header") { + if let Some(path) = matches.get_one::("header") { ::std::fs::read_to_string(&path).expect("Header file not found") } else { String::from("") @@ -174,7 +174,7 @@ fn main() { // Use default template if template path is not given. let template = { - if let Some(path) = matches.value_of("template") { + if let Some(path) = matches.get_one::("template") { ::std::fs::read_to_string(&path).expect("Template file not found") } else { String::from(DEFAULT_TEMPLATE) @@ -182,7 +182,7 @@ fn main() { }; // Write benchmark to file or print to terminal if output path is not given. - if let Some(path) = matches.value_of("output") { + if let Some(path) = matches.get_one::("output") { let mut output_file = ::std::fs::File::create(&path).expect("Could not create output file"); handlebars diff --git a/weight-meter/Cargo.toml b/weight-meter/Cargo.toml index 0b9c67954..922db6c53 100644 --- a/weight-meter/Cargo.toml +++ b/weight-meter/Cargo.toml @@ -10,19 +10,19 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } weight-meter-procedural = { path = "weight-meter-procedural", default-features = false } [dev-dependencies] serde = { version = "1.0.136" } codec = { package = "parity-scale-codec", version = "3.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/weight-meter/src/tests.rs b/weight-meter/src/tests.rs index 97d08a16f..3c261ee2e 100644 --- a/weight-meter/src/tests.rs +++ b/weight-meter/src/tests.rs @@ -47,7 +47,7 @@ fn exceed_max_weight_works() { new_test_ext().execute_with(|| { let result: PostDispatchInfo = TestModule::expect_max_weight(RuntimeOrigin::signed(100)).unwrap(); // Check used weight is correct - assert_eq!(Some(Weight::MAX), result.actual_weight); + assert_eq!(Some(Weight::from_ref_time(u64::MAX)), result.actual_weight); }); } diff --git a/xcm-support/Cargo.toml b/xcm-support/Cargo.toml index 2e1878fde..d3e1e0b51 100644 --- a/xcm-support/Cargo.toml +++ b/xcm-support/Cargo.toml @@ -10,12 +10,12 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.30" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.30" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } diff --git a/xcm/Cargo.toml b/xcm/Cargo.toml index b40c1f232..6b75f3cee 100644 --- a/xcm/Cargo.toml +++ b/xcm/Cargo.toml @@ -11,15 +11,15 @@ edition = "2021" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.30" } -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.30" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } [dev-dependencies] -xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.30" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } [features] default = ["std"] diff --git a/xtokens/Cargo.toml b/xtokens/Cargo.toml index 4b3db69db..78e660234 100644 --- a/xtokens/Cargo.toml +++ b/xtokens/Cargo.toml @@ -13,19 +13,19 @@ serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } # substrate -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.30" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } # cumulus -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.30" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.31" } # polkadot -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.30" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.30" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.30" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } # orml orml-xcm-support = { path = "../xcm-support", default-features = false } @@ -33,21 +33,21 @@ orml-traits = { path = "../traits", default-features = false} [dev-dependencies] # substrate -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } # cumulus -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.30" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.30" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.30" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.30" } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.30" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } # polkadot -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.30" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.30" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.30" } -xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.30" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } +xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } # orml orml-tokens = { path = "../tokens" } From c23d3d2b16e6597fe31c17a109caa7f0d1d4addb Mon Sep 17 00:00:00 2001 From: zjb0807 Date: Thu, 10 Nov 2022 13:04:32 +1300 Subject: [PATCH 03/27] add CODECOV_TOKEN (#836) --- .github/workflows/coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 11c67e2af..d28efdc5d 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -48,4 +48,5 @@ jobs: - name: Upload to codecov.io uses: codecov/codecov-action@v2 with: + token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true From 2b4d4dbd7b7acb35ffabf99db024e651c1dbdad6 Mon Sep 17 00:00:00 2001 From: wangjj9219 <183318287@qq.com> Date: Thu, 10 Nov 2022 11:37:30 +0800 Subject: [PATCH 04/27] claim_rewards should not create empty records (#835) --- rewards/src/lib.rs | 34 ++++++++++++++++++---------------- rewards/src/tests.rs | 26 ++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 16 deletions(-) diff --git a/rewards/src/lib.rs b/rewards/src/lib.rs index 0ef94ade5..f395f9506 100644 --- a/rewards/src/lib.rs +++ b/rewards/src/lib.rs @@ -274,22 +274,24 @@ impl Pallet { return; } - PoolInfos::::mutate(pool, |pool_info| { - let total_shares = U256::from(pool_info.total_shares.to_owned().saturated_into::()); - pool_info.rewards.iter_mut().for_each( - |(reward_currency, (total_reward, total_withdrawn_reward))| { - Self::claim_one( - withdrawn_rewards, - *reward_currency, - share.to_owned(), - total_reward.to_owned(), - total_shares, - total_withdrawn_reward, - who, - pool, - ); - }, - ); + PoolInfos::::mutate_exists(pool, |maybe_pool_info| { + if let Some(pool_info) = maybe_pool_info { + let total_shares = U256::from(pool_info.total_shares.to_owned().saturated_into::()); + pool_info.rewards.iter_mut().for_each( + |(reward_currency, (total_reward, total_withdrawn_reward))| { + Self::claim_one( + withdrawn_rewards, + *reward_currency, + share.to_owned(), + total_reward.to_owned(), + total_shares, + total_withdrawn_reward, + who, + pool, + ); + }, + ); + } }); } }); diff --git a/rewards/src/tests.rs b/rewards/src/tests.rs index f0c05bd25..fb80a28bb 100644 --- a/rewards/src/tests.rs +++ b/rewards/src/tests.rs @@ -121,6 +121,32 @@ fn claim_rewards_should_not_create_empty_records() { SharesAndWithdrawnRewards::::contains_key(&DOT_POOL, &ALICE), false ); + + PoolInfos::::mutate(DOT_POOL, |pool_info| { + pool_info.rewards.insert(NATIVE_COIN, (10_000, 0)); + }); + RewardsModule::add_share(&ALICE, &DOT_POOL, 100); + assert_eq!( + RewardsModule::pool_infos(DOT_POOL), + PoolInfo { + total_shares: 100, + rewards: vec![(NATIVE_COIN, (10_000, 0))].into_iter().collect() + } + ); + assert_eq!( + RewardsModule::shares_and_withdrawn_rewards(DOT_POOL, ALICE), + (100, vec![(NATIVE_COIN, 0)].into_iter().collect()) + ); + + PoolInfos::::remove(DOT_POOL); + assert_eq!(PoolInfos::::contains_key(DOT_POOL), false); + + RewardsModule::claim_rewards(&ALICE, &DOT_POOL); + assert_eq!(PoolInfos::::contains_key(&DOT_POOL), false); + assert_eq!( + RewardsModule::shares_and_withdrawn_rewards(DOT_POOL, ALICE), + (100, vec![(NATIVE_COIN, 0)].into_iter().collect()) + ); }) } From 9d54d0e790bdb5ee4162676880dbd110cd64c6ac Mon Sep 17 00:00:00 2001 From: Maarten <36227274+fiexer@users.noreply.github.com> Date: Thu, 10 Nov 2022 21:15:41 +0100 Subject: [PATCH 05/27] Update Readme (#837) * Update Readme Plasm Network rebranded last year to Astar Network Source: https://medium.com/astar-network/plasm-rebrands-to-astar-network-in-pursuit-of-becoming-a-polkadot-native-dapp-hub-6db3121c4f13 * Update README.md Change order --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bc6e44106..0797dd61c 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ 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) - [ChainX](https://github.com/chainx-org/ChainX) @@ -77,7 +78,6 @@ _In alphabetical order_ - [Manta Network](https://github.com/Manta-Network) - [Minterest](https://github.com/minterest-finance/minterest-chain-node) - [OAK](https://github.com/OAK-Foundation/OAK-blockchain) -- [Plasm Network](https://github.com/PlasmNetwork) - [PolkaFoundry Network](https://github.com/PolkaFoundry) - [Setheum Network](https://github.com/Setheum-Labs/Setheum) - [Valiu Liquidity Network](https://github.com/valibre-org/vln-node) From 5803a01a44ade05fe5f00dd73b619c89fbf4e701 Mon Sep 17 00:00:00 2001 From: Daniel Savu Date: Thu, 10 Nov 2022 20:17:16 +0000 Subject: [PATCH 06/27] Token hook refactoring; Posthooks for deposit and transfer (#834) * feat(tokens): Refactor hooks into single trait * feat(tokens): Add post-hooks for Transfer and Deposit * chore(tokens): improve mutation hook naming --- asset-registry/src/mock/para.rs | 7 +- currencies/src/mock.rs | 24 ++-- payments/src/mock.rs | 7 +- tokens/src/lib.rs | 68 +++++++----- tokens/src/mock.rs | 146 ++++++++++++++++++------- tokens/src/tests.rs | 53 +++++---- traits/src/currency.rs | 39 ++++++- traits/src/lib.rs | 2 +- xtokens/src/mock/para.rs | 7 +- xtokens/src/mock/para_relative_view.rs | 7 +- xtokens/src/mock/para_teleport.rs | 7 +- 11 files changed, 242 insertions(+), 125 deletions(-) diff --git a/asset-registry/src/mock/para.rs b/asset-registry/src/mock/para.rs index 585f29280..e8900a634 100644 --- a/asset-registry/src/mock/para.rs +++ b/asset-registry/src/mock/para.rs @@ -92,16 +92,11 @@ impl orml_tokens::Config for Runtime { type CurrencyId = CurrencyId; type WeightInfo = (); type ExistentialDeposits = ExistentialDeposits; - type OnDust = (); - type OnSlash = (); - type OnDeposit = (); - type OnTransfer = (); + type CurrencyHooks = (); type ReserveIdentifier = [u8; 8]; type MaxReserves = (); type MaxLocks = ConstU32<50>; type DustRemovalWhitelist = Nothing; - type OnNewTokenAccount = (); - type OnKilledTokenAccount = (); } #[derive(scale_info::TypeInfo, Encode, Decode, Clone, Eq, PartialEq, Debug)] diff --git a/currencies/src/mock.rs b/currencies/src/mock.rs index 62bd4da68..cb837a4dd 100644 --- a/currencies/src/mock.rs +++ b/currencies/src/mock.rs @@ -8,7 +8,7 @@ use frame_support::{ traits::{ConstU32, ConstU64, Everything, Nothing}, PalletId, }; -use orml_traits::parameter_type_with_key; +use orml_traits::{currency::MutationHooks, parameter_type_with_key}; use sp_core::H256; use sp_runtime::{ testing::Header, @@ -73,6 +73,21 @@ parameter_types! { pub DustAccount: AccountId = PalletId(*b"orml/dst").into_account_truncating(); } +pub struct CurrencyHooks(marker::PhantomData); +impl MutationHooks for CurrencyHooks +where + T::AccountId: From, +{ + type OnDust = orml_tokens::TransferDust; + type OnSlash = (); + type PreDeposit = (); + type PostDeposit = (); + type PreTransfer = (); + type PostTransfer = (); + type OnNewTokenAccount = (); + type OnKilledTokenAccount = (); +} + impl orml_tokens::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; @@ -80,16 +95,11 @@ impl orml_tokens::Config for Runtime { type CurrencyId = CurrencyId; type WeightInfo = (); type ExistentialDeposits = ExistentialDeposits; - type OnDust = orml_tokens::TransferDust; - type OnSlash = (); - type OnDeposit = (); - type OnTransfer = (); + type CurrencyHooks = CurrencyHooks; type MaxLocks = ConstU32<100_000>; type MaxReserves = ConstU32<100_000>; type ReserveIdentifier = ReserveIdentifier; type DustRemovalWhitelist = Nothing; - type OnNewTokenAccount = (); - type OnKilledTokenAccount = (); } pub const NATIVE_CURRENCY_ID: CurrencyId = 1; diff --git a/payments/src/mock.rs b/payments/src/mock.rs index ac32214ba..53bc87e3c 100644 --- a/payments/src/mock.rs +++ b/payments/src/mock.rs @@ -98,17 +98,12 @@ impl orml_tokens::Config for Test { type CurrencyId = u32; type RuntimeEvent = RuntimeEvent; type ExistentialDeposits = ExistentialDeposits; - type OnDust = (); - type OnSlash = (); - type OnDeposit = (); - type OnTransfer = (); + type CurrencyHooks = (); type WeightInfo = (); type MaxLocks = MaxLocks; type DustRemovalWhitelist = MockDustRemovalWhitelist; type MaxReserves = ConstU32<2>; type ReserveIdentifier = ReserveIdentifier; - type OnNewTokenAccount = (); - type OnKilledTokenAccount = (); } pub struct MockDisputeResolver; diff --git a/tokens/src/lib.rs b/tokens/src/lib.rs index b9ab40860..59be2f68b 100644 --- a/tokens/src/lib.rs +++ b/tokens/src/lib.rs @@ -66,9 +66,9 @@ use sp_std::{cmp, convert::Infallible, marker, prelude::*, vec::Vec}; use orml_traits::{ arithmetic::{self, Signed}, - currency::{OnDeposit, OnSlash, OnTransfer, TransferAll}, + currency::{MutationHooks, OnDeposit, OnDust, OnSlash, OnTransfer, TransferAll}, BalanceStatus, GetByKey, Happened, LockIdentifier, MultiCurrency, MultiCurrencyExtended, MultiLockableCurrency, - MultiReservableCurrency, NamedMultiReservableCurrency, OnDust, + MultiReservableCurrency, NamedMultiReservableCurrency, }; mod imbalances; @@ -173,7 +173,7 @@ pub use module::*; #[frame_support::pallet] pub mod module { - use orml_traits::currency::{OnDeposit, OnSlash, OnTransfer}; + use orml_traits::currency::MutationHooks; use super::*; @@ -216,23 +216,9 @@ pub mod module { /// System::AccountInfo, zero ED may cause some problems. type ExistentialDeposits: GetByKey; - /// Handler to burn or transfer account's dust - type OnDust: OnDust; - - /// Hook to run before slashing an account. - type OnSlash: OnSlash; - - /// Hook to run before depositing into an account. - type OnDeposit: OnDeposit; - - /// Hook to run before transferring from an account to another. - type OnTransfer: OnTransfer; - - /// Handler for when an account was created - type OnNewTokenAccount: Happened<(Self::AccountId, Self::CurrencyId)>; - - /// Handler for when an account was created - type OnKilledTokenAccount: Happened<(Self::AccountId, Self::CurrencyId)>; + /// Hooks are actions that are executed on certain events. + /// For example: OnDust, OnNewTokenAccount + type CurrencyHooks: MutationHooks; #[pallet::constant] type MaxLocks: Get; @@ -765,11 +751,11 @@ impl Pallet { // Ignore the result, because if it failed then there are remaining consumers, // and the account storage in frame_system shouldn't be reaped. let _ = frame_system::Pallet::::dec_providers(who); - T::OnKilledTokenAccount::happened(&(who.clone(), currency_id)); + >::OnKilledTokenAccount::happened(&(who.clone(), currency_id)); } else if !existed && exists { // if new, increase account provider frame_system::Pallet::::inc_providers(who); - T::OnNewTokenAccount::happened(&(who.clone(), currency_id)); + >::OnNewTokenAccount::happened(&(who.clone(), currency_id)); } if let Some(endowed) = maybe_endowed { @@ -783,7 +769,7 @@ impl Pallet { if let Some(dust_amount) = maybe_dust { // `OnDust` maybe get/set storage `Accounts` of `who`, trigger handler here // to avoid some unexpected errors. - T::OnDust::on_dust(who, currency_id, dust_amount); + >::OnDust::on_dust(who, currency_id, dust_amount); Self::deposit_event(Event::DustLost { currency_id, @@ -906,7 +892,12 @@ impl Pallet { return Ok(()); } - T::OnTransfer::on_transfer(currency_id, from, to, amount)?; + >::PreTransfer::on_transfer( + currency_id, + from, + to, + amount, + )?; Self::try_mutate_account(to, currency_id, |to_account, _existed| -> DispatchResult { Self::try_mutate_account(from, currency_id, |from_account, _existed| -> DispatchResult { from_account.free = from_account @@ -946,6 +937,12 @@ impl Pallet { Ok(()) })?; + >::PostTransfer::on_transfer( + currency_id, + from, + to, + amount, + )?; Self::deposit_event(Event::Transfer { currency_id, from: from.clone(), @@ -1032,7 +1029,11 @@ impl Pallet { return Ok(()); } - T::OnDeposit::on_deposit(currency_id, who, amount)?; + >::PreDeposit::on_deposit( + currency_id, + who, + amount, + )?; Self::try_mutate_account(who, currency_id, |account, existed| -> DispatchResult { if require_existed { ensure!(existed, Error::::DeadAccount); @@ -1054,6 +1055,11 @@ impl Pallet { } account.free = account.free.defensive_saturating_add(amount); + >::PostDeposit::on_deposit( + currency_id, + who, + amount, + )?; Self::deposit_event(Event::Deposited { currency_id, who: who.clone(), @@ -1128,7 +1134,11 @@ impl MultiCurrency for Pallet { return amount; } - T::OnSlash::on_slash(currency_id, who, amount); + >::OnSlash::on_slash( + currency_id, + who, + amount, + ); let account = Self::accounts(who, currency_id); let free_slashed_amount = account.free.min(amount); // Cannot underflow because free_slashed_amount can never be greater than amount @@ -1306,7 +1316,11 @@ impl MultiReservableCurrency for Pallet { return value; } - T::OnSlash::on_slash(currency_id, who, value); + >::OnSlash::on_slash( + currency_id, + who, + value, + ); let reserved_balance = Self::reserved_balance(currency_id, who); let actual = reserved_balance.min(value); Self::mutate_account(who, currency_id, |account, _| { diff --git a/tokens/src/mock.rs b/tokens/src/mock.rs index 74e962d86..ca5592c89 100644 --- a/tokens/src/mock.rs +++ b/tokens/src/mock.rs @@ -228,10 +228,18 @@ thread_local! { pub static KILLED: RefCell> = RefCell::new(vec![]); } -pub struct TrackCreatedAccounts; -impl TrackCreatedAccounts { - pub fn accounts() -> Vec<(AccountId, CurrencyId)> { - CREATED.with(|accounts| accounts.borrow().clone()) +pub struct TrackCreatedAccounts(marker::PhantomData); +impl TrackCreatedAccounts +where + T::AccountId: From + Into, + T::CurrencyId: From + Into, +{ + pub fn accounts() -> Vec<(T::AccountId, T::CurrencyId)> { + CREATED + .with(|accounts| accounts.borrow().clone()) + .iter() + .map(|account| (account.0.clone().into(), account.1.clone().into())) + .collect() } pub fn reset() { @@ -240,18 +248,30 @@ impl TrackCreatedAccounts { }); } } -impl Happened<(AccountId, CurrencyId)> for TrackCreatedAccounts { - fn happened((who, currency): &(AccountId, CurrencyId)) { +impl Happened<(T::AccountId, T::CurrencyId)> for TrackCreatedAccounts +where + T::AccountId: From + Into, + T::CurrencyId: From + Into, +{ + fn happened((who, currency): &(T::AccountId, T::CurrencyId)) { CREATED.with(|accounts| { - accounts.borrow_mut().push((who.clone(), *currency)); + accounts.borrow_mut().push((who.clone().into(), (*currency).into())); }); } } -pub struct TrackKilledAccounts; -impl TrackKilledAccounts { - pub fn accounts() -> Vec<(AccountId, CurrencyId)> { - KILLED.with(|accounts| accounts.borrow().clone()) +pub struct TrackKilledAccounts(marker::PhantomData); +impl TrackKilledAccounts +where + T::AccountId: From + Into, + T::CurrencyId: From + Into, +{ + pub fn accounts() -> Vec<(T::AccountId, T::CurrencyId)> { + KILLED + .with(|accounts| accounts.borrow().clone()) + .iter() + .map(|account| (account.0.clone().into(), account.1.clone().into())) + .collect() } pub fn reset() { @@ -260,23 +280,29 @@ impl TrackKilledAccounts { }); } } -impl Happened<(AccountId, CurrencyId)> for TrackKilledAccounts { - fn happened((who, currency): &(AccountId, CurrencyId)) { +impl Happened<(T::AccountId, T::CurrencyId)> for TrackKilledAccounts +where + T::AccountId: From + Into, + T::CurrencyId: From + Into, +{ + fn happened((who, currency): &(T::AccountId, T::CurrencyId)) { KILLED.with(|accounts| { - accounts.borrow_mut().push((who.clone(), *currency)); + accounts.borrow_mut().push((who.clone().into(), (*currency).into())); }); } } thread_local! { pub static ON_SLASH_CALLS: RefCell = RefCell::new(0); - pub static ON_DEPOSIT_CALLS: RefCell = RefCell::new(0); - pub static ON_TRANSFER_CALLS: RefCell = RefCell::new(0); + pub static ON_DEPOSIT_PREHOOK_CALLS: RefCell = RefCell::new(0); + pub static ON_DEPOSIT_POSTHOOK_CALLS: RefCell = RefCell::new(0); + pub static ON_TRANSFER_PREHOOK_CALLS: RefCell = RefCell::new(0); + pub static ON_TRANSFER_POSTHOOK_CALLS: RefCell = RefCell::new(0); } pub struct OnSlashHook(marker::PhantomData); -impl OnSlash for OnSlashHook { - fn on_slash(_currency_id: CurrencyId, _account_id: &T::AccountId, _amount: Balance) { +impl OnSlash for OnSlashHook { + fn on_slash(_currency_id: T::CurrencyId, _account_id: &T::AccountId, _amount: T::Balance) { ON_SLASH_CALLS.with(|cell| *cell.borrow_mut() += 1); } } @@ -286,34 +312,65 @@ impl OnSlashHook { } } -pub struct OnDepositHook(marker::PhantomData); -impl OnDeposit for OnDepositHook { - fn on_deposit(_currency_id: CurrencyId, _account_id: &T::AccountId, _amount: Balance) -> DispatchResult { - ON_DEPOSIT_CALLS.with(|cell| *cell.borrow_mut() += 1); +pub struct PreDeposit(marker::PhantomData); +impl OnDeposit for PreDeposit { + fn on_deposit(_currency_id: T::CurrencyId, _account_id: &T::AccountId, _amount: T::Balance) -> DispatchResult { + ON_DEPOSIT_PREHOOK_CALLS.with(|cell| *cell.borrow_mut() += 1); Ok(()) } } -impl OnDepositHook { +impl PreDeposit { pub fn calls() -> u32 { - ON_DEPOSIT_CALLS.with(|accounts| *accounts.borrow()) + ON_DEPOSIT_PREHOOK_CALLS.with(|accounts| accounts.borrow().clone()) } } -pub struct OnTransferHook(marker::PhantomData); -impl OnTransfer for OnTransferHook { +pub struct PostDeposit(marker::PhantomData); +impl OnDeposit for PostDeposit { + fn on_deposit(_currency_id: T::CurrencyId, _account_id: &T::AccountId, _amount: T::Balance) -> DispatchResult { + ON_DEPOSIT_POSTHOOK_CALLS.with(|cell| *cell.borrow_mut() += 1); + Ok(()) + } +} +impl PostDeposit { + pub fn calls() -> u32 { + ON_DEPOSIT_POSTHOOK_CALLS.with(|accounts| accounts.borrow().clone()) + } +} + +pub struct PreTransfer(marker::PhantomData); +impl OnTransfer for PreTransfer { + fn on_transfer( + _currency_id: T::CurrencyId, + _from: &T::AccountId, + _to: &T::AccountId, + _amount: T::Balance, + ) -> DispatchResult { + ON_TRANSFER_PREHOOK_CALLS.with(|cell| *cell.borrow_mut() += 1); + Ok(()) + } +} +impl PreTransfer { + pub fn calls() -> u32 { + ON_TRANSFER_PREHOOK_CALLS.with(|accounts| accounts.borrow().clone()) + } +} + +pub struct PostTransfer(marker::PhantomData); +impl OnTransfer for PostTransfer { fn on_transfer( - _currency_id: CurrencyId, + _currency_id: T::CurrencyId, _from: &T::AccountId, _to: &T::AccountId, - _amount: Balance, + _amount: T::Balance, ) -> DispatchResult { - ON_TRANSFER_CALLS.with(|cell| *cell.borrow_mut() += 1); + ON_TRANSFER_POSTHOOK_CALLS.with(|cell| *cell.borrow_mut() += 1); Ok(()) } } -impl OnTransferHook { +impl PostTransfer { pub fn calls() -> u32 { - ON_TRANSFER_CALLS.with(|accounts| *accounts.borrow()) + ON_TRANSFER_POSTHOOK_CALLS.with(|accounts| accounts.borrow().clone()) } } @@ -321,6 +378,22 @@ parameter_types! { pub DustReceiver: AccountId = PalletId(*b"orml/dst").into_account_truncating(); } +pub struct CurrencyHooks(marker::PhantomData); +impl MutationHooks for CurrencyHooks +where + T::AccountId: From + Into, + T::CurrencyId: From + Into, +{ + type OnDust = TransferDust; + type OnSlash = OnSlashHook; + type PreDeposit = PreDeposit; + type PostDeposit = PostDeposit; + type PreTransfer = PreTransfer; + type PostTransfer = PostTransfer; + type OnNewTokenAccount = TrackCreatedAccounts; + type OnKilledTokenAccount = TrackKilledAccounts; +} + impl Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; @@ -328,12 +401,7 @@ impl Config for Runtime { type CurrencyId = CurrencyId; type WeightInfo = (); type ExistentialDeposits = ExistentialDeposits; - type OnDust = TransferDust; - type OnSlash = OnSlashHook; - type OnDeposit = OnDepositHook; - type OnTransfer = OnTransferHook; - type OnNewTokenAccount = TrackCreatedAccounts; - type OnKilledTokenAccount = TrackKilledAccounts; + type CurrencyHooks = CurrencyHooks; type MaxLocks = ConstU32<2>; type MaxReserves = ConstU32<2>; type ReserveIdentifier = ReserveIdentifier; @@ -390,8 +458,8 @@ impl ExtBuilder { .unwrap(); } - TrackCreatedAccounts::reset(); - TrackKilledAccounts::reset(); + TrackCreatedAccounts::::reset(); + TrackKilledAccounts::::reset(); let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| System::set_block_number(1)); diff --git a/tokens/src/tests.rs b/tokens/src/tests.rs index 12feb02ea..baa96dd69 100644 --- a/tokens/src/tests.rs +++ b/tokens/src/tests.rs @@ -55,7 +55,7 @@ fn transfer_should_work() { Error::::ExistentialDeposit, ); assert_ok!(Tokens::transfer(Some(ALICE).into(), CHARLIE, DOT, 2)); - assert_eq!(TrackCreatedAccounts::accounts(), vec![(CHARLIE, DOT)]); + assert_eq!(TrackCreatedAccounts::::accounts(), vec![(CHARLIE, DOT)]); // imply AllowDeath assert!(Accounts::::contains_key(ALICE, DOT)); @@ -132,7 +132,7 @@ fn transfer_all_allow_death_should_work() { assert!(Accounts::::contains_key(ALICE, DOT)); assert_eq!(Tokens::free_balance(DOT, &ALICE), 100); assert_ok!(Tokens::transfer_all(Some(ALICE).into(), CHARLIE, DOT, false)); - assert_eq!(TrackCreatedAccounts::accounts(), vec![(CHARLIE, DOT)]); + assert_eq!(TrackCreatedAccounts::::accounts(), vec![(CHARLIE, DOT)]); System::assert_last_event(RuntimeEvent::Tokens(crate::Event::Transfer { currency_id: DOT, from: ALICE, @@ -141,7 +141,7 @@ fn transfer_all_allow_death_should_work() { })); assert!(!Accounts::::contains_key(ALICE, DOT)); assert_eq!(Tokens::free_balance(DOT, &ALICE), 0); - assert_eq!(TrackKilledAccounts::accounts(), vec![(ALICE, DOT)]); + assert_eq!(TrackKilledAccounts::::accounts(), vec![(ALICE, DOT)]); assert_ok!(Tokens::set_lock(ID_1, DOT, &BOB, 50)); assert_eq!(Tokens::accounts(&BOB, DOT).frozen, 50); @@ -179,7 +179,7 @@ fn force_transfer_should_work() { amount: 100, })); assert!(!Accounts::::contains_key(ALICE, DOT)); - assert_eq!(TrackKilledAccounts::accounts(), vec![(ALICE, DOT)]); + assert_eq!(TrackKilledAccounts::::accounts(), vec![(ALICE, DOT)]); assert_eq!(Tokens::free_balance(DOT, &ALICE), 0); assert_eq!(Tokens::free_balance(DOT, &BOB), 200); }); @@ -1154,17 +1154,20 @@ fn exceeding_max_reserves_should_fail() { fn lifecycle_callbacks_are_activated() { ExtBuilder::default().build().execute_with(|| { assert_ok!(Tokens::set_balance(RawOrigin::Root.into(), ALICE, DOT, 200, 0)); - assert_eq!(TrackCreatedAccounts::accounts(), vec![(ALICE, DOT)]); + assert_eq!(TrackCreatedAccounts::::accounts(), vec![(ALICE, DOT)]); assert_ok!(Tokens::set_balance(RawOrigin::Root.into(), ALICE, BTC, 200, 0)); - assert_eq!(TrackCreatedAccounts::accounts(), vec![(ALICE, DOT), (ALICE, BTC)]); + assert_eq!( + TrackCreatedAccounts::::accounts(), + vec![(ALICE, DOT), (ALICE, BTC)] + ); assert_ok!(Tokens::transfer_all(Some(ALICE).into(), CHARLIE, BTC, false)); assert_eq!( - TrackCreatedAccounts::accounts(), + TrackCreatedAccounts::::accounts(), vec![(ALICE, DOT), (ALICE, BTC), (CHARLIE, BTC)] ); - assert_eq!(TrackKilledAccounts::accounts(), vec![(ALICE, BTC)]); + assert_eq!(TrackKilledAccounts::::accounts(), vec![(ALICE, BTC)]); }) } @@ -1174,31 +1177,37 @@ fn lifecycle_callbacks_are_activated() { // ************************************************* #[test] -fn deposit_hook_works() { +fn deposit_hooks_work() { ExtBuilder::default().build().execute_with(|| { - let initial_hook_calls = OnDepositHook::::calls(); + let initial_prehook_calls = PreDeposit::::calls(); + let initial_posthook_calls = PostDeposit::::calls(); assert_ok!(Tokens::do_deposit(DOT, &CHARLIE, 0, false, true),); - assert_eq!(OnDepositHook::::calls(), initial_hook_calls); + assert_eq!(PreDeposit::::calls(), initial_prehook_calls); + assert_eq!(PostDeposit::::calls(), initial_posthook_calls); assert_ok!(Tokens::do_deposit(DOT, &CHARLIE, 100, false, true),); - assert_eq!(OnDepositHook::::calls(), initial_hook_calls + 1); + assert_eq!(PreDeposit::::calls(), initial_prehook_calls + 1); + assert_eq!(PostDeposit::::calls(), initial_posthook_calls + 1); - // The hook must be called even if the actual deposit ends up failing assert_noop!( Tokens::do_deposit(DOT, &BOB, 1, false, true), Error::::ExistentialDeposit ); - assert_eq!(OnDepositHook::::calls(), initial_hook_calls + 2); + // The prehook is called + assert_eq!(PreDeposit::::calls(), initial_prehook_calls + 2); + // The posthook is not called + assert_eq!(PostDeposit::::calls(), initial_posthook_calls + 1); }); } #[test] -fn transfer_hook_works() { +fn transfer_hooks_work() { ExtBuilder::default() .balances(vec![(ALICE, DOT, 100)]) .build() .execute_with(|| { - let initial_hook_calls = OnTransferHook::::calls(); + let initial_prehook_calls = PreTransfer::::calls(); + let initial_posthook_calls = PostTransfer::::calls(); assert_ok!(Tokens::do_transfer( DOT, &ALICE, @@ -1206,7 +1215,8 @@ fn transfer_hook_works() { 0, ExistenceRequirement::AllowDeath ),); - assert_eq!(OnTransferHook::::calls(), initial_hook_calls); + assert_eq!(PreTransfer::::calls(), initial_prehook_calls); + assert_eq!(PostTransfer::::calls(), initial_posthook_calls); assert_ok!(Tokens::do_transfer( DOT, @@ -1215,13 +1225,16 @@ fn transfer_hook_works() { 10, ExistenceRequirement::AllowDeath )); - assert_eq!(OnTransferHook::::calls(), initial_hook_calls + 1); + assert_eq!(PreTransfer::::calls(), initial_prehook_calls + 1); + assert_eq!(PostTransfer::::calls(), initial_posthook_calls + 1); - // The hook must be called even if the actual transfer ends up failing assert_noop!( Tokens::do_transfer(DOT, &ALICE, &BOB, 1, ExistenceRequirement::AllowDeath), Error::::ExistentialDeposit ); - assert_eq!(OnTransferHook::::calls(), initial_hook_calls + 2); + // The prehook is called + assert_eq!(PreTransfer::::calls(), initial_prehook_calls + 2); + // The posthook is not called + assert_eq!(PostTransfer::::calls(), initial_posthook_calls + 1); }); } diff --git a/traits/src/currency.rs b/traits/src/currency.rs index eaaf5b4d1..8c391f604 100644 --- a/traits/src/currency.rs +++ b/traits/src/currency.rs @@ -1,4 +1,4 @@ -use crate::arithmetic; +use crate::{arithmetic, Happened}; use codec::{Codec, FullCodec, MaxEncodedLen}; pub use frame_support::{ traits::{BalanceStatus, DefensiveSaturating, LockIdentifier}, @@ -690,3 +690,40 @@ impl OnTransfer Ok(()) } } + +pub trait MutationHooks { + /// Handler to burn or transfer account's dust + type OnDust: OnDust; + + /// Hook to run before slashing an account. + type OnSlash: OnSlash; + + /// Hook to run before depositing into an account. + type PreDeposit: OnDeposit; + + /// Hook to run after depositing into an account. + type PostDeposit: OnDeposit; + + /// Hook to run before transferring from an account to another. + type PreTransfer: OnTransfer; + + /// Hook to run after transferring from an account to another. + type PostTransfer: OnTransfer; + + /// Handler for when an account was created + type OnNewTokenAccount: Happened<(AccountId, CurrencyId)>; + + /// Handler for when an account was created + type OnKilledTokenAccount: Happened<(AccountId, CurrencyId)>; +} + +impl MutationHooks for () { + type OnDust = (); + type OnSlash = (); + type PreDeposit = (); + type PostDeposit = (); + type PreTransfer = (); + type PostTransfer = (); + type OnNewTokenAccount = (); + type OnKilledTokenAccount = (); +} diff --git a/traits/src/lib.rs b/traits/src/lib.rs index 818d51251..a5894d218 100644 --- a/traits/src/lib.rs +++ b/traits/src/lib.rs @@ -16,7 +16,7 @@ pub use auction::{Auction, AuctionHandler, AuctionInfo, OnNewBidResult}; pub use currency::{ BalanceStatus, BasicCurrency, BasicCurrencyExtended, BasicLockableCurrency, BasicReservableCurrency, LockIdentifier, MultiCurrency, MultiCurrencyExtended, MultiLockableCurrency, MultiReservableCurrency, - NamedBasicReservableCurrency, NamedMultiReservableCurrency, OnDust, + NamedBasicReservableCurrency, NamedMultiReservableCurrency, }; pub use data_provider::{DataFeeder, DataProvider, DataProviderExtended}; pub use get_by_key::GetByKey; diff --git a/xtokens/src/mock/para.rs b/xtokens/src/mock/para.rs index 830ad48f4..6a91b6185 100644 --- a/xtokens/src/mock/para.rs +++ b/xtokens/src/mock/para.rs @@ -83,16 +83,11 @@ impl orml_tokens::Config for Runtime { type CurrencyId = CurrencyId; type WeightInfo = (); type ExistentialDeposits = ExistentialDeposits; - type OnDust = (); - type OnSlash = (); - type OnDeposit = (); - type OnTransfer = (); + type CurrencyHooks = (); type MaxLocks = ConstU32<50>; type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; type DustRemovalWhitelist = Everything; - type OnNewTokenAccount = (); - type OnKilledTokenAccount = (); } parameter_types! { diff --git a/xtokens/src/mock/para_relative_view.rs b/xtokens/src/mock/para_relative_view.rs index 064cdb0db..357e5cd07 100644 --- a/xtokens/src/mock/para_relative_view.rs +++ b/xtokens/src/mock/para_relative_view.rs @@ -86,16 +86,11 @@ impl orml_tokens::Config for Runtime { type CurrencyId = CurrencyId; type WeightInfo = (); type ExistentialDeposits = ExistentialDeposits; - type OnDust = (); - type OnSlash = (); - type OnDeposit = (); - type OnTransfer = (); + type CurrencyHooks = (); type MaxLocks = ConstU32<50>; type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; type DustRemovalWhitelist = Everything; - type OnNewTokenAccount = (); - type OnKilledTokenAccount = (); } parameter_types! { diff --git a/xtokens/src/mock/para_teleport.rs b/xtokens/src/mock/para_teleport.rs index a9660e07f..01bc013e5 100644 --- a/xtokens/src/mock/para_teleport.rs +++ b/xtokens/src/mock/para_teleport.rs @@ -84,16 +84,11 @@ impl orml_tokens::Config for Runtime { type CurrencyId = CurrencyId; type WeightInfo = (); type ExistentialDeposits = ExistentialDeposits; - type OnDust = (); - type OnSlash = (); - type OnDeposit = (); - type OnTransfer = (); + type CurrencyHooks = (); type MaxLocks = ConstU32<50>; type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; type DustRemovalWhitelist = Everything; - type OnNewTokenAccount = (); - type OnKilledTokenAccount = (); } parameter_types! { From 3fcd3cf9e63fe80fd9671912833a900ba09d1cc0 Mon Sep 17 00:00:00 2001 From: Daniel Savu Date: Tue, 15 Nov 2022 21:56:27 +0000 Subject: [PATCH 07/27] fix(tokens): PostDeposit hook (#839) * fix(tokens): PostDeposit hook * test(tokens): posthook correctness * fix(tokens): use `assert` instead of `ensure` in mock posthooks --- tokens/src/lib.rs | 24 ++++++++++++------------ tokens/src/mock.rs | 20 ++++++++++++++++---- tokens/src/tests.rs | 31 +++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 16 deletions(-) diff --git a/tokens/src/lib.rs b/tokens/src/lib.rs index 59be2f68b..b1d30c822 100644 --- a/tokens/src/lib.rs +++ b/tokens/src/lib.rs @@ -1054,19 +1054,19 @@ impl Pallet { TotalIssuance::::mutate(currency_id, |v| *v = new_total_issuance); } account.free = account.free.defensive_saturating_add(amount); - - >::PostDeposit::on_deposit( - currency_id, - who, - amount, - )?; - Self::deposit_event(Event::Deposited { - currency_id, - who: who.clone(), - amount, - }); Ok(()) - }) + })?; + >::PostDeposit::on_deposit( + currency_id, + who, + amount, + )?; + Self::deposit_event(Event::Deposited { + currency_id, + who: who.clone(), + amount, + }); + Ok(()) } } diff --git a/tokens/src/mock.rs b/tokens/src/mock.rs index ca5592c89..528eb69c9 100644 --- a/tokens/src/mock.rs +++ b/tokens/src/mock.rs @@ -327,8 +327,14 @@ impl PreDeposit { pub struct PostDeposit(marker::PhantomData); impl OnDeposit for PostDeposit { - fn on_deposit(_currency_id: T::CurrencyId, _account_id: &T::AccountId, _amount: T::Balance) -> DispatchResult { + fn on_deposit(currency_id: T::CurrencyId, account_id: &T::AccountId, amount: T::Balance) -> DispatchResult { ON_DEPOSIT_POSTHOOK_CALLS.with(|cell| *cell.borrow_mut() += 1); + let account_balance: AccountData = + tokens::Pallet::::accounts::(account_id.clone(), currency_id); + assert!( + account_balance.free.ge(&amount), + "Posthook must run after the account balance is updated." + ); Ok(()) } } @@ -359,12 +365,18 @@ impl PreTransfer { pub struct PostTransfer(marker::PhantomData); impl OnTransfer for PostTransfer { fn on_transfer( - _currency_id: T::CurrencyId, + currency_id: T::CurrencyId, _from: &T::AccountId, - _to: &T::AccountId, - _amount: T::Balance, + to: &T::AccountId, + amount: T::Balance, ) -> DispatchResult { ON_TRANSFER_POSTHOOK_CALLS.with(|cell| *cell.borrow_mut() += 1); + let account_balance: AccountData = + tokens::Pallet::::accounts::(to.clone(), currency_id); + assert!( + account_balance.free.ge(&amount), + "Posthook must run after the account balance is updated." + ); Ok(()) } } diff --git a/tokens/src/tests.rs b/tokens/src/tests.rs index baa96dd69..e1c51c8a3 100644 --- a/tokens/src/tests.rs +++ b/tokens/src/tests.rs @@ -1200,6 +1200,17 @@ fn deposit_hooks_work() { }); } +#[test] +fn post_deposit_can_use_new_balance() { + ExtBuilder::default().build().execute_with(|| { + let initial_balance = Tokens::free_balance(DOT, &CHARLIE); + // The following will fail unless Charlie's new balance can be used by the hook, + // because `initial_balance + 100` is higher than Charlie's initial balance. + // If this fails, the posthook is called too soon. + assert_ok!(Tokens::do_deposit(DOT, &CHARLIE, initial_balance + 100, false, true),); + }); +} + #[test] fn transfer_hooks_work() { ExtBuilder::default() @@ -1238,3 +1249,23 @@ fn transfer_hooks_work() { assert_eq!(PostTransfer::::calls(), initial_posthook_calls + 1); }); } + +#[test] +fn post_transfer_can_use_new_balance() { + ExtBuilder::default() + .balances(vec![(ALICE, DOT, 100)]) + .build() + .execute_with(|| { + let initial_balance = Tokens::free_balance(DOT, &CHARLIE); + // The following will fail unless Charlie's new balance can be used by the hook, + // because `initial_balance + 100` is higher than Charlie's initial balance. + // If this fails, the posthook is called too soon. + assert_ok!(Tokens::do_transfer( + DOT, + &ALICE, + &CHARLIE, + initial_balance + 100, + ExistenceRequirement::AllowDeath + )); + }); +} From 02ec3ea7df725d9fa22d65676f8d70ef042888b6 Mon Sep 17 00:00:00 2001 From: Miguel Hervas Date: Tue, 15 Nov 2022 19:22:23 -0700 Subject: [PATCH 08/27] Add Centrifuge to users of orml (#842) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0797dd61c..915a835bb 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ _In alphabetical order_ - [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) - [GameDAO Protocol](https://github.com/gamedaoco) - [HydraDX](https://github.com/galacticcouncil/hack.HydraDX-node) From 43d237d86828ce59e8ba487f0f7204314b0344e7 Mon Sep 17 00:00:00 2001 From: Myron <49134743+mmyyrroonn@users.noreply.github.com> Date: Wed, 16 Nov 2022 17:04:37 +0800 Subject: [PATCH 09/27] Add Crust to ORML (#843) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 915a835bb..f956606dd 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ _In alphabetical order_ - [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) From 740f0b83f23f13dc540a8df2773b119446392c57 Mon Sep 17 00:00:00 2001 From: sander2 Date: Wed, 16 Nov 2022 22:54:54 +0100 Subject: [PATCH 10/27] refactor: make weight argument in xtokens transfers optional (#841) * refactor: make weight argument in xtokens be of type WeightLimit * refactor: rename dest_weight -> dest_weight_limit --- asset-registry/src/tests.rs | 8 +- traits/src/xcm_transfer.rs | 6 +- xtokens/src/lib.rs | 140 +++++++++++++++++---------------- xtokens/src/tests.rs | 153 ++++++++++++++++++++++++++---------- 4 files changed, 192 insertions(+), 115 deletions(-) diff --git a/asset-registry/src/tests.rs b/asset-registry/src/tests.rs index 0ef593428..f204c8c31 100644 --- a/asset-registry/src/tests.rs +++ b/asset-registry/src/tests.rs @@ -118,7 +118,7 @@ fn send_self_parachain_asset_to_sibling() { ) .into() ), - 40, + WeightLimit::Unlimited, )); assert_eq!(ParaTokens::free_balance(CurrencyId::RegisteredAsset(1), &ALICE), 500); @@ -204,7 +204,7 @@ fn send_sibling_asset_to_non_reserve_sibling() { ) .into() ), - 40 + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::RegisteredAsset(1), &ALICE), 500); }); @@ -302,7 +302,7 @@ fn test_fixed_rate_asset_trader() { ) .into() ), - 40, + WeightLimit::Unlimited, )); }); @@ -353,7 +353,7 @@ fn test_fixed_rate_asset_trader() { ) .into() ), - 40, + WeightLimit::Unlimited, )); }); diff --git a/traits/src/xcm_transfer.rs b/traits/src/xcm_transfer.rs index 797f2c50d..cd671f5e6 100644 --- a/traits/src/xcm_transfer.rs +++ b/traits/src/xcm_transfer.rs @@ -1,5 +1,5 @@ use frame_support::dispatch::DispatchResult; -use xcm::latest::{prelude::*, Weight}; +use xcm::latest::prelude::*; /// Abstraction over cross-chain token transfers. pub trait XcmTransfer { @@ -9,7 +9,7 @@ pub trait XcmTransfer { currency_id: CurrencyId, amount: Balance, dest: MultiLocation, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> DispatchResult; /// Transfer `MultiAsset` @@ -17,6 +17,6 @@ pub trait XcmTransfer { who: AccountId, asset: MultiAsset, dest: MultiLocation, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> DispatchResult; } diff --git a/xtokens/src/lib.rs b/xtokens/src/lib.rs index 027ad6215..89ad16bff 100644 --- a/xtokens/src/lib.rs +++ b/xtokens/src/lib.rs @@ -189,9 +189,9 @@ pub mod module { impl Pallet { /// Transfer native currencies. /// - /// `dest_weight` is the weight for XCM execution on the dest chain, and - /// it would be charged from the transferred assets. If set below - /// requirements, the execution may fail and assets wouldn't be + /// `dest_weight_limit` is the weight for XCM execution on the dest + /// chain, and it would be charged from the transferred assets. If set + /// below requirements, the execution may fail and assets wouldn't be /// received. /// /// It's a no-op if any error on local XCM execution or message sending. @@ -205,18 +205,18 @@ pub mod module { currency_id: T::CurrencyId, amount: T::Balance, dest: Box, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> DispatchResult { let who = ensure_signed(origin)?; let dest: MultiLocation = (*dest).try_into().map_err(|()| Error::::BadVersion)?; - Self::do_transfer(who, currency_id, amount, dest, dest_weight) + Self::do_transfer(who, currency_id, amount, dest, dest_weight_limit) } /// Transfer `MultiAsset`. /// - /// `dest_weight` is the weight for XCM execution on the dest chain, and - /// it would be charged from the transferred assets. If set below - /// requirements, the execution may fail and assets wouldn't be + /// `dest_weight_limit` is the weight for XCM execution on the dest + /// chain, and it would be charged from the transferred assets. If set + /// below requirements, the execution may fail and assets wouldn't be /// received. /// /// It's a no-op if any error on local XCM execution or message sending. @@ -229,20 +229,20 @@ pub mod module { origin: OriginFor, asset: Box, dest: Box, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> DispatchResult { let who = ensure_signed(origin)?; let asset: MultiAsset = (*asset).try_into().map_err(|()| Error::::BadVersion)?; let dest: MultiLocation = (*dest).try_into().map_err(|()| Error::::BadVersion)?; - Self::do_transfer_multiasset(who, asset, dest, dest_weight) + Self::do_transfer_multiasset(who, asset, dest, dest_weight_limit) } /// Transfer native currencies specifying the fee and amount as /// separate. /// - /// `dest_weight` is the weight for XCM execution on the dest chain, and - /// it would be charged from the transferred assets. If set below - /// requirements, the execution may fail and assets wouldn't be + /// `dest_weight_limit` is the weight for XCM execution on the dest + /// chain, and it would be charged from the transferred assets. If set + /// below requirements, the execution may fail and assets wouldn't be /// received. /// /// `fee` is the amount to be spent to pay for execution in destination @@ -265,19 +265,19 @@ pub mod module { amount: T::Balance, fee: T::Balance, dest: Box, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> DispatchResult { let who = ensure_signed(origin)?; let dest: MultiLocation = (*dest).try_into().map_err(|()| Error::::BadVersion)?; - Self::do_transfer_with_fee(who, currency_id, amount, fee, dest, dest_weight) + Self::do_transfer_with_fee(who, currency_id, amount, fee, dest, dest_weight_limit) } /// Transfer `MultiAsset` specifying the fee and amount as separate. /// - /// `dest_weight` is the weight for XCM execution on the dest chain, and - /// it would be charged from the transferred assets. If set below - /// requirements, the execution may fail and assets wouldn't be + /// `dest_weight_limit` is the weight for XCM execution on the dest + /// chain, and it would be charged from the transferred assets. If set + /// below requirements, the execution may fail and assets wouldn't be /// received. /// /// `fee` is the multiasset to be spent to pay for execution in @@ -300,21 +300,21 @@ pub mod module { asset: Box, fee: Box, dest: Box, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> DispatchResult { let who = ensure_signed(origin)?; let asset: MultiAsset = (*asset).try_into().map_err(|()| Error::::BadVersion)?; let fee: MultiAsset = (*fee).try_into().map_err(|()| Error::::BadVersion)?; let dest: MultiLocation = (*dest).try_into().map_err(|()| Error::::BadVersion)?; - Self::do_transfer_multiasset_with_fee(who, asset, fee, dest, dest_weight) + Self::do_transfer_multiasset_with_fee(who, asset, fee, dest, dest_weight_limit) } /// Transfer several currencies specifying the item to be used as fee /// - /// `dest_weight` is the weight for XCM execution on the dest chain, and - /// it would be charged from the transferred assets. If set below - /// requirements, the execution may fail and assets wouldn't be + /// `dest_weight_limit` is the weight for XCM execution on the dest + /// chain, and it would be charged from the transferred assets. If set + /// below requirements, the execution may fail and assets wouldn't be /// received. /// /// `fee_item` is index of the currencies tuple that we want to use for @@ -331,19 +331,19 @@ pub mod module { currencies: Vec<(T::CurrencyId, T::Balance)>, fee_item: u32, dest: Box, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> DispatchResult { let who = ensure_signed(origin)?; let dest: MultiLocation = (*dest).try_into().map_err(|()| Error::::BadVersion)?; - Self::do_transfer_multicurrencies(who, currencies, fee_item, dest, dest_weight) + Self::do_transfer_multicurrencies(who, currencies, fee_item, dest, dest_weight_limit) } /// Transfer several `MultiAsset` specifying the item to be used as fee /// - /// `dest_weight` is the weight for XCM execution on the dest chain, and - /// it would be charged from the transferred assets. If set below - /// requirements, the execution may fail and assets wouldn't be + /// `dest_weight_limit` is the weight for XCM execution on the dest + /// chain, and it would be charged from the transferred assets. If set + /// below requirements, the execution may fail and assets wouldn't be /// received. /// /// `fee_item` is index of the MultiAssets that we want to use for @@ -360,7 +360,7 @@ pub mod module { assets: Box, fee_item: u32, dest: Box, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> DispatchResult { let who = ensure_signed(origin)?; let assets: MultiAssets = (*assets).try_into().map_err(|()| Error::::BadVersion)?; @@ -369,7 +369,7 @@ pub mod module { // We first grab the fee let fee: &MultiAsset = assets.get(fee_item as usize).ok_or(Error::::AssetIndexNonExistent)?; - Self::do_transfer_multiassets(who, assets.clone(), fee.clone(), dest, dest_weight) + Self::do_transfer_multiassets(who, assets.clone(), fee.clone(), dest, dest_weight_limit) } } @@ -379,7 +379,7 @@ pub mod module { currency_id: T::CurrencyId, amount: T::Balance, dest: MultiLocation, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> DispatchResult { let location: MultiLocation = T::CurrencyIdConvert::convert(currency_id).ok_or(Error::::NotCrossChainTransferableCurrency)?; @@ -391,7 +391,7 @@ pub mod module { ); let asset: MultiAsset = (location, amount.into()).into(); - Self::do_transfer_multiassets(who, vec![asset.clone()].into(), asset, dest, dest_weight) + Self::do_transfer_multiassets(who, vec![asset.clone()].into(), asset, dest, dest_weight_limit) } fn do_transfer_with_fee( @@ -400,7 +400,7 @@ pub mod module { amount: T::Balance, fee: T::Balance, dest: MultiLocation, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> DispatchResult { let location: MultiLocation = T::CurrencyIdConvert::convert(currency_id).ok_or(Error::::NotCrossChainTransferableCurrency)?; @@ -420,16 +420,16 @@ pub mod module { assets.push(asset); assets.push(fee_asset.clone()); - Self::do_transfer_multiassets(who, assets, fee_asset, dest, dest_weight) + Self::do_transfer_multiassets(who, assets, fee_asset, dest, dest_weight_limit) } fn do_transfer_multiasset( who: T::AccountId, asset: MultiAsset, dest: MultiLocation, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> DispatchResult { - Self::do_transfer_multiassets(who, vec![asset.clone()].into(), asset, dest, dest_weight) + Self::do_transfer_multiassets(who, vec![asset.clone()].into(), asset, dest, dest_weight_limit) } fn do_transfer_multiasset_with_fee( @@ -437,14 +437,14 @@ pub mod module { asset: MultiAsset, fee: MultiAsset, dest: MultiLocation, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> DispatchResult { // Push contains saturated addition, so we should be able to use it safely let mut assets = MultiAssets::new(); assets.push(asset); assets.push(fee.clone()); - Self::do_transfer_multiassets(who, assets, fee, dest, dest_weight)?; + Self::do_transfer_multiassets(who, assets, fee, dest, dest_weight_limit)?; Ok(()) } @@ -454,7 +454,7 @@ pub mod module { currencies: Vec<(T::CurrencyId, T::Balance)>, fee_item: u32, dest: MultiLocation, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> DispatchResult { ensure!( currencies.len() <= T::MaxAssetsForTransfer::get(), @@ -488,7 +488,7 @@ pub mod module { let fee: MultiAsset = (fee_location, (*fee_amount).into()).into(); - Self::do_transfer_multiassets(who, assets, fee, dest, dest_weight) + Self::do_transfer_multiassets(who, assets, fee, dest, dest_weight_limit) } fn do_transfer_multiassets( @@ -496,7 +496,7 @@ pub mod module { assets: MultiAssets, fee: MultiAsset, dest: MultiLocation, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> DispatchResult { ensure!( assets.len() <= T::MaxAssetsForTransfer::get(), @@ -576,7 +576,7 @@ pub mod module { fee_reserve, &dest, Some(override_recipient), - dest_weight, + dest_weight_limit.clone(), true, )?; @@ -588,7 +588,7 @@ pub mod module { non_fee_reserve, &dest, None, - dest_weight, + dest_weight_limit, false, )?; } else { @@ -599,7 +599,7 @@ pub mod module { non_fee_reserve, &dest, None, - dest_weight, + dest_weight_limit, false, )?; } @@ -623,7 +623,7 @@ pub mod module { reserve: Option, dest: &MultiLocation, maybe_recipient_override: Option, - dest_weight: Weight, + dest_weight_limit: WeightLimit, use_teleport: bool, ) -> DispatchResult { let (transfer_kind, dest, reserve, recipient) = Self::transfer_kind(reserve, dest)?; @@ -633,11 +633,17 @@ pub mod module { }; let mut msg = match transfer_kind { - SelfReserveAsset => Self::transfer_self_reserve_asset(assets, fee, dest, recipient, dest_weight)?, - ToReserve => Self::transfer_to_reserve(assets, fee, dest, recipient, dest_weight)?, - ToNonReserve => { - Self::transfer_to_non_reserve(assets, fee, reserve, dest, recipient, dest_weight, use_teleport)? - } + SelfReserveAsset => Self::transfer_self_reserve_asset(assets, fee, dest, recipient, dest_weight_limit)?, + ToReserve => Self::transfer_to_reserve(assets, fee, dest, recipient, dest_weight_limit)?, + ToNonReserve => Self::transfer_to_non_reserve( + assets, + fee, + reserve, + dest, + recipient, + dest_weight_limit, + use_teleport, + )?, }; let weight = T::Weigher::weight(&mut msg).map_err(|()| Error::::UnweighableMessage)?; @@ -656,13 +662,13 @@ pub mod module { fee: MultiAsset, dest: MultiLocation, recipient: MultiLocation, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> Result, DispatchError> { Ok(Xcm(vec![TransferReserveAsset { assets: assets.clone(), dest: dest.clone(), xcm: Xcm(vec![ - Self::buy_execution(fee, &dest, dest_weight)?, + Self::buy_execution(fee, &dest, dest_weight_limit)?, Self::deposit_asset(recipient, assets.len() as u32), ]), }])) @@ -673,7 +679,7 @@ pub mod module { fee: MultiAsset, reserve: MultiLocation, recipient: MultiLocation, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> Result, DispatchError> { Ok(Xcm(vec![ WithdrawAsset(assets.clone()), @@ -681,7 +687,7 @@ pub mod module { assets: All.into(), reserve: reserve.clone(), xcm: Xcm(vec![ - Self::buy_execution(fee, &reserve, dest_weight)?, + Self::buy_execution(fee, &reserve, dest_weight_limit)?, Self::deposit_asset(recipient, assets.len() as u32), ]), }, @@ -694,7 +700,7 @@ pub mod module { reserve: MultiLocation, dest: MultiLocation, recipient: MultiLocation, - dest_weight: Weight, + dest_weight_limit: WeightLimit, use_teleport: bool, ) -> Result, DispatchError> { let mut reanchored_dest = dest.clone(); @@ -717,13 +723,13 @@ pub mod module { assets: All.into(), reserve: reserve.clone(), xcm: Xcm(vec![ - Self::buy_execution(half(&fee), &reserve, dest_weight)?, + Self::buy_execution(half(&fee), &reserve, dest_weight_limit.clone())?, DepositReserveAsset { assets: All.into(), max_assets: assets.len() as u32, dest: reanchored_dest, xcm: Xcm(vec![ - Self::buy_execution(half(&fee), &dest, dest_weight)?, + Self::buy_execution(half(&fee), &dest, dest_weight_limit)?, Self::deposit_asset(recipient, assets.len() as u32), ]), }, @@ -737,12 +743,12 @@ pub mod module { assets: All.into(), reserve: reserve.clone(), xcm: Xcm(vec![ - Self::buy_execution(half(&fee), &reserve, dest_weight)?, + Self::buy_execution(half(&fee), &reserve, dest_weight_limit.clone())?, InitiateTeleport { assets: All.into(), dest: reanchored_dest, xcm: Xcm(vec![ - Self::buy_execution(half(&fee), &dest, dest_weight)?, + Self::buy_execution(half(&fee), &dest, dest_weight_limit)?, Self::deposit_asset(recipient, assets.len() as u32), ]), }, @@ -763,16 +769,14 @@ pub mod module { fn buy_execution( asset: MultiAsset, at: &MultiLocation, - weight: Weight, + weight_limit: WeightLimit, ) -> Result, DispatchError> { let ancestry = T::LocationInverter::ancestry(); let fees = asset .reanchored(at, &ancestry) .map_err(|_| Error::::CannotReanchor)?; - Ok(BuyExecution { - fees, - weight_limit: WeightLimit::Limited(weight), - }) + + Ok(BuyExecution { fees, weight_limit }) } /// Ensure has the `dest` has chain part and recipient part. @@ -931,9 +935,9 @@ pub mod module { currency_id: T::CurrencyId, amount: T::Balance, dest: MultiLocation, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> DispatchResult { - Self::do_transfer(who, currency_id, amount, dest, dest_weight) + Self::do_transfer(who, currency_id, amount, dest, dest_weight_limit) } #[require_transactional] @@ -941,9 +945,9 @@ pub mod module { who: T::AccountId, asset: MultiAsset, dest: MultiLocation, - dest_weight: Weight, + dest_weight_limit: WeightLimit, ) -> DispatchResult { - Self::do_transfer_multiasset(who, asset, dest, dest_weight) + Self::do_transfer_multiasset(who, asset, dest, dest_weight_limit) } } } diff --git a/xtokens/src/tests.rs b/xtokens/src/tests.rs index d1f368ef5..79ef3c0b7 100644 --- a/xtokens/src/tests.rs +++ b/xtokens/src/tests.rs @@ -71,7 +71,7 @@ fn send_relay_chain_asset_to_relay_chain() { ) .into() ), - 40, + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::R, &ALICE), 500); }); @@ -106,7 +106,7 @@ fn send_relay_chain_asset_to_relay_chain_with_fee() { ) .into() ), - 40, + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::R, &ALICE), 500); }); @@ -140,7 +140,7 @@ fn cannot_lost_fund_on_send_failed() { ) .into() ), - 40, + WeightLimit::Unlimited ), Error::::XcmExecutionFailed ); @@ -175,7 +175,7 @@ fn send_relay_chain_asset_to_sibling() { ) .into() ), - 40, + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::R, &ALICE), 500); }); @@ -217,7 +217,7 @@ fn send_relay_chain_asset_to_sibling_with_fee() { ) .into() ), - 40, + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::R, &ALICE), 500); }); @@ -264,7 +264,7 @@ fn send_sibling_asset_to_reserve_sibling() { ) .into() ), - 40, + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::B, &ALICE), 500); @@ -289,7 +289,7 @@ fn send_sibling_asset_to_reserve_sibling() { ) .into() ), - 40, + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::A, &BOB), 500); }); @@ -329,7 +329,7 @@ fn send_sibling_asset_to_reserve_sibling_with_fee() { ) .into() ), - 40, + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::B, &ALICE), 500); @@ -372,7 +372,7 @@ fn send_sibling_asset_to_reserve_sibling_with_distinct_fee() { ) .into() ), - 40, + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::B, &ALICE), 550); @@ -418,7 +418,7 @@ fn send_sibling_asset_to_reserve_sibling_with_distinct_fee_index_works() { ) .into() ), - 40, + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::B, &ALICE), 550); @@ -464,7 +464,7 @@ fn send_sibling_asset_to_non_reserve_sibling() { ) .into() ), - 40 + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::B, &ALICE), 500); }); @@ -511,7 +511,7 @@ fn send_sibling_asset_to_non_reserve_sibling_with_fee() { ) .into() ), - 40 + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::B, &ALICE), 500); }); @@ -553,7 +553,7 @@ fn send_self_parachain_asset_to_sibling() { ) .into() ), - 40, + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::A, &ALICE), 500); @@ -590,7 +590,7 @@ fn send_self_parachain_asset_to_sibling_with_fee() { ) .into() ), - 40, + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::A, &ALICE), 500); @@ -628,7 +628,7 @@ fn send_self_parachain_asset_to_sibling_with_distinct_fee() { ) .into() ), - 40, + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::A, &ALICE), 550); @@ -681,7 +681,7 @@ fn sending_sibling_asset_to_reserve_sibling_with_relay_fee_works() { ) .into() ), - weight as u64, + WeightLimit::Limited(weight as u64), )); assert_eq!(550, ParaTokens::free_balance(CurrencyId::C, &ALICE)); assert_eq!(1000 - fee_amount, ParaTokens::free_balance(CurrencyId::R, &ALICE)); @@ -741,7 +741,7 @@ fn sending_sibling_asset_to_reserve_sibling_with_relay_fee_works_with_relative_s ) .into() ), - weight as u64, + WeightLimit::Limited(weight as u64), )); assert_eq!(550, ParaRelativeTokens::free_balance(CurrencyId::C, &ALICE)); assert_eq!( @@ -804,7 +804,7 @@ fn sending_sibling_asset_to_reserve_sibling_with_relay_fee_not_enough() { ) .into() ), - weight as u64, + WeightLimit::Limited(weight as u64), )); assert_eq!(550, ParaTokens::free_balance(CurrencyId::C, &ALICE)); assert_eq!(1000 - fee_amount, ParaTokens::free_balance(CurrencyId::R, &ALICE)); @@ -850,7 +850,7 @@ fn transfer_asset_with_relay_fee_failed() { ) .into() ), - 40, + WeightLimit::Unlimited ), Error::::InvalidAsset ); @@ -874,7 +874,7 @@ fn transfer_asset_with_relay_fee_failed() { ) .into() ), - 40, + WeightLimit::Unlimited ), Error::::InvalidAsset ); @@ -899,7 +899,7 @@ fn transfer_asset_with_relay_fee_failed() { ) .into() ), - 40, + WeightLimit::Unlimited ), Error::::FeeNotEnough ); @@ -923,7 +923,7 @@ fn transfer_asset_with_relay_fee_failed() { ) .into() ), - 40, + WeightLimit::Unlimited ), Error::::MinXcmFeeNotDefined ); @@ -950,7 +950,7 @@ fn transfer_no_reserve_assets_fails() { ) .into() ), - 50, + WeightLimit::Unlimited ), Error::::AssetHasNoReserve ); @@ -979,7 +979,7 @@ fn transfer_to_self_chain_fails() { ) .into() ), - 50, + WeightLimit::Unlimited ), Error::::NotCrossChainTransfer ); @@ -1005,7 +1005,7 @@ fn transfer_to_invalid_dest_fails() { ) .into() ), - 50, + WeightLimit::Unlimited ), Error::::InvalidDest ); @@ -1137,7 +1137,7 @@ fn send_with_zero_fee_should_yield_an_error() { ) .into() ), - 40, + WeightLimit::Unlimited ), Error::::ZeroFee ); @@ -1171,7 +1171,7 @@ fn send_with_insufficient_fee_traps_assets() { ) .into() ), - 40, + WeightLimit::Unlimited )); }); @@ -1214,7 +1214,7 @@ fn send_with_fee_should_handle_overflow() { ) .into() ), - 40, + WeightLimit::Unlimited ), Error::::XcmExecutionFailed ); @@ -1264,7 +1264,7 @@ fn specifying_more_than_assets_limit_should_error() { ) .into() ), - 40, + WeightLimit::Unlimited ), Error::::TooManyAssetsBeingSent ); @@ -1305,7 +1305,7 @@ fn sending_non_fee_assets_with_different_reserve_should_fail() { ) .into() ), - 40, + WeightLimit::Unlimited ), Error::::DistinctReserveForAssetAndFee ); @@ -1341,7 +1341,7 @@ fn specifying_a_non_existent_asset_index_should_fail() { ) .into() ), - 40, + WeightLimit::Unlimited ), Error::::AssetIndexNonExistent ); @@ -1369,7 +1369,7 @@ fn send_with_zero_amount() { ) .into() ), - 40, + WeightLimit::Unlimited ), Error::::ZeroAmount ); @@ -1390,7 +1390,7 @@ fn send_with_zero_amount() { ) .into() ), - 40, + WeightLimit::Unlimited ), Error::::ZeroAmount ); @@ -1423,7 +1423,7 @@ fn send_self_parachain_asset_to_sibling_relative_parachain() { ) .into() ), - 40, + WeightLimit::Unlimited )); assert_eq!(ParaRelativeTokens::free_balance(CurrencyId::D, &ALICE), 500); @@ -1468,7 +1468,7 @@ fn send_sibling_asset_to_reserve_sibling_with_relative_view() { ) .into() ), - 40, + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::D, &ALICE), 500); @@ -1496,7 +1496,7 @@ fn send_sibling_asset_to_reserve_sibling_with_relative_view() { ) .into() ), - 40, + WeightLimit::Unlimited )); assert_eq!(ParaRelativeTokens::free_balance(CurrencyId::A, &BOB), 500); }); @@ -1537,7 +1537,7 @@ fn send_relative_view_sibling_asset_to_non_reserve_sibling() { ) .into() ), - 40 + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::D, &ALICE), 500); }); @@ -1585,7 +1585,7 @@ fn send_relay_chain_asset_to_relative_view_sibling() { ) .into() ), - 40, + WeightLimit::Unlimited )); assert_eq!(ParaTokens::free_balance(CurrencyId::R, &ALICE), 500); }); @@ -1623,7 +1623,7 @@ fn unsupported_multilocation_should_be_filtered() { ) .into() ), - 40, + WeightLimit::Unlimited ), Error::::NotSupportedMultiLocation ); @@ -1644,9 +1644,82 @@ fn unsupported_multilocation_should_be_filtered() { ) .into() ), - 40, + WeightLimit::Unlimited ), Error::::NotSupportedMultiLocation ); }); } + +#[test] +fn send_with_sufficient_weight_limit() { + TestNet::reset(); + + ParaA::execute_with(|| { + assert_ok!(ParaTokens::deposit(CurrencyId::A, &ALICE, 1_000)); + + assert_ok!(ParaXTokens::transfer( + Some(ALICE).into(), + CurrencyId::A, + 500, + Box::new( + MultiLocation::new( + 1, + X2( + Parachain(2), + Junction::AccountId32 { + network: NetworkId::Any, + id: BOB.into(), + } + ) + ) + .into() + ), + WeightLimit::Limited(40), + )); + + assert_eq!(ParaTokens::free_balance(CurrencyId::A, &ALICE), 500); + assert_eq!(ParaTokens::free_balance(CurrencyId::A, &sibling_b_account()), 500); + }); + + ParaB::execute_with(|| { + assert_eq!(ParaTokens::free_balance(CurrencyId::A, &BOB), 460); + }); +} + +#[test] +fn send_with_insufficient_weight_limit() { + TestNet::reset(); + + ParaA::execute_with(|| { + assert_ok!(ParaTokens::deposit(CurrencyId::A, &ALICE, 1_000)); + + assert_ok!(ParaXTokens::transfer( + Some(ALICE).into(), + CurrencyId::A, + 500, + Box::new( + MultiLocation::new( + 1, + X2( + Parachain(2), + Junction::AccountId32 { + network: NetworkId::Any, + id: BOB.into(), + } + ) + ) + .into() + ), + WeightLimit::Limited(1), + )); + + assert_eq!(ParaTokens::free_balance(CurrencyId::A, &ALICE), 500); + assert_eq!(ParaTokens::free_balance(CurrencyId::A, &sibling_b_account()), 500); + }); + + ParaB::execute_with(|| { + // no funds should arrive - message will have failed + assert_eq!(ParaTokens::free_balance(CurrencyId::A, &BOB), 0); + }); +} From 7f95607a1893f0ee6e12a3d642b40fa87673e774 Mon Sep 17 00:00:00 2001 From: zjb0807 Date: Mon, 21 Nov 2022 23:31:38 +1300 Subject: [PATCH 11/27] Update weight-gen template.hbs (#844) --- weight-gen/src/template.hbs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/weight-gen/src/template.hbs b/weight-gen/src/template.hbs index 20003b1a4..0f4233ebc 100644 --- a/weight-gen/src/template.hbs +++ b/weight-gen/src/template.hbs @@ -13,16 +13,16 @@ impl ModuleWeights { {{#each benchmarks as |benchmark|}} // Storage access info // - {{#each benchmark.comments as |c|}} - // {{c}} + {{#each benchmark.comments as |comment|}} + // {{comment}} {{/each}} pub fn {{benchmark.name~}} () -> Weight { - ({{underscore benchmark.weight}} as Weight) + Weight::from_ref_time({{underscore benchmark.weight}}) {{#if (ne benchmark.reads 0)}} - .saturating_add(T::DbWeight::get().reads({{benchmark.reads}} as Weight)) + .saturating_add(T::DbWeight::get().reads({{benchmark.reads}})) {{/if}} {{#if (ne benchmark.writes 0)}} - .saturating_add(T::DbWeight::get().writes({{benchmark.writes}} as Weight)) + .saturating_add(T::DbWeight::get().writes({{benchmark.writes}})) {{/if}} } {{/each}} From e885d8df15d5d729d6c048f67945c5f649b38dfb Mon Sep 17 00:00:00 2001 From: Xiliang Chen Date: Tue, 22 Nov 2022 13:03:56 +1300 Subject: [PATCH 12/27] prevent nested DelayedOrigin (#845) * prevent nested DelayedOrigin * fix deps * Update authority/src/tests.rs Co-authored-by: zjb0807 * allow nested DelayedOrigin * update docstring * typo fix Co-authored-by: zjb0807 --- authority/Cargo.toml | 4 +-- authority/src/lib.rs | 74 ++++++++++++++++++++++++++++++++++++++---- authority/src/tests.rs | 7 ++++ 3 files changed, 76 insertions(+), 9 deletions(-) diff --git a/authority/Cargo.toml b/authority/Cargo.toml index e0468a06b..03535affb 100644 --- a/authority/Cargo.toml +++ b/authority/Cargo.toml @@ -12,15 +12,15 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.145", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } [dev-dependencies] sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } diff --git a/authority/src/lib.rs b/authority/src/lib.rs index cc49a9074..93a30dac6 100644 --- a/authority/src/lib.rs +++ b/authority/src/lib.rs @@ -11,6 +11,13 @@ //! Two functionalities are provided by this module: //! - schedule a dispatchable //! - dispatch method with on behalf of other origins +//! +//! NOTE: +//! +//! In order to derive a feasible max encoded len for `DelayedOrigin`, it is +//! assumed that there are no nested `DelayedOrigin` in `OriginCaller`. +//! In practice, this means there should not be nested `schedule_dispatch`. +//! Otherwise the proof size estimation may not be accurate. #![cfg_attr(not(feature = "std"), no_std)] // Disable the following three lints since they originate from an external macro @@ -32,6 +39,7 @@ use frame_support::{ }; use frame_system::{pallet_prelude::*, EnsureRoot, EnsureSigned}; use scale_info::TypeInfo; +use sp_core::defer; use sp_runtime::{ traits::{CheckedSub, Dispatchable, Hash, Saturating}, ArithmeticError, DispatchError, DispatchResult, Either, RuntimeDebug, @@ -45,12 +53,64 @@ mod weights; pub use weights::WeightInfo; /// A delayed origin. Can only be dispatched via `dispatch_as` with a delay. -#[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode, TypeInfo, MaxEncodedLen)] +#[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode, TypeInfo)] pub struct DelayedOrigin { /// Number of blocks that this call have been delayed. - pub delay: BlockNumber, + pub(crate) delay: BlockNumber, /// The initial origin. - pub origin: Box, + pub(crate) origin: Box, +} + +#[cfg(feature = "std")] +mod helper { + use std::cell::RefCell; + + thread_local! { + static NESTED_MAX_ENCODED_LEN: RefCell = RefCell::new(false); + } + + pub fn set_nested_max_encoded_len(val: bool) { + NESTED_MAX_ENCODED_LEN.with(|v| *v.borrow_mut() = val); + } + + pub fn nested_max_encoded_len() -> bool { + NESTED_MAX_ENCODED_LEN.with(|v| *v.borrow()) + } +} + +#[cfg(not(feature = "std"))] +mod helper { + static mut NESTED_MAX_ENCODED_LEN: bool = false; + + pub fn set_nested_max_encoded_len(val: bool) { + unsafe { + NESTED_MAX_ENCODED_LEN = val; + } + } + + pub fn nested_max_encoded_len() -> bool { + unsafe { NESTED_MAX_ENCODED_LEN } + } +} + +// Manual implementation to break recursive calls of `MaxEncodedLen` as the +// implementation of `PalletsOrigin::max_encoded_len` will also call +// `MaxEncodedLen` on `DelayedOrigin`. This is only safe if there are no nested +// `DelayedOrigin`. It is only possible to construct a `DelayedOrigin` via +// `schedule_dispatch` which is a protected call only accessible via governance. +impl MaxEncodedLen + for DelayedOrigin +{ + fn max_encoded_len() -> usize { + if helper::nested_max_encoded_len() { + return 0; + } + + helper::set_nested_max_encoded_len(true); + defer!(helper::set_nested_max_encoded_len(false)); + + BlockNumber::max_encoded_len() + PalletsOrigin::max_encoded_len() + } } /// Ensure the origin have a minimum amount of delay. @@ -99,10 +159,10 @@ pub trait AuthorityConfig { new_delay: BlockNumber, ) -> DispatchResult; /// Check if the `origin` is allow to delay a scheduled task that - /// initially created by `inital_origin`. + /// initially created by `initial_origin`. fn check_delay_schedule(origin: Origin, initial_origin: &PalletsOrigin) -> DispatchResult; /// Check if the `origin` is allow to cancel a scheduled task that - /// initially created by `inital_origin`. + /// initially created by `initial_origin`. fn check_cancel_schedule(origin: Origin, initial_origin: &PalletsOrigin) -> DispatchResult; } @@ -396,12 +456,12 @@ pub mod module { #[pallet::weight(T::WeightInfo::remove_authorized_call())] pub fn remove_authorized_call(origin: OriginFor, hash: T::Hash) -> DispatchResult { - let root_or_sigend = + let root_or_signed = EitherOfDiverse::, EnsureSigned>::ensure_origin(origin)?; SavedCalls::::try_mutate_exists(hash, |maybe_call| { let (_, maybe_caller) = maybe_call.take().ok_or(Error::::CallNotAuthorized)?; - match root_or_sigend { + match root_or_signed { Either::Left(_) => {} // root, do nothing Either::Right(who) => { // signed, ensure it's the caller diff --git a/authority/src/tests.rs b/authority/src/tests.rs index f44c2a840..c4bd784d6 100644 --- a/authority/src/tests.rs +++ b/authority/src/tests.rs @@ -3,6 +3,7 @@ #![cfg(test)] use super::*; +use codec::MaxEncodedLen; use frame_support::{ assert_noop, assert_ok, dispatch::DispatchErrorWithPostInfo, @@ -691,3 +692,9 @@ fn trigger_old_call_should_be_free_and_operational() { ); }); } + +#[test] +fn origin_max_encoded_len_works() { + assert_eq!(DelayedOrigin::::max_encoded_len(), 22); + assert_eq!(OriginCaller::max_encoded_len(), 27); +} From 394d4c33aa810bd4604a7258b9634d78e88a459f Mon Sep 17 00:00:00 2001 From: zjb0807 Date: Tue, 22 Nov 2022 17:36:14 +1300 Subject: [PATCH 13/27] Add try-runtime feature for orml-payments (#846) * Add try-runtime feature for orml-payments * Add features --- asset-registry/Cargo.toml | 27 +++++++++++++++--------- auction/Cargo.toml | 18 +++++++++------- authority/Cargo.toml | 24 +++++++++++++-------- benchmarking/Cargo.toml | 25 ++++++++++++---------- currencies/Cargo.toml | 24 ++++++++++++--------- gradually-update/Cargo.toml | 18 +++++++++------- nft/Cargo.toml | 20 +++++++++++------- oracle/Cargo.toml | 20 +++++++++++------- payments/Cargo.toml | 14 ++++++++----- payments/src/types.rs | 2 +- rewards/Cargo.toml | 26 +++++++++++++---------- tokens/Cargo.toml | 25 +++++++++++++--------- unknown-tokens/Cargo.toml | 18 +++++++++------- vesting/Cargo.toml | 23 ++++++++++++-------- xcm-support/Cargo.toml | 13 ++++++------ xcm/Cargo.toml | 16 ++++++++------ xtokens/Cargo.toml | 42 +++++++++++++++++++++++-------------- 17 files changed, 214 insertions(+), 141 deletions(-) diff --git a/asset-registry/Cargo.toml b/asset-registry/Cargo.toml index 4970ad8d3..11c3c9128 100644 --- a/asset-registry/Cargo.toml +++ b/asset-registry/Cargo.toml @@ -13,10 +13,10 @@ 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.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } # polkadot pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } @@ -29,9 +29,9 @@ orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = fa [dev-dependencies] # substrate -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } # cumulus cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } @@ -47,30 +47,37 @@ xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "rele # 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"] diff --git a/auction/Cargo.toml b/auction/Cargo.toml index 004c5c905..404d0f5e1 100644 --- a/auction/Cargo.toml +++ b/auction/Cargo.toml @@ -8,14 +8,14 @@ authors = ["Acala Developers"] edition = "2021" [dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } @@ -27,12 +27,16 @@ sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0 default = ["std"] std = [ "serde", + "codec/std", - "scale-info/std", - "sp-runtime/std", - "sp-std/std", "frame-support/std", "frame-system/std", "orml-traits/std", + "scale-info/std", + "sp-runtime/std", + "sp-std/std", ] -try-runtime = ["frame-support/try-runtime"] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", +] \ No newline at end of file diff --git a/authority/Cargo.toml b/authority/Cargo.toml index 03535affb..0f831f2b1 100644 --- a/authority/Cargo.toml +++ b/authority/Cargo.toml @@ -8,36 +8,42 @@ authors = ["Acala Developers"] edition = "2021" [dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.145", optional = true } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } [features] default = ["std"] std = [ "serde", + "codec/std", + "frame-support/std", + "frame-system/std", "scale-info/std", + "sp-core/std", + "sp-io/std", "sp-runtime/std", "sp-std/std", - "sp-io/std", - "frame-support/std", - "frame-system/std", ] runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", ] -try-runtime = ["frame-support/try-runtime"] diff --git a/benchmarking/Cargo.toml b/benchmarking/Cargo.toml index c0e50e798..a7fc2e3fc 100644 --- a/benchmarking/Cargo.toml +++ b/benchmarking/Cargo.toml @@ -8,20 +8,20 @@ authors = ["Laminar Developers "] edition = "2021" [dependencies] -serde = { version = "1.0.136", optional = true } -paste = "1.0.7" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } +paste = "1.0.7" +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } +serde = { version = "1.0.136", optional = true } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } [dev-dependencies] hex-literal = "0.3.4" @@ -32,13 +32,16 @@ frame-system = { git = "https://github.com/paritytech/substrate", branch = "polk default = [ "std" ] std = [ "serde", + "codec/std", + "frame-benchmarking/std", + "frame-support/std", + "log/std", "scale-info/std", + "sp-api/std", + "sp-io/std", "sp-runtime-interface/std", "sp-runtime/std", - "sp-api/std", "sp-std/std", - "frame-support/std", - "frame-benchmarking/std", - "log/std", + "sp-storage/std", ] diff --git a/currencies/Cargo.toml b/currencies/Cargo.toml index 68cdf1ee9..2c54199e8 100644 --- a/currencies/Cargo.toml +++ b/currencies/Cargo.toml @@ -8,22 +8,22 @@ authors = ["Laminar Developers "] edition = "2021" [dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } orml_tokens = { package = "orml-tokens", path = "../tokens", version = "0.4.1-dev" } @@ -31,14 +31,18 @@ orml_tokens = { package = "orml-tokens", path = "../tokens", version = "0.4.1-de default = ["std"] std = [ "serde", + "codec/std", - "scale-info/std", - "sp-runtime/std", - "sp-std/std", - "sp-io/std", "frame-support/std", "frame-system/std", "orml-traits/std", "orml-utilities/std", + "scale-info/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", ] -try-runtime = ["frame-support/try-runtime"] diff --git a/gradually-update/Cargo.toml b/gradually-update/Cargo.toml index 93591c3e8..45829b0c9 100644 --- a/gradually-update/Cargo.toml +++ b/gradually-update/Cargo.toml @@ -8,28 +8,32 @@ authors = ["Laminar Developers "] edition = "2021" [dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } [features] default = ["std"] std = [ "serde", + "codec/std", - "scale-info/std", "frame-support/std", "frame-system/std", - "sp-io/std", - "sp-std/std", + "scale-info/std", "sp-core/std", + "sp-io/std", "sp-runtime/std", + "sp-std/std", +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", ] -try-runtime = ["frame-support/try-runtime"] diff --git a/nft/Cargo.toml b/nft/Cargo.toml index 8b408a4b6..43d6000cc 100644 --- a/nft/Cargo.toml +++ b/nft/Cargo.toml @@ -8,28 +8,32 @@ authors = ["Acala Developers"] edition = "2021" [dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } [features] default = ["std"] std = [ "serde", + "codec/std", - "scale-info/std", - "sp-std/std", - "sp-runtime/std", "frame-support/std", "frame-system/std", + "scale-info/std", + "sp-runtime/std", + "sp-std/std", ] -try-runtime = ["frame-support/try-runtime"] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", +] \ No newline at end of file diff --git a/oracle/Cargo.toml b/oracle/Cargo.toml index a5c51f564..68836ecd0 100644 --- a/oracle/Cargo.toml +++ b/oracle/Cargo.toml @@ -8,16 +8,16 @@ authors = ["Laminar Developers "] edition = "2021" [dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } @@ -29,15 +29,19 @@ sp-core = { git = "https://github.com/paritytech/substrate", default-features = default = ["std"] std = [ "serde", + "codec/std", + "frame-support/std", + "frame-system/std", + "orml-traits/std", + "orml-utilities/std", "scale-info/std", "sp-application-crypto/std", "sp-io/std", "sp-runtime/std", "sp-std/std", - "frame-support/std", - "frame-system/std", - "orml-traits/std", - "orml-utilities/std", ] -try-runtime = ["frame-support/try-runtime"] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", +] diff --git a/payments/Cargo.toml b/payments/Cargo.toml index 81044bc0a..6218a3dfc 100644 --- a/payments/Cargo.toml +++ b/payments/Cargo.toml @@ -10,7 +10,7 @@ description = "Allows users to post escrow payment on-chain" readme = "README.md" [dependencies] -parity-scale-codec = { version = "3.1.5", default-features = false, features = ["max-encoded-len"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } log = { version = "0.4.17", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } @@ -32,13 +32,17 @@ orml-tokens = { path = "../tokens", version = "0.4.1-dev", default-features = fa [features] default = ['std'] std = [ - 'parity-scale-codec/std', + 'codec/std', 'frame-support/std', 'frame-system/std', 'log/std', + 'orml-tokens/std', + 'orml-traits/std', + 'scale-info/std', 'sp-runtime/std', 'sp-std/std', - 'scale-info/std', - 'orml-traits/std', - 'orml-tokens/std' ] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", +] \ No newline at end of file diff --git a/payments/src/types.rs b/payments/src/types.rs index a4e5058d4..acb694db2 100644 --- a/payments/src/types.rs +++ b/payments/src/types.rs @@ -1,6 +1,6 @@ #![allow(unused_qualifications)] use crate::{pallet, AssetIdOf, BalanceOf}; -use parity_scale_codec::{Decode, Encode, HasCompact, MaxEncodedLen}; +use codec::{Decode, Encode, HasCompact, MaxEncodedLen}; use scale_info::TypeInfo; use sp_runtime::{DispatchResult, Percent}; diff --git a/rewards/Cargo.toml b/rewards/Cargo.toml index 27e15bb17..b54b2c2d4 100644 --- a/rewards/Cargo.toml +++ b/rewards/Cargo.toml @@ -8,16 +8,16 @@ authors = ["Acala Developers"] edition = "2021" [dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } @@ -28,14 +28,18 @@ sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot- default = ["std"] std = [ "serde", + "codec/std", - "scale-info/std", - "sp-runtime/std", - "sp-io/std", - "sp-std/std", - "sp-core/std", "frame-support/std", "frame-system/std", "orml-traits/std", + "scale-info/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", ] -try-runtime = ["frame-support/try-runtime"] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", +] \ No newline at end of file diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index e6573be1f..b69d4a4e0 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -8,37 +8,42 @@ authors = ["Laminar Developers "] edition = "2021" [dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } [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", + "scale-info/std", + "sp-runtime/std", + "sp-std/std", ] runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", ] -try-runtime = ["frame-support/try-runtime"] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", +] \ No newline at end of file diff --git a/unknown-tokens/Cargo.toml b/unknown-tokens/Cargo.toml index 07c8a610e..2fc720c5f 100644 --- a/unknown-tokens/Cargo.toml +++ b/unknown-tokens/Cargo.toml @@ -8,33 +8,37 @@ authors = ["Acala Developers"] edition = "2021" [dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } orml-xcm-support = { path = "../xcm-support", default-features = false } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } [features] default = ["std"] std = [ "serde", + "codec/std", - "scale-info/std", - "sp-std/std", "frame-support/std", "frame-system/std", - "xcm/std", "orml-xcm-support/std", + "scale-info/std", + "sp-std/std", + "xcm/std", ] -try-runtime = ["frame-support/try-runtime"] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", +] \ No newline at end of file diff --git a/vesting/Cargo.toml b/vesting/Cargo.toml index f406347ee..9cbf09fe5 100644 --- a/vesting/Cargo.toml +++ b/vesting/Cargo.toml @@ -8,34 +8,39 @@ authors = ["Laminar Developers "] edition = "2021" [dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } [features] default = ["std"] std = [ "serde", + "codec/std", + "frame-support/std", + "frame-system/std", "scale-info/std", + "sp-io/std", "sp-runtime/std", "sp-std/std", - "sp-io/std", - "frame-support/std", - "frame-system/std", ] runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", ] -try-runtime = ["frame-support/try-runtime"] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", +] \ No newline at end of file diff --git a/xcm-support/Cargo.toml b/xcm-support/Cargo.toml index d3e1e0b51..460b49d71 100644 --- a/xcm-support/Cargo.toml +++ b/xcm-support/Cargo.toml @@ -10,9 +10,9 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } @@ -22,10 +22,11 @@ orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = fa [features] default = ["std"] std = [ - "sp-std/std", - "sp-runtime/std", + "codec/std", "frame-support/std", - "xcm/std", - "xcm-executor/std", "orml-traits/std", + "sp-runtime/std", + "sp-std/std", + "xcm-executor/std", + "xcm/std", ] diff --git a/xcm/Cargo.toml b/xcm/Cargo.toml index 6b75f3cee..a72393624 100644 --- a/xcm/Cargo.toml +++ b/xcm/Cargo.toml @@ -11,12 +11,12 @@ edition = "2021" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } [dev-dependencies] xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } @@ -25,11 +25,15 @@ xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "rele default = ["std"] std = [ "codec/std", - "scale-info/std", - "sp-std/std", "frame-support/std", "frame-system/std", - "xcm/std", "pallet-xcm/std", + "scale-info/std", + "sp-std/std", + "xcm/std", ] -try-runtime = ["frame-support/try-runtime"] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "pallet-xcm/try-runtime", +] \ No newline at end of file diff --git a/xtokens/Cargo.toml b/xtokens/Cargo.toml index 78e660234..6d7c8c143 100644 --- a/xtokens/Cargo.toml +++ b/xtokens/Cargo.toml @@ -8,16 +8,16 @@ authors = ["Acala Developers"] edition = "2021" [dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } # substrate -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } # cumulus cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.31" } @@ -28,19 +28,19 @@ xcm = { git = "https://github.com/paritytech/polkadot", default-features = false xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } # orml -orml-xcm-support = { path = "../xcm-support", default-features = false } orml-traits = { path = "../traits", default-features = false} +orml-xcm-support = { path = "../xcm-support", default-features = false } [dev-dependencies] # substrate -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } # cumulus -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } # polkadot @@ -57,21 +57,31 @@ orml-xcm = { path = "../xcm" } default = ["std"] std = [ "serde", + "codec/std", + "cumulus-primitives-core/std", + "frame-support/std", + "frame-system/std", + "orml-traits/std", + "orml-xcm-support/std", + "pallet-xcm/std", "scale-info/std", + "sp-io/std", "sp-runtime/std", "sp-std/std", - "sp-io/std", - "frame-support/std", - "frame-system/std", - "cumulus-primitives-core/std", - "xcm/std", "xcm-executor/std", - "orml-xcm-support/std", - "orml-traits/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"] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "pallet-xcm/try-runtime", +] \ No newline at end of file From f336875e48599b5e9500b301385259354821f01f Mon Sep 17 00:00:00 2001 From: Nuno Alexandre Date: Tue, 22 Nov 2022 09:02:11 +0100 Subject: [PATCH 14/27] Update to Polkadot v0.9.32 (#848) --- asset-registry/Cargo.toml | 38 ++++++++++++++-------------- auction/Cargo.toml | 14 +++++------ authority/Cargo.toml | 18 ++++++------- bencher/Cargo.toml | 24 +++++++++--------- bencher/test/Cargo.toml | 12 ++++----- benchmarking/Cargo.toml | 18 ++++++------- currencies/Cargo.toml | 14 +++++------ gradually-update/Cargo.toml | 12 ++++----- nft/Cargo.toml | 14 +++++------ oracle/Cargo.toml | 14 +++++------ oracle/rpc/Cargo.toml | 6 ++--- oracle/rpc/runtime-api/Cargo.toml | 4 +-- payments/Cargo.toml | 14 +++++------ rewards/Cargo.toml | 16 ++++++------ tokens/Cargo.toml | 18 ++++++------- tokens/rpc/Cargo.toml | 12 ++++----- tokens/rpc/runtime-api/Cargo.toml | 6 ++--- traits/Cargo.toml | 10 ++++---- unknown-tokens/Cargo.toml | 16 ++++++------ utilities/Cargo.toml | 10 ++++---- vesting/Cargo.toml | 16 ++++++------ weight-meter/Cargo.toml | 14 +++++------ xcm-support/Cargo.toml | 10 ++++---- xcm/Cargo.toml | 14 +++++------ xtokens/Cargo.toml | 42 +++++++++++++++---------------- 25 files changed, 193 insertions(+), 193 deletions(-) diff --git a/asset-registry/Cargo.toml b/asset-registry/Cargo.toml index 11c3c9128..93a27f305 100644 --- a/asset-registry/Cargo.toml +++ b/asset-registry/Cargo.toml @@ -13,37 +13,37 @@ serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } # substrate -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } # polkadot -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } # orml orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] # substrate -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } # cumulus -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } # polkadot -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } -xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" } +xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" } # orml orml-tokens = { path = "../tokens" } diff --git a/auction/Cargo.toml b/auction/Cargo.toml index 404d0f5e1..397aa0d21 100644 --- a/auction/Cargo.toml +++ b/auction/Cargo.toml @@ -12,16 +12,16 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } [features] default = ["std"] @@ -39,4 +39,4 @@ std = [ try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", -] \ No newline at end of file +] diff --git a/authority/Cargo.toml b/authority/Cargo.toml index 0f831f2b1..2e7023601 100644 --- a/authority/Cargo.toml +++ b/authority/Cargo.toml @@ -12,17 +12,17 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.145", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } [dev-dependencies] -pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } [features] default = ["std"] diff --git a/bencher/Cargo.toml b/bencher/Cargo.toml index 6797f18ee..0ad787361 100644 --- a/bencher/Cargo.toml +++ b/bencher/Cargo.toml @@ -26,18 +26,18 @@ hash-db = { version = "0.15.2", default-features = false, optional = true } bencher-procedural = { path = "bencher-procedural", default-features = false } codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.31" } -sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["wasmtime"], optional = true , branch = "polkadot-v0.9.31" } -sc-executor-common = { git = "https://github.com/paritytech/substrate", optional = true , branch = "polkadot-v0.9.31" } -sc-client-db = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["rocksdb"], optional = true , branch = "polkadot-v0.9.31" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.31" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.32" } +sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["wasmtime"], optional = true , branch = "polkadot-v0.9.32" } +sc-executor-common = { git = "https://github.com/paritytech/substrate", optional = true , branch = "polkadot-v0.9.32" } +sc-client-db = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["rocksdb"], optional = true , branch = "polkadot-v0.9.32" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.32" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.32" } [features] default = ["std"] diff --git a/bencher/test/Cargo.toml b/bencher/test/Cargo.toml index 0c0ab28e3..92931c950 100644 --- a/bencher/test/Cargo.toml +++ b/bencher/test/Cargo.toml @@ -15,16 +15,16 @@ required-features = ["bench"] serde = { version = "1.0.136", optional = true } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } orml-bencher = { path = "..", default-features = false } orml-weight-meter = { path = "../../weight-meter", default-features = false } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } [features] default = ["std"] diff --git a/benchmarking/Cargo.toml b/benchmarking/Cargo.toml index a7fc2e3fc..2a7e73f48 100644 --- a/benchmarking/Cargo.toml +++ b/benchmarking/Cargo.toml @@ -14,19 +14,19 @@ paste = "1.0.7" scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } [dev-dependencies] hex-literal = "0.3.4" -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } [features] default = [ "std" ] diff --git a/currencies/Cargo.toml b/currencies/Cargo.toml index 2c54199e8..299e35b71 100644 --- a/currencies/Cargo.toml +++ b/currencies/Cargo.toml @@ -12,18 +12,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } orml_tokens = { package = "orml-tokens", path = "../tokens", version = "0.4.1-dev" } diff --git a/gradually-update/Cargo.toml b/gradually-update/Cargo.toml index 45829b0c9..1255b5e23 100644 --- a/gradually-update/Cargo.toml +++ b/gradually-update/Cargo.toml @@ -12,12 +12,12 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } [features] default = ["std"] diff --git a/nft/Cargo.toml b/nft/Cargo.toml index 43d6000cc..a1df801de 100644 --- a/nft/Cargo.toml +++ b/nft/Cargo.toml @@ -12,14 +12,14 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } [features] default = ["std"] @@ -36,4 +36,4 @@ std = [ try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", -] \ No newline at end of file +] diff --git a/oracle/Cargo.toml b/oracle/Cargo.toml index 68836ecd0..e0701901f 100644 --- a/oracle/Cargo.toml +++ b/oracle/Cargo.toml @@ -12,18 +12,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } [features] default = ["std"] diff --git a/oracle/rpc/Cargo.toml b/oracle/rpc/Cargo.toml index 2508a5c3a..16c0cfb7d 100644 --- a/oracle/rpc/Cargo.toml +++ b/oracle/rpc/Cargo.toml @@ -12,8 +12,8 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } tracing = { version = "0.1.29" } tracing-core = { version = "0.1.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } orml-oracle-rpc-runtime-api = { path = "runtime-api", version = "0.4.1-dev" } diff --git a/oracle/rpc/runtime-api/Cargo.toml b/oracle/rpc/runtime-api/Cargo.toml index d3d7f6a0a..d69949653 100644 --- a/oracle/rpc/runtime-api/Cargo.toml +++ b/oracle/rpc/runtime-api/Cargo.toml @@ -8,8 +8,8 @@ description = "Runtime API module for orml-oracle-rpc." [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } [features] default = ["std"] diff --git a/payments/Cargo.toml b/payments/Cargo.toml index 6218a3dfc..9877b1cd7 100644 --- a/payments/Cargo.toml +++ b/payments/Cargo.toml @@ -14,18 +14,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = log = { version = "0.4.17", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } orml-traits = {path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] serde = { version = "1.0.136" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } orml-tokens = { path = "../tokens", version = "0.4.1-dev", default-features = false } @@ -45,4 +45,4 @@ std = [ try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", -] \ No newline at end of file +] diff --git a/rewards/Cargo.toml b/rewards/Cargo.toml index b54b2c2d4..8e784c0bf 100644 --- a/rewards/Cargo.toml +++ b/rewards/Cargo.toml @@ -12,17 +12,17 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } [features] default = ["std"] @@ -42,4 +42,4 @@ std = [ try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", -] \ No newline at end of file +] diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index b69d4a4e0..5bfe7282b 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -12,18 +12,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } [features] default = ["std"] @@ -46,4 +46,4 @@ runtime-benchmarks = [ try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", -] \ No newline at end of file +] diff --git a/tokens/rpc/Cargo.toml b/tokens/rpc/Cargo.toml index 758ccb05c..08ced5c03 100644 --- a/tokens/rpc/Cargo.toml +++ b/tokens/rpc/Cargo.toml @@ -12,11 +12,11 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } tracing = { version = "0.1.29" } tracing-core = { version = "0.1.28" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } orml-tokens-rpc-runtime-api = { version = "0.4.1-dev", path = "./runtime-api" } diff --git a/tokens/rpc/runtime-api/Cargo.toml b/tokens/rpc/runtime-api/Cargo.toml index 5440d6b6e..51caedce1 100644 --- a/tokens/rpc/runtime-api/Cargo.toml +++ b/tokens/rpc/runtime-api/Cargo.toml @@ -8,9 +8,9 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } orml-tokens = { default-features = false, path = "../../../tokens" } [features] diff --git a/traits/Cargo.toml b/traits/Cargo.toml index 6acc8c615..a22132961 100644 --- a/traits/Cargo.toml +++ b/traits/Cargo.toml @@ -14,12 +14,12 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = num-traits = { version = "0.2.14", default-features = false } impl-trait-for-tuples = "0.2.2" -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } diff --git a/unknown-tokens/Cargo.toml b/unknown-tokens/Cargo.toml index 2fc720c5f..f706277e6 100644 --- a/unknown-tokens/Cargo.toml +++ b/unknown-tokens/Cargo.toml @@ -12,18 +12,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } orml-xcm-support = { path = "../xcm-support", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } [features] default = ["std"] @@ -41,4 +41,4 @@ std = [ try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", -] \ No newline at end of file +] diff --git a/utilities/Cargo.toml b/utilities/Cargo.toml index 4f4175652..cb9900da3 100644 --- a/utilities/Cargo.toml +++ b/utilities/Cargo.toml @@ -12,15 +12,15 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } [dev-dependencies] serde_json = "1.0.64" -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } [features] default = ["std"] diff --git a/vesting/Cargo.toml b/vesting/Cargo.toml index 9cbf09fe5..19abb9c91 100644 --- a/vesting/Cargo.toml +++ b/vesting/Cargo.toml @@ -12,15 +12,15 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } [features] default = ["std"] @@ -43,4 +43,4 @@ runtime-benchmarks = [ try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", -] \ No newline at end of file +] diff --git a/weight-meter/Cargo.toml b/weight-meter/Cargo.toml index 922db6c53..f15764467 100644 --- a/weight-meter/Cargo.toml +++ b/weight-meter/Cargo.toml @@ -10,19 +10,19 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } weight-meter-procedural = { path = "weight-meter-procedural", default-features = false } [dev-dependencies] serde = { version = "1.0.136" } codec = { package = "parity-scale-codec", version = "3.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } [features] default = ["std"] diff --git a/xcm-support/Cargo.toml b/xcm-support/Cargo.toml index 460b49d71..12c9f8521 100644 --- a/xcm-support/Cargo.toml +++ b/xcm-support/Cargo.toml @@ -10,12 +10,12 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } diff --git a/xcm/Cargo.toml b/xcm/Cargo.toml index a72393624..5a1b3e072 100644 --- a/xcm/Cargo.toml +++ b/xcm/Cargo.toml @@ -11,15 +11,15 @@ edition = "2021" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } [dev-dependencies] -xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" } [features] default = ["std"] @@ -36,4 +36,4 @@ try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", "pallet-xcm/try-runtime", -] \ No newline at end of file +] diff --git a/xtokens/Cargo.toml b/xtokens/Cargo.toml index 6d7c8c143..4d8dc06ca 100644 --- a/xtokens/Cargo.toml +++ b/xtokens/Cargo.toml @@ -13,19 +13,19 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } # substrate -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.31" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } # cumulus -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.31" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.32" } # polkadot -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.31" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } # orml orml-traits = { path = "../traits", default-features = false} @@ -33,21 +33,21 @@ orml-xcm-support = { path = "../xcm-support", default-features = false } [dev-dependencies] # substrate -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } # cumulus -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } # polkadot -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } -xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" } +xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" } # orml orml-tokens = { path = "../tokens" } @@ -84,4 +84,4 @@ try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", "pallet-xcm/try-runtime", -] \ No newline at end of file +] From 56876b435dbafd8219bfcc4c8b1029d85e1deca9 Mon Sep 17 00:00:00 2001 From: zjb0807 Date: Wed, 23 Nov 2022 13:21:53 +1300 Subject: [PATCH 15/27] Add new for DelayedOrigin (#849) --- authority/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/authority/src/lib.rs b/authority/src/lib.rs index 93a30dac6..c140b6f15 100644 --- a/authority/src/lib.rs +++ b/authority/src/lib.rs @@ -61,6 +61,13 @@ pub struct DelayedOrigin { pub(crate) origin: Box, } +#[cfg(any(feature = "std", feature = "runtime-benchmarks", test))] +impl DelayedOrigin { + pub fn new(delay: BlockNumber, origin: Box) -> Self { + Self { delay, origin } + } +} + #[cfg(feature = "std")] mod helper { use std::cell::RefCell; From 10cdcf1312f2cfb9ed957661c14058c7834193b8 Mon Sep 17 00:00:00 2001 From: Lawrence Law - Acala <97002769+Lawrence-Acala@users.noreply.github.com> Date: Wed, 23 Nov 2022 21:48:02 +1300 Subject: [PATCH 16/27] Update README.md (#851) * Update README.md Update modules description * Update README.md Further updates on description. --- README.md | 66 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index f956606dd..62ede983b 100644 --- a/README.md +++ b/README.md @@ -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 From c218d9822b1eca9037432332c44c179cff0c31f8 Mon Sep 17 00:00:00 2001 From: Dzmitry Lahoda Date: Tue, 29 Nov 2022 22:17:08 +0000 Subject: [PATCH 17/27] #xcm polishing #xtokens README.md (#856) --- xtokens/README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/xtokens/README.md b/xtokens/README.md index da33a75a7..ab0138ef4 100644 --- a/xtokens/README.md +++ b/xtokens/README.md @@ -2,18 +2,18 @@ ## Overview -The xtokens module provides cross-chain token transfer functionality, by cross-consensus messages(XCM). +The `xtokens` module provides cross-chain token transfer functionality, by cross-consensus messages(XCM). -The xtokens module provides functions for +The `xtokens` module provides functions for - Token transfer from parachains to relay chain. - Token transfer between parachains, including relay chain tokens like DOT, - KSM, and parachain tokens like ACA, aUSD. + KSM, and parachain tokens like ACA, aUSD, USDT. ## Notes #### Integration tests -Integration tests could be done manually after integrating orml-xtokens into runtime. To cover the full features, set up at least 4 relay chain validators and 3 collators of different parachains, and use dispatchable calls to include all these scenarios: +Integration tests could be done manually after integrating `xtokens` into a runtime. To cover the full features, set up at least 4 relay chain validators and 3 collators of different parachains, and use dispatchable calls to include all these scenarios: - Transfer relay chain tokens to relay chain. - Transfer tokens issued by parachain A, from parachain A to parachain B. @@ -34,24 +34,24 @@ Integration tests could be done manually after integrating orml-xtokens into run - Transfer relay chain tokens to relay chain, and use relay chain token as fee - Transfer relay chain tokens to parachain, and use relay chain token as fee -- Transfer tokens issued by parachain A, from parachain A to parachain B, and use parachain A token as fee -- Transfer tokens issued by parachain B, from parachain A to parachain B, and use parachain B token as fee -- Transfer tokens issued by parachain C, from parachain A to parachain B, and use parachain C token as fee +- Transfer tokens issued by parachain A, from parachain A to parachain B, and use parachain A token as a fee +- Transfer tokens issued by parachain B, from parachain A to parachain B, and use parachain B token as a fee +- Transfer tokens issued by parachain C, from parachain A to parachain B, and use parachain C token as a fee - Transfer tokens issued by parachain B, from parachain A to parachain B, and use relay chain token as fee -Notice, in the case of parachain A transfer parachain B token to parachain B, and use relay chain token as fee. Because fee asset is relaychain token, and non fee asset is parachain B token, this is two different chain. We call chain of fee asset as fee_reserve, and chain of non fee asset as non_fee_reserve. And in this case fee_reserve location is also refer to destination parachain. +Notice, in the case of parachain A transfer parachain B token to parachain B, and use relay chain token as fee. Because fee asset is relaychain token, and non fee asset is parachain B token, this is two different chain. We call chain of fee asset as `fee_reserve`, and chain of non fee asset as `non_fee_reserve`. And in this case `fee_reserve` location is also refer to destination parachain. -The current implementation is sent two xcm from sender parachain. first xcm sent to fee reserve chain which will also route xcm message to destination parachain. second xcm directly sent to destination parachain. +The current implementation sends two XCM from a sender parachain. First XCM is sent to the fee reserve chain which will also route the XCM message to the destination parachain. Second XCM directly sent to destination parachain. -the fee amount in fee asset is split into two parts. -1. fee asset sent to fee reserve chain = fee_amount - min_xcm_fee -2. fee asset sent to dest reserve chain = min_xcm_fee +The fee amount in fee asset is split into two parts: +1. Fee asset sent to fee reserve chain = fee_amount - min_xcm_fee +2. Fee asset sent to dest reserve chain = min_xcm_fee -Parachains should implements config `MinXcmFee` in `xtokens` module config: +Parachains should implement config `MinXcmFee` in `xtokens` module config: ```rust parameter_type_with_key! { - pub ParachainMinFee: |location: MultiLocation| -> Option { + pub MinXcmReserveFee: |location: MultiLocation| -> Option { #[allow(clippy::match_ref_pats)] // false positive match (location.parents, location.first_interior()) { (1, Some(Parachain(parachains::statemine::ID))) => Some(4_000_000_000), @@ -71,6 +71,6 @@ parameter_type_with_key! { } ``` -Notice the implementation for now also relies on `SelfLocation` which is already in `xtokens` config. The `SelfLocation` is currently set to absolute view `(1, Parachain(id))` and refers to the sender parachain. However `SelfLocation` set to relative view `(0, Here)` will also work. +Notice the implementation for now also relies on `SelfLocation` which is already in `xtokens` config. The `SelfLocation` can be set to the absolute view `(1, Parachain(THIS_PARACHAIN_ID))` and refers to the sender parachain. The alternative is to set `SelfLocation` to relative view `(0, Here)` to adhere to Polkadot guidelines. -We use `SelfLocation` to fund fee to sender's parachain sovereign account on destination parachain, which asset is originated from sender account on sender parachain. This means if user setup too much fee, the fee will not returned to user, instead deposit to sibling parachain sovereign account on destination parachain. \ No newline at end of file +We use `SelfLocation` to fund fee to sender's parachain sovereign account on destination parachain, which asset is originated from sender account on sender parachain. This means if user setup too much fee, the fee will not returned to user, instead deposit to sibling parachain sovereign account on destination parachain. From 7e3c9aebe1e0f3bd5a9bdb45139bfc62dc57efd4 Mon Sep 17 00:00:00 2001 From: zjb0807 Date: Wed, 30 Nov 2022 11:25:06 +1300 Subject: [PATCH 18/27] Update github actions (#855) * Update github actions * trigger GitHub actions --- .github/workflows/coverage.yml | 6 ++---- .github/workflows/master.yml.disabled | 5 +---- .github/workflows/publish_packages.yml | 3 +-- .github/workflows/test.yml | 5 +---- 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index d28efdc5d..5b6b34f7a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -32,13 +32,11 @@ jobs: with: submodules: recursive - name: Install toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@nightly with: - profile: minimal toolchain: nightly-2022-08-05 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 @@ -46,7 +44,7 @@ jobs: 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 diff --git a/.github/workflows/master.yml.disabled b/.github/workflows/master.yml.disabled index c42472afe..1436a32f5 100644 --- a/.github/workflows/master.yml.disabled +++ b/.github/workflows/master.yml.disabled @@ -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-08-05 - override: true - default: true - 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 diff --git a/.github/workflows/publish_packages.yml b/.github/workflows/publish_packages.yml index 356061838..5d4a21142 100644 --- a/.github/workflows/publish_packages.yml +++ b/.github/workflows/publish_packages.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ce030bdd7..f6870a045 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,14 +32,11 @@ 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-08-05 components: rustfmt target: wasm32-unknown-unknown - override: true - default: true - name: Install Wasm toolchain run: rustup target add wasm32-unknown-unknown - name: Check format From 65da351213e79f59d0a8a40f53b022b381ddba16 Mon Sep 17 00:00:00 2001 From: Pavel Orlov <45266194+PraetorP@users.noreply.github.com> Date: Wed, 30 Nov 2022 15:30:38 +0700 Subject: [PATCH 19/27] Changed `vested_transfer` extrinsic behavior. (#857) * Changed `vested_transfer` extrinsic behavior. Fixed self-vesting case (`from` == `to`) when it was possible to self-freeze funds above the current account balance. * added test for self-vesting case --- vesting/src/lib.rs | 8 ++++++++ vesting/src/mock.rs | 5 ++++- vesting/src/tests.rs | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) diff --git a/vesting/src/lib.rs b/vesting/src/lib.rs index 422b88b1b..96dab8fb6 100644 --- a/vesting/src/lib.rs +++ b/vesting/src/lib.rs @@ -264,6 +264,14 @@ pub mod module { ) -> DispatchResult { let from = T::VestedTransferOrigin::ensure_origin(origin)?; let to = T::Lookup::lookup(dest)?; + + if to == from { + ensure!( + T::Currency::free_balance(&from) >= schedule.total_amount().ok_or(ArithmeticError::Overflow)?, + Error::::InsufficientBalanceToLock, + ); + } + Self::do_vested_transfer(&from, &to, schedule.clone())?; Self::deposit_event(Event::VestingScheduleAdded { diff --git a/vesting/src/mock.rs b/vesting/src/mock.rs index 75024a63f..9a2a871fa 100644 --- a/vesting/src/mock.rs +++ b/vesting/src/mock.rs @@ -116,6 +116,9 @@ pub const ALICE: AccountId = 1; pub const BOB: AccountId = 2; pub const CHARLIE: AccountId = 3; +pub const ALICE_BALANCE: u64 = 100; +pub const CHARLIE_BALANCE: u64 = 50; + #[derive(Default)] pub struct ExtBuilder; @@ -126,7 +129,7 @@ impl ExtBuilder { .unwrap(); pallet_balances::GenesisConfig:: { - balances: vec![(ALICE, 100), (CHARLIE, 50)], + balances: vec![(ALICE, ALICE_BALANCE), (CHARLIE, CHARLIE_BALANCE)], } .assimilate_storage(&mut t) .unwrap(); diff --git a/vesting/src/tests.rs b/vesting/src/tests.rs index 97371ffac..2419d6680 100644 --- a/vesting/src/tests.rs +++ b/vesting/src/tests.rs @@ -87,6 +87,45 @@ fn vested_transfer_works() { }); } +#[test] +fn self_vesting() { + ExtBuilder::build().execute_with(|| { + System::set_block_number(1); + + let schedule = VestingSchedule { + start: 0u64, + period: 10u64, + period_count: 1u32, + per_period: ALICE_BALANCE, + }; + + let bad_schedule = VestingSchedule { + start: 0u64, + period: 10u64, + period_count: 1u32, + per_period: 10 * ALICE_BALANCE, + }; + + assert_noop!( + Vesting::vested_transfer(RuntimeOrigin::signed(ALICE), ALICE, bad_schedule), + crate::Error::::InsufficientBalanceToLock + ); + + assert_ok!(Vesting::vested_transfer( + RuntimeOrigin::signed(ALICE), + ALICE, + schedule.clone() + )); + + assert_eq!(Vesting::vesting_schedules(&ALICE), vec![schedule.clone()]); + System::assert_last_event(RuntimeEvent::Vesting(crate::Event::VestingScheduleAdded { + from: ALICE, + to: ALICE, + vesting_schedule: schedule, + })); + }); +} + #[test] fn add_new_vesting_schedule_merges_with_current_locked_balance_and_until() { ExtBuilder::build().execute_with(|| { From dc39cfddefb10ef0de23655e2c3dcdab66a19404 Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Fri, 2 Dec 2022 00:28:13 +0300 Subject: [PATCH 20/27] Upgrade polkadot-v0.9.33 (#858) --- Cargo.dev.toml | 129 +++++++++++++++--------------- asset-registry/Cargo.toml | 38 ++++----- auction/Cargo.toml | 12 +-- authority/Cargo.toml | 18 ++--- bencher/Cargo.toml | 24 +++--- bencher/test/Cargo.toml | 12 +-- benchmarking/Cargo.toml | 18 ++--- currencies/Cargo.toml | 14 ++-- gradually-update/Cargo.toml | 12 +-- nft/Cargo.toml | 12 +-- oracle/Cargo.toml | 14 ++-- oracle/rpc/Cargo.toml | 6 +- oracle/rpc/runtime-api/Cargo.toml | 4 +- payments/Cargo.toml | 12 +-- rewards/Cargo.toml | 14 ++-- tokens/Cargo.toml | 16 ++-- tokens/rpc/Cargo.toml | 12 +-- tokens/rpc/runtime-api/Cargo.toml | 6 +- tokens/src/tests_fungibles.rs | 8 +- traits/Cargo.toml | 10 +-- unknown-tokens/Cargo.toml | 14 ++-- utilities/Cargo.toml | 10 +-- vesting/Cargo.toml | 14 ++-- weight-meter/Cargo.toml | 14 ++-- xcm-support/Cargo.toml | 10 +-- xcm/Cargo.toml | 12 +-- xtokens/Cargo.toml | 40 ++++----- 27 files changed, 250 insertions(+), 255 deletions(-) diff --git a/Cargo.dev.toml b/Cargo.dev.toml index 1b99160a3..3f494b98d 100644 --- a/Cargo.dev.toml +++ b/Cargo.dev.toml @@ -32,72 +32,71 @@ resolver = "2" split-debuginfo = "unpacked" [patch.'https://github.com/paritytech/substrate'] -frame-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -frame-support = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -frame-system = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -pallet-babe = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -pallet-balances = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -pallet-scheduler = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -pallet-session = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -pallet-staking = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -pallet-timestamp = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -pallet-treasury = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -pallet-vesting = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sc-client-api = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sc-client-db = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sc-executor = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sc-executor-common = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sc-executor-wasmi = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sc-utils = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-api = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-application-crypto = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-arithmetic = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-authorship = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-blockchain = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-consensus = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-consensus-slots = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-core = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-debug-derive = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-externalities = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-inherents = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-io = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-keystore = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-npos-elections = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-panic-handler = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-runtime = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-runtime-interface = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-session = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-staking = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-state-machine = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-std = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-storage = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-tasks = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-timestamp = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-trie = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-version = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-wasm-interface = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-tracing = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", rev = "7a4e5163091384c4c10b6d76f5cb80dac0834f38" } +frame-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +frame-support = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +frame-system = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +pallet-babe = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +pallet-balances = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +pallet-scheduler = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +pallet-session = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +pallet-staking = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +pallet-timestamp = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +pallet-treasury = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +pallet-vesting = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sc-client-api = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sc-client-db = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sc-executor = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sc-executor-common = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sc-executor-wasmi = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sc-utils = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-api = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-application-crypto = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-arithmetic = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-authorship = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-blockchain = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-consensus = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-consensus-slots = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-core = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-debug-derive = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-externalities = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-inherents = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-io = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-keystore = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-npos-elections = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-panic-handler = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-runtime = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-runtime-interface = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-session = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-staking = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-state-machine = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-std = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-storage = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-timestamp = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-trie = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-version = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-wasm-interface = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-tracing = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } [patch.'https://github.com/paritytech/cumulus'] -cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", rev = "a63ca3a370d0b1c2743b7d6fac4690a8a9ccff2d" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "a63ca3a370d0b1c2743b7d6fac4690a8a9ccff2d" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "a63ca3a370d0b1c2743b7d6fac4690a8a9ccff2d" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", rev = "a63ca3a370d0b1c2743b7d6fac4690a8a9ccff2d" } -parachain-info = { git = "https://github.com/paritytech//cumulus", rev = "a63ca3a370d0b1c2743b7d6fac4690a8a9ccff2d" } +cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", rev = "eb044b17ef24e7f10fa3408ffbd900f8a9da837f" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "eb044b17ef24e7f10fa3408ffbd900f8a9da837f" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "eb044b17ef24e7f10fa3408ffbd900f8a9da837f" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", rev = "eb044b17ef24e7f10fa3408ffbd900f8a9da837f" } +parachain-info = { git = "https://github.com/paritytech//cumulus", rev = "eb044b17ef24e7f10fa3408ffbd900f8a9da837f" } [patch.'https://github.com/paritytech/polkadot'] -pallet-xcm = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } -polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } -polkadot-parachain = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } -polkadot-primitives = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } -xcm = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } -xcm-executor = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } -xcm-builder = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } -xcm-simulator = { git = "https://github.com/paritytech//polkadot", rev = "32dd0c9cfcd1a1bda821747f6ab334f0e3577558" } +pallet-xcm = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } +polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } +polkadot-parachain = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } +polkadot-primitives = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } +xcm = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } +xcm-executor = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } +xcm-builder = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } +xcm-simulator = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } diff --git a/asset-registry/Cargo.toml b/asset-registry/Cargo.toml index 93a27f305..aa99ae6f2 100644 --- a/asset-registry/Cargo.toml +++ b/asset-registry/Cargo.toml @@ -13,37 +13,37 @@ serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } # substrate -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } # polkadot -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } # orml orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] # substrate -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } # cumulus -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } # polkadot -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" } -xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } +xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } # orml orml-tokens = { path = "../tokens" } diff --git a/auction/Cargo.toml b/auction/Cargo.toml index 397aa0d21..ee6b7bf7e 100644 --- a/auction/Cargo.toml +++ b/auction/Cargo.toml @@ -12,16 +12,16 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } [features] default = ["std"] diff --git a/authority/Cargo.toml b/authority/Cargo.toml index 2e7023601..3a9aa7906 100644 --- a/authority/Cargo.toml +++ b/authority/Cargo.toml @@ -12,17 +12,17 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.145", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } [dev-dependencies] -pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } [features] default = ["std"] diff --git a/bencher/Cargo.toml b/bencher/Cargo.toml index 0ad787361..bb4b16b1f 100644 --- a/bencher/Cargo.toml +++ b/bencher/Cargo.toml @@ -26,18 +26,18 @@ hash-db = { version = "0.15.2", default-features = false, optional = true } bencher-procedural = { path = "bencher-procedural", default-features = false } codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.32" } -sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["wasmtime"], optional = true , branch = "polkadot-v0.9.32" } -sc-executor-common = { git = "https://github.com/paritytech/substrate", optional = true , branch = "polkadot-v0.9.32" } -sc-client-db = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["rocksdb"], optional = true , branch = "polkadot-v0.9.32" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.32" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.33" } +sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["wasmtime"], optional = true , branch = "polkadot-v0.9.33" } +sc-executor-common = { git = "https://github.com/paritytech/substrate", optional = true , branch = "polkadot-v0.9.33" } +sc-client-db = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["rocksdb"], optional = true , branch = "polkadot-v0.9.33" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.33" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.33" } [features] default = ["std"] diff --git a/bencher/test/Cargo.toml b/bencher/test/Cargo.toml index 92931c950..2ab6fb22b 100644 --- a/bencher/test/Cargo.toml +++ b/bencher/test/Cargo.toml @@ -15,16 +15,16 @@ required-features = ["bench"] serde = { version = "1.0.136", optional = true } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } orml-bencher = { path = "..", default-features = false } orml-weight-meter = { path = "../../weight-meter", default-features = false } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } [features] default = ["std"] diff --git a/benchmarking/Cargo.toml b/benchmarking/Cargo.toml index 2a7e73f48..db092525e 100644 --- a/benchmarking/Cargo.toml +++ b/benchmarking/Cargo.toml @@ -14,19 +14,19 @@ paste = "1.0.7" scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } [dev-dependencies] hex-literal = "0.3.4" -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } [features] default = [ "std" ] diff --git a/currencies/Cargo.toml b/currencies/Cargo.toml index 299e35b71..fe977c8c7 100644 --- a/currencies/Cargo.toml +++ b/currencies/Cargo.toml @@ -12,18 +12,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } orml_tokens = { package = "orml-tokens", path = "../tokens", version = "0.4.1-dev" } diff --git a/gradually-update/Cargo.toml b/gradually-update/Cargo.toml index 1255b5e23..54a8c8919 100644 --- a/gradually-update/Cargo.toml +++ b/gradually-update/Cargo.toml @@ -12,12 +12,12 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } [features] default = ["std"] diff --git a/nft/Cargo.toml b/nft/Cargo.toml index a1df801de..804ab5127 100644 --- a/nft/Cargo.toml +++ b/nft/Cargo.toml @@ -12,14 +12,14 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } [features] default = ["std"] diff --git a/oracle/Cargo.toml b/oracle/Cargo.toml index e0701901f..b68e4dd18 100644 --- a/oracle/Cargo.toml +++ b/oracle/Cargo.toml @@ -12,18 +12,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } [features] default = ["std"] diff --git a/oracle/rpc/Cargo.toml b/oracle/rpc/Cargo.toml index 16c0cfb7d..98f5a0df7 100644 --- a/oracle/rpc/Cargo.toml +++ b/oracle/rpc/Cargo.toml @@ -12,8 +12,8 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } tracing = { version = "0.1.29" } tracing-core = { version = "0.1.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } orml-oracle-rpc-runtime-api = { path = "runtime-api", version = "0.4.1-dev" } diff --git a/oracle/rpc/runtime-api/Cargo.toml b/oracle/rpc/runtime-api/Cargo.toml index d69949653..406c03a3f 100644 --- a/oracle/rpc/runtime-api/Cargo.toml +++ b/oracle/rpc/runtime-api/Cargo.toml @@ -8,8 +8,8 @@ description = "Runtime API module for orml-oracle-rpc." [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } [features] default = ["std"] diff --git a/payments/Cargo.toml b/payments/Cargo.toml index 9877b1cd7..033a2de92 100644 --- a/payments/Cargo.toml +++ b/payments/Cargo.toml @@ -14,18 +14,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = log = { version = "0.4.17", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } orml-traits = {path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] serde = { version = "1.0.136" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } orml-tokens = { path = "../tokens", version = "0.4.1-dev", default-features = false } diff --git a/rewards/Cargo.toml b/rewards/Cargo.toml index 8e784c0bf..ed456b3e8 100644 --- a/rewards/Cargo.toml +++ b/rewards/Cargo.toml @@ -12,17 +12,17 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } [features] default = ["std"] diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index 5bfe7282b..643895693 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -12,18 +12,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } [features] default = ["std"] diff --git a/tokens/rpc/Cargo.toml b/tokens/rpc/Cargo.toml index 08ced5c03..ca361beb2 100644 --- a/tokens/rpc/Cargo.toml +++ b/tokens/rpc/Cargo.toml @@ -12,11 +12,11 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } tracing = { version = "0.1.29" } tracing-core = { version = "0.1.28" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } orml-tokens-rpc-runtime-api = { version = "0.4.1-dev", path = "./runtime-api" } diff --git a/tokens/rpc/runtime-api/Cargo.toml b/tokens/rpc/runtime-api/Cargo.toml index 51caedce1..2fd46ef79 100644 --- a/tokens/rpc/runtime-api/Cargo.toml +++ b/tokens/rpc/runtime-api/Cargo.toml @@ -8,9 +8,9 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } orml-tokens = { default-features = false, path = "../../../tokens" } [features] diff --git a/tokens/src/tests_fungibles.rs b/tokens/src/tests_fungibles.rs index c424b3127..d5a6ec5ef 100644 --- a/tokens/src/tests_fungibles.rs +++ b/tokens/src/tests_fungibles.rs @@ -87,7 +87,7 @@ fn fungibles_unbalanced_trait_should_work() { assert_ok!(>::reserve(DOT, &ALICE, 50)); assert_noop!( >::decrease_balance(DOT, &ALICE, 60), - ArithmeticError::Underflow + TokenError::NoFunds ); assert_eq!( >::decrease_balance(DOT, &ALICE, 50), @@ -124,11 +124,7 @@ fn fungibles_unbalanced_trait_should_work() { assert_ok!(>::reserve(DOT, &ALICE, 50)); assert_eq!( >::decrease_balance_at_most(DOT, &ALICE, 60), - 0 - ); - assert_eq!( - >::decrease_balance_at_most(DOT, &ALICE, 50), - 50 + 50, ); assert_eq!(>::balance(DOT, &ALICE), 50); assert_eq!( diff --git a/traits/Cargo.toml b/traits/Cargo.toml index a22132961..96f7592ca 100644 --- a/traits/Cargo.toml +++ b/traits/Cargo.toml @@ -14,12 +14,12 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = num-traits = { version = "0.2.14", default-features = false } impl-trait-for-tuples = "0.2.2" -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } diff --git a/unknown-tokens/Cargo.toml b/unknown-tokens/Cargo.toml index f706277e6..9897291f5 100644 --- a/unknown-tokens/Cargo.toml +++ b/unknown-tokens/Cargo.toml @@ -12,18 +12,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } orml-xcm-support = { path = "../xcm-support", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } [features] default = ["std"] diff --git a/utilities/Cargo.toml b/utilities/Cargo.toml index cb9900da3..cc889d2c8 100644 --- a/utilities/Cargo.toml +++ b/utilities/Cargo.toml @@ -12,15 +12,15 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } [dev-dependencies] serde_json = "1.0.64" -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } [features] default = ["std"] diff --git a/vesting/Cargo.toml b/vesting/Cargo.toml index 19abb9c91..0ae17860d 100644 --- a/vesting/Cargo.toml +++ b/vesting/Cargo.toml @@ -12,15 +12,15 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } [features] default = ["std"] diff --git a/weight-meter/Cargo.toml b/weight-meter/Cargo.toml index f15764467..901d98945 100644 --- a/weight-meter/Cargo.toml +++ b/weight-meter/Cargo.toml @@ -10,19 +10,19 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } weight-meter-procedural = { path = "weight-meter-procedural", default-features = false } [dev-dependencies] serde = { version = "1.0.136" } codec = { package = "parity-scale-codec", version = "3.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } [features] default = ["std"] diff --git a/xcm-support/Cargo.toml b/xcm-support/Cargo.toml index 12c9f8521..d00c46562 100644 --- a/xcm-support/Cargo.toml +++ b/xcm-support/Cargo.toml @@ -10,12 +10,12 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } diff --git a/xcm/Cargo.toml b/xcm/Cargo.toml index 5a1b3e072..1c5b6ab21 100644 --- a/xcm/Cargo.toml +++ b/xcm/Cargo.toml @@ -11,15 +11,15 @@ edition = "2021" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } [dev-dependencies] -xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } [features] default = ["std"] diff --git a/xtokens/Cargo.toml b/xtokens/Cargo.toml index 4d8dc06ca..8fc7881cb 100644 --- a/xtokens/Cargo.toml +++ b/xtokens/Cargo.toml @@ -13,19 +13,19 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } # substrate -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.32" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } # cumulus -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.32" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.33" } # polkadot -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.32" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } # orml orml-traits = { path = "../traits", default-features = false} @@ -33,21 +33,21 @@ orml-xcm-support = { path = "../xcm-support", default-features = false } [dev-dependencies] # substrate -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } # cumulus -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } # polkadot -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" } -xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } +xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } # orml orml-tokens = { path = "../tokens" } From f94894fd761e90fc29fdc93161d5f406ee1f4b61 Mon Sep 17 00:00:00 2001 From: wangjj9219 <183318287@qq.com> Date: Wed, 4 Jan 2023 09:41:05 +0800 Subject: [PATCH 21/27] use explicit call index (#865) --- asset-registry/src/lib.rs | 2 ++ auction/src/lib.rs | 1 + authority/src/lib.rs | 9 +++++++++ bencher/test/src/lib.rs | 4 +++- benchmarking/src/tests.rs | 2 ++ currencies/src/lib.rs | 3 +++ gradually-update/src/lib.rs | 2 ++ oracle/src/lib.rs | 1 + payments/src/lib.rs | 8 ++++++++ tokens/src/lib.rs | 5 +++++ vesting/src/lib.rs | 4 ++++ weight-meter/src/mock.rs | 6 ++++++ xcm/src/lib.rs | 1 + xtokens/src/lib.rs | 6 ++++++ 14 files changed, 53 insertions(+), 1 deletion(-) diff --git a/asset-registry/src/lib.rs b/asset-registry/src/lib.rs index 4086f19b6..2bea733e5 100644 --- a/asset-registry/src/lib.rs +++ b/asset-registry/src/lib.rs @@ -140,6 +140,7 @@ pub mod module { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::register_asset())] pub fn register_asset( origin: OriginFor, @@ -151,6 +152,7 @@ pub mod module { Self::do_register_asset(metadata, asset_id) } + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::update_asset())] pub fn update_asset( origin: OriginFor, diff --git a/auction/src/lib.rs b/auction/src/lib.rs index 7874a28e8..2c9c3ec4b 100644 --- a/auction/src/lib.rs +++ b/auction/src/lib.rs @@ -127,6 +127,7 @@ pub mod module { /// /// The dispatch origin for this call must be `Signed` by the /// transactor. + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::bid_collateral_auction())] pub fn bid(origin: OriginFor, id: T::AuctionId, #[pallet::compact] value: T::Balance) -> DispatchResult { let from = ensure_signed(origin)?; diff --git a/authority/src/lib.rs b/authority/src/lib.rs index c140b6f15..506f96578 100644 --- a/authority/src/lib.rs +++ b/authority/src/lib.rs @@ -307,6 +307,7 @@ pub mod module { #[pallet::call] impl Pallet { /// Dispatch a dispatchable on behalf of other origin + #[pallet::call_index(0)] #[pallet::weight({ let info = call.get_dispatch_info(); (T::WeightInfo::dispatch_as().saturating_add(info.weight), info.class) @@ -324,6 +325,7 @@ pub mod module { /// Schedule a dispatchable to be dispatched at later block. /// This is the only way to dispatch a call with `DelayedOrigin`. + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::schedule_dispatch_without_delay())] pub fn schedule_dispatch( origin: OriginFor, @@ -375,6 +377,7 @@ pub mod module { } /// Fast track a scheduled dispatchable. + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::fast_track_scheduled_dispatch())] pub fn fast_track_scheduled_dispatch( origin: OriginFor, @@ -405,6 +408,7 @@ pub mod module { } /// Delay a scheduled dispatchable. + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::delay_scheduled_dispatch())] pub fn delay_scheduled_dispatch( origin: OriginFor, @@ -432,6 +436,7 @@ pub mod module { } /// Cancel a scheduled dispatchable. + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::cancel_scheduled_dispatch())] pub fn cancel_scheduled_dispatch( origin: OriginFor, @@ -448,6 +453,7 @@ pub mod module { Ok(()) } + #[pallet::call_index(5)] #[pallet::weight(T::WeightInfo::authorize_call())] pub fn authorize_call( origin: OriginFor, @@ -461,6 +467,7 @@ pub mod module { Ok(()) } + #[pallet::call_index(6)] #[pallet::weight(T::WeightInfo::remove_authorized_call())] pub fn remove_authorized_call(origin: OriginFor, hash: T::Hash) -> DispatchResult { let root_or_signed = @@ -481,6 +488,7 @@ pub mod module { }) } + #[pallet::call_index(7)] #[pallet::weight(( T::WeightInfo::trigger_call().saturating_add((*call_weight_bound).into()), DispatchClass::Operational, @@ -512,6 +520,7 @@ pub mod module { }) } + #[pallet::call_index(8)] #[pallet::weight(( T::WeightInfo::trigger_call().saturating_add(*call_weight_bound), DispatchClass::Operational, diff --git a/bencher/test/src/lib.rs b/bencher/test/src/lib.rs index ed81c5f44..7881e2ea7 100644 --- a/bencher/test/src/lib.rs +++ b/bencher/test/src/lib.rs @@ -38,6 +38,7 @@ pub mod pallet { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(0)] #[orml_weight_meter::start(ModuleWeights::::set_value())] pub fn set_value(origin: OriginFor, n: u32) -> DispatchResultWithPostInfo { @@ -49,6 +50,7 @@ pub mod pallet { Ok(Some(orml_weight_meter::used_weight()).into()) } + #[pallet::call_index(1)] #[pallet::weight(0)] pub fn dummy(origin: OriginFor, _n: u32) -> DispatchResult { let _sender = frame_system::ensure_none(origin)?; @@ -85,4 +87,4 @@ pub mod pallet { _ = Bar::::clear(10, None); } } -} +} \ No newline at end of file diff --git a/benchmarking/src/tests.rs b/benchmarking/src/tests.rs index 15c827918..89ee0e7ff 100644 --- a/benchmarking/src/tests.rs +++ b/benchmarking/src/tests.rs @@ -34,6 +34,7 @@ pub mod test { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(0)] pub fn set_value(origin: OriginFor, n: u32) -> DispatchResult { let _sender = frame_system::ensure_signed(origin)?; @@ -41,6 +42,7 @@ pub mod test { Ok(()) } + #[pallet::call_index(1)] #[pallet::weight(0)] pub fn dummy(origin: OriginFor, _n: u32) -> DispatchResult { let _sender = frame_system::ensure_none(origin)?; diff --git a/currencies/src/lib.rs b/currencies/src/lib.rs index b60c2573f..a7594f9c4 100644 --- a/currencies/src/lib.rs +++ b/currencies/src/lib.rs @@ -126,6 +126,7 @@ pub mod module { /// /// The dispatch origin for this call must be `Signed` by the /// transactor. + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::transfer_non_native_currency())] pub fn transfer( origin: OriginFor, @@ -142,6 +143,7 @@ pub mod module { /// /// The dispatch origin for this call must be `Signed` by the /// transactor. + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::transfer_native_currency())] pub fn transfer_native_currency( origin: OriginFor, @@ -156,6 +158,7 @@ pub mod module { /// update amount of account `who` under `currency_id`. /// /// The dispatch origin of this call must be _Root_. + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::update_balance_non_native_currency())] pub fn update_balance( origin: OriginFor, diff --git a/gradually-update/src/lib.rs b/gradually-update/src/lib.rs index ff34cea19..0371b0fa2 100644 --- a/gradually-update/src/lib.rs +++ b/gradually-update/src/lib.rs @@ -162,6 +162,7 @@ pub mod module { #[pallet::call] impl Pallet { /// Add gradually_update to adjust numeric parameter. + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::gradually_update())] pub fn gradually_update(origin: OriginFor, update: GraduallyUpdateOf) -> DispatchResult { T::DispatchOrigin::try_origin(origin).map(|_| ()).or_else(ensure_root)?; @@ -202,6 +203,7 @@ pub mod module { } /// Cancel gradually_update to adjust numeric parameter. + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::cancel_gradually_update())] pub fn cancel_gradually_update(origin: OriginFor, key: StorageKeyBytes) -> DispatchResult { T::DispatchOrigin::try_origin(origin).map(|_| ()).or_else(ensure_root)?; diff --git a/oracle/src/lib.rs b/oracle/src/lib.rs index a44ba200d..1d2513197 100644 --- a/oracle/src/lib.rs +++ b/oracle/src/lib.rs @@ -155,6 +155,7 @@ pub mod module { /// Feed the external value. /// /// Require authorized operator. + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::feed_values(values.len() as u32))] pub fn feed_values( origin: OriginFor, diff --git a/payments/src/lib.rs b/payments/src/lib.rs index 810839d30..8a66cbee6 100644 --- a/payments/src/lib.rs +++ b/payments/src/lib.rs @@ -280,6 +280,7 @@ pub mod pallet { /// the option to add a remark, this remark can then be used to run /// custom logic and trigger alternate payment flows. the specified /// amount. + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::pay(T::MaxRemarkLength::get()))] pub fn pay( origin: OriginFor, @@ -314,6 +315,7 @@ pub mod pallet { /// Release any created payment, this will transfer the reserved amount /// from the creator of the payment to the assigned recipient + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::release())] pub fn release(origin: OriginFor, to: T::AccountId) -> DispatchResultWithPostInfo { let from = ensure_signed(origin)?; @@ -332,6 +334,7 @@ pub mod pallet { /// Cancel a payment in created state, this will release the reserved /// back to creator of the payment. This extrinsic can only be called by /// the recipient of the payment + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::cancel())] pub fn cancel(origin: OriginFor, creator: T::AccountId) -> DispatchResultWithPostInfo { let who = ensure_signed(origin)?; @@ -354,6 +357,7 @@ pub mod pallet { /// recipient of the payment. /// This extrinsic allows the assigned judge to /// cancel/release/partial_release the payment. + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::resolve_payment())] pub fn resolve_payment( origin: OriginFor, @@ -389,6 +393,7 @@ pub mod pallet { /// Allow the creator of a payment to initiate a refund that will return /// the funds after a configured amount of time that the reveiver has to /// react and opose the request + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::request_refund())] pub fn request_refund(origin: OriginFor, recipient: T::AccountId) -> DispatchResultWithPostInfo { let who = ensure_signed(origin)?; @@ -436,6 +441,7 @@ pub mod pallet { /// payment creator This does not cancel the request, instead sends the /// payment to a NeedsReview state The assigned resolver account can /// then change the state of the payment after review. + #[pallet::call_index(5)] #[pallet::weight(T::WeightInfo::dispute_refund())] pub fn dispute_refund(origin: OriginFor, creator: T::AccountId) -> DispatchResultWithPostInfo { use PaymentState::*; @@ -482,6 +488,7 @@ pub mod pallet { // using the `accept_and_pay` extrinsic. The payment will be in // PaymentRequested State and can only be modified by the `accept_and_pay` // extrinsic. + #[pallet::call_index(6)] #[pallet::weight(T::WeightInfo::request_payment())] pub fn request_payment( origin: OriginFor, @@ -510,6 +517,7 @@ pub mod pallet { // This extrinsic allows the sender to fulfill a payment request created by a // recipient. The amount will be transferred to the recipient and payment // removed from storage + #[pallet::call_index(7)] #[pallet::weight(T::WeightInfo::accept_and_pay())] pub fn accept_and_pay(origin: OriginFor, to: T::AccountId) -> DispatchResultWithPostInfo { let from = ensure_signed(origin)?; diff --git a/tokens/src/lib.rs b/tokens/src/lib.rs index b1d30c822..f6b531899 100644 --- a/tokens/src/lib.rs +++ b/tokens/src/lib.rs @@ -462,6 +462,7 @@ pub mod module { /// - `dest`: The recipient of the transfer. /// - `currency_id`: currency type. /// - `amount`: free balance amount to tranfer. + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::transfer())] pub fn transfer( origin: OriginFor, @@ -493,6 +494,7 @@ pub mod module { /// the sender account to be killed (false), or transfer everything /// except at least the existential deposit, which will guarantee to /// keep the sender account alive (true). + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::transfer_all())] pub fn transfer_all( origin: OriginFor, @@ -519,6 +521,7 @@ pub mod module { /// - `dest`: The recipient of the transfer. /// - `currency_id`: currency type. /// - `amount`: free balance amount to tranfer. + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::transfer_keep_alive())] pub fn transfer_keep_alive( origin: OriginFor, @@ -541,6 +544,7 @@ pub mod module { /// - `dest`: The recipient of the transfer. /// - `currency_id`: currency type. /// - `amount`: free balance amount to tranfer. + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::force_transfer())] pub fn force_transfer( origin: OriginFor, @@ -563,6 +567,7 @@ pub mod module { /// existential deposit, it will reap the `AccountInfo`. /// /// The dispatch origin for this call is `root`. + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::set_balance())] pub fn set_balance( origin: OriginFor, diff --git a/vesting/src/lib.rs b/vesting/src/lib.rs index 96dab8fb6..8ca778c34 100644 --- a/vesting/src/lib.rs +++ b/vesting/src/lib.rs @@ -244,6 +244,7 @@ pub mod module { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::claim((::MaxVestingSchedules::get() / 2) as u32))] pub fn claim(origin: OriginFor) -> DispatchResult { let who = ensure_signed(origin)?; @@ -256,6 +257,7 @@ pub mod module { Ok(()) } + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::vested_transfer())] pub fn vested_transfer( origin: OriginFor, @@ -282,6 +284,7 @@ pub mod module { Ok(()) } + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::update_vesting_schedules(vesting_schedules.len() as u32))] pub fn update_vesting_schedules( origin: OriginFor, @@ -297,6 +300,7 @@ pub mod module { Ok(()) } + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::claim((::MaxVestingSchedules::get() / 2) as u32))] pub fn claim_for(origin: OriginFor, dest: ::Source) -> DispatchResult { let _ = ensure_signed(origin)?; diff --git a/weight-meter/src/mock.rs b/weight-meter/src/mock.rs index dee781d26..8126a377f 100644 --- a/weight-meter/src/mock.rs +++ b/weight-meter/src/mock.rs @@ -19,6 +19,7 @@ pub mod test_module { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(50_000)] #[orml_weight_meter::start] pub fn expect_100(origin: OriginFor) -> DispatchResultWithPostInfo { @@ -29,6 +30,7 @@ pub mod test_module { Ok(Some(orml_weight_meter::used_weight()).into()) } + #[pallet::call_index(1)] #[pallet::weight(50_000)] #[orml_weight_meter::start] pub fn expect_500(origin: OriginFor) -> DispatchResultWithPostInfo { @@ -43,6 +45,7 @@ pub mod test_module { Ok(Some(orml_weight_meter::used_weight()).into()) } + #[pallet::call_index(2)] #[pallet::weight(50_000)] #[orml_weight_meter::start] pub fn expect_max_weight(origin: OriginFor) -> DispatchResultWithPostInfo { @@ -54,6 +57,7 @@ pub mod test_module { Ok(Some(orml_weight_meter::used_weight()).into()) } + #[pallet::call_index(3)] #[pallet::weight(50_000)] #[orml_weight_meter::start] pub fn expect_100_or_200(origin: OriginFor, branch: bool) -> DispatchResultWithPostInfo { @@ -68,6 +72,7 @@ pub mod test_module { Ok(Some(orml_weight_meter::used_weight()).into()) } + #[pallet::call_index(4)] #[pallet::weight(50_000)] #[orml_weight_meter::start] pub fn nested_inner_methods(origin: OriginFor) -> DispatchResultWithPostInfo { @@ -78,6 +83,7 @@ pub mod test_module { Ok(Some(orml_weight_meter::used_weight()).into()) } + #[pallet::call_index(5)] #[pallet::weight(50_000)] #[orml_weight_meter::start] pub fn nested_extrinsic(origin: OriginFor) -> DispatchResultWithPostInfo { diff --git a/xcm/src/lib.rs b/xcm/src/lib.rs index 61607a5b4..40057f889 100644 --- a/xcm/src/lib.rs +++ b/xcm/src/lib.rs @@ -50,6 +50,7 @@ pub mod module { #[pallet::call] impl Pallet { /// Send an XCM message as parachain sovereign. + #[pallet::call_index(0)] #[pallet::weight(100_000_000)] pub fn send_as_sovereign( origin: OriginFor, diff --git a/xtokens/src/lib.rs b/xtokens/src/lib.rs index 89ad16bff..e75585d31 100644 --- a/xtokens/src/lib.rs +++ b/xtokens/src/lib.rs @@ -199,6 +199,7 @@ pub mod module { /// received. Receiving depends on if the XCM message could be delivered /// by the network, and if the receiving chain would handle /// messages correctly. + #[pallet::call_index(0)] #[pallet::weight(Pallet::::weight_of_transfer(currency_id.clone(), *amount, dest))] pub fn transfer( origin: OriginFor, @@ -224,6 +225,7 @@ pub mod module { /// received. Receiving depends on if the XCM message could be delivered /// by the network, and if the receiving chain would handle /// messages correctly. + #[pallet::call_index(1)] #[pallet::weight(Pallet::::weight_of_transfer_multiasset(asset, dest))] pub fn transfer_multiasset( origin: OriginFor, @@ -258,6 +260,7 @@ pub mod module { /// received. Receiving depends on if the XCM message could be delivered /// by the network, and if the receiving chain would handle /// messages correctly. + #[pallet::call_index(2)] #[pallet::weight(Pallet::::weight_of_transfer(currency_id.clone(), *amount, dest))] pub fn transfer_with_fee( origin: OriginFor, @@ -294,6 +297,7 @@ pub mod module { /// received. Receiving depends on if the XCM message could be delivered /// by the network, and if the receiving chain would handle /// messages correctly. + #[pallet::call_index(3)] #[pallet::weight(Pallet::::weight_of_transfer_multiasset(asset, dest))] pub fn transfer_multiasset_with_fee( origin: OriginFor, @@ -325,6 +329,7 @@ pub mod module { /// received. Receiving depends on if the XCM message could be delivered /// by the network, and if the receiving chain would handle /// messages correctly. + #[pallet::call_index(4)] #[pallet::weight(Pallet::::weight_of_transfer_multicurrencies(currencies, fee_item, dest))] pub fn transfer_multicurrencies( origin: OriginFor, @@ -354,6 +359,7 @@ pub mod module { /// received. Receiving depends on if the XCM message could be delivered /// by the network, and if the receiving chain would handle /// messages correctly. + #[pallet::call_index(5)] #[pallet::weight(Pallet::::weight_of_transfer_multiassets(assets, fee_item, dest))] pub fn transfer_multiassets( origin: OriginFor, From 0e234464af65a31010e24f56c34094663513943b Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Thu, 5 Jan 2023 02:39:34 +0100 Subject: [PATCH 22/27] Upgrade to polkadot v0.9.36 (#864) * build: upgrade to polkadot v0.9.36 Signed-off-by: Yaroslav Bolyukin * style: fix formatting Signed-off-by: Yaroslav Bolyukin * fix: polkadot dependency references Signed-off-by: Yaroslav Bolyukin * build: use released cumulus Signed-off-by: Yaroslav Bolyukin * fix: make asset_exists return false Signed-off-by: Yaroslav Bolyukin Signed-off-by: Yaroslav Bolyukin --- Cargo.dev.toml | 128 ++++++++++++------------- asset-registry/Cargo.toml | 38 ++++---- asset-registry/src/impls.rs | 4 +- asset-registry/src/mock/para.rs | 6 +- auction/Cargo.toml | 12 +-- authority/Cargo.toml | 19 ++-- authority/src/mock.rs | 3 + authority/src/tests.rs | 23 ++--- bencher/Cargo.toml | 24 ++--- bencher/test/Cargo.toml | 12 +-- benchmarking/Cargo.toml | 18 ++-- currencies/Cargo.toml | 14 +-- gradually-update/Cargo.toml | 12 +-- nft/Cargo.toml | 12 +-- oracle/Cargo.toml | 14 +-- oracle/rpc/Cargo.toml | 6 +- oracle/rpc/runtime-api/Cargo.toml | 4 +- payments/Cargo.toml | 12 +-- rewards/Cargo.toml | 14 +-- tokens/Cargo.toml | 16 ++-- tokens/rpc/Cargo.toml | 12 +-- tokens/rpc/runtime-api/Cargo.toml | 6 +- tokens/src/impls.rs | 4 + tokens/src/lib.rs | 4 + traits/Cargo.toml | 10 +- unknown-tokens/Cargo.toml | 14 +-- utilities/Cargo.toml | 10 +- vesting/Cargo.toml | 14 +-- weight-meter/Cargo.toml | 14 +-- xcm-support/Cargo.toml | 10 +- xcm/Cargo.toml | 12 +-- xtokens/Cargo.toml | 40 ++++---- xtokens/src/mock/para.rs | 6 +- xtokens/src/mock/para_relative_view.rs | 6 +- xtokens/src/mock/para_teleport.rs | 6 +- 35 files changed, 286 insertions(+), 273 deletions(-) diff --git a/Cargo.dev.toml b/Cargo.dev.toml index 3f494b98d..e8d806294 100644 --- a/Cargo.dev.toml +++ b/Cargo.dev.toml @@ -32,71 +32,71 @@ resolver = "2" split-debuginfo = "unpacked" [patch.'https://github.com/paritytech/substrate'] -frame-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -frame-support = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -frame-system = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -pallet-babe = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -pallet-balances = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -pallet-scheduler = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -pallet-session = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -pallet-staking = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -pallet-timestamp = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -pallet-treasury = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -pallet-vesting = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sc-client-api = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sc-client-db = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sc-executor = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sc-executor-common = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sc-executor-wasmi = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sc-utils = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-api = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-application-crypto = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-arithmetic = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-authorship = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-blockchain = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-consensus = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-consensus-slots = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-core = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-debug-derive = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-externalities = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-inherents = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-io = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-keystore = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-npos-elections = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-panic-handler = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-runtime = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-runtime-interface = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-session = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-staking = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-state-machine = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-std = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-storage = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-timestamp = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-trie = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-version = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-wasm-interface = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-tracing = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", rev = "2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" } +frame-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +frame-support = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +frame-system = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +pallet-babe = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +pallet-balances = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +pallet-scheduler = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +pallet-session = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +pallet-staking = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +pallet-timestamp = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +pallet-treasury = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +pallet-vesting = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sc-client-api = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sc-client-db = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sc-executor = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sc-executor-common = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sc-executor-wasmi = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sc-utils = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-api = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-application-crypto = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-arithmetic = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-authorship = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-blockchain = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-consensus = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-consensus-slots = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-core = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-debug-derive = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-externalities = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-inherents = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-io = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-keystore = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-npos-elections = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-panic-handler = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-runtime = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-runtime-interface = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-session = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-staking = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-state-machine = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-std = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-storage = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-timestamp = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-trie = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-version = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-wasm-interface = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-tracing = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", rev = "cb4f2491b00af7d7817f3a54209c26b20faa1f51" } [patch.'https://github.com/paritytech/cumulus'] -cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", rev = "eb044b17ef24e7f10fa3408ffbd900f8a9da837f" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "eb044b17ef24e7f10fa3408ffbd900f8a9da837f" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "eb044b17ef24e7f10fa3408ffbd900f8a9da837f" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", rev = "eb044b17ef24e7f10fa3408ffbd900f8a9da837f" } -parachain-info = { git = "https://github.com/paritytech//cumulus", rev = "eb044b17ef24e7f10fa3408ffbd900f8a9da837f" } +cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", rev = "d936c9f47fdb2aba41afb9e98a911ae311109ff0" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "d936c9f47fdb2aba41afb9e98a911ae311109ff0" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "d936c9f47fdb2aba41afb9e98a911ae311109ff0" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", rev = "d936c9f47fdb2aba41afb9e98a911ae311109ff0" } +parachain-info = { git = "https://github.com/paritytech//cumulus", rev = "d936c9f47fdb2aba41afb9e98a911ae311109ff0" } [patch.'https://github.com/paritytech/polkadot'] -pallet-xcm = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } -polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } -polkadot-parachain = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } -polkadot-primitives = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } -xcm = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } -xcm-executor = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } -xcm-builder = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } -xcm-simulator = { git = "https://github.com/paritytech//polkadot", rev = "c7d6c21242fc654f6f069e12c00951484dff334d" } +pallet-xcm = { git = "https://github.com/paritytech//polkadot", rev = "dc25abc712e42b9b51d87ad1168e453a42b5f0bc" } +polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", rev = "dc25abc712e42b9b51d87ad1168e453a42b5f0bc" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", rev = "dc25abc712e42b9b51d87ad1168e453a42b5f0bc" } +polkadot-parachain = { git = "https://github.com/paritytech//polkadot", rev = "dc25abc712e42b9b51d87ad1168e453a42b5f0bc" } +polkadot-primitives = { git = "https://github.com/paritytech//polkadot", rev = "dc25abc712e42b9b51d87ad1168e453a42b5f0bc" } +xcm = { git = "https://github.com/paritytech//polkadot", rev = "dc25abc712e42b9b51d87ad1168e453a42b5f0bc" } +xcm-executor = { git = "https://github.com/paritytech//polkadot", rev = "dc25abc712e42b9b51d87ad1168e453a42b5f0bc" } +xcm-builder = { git = "https://github.com/paritytech//polkadot", rev = "dc25abc712e42b9b51d87ad1168e453a42b5f0bc" } +xcm-simulator = { git = "https://github.com/paritytech//polkadot", rev = "dc25abc712e42b9b51d87ad1168e453a42b5f0bc" } diff --git a/asset-registry/Cargo.toml b/asset-registry/Cargo.toml index aa99ae6f2..081d32885 100644 --- a/asset-registry/Cargo.toml +++ b/asset-registry/Cargo.toml @@ -13,37 +13,37 @@ serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } # substrate -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } # polkadot -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.36" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.36" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.36" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.36" } # orml orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] # substrate -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } # cumulus -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.36" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.36" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.36" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.36" } +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.36" } # polkadot -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } -xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.36" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.36" } +xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.36" } # orml orml-tokens = { path = "../tokens" } diff --git a/asset-registry/src/impls.rs b/asset-registry/src/impls.rs index 6dc50b8f1..9bb8e6678 100644 --- a/asset-registry/src/impls.rs +++ b/asset-registry/src/impls.rs @@ -1,5 +1,5 @@ use crate::module::*; -use frame_support::{log, pallet_prelude::*, weights::constants::WEIGHT_PER_SECOND}; +use frame_support::{log, pallet_prelude::*, weights::constants::WEIGHT_REF_TIME_PER_SECOND}; use orml_traits::{ asset_registry::{ AssetMetadata, AssetProcessor, FixedConversionRateProvider, Inspect, Mutate, WeightToFeeConverter, @@ -55,7 +55,7 @@ pub struct FixedRateAssetRegistryTrader(PhantomD impl WeightToFeeConverter for FixedRateAssetRegistryTrader

{ fn convert_weight_to_fee(location: &MultiLocation, weight: Weight) -> Option { let fee_per_second = P::get_fee_per_second(location)?; - let weight_ratio = FixedU128::saturating_from_rational(weight.ref_time(), WEIGHT_PER_SECOND.ref_time() as u128); + let weight_ratio = FixedU128::saturating_from_rational(weight.ref_time(), WEIGHT_REF_TIME_PER_SECOND); let amount = weight_ratio.saturating_mul_int(fee_per_second); Some(amount) } diff --git a/asset-registry/src/mock/para.rs b/asset-registry/src/mock/para.rs index e8900a634..2e60a6350 100644 --- a/asset-registry/src/mock/para.rs +++ b/asset-registry/src/mock/para.rs @@ -8,7 +8,7 @@ use frame_support::traits::{EnsureOrigin, EnsureOriginWithArg}; use frame_support::{ construct_runtime, match_types, ord_parameter_types, parameter_types, traits::{ConstU128, ConstU32, ConstU64, Everything, Nothing}, - weights::constants::WEIGHT_PER_SECOND, + weights::constants::WEIGHT_REF_TIME_PER_SECOND, PalletId, }; use frame_system::{EnsureRoot, EnsureSignedBy}; @@ -143,8 +143,8 @@ impl orml_asset_registry::Config for Runtime { } parameter_types! { - pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND.ref_time() / 4; - pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND.ref_time() / 4; + pub const ReservedXcmpWeight: Weight = WEIGHT_REF_TIME_PER_SECOND / 4; + pub const ReservedDmpWeight: Weight = WEIGHT_REF_TIME_PER_SECOND / 4; } impl parachain_info::Config for Runtime {} diff --git a/auction/Cargo.toml b/auction/Cargo.toml index ee6b7bf7e..034d2d97b 100644 --- a/auction/Cargo.toml +++ b/auction/Cargo.toml @@ -12,16 +12,16 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/authority/Cargo.toml b/authority/Cargo.toml index 3a9aa7906..a2e0a527b 100644 --- a/authority/Cargo.toml +++ b/authority/Cargo.toml @@ -12,17 +12,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.145", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } [dev-dependencies] -pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-root-testing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/authority/src/mock.rs b/authority/src/mock.rs index 1301ba0cc..5709698ff 100644 --- a/authority/src/mock.rs +++ b/authority/src/mock.rs @@ -79,6 +79,8 @@ impl pallet_scheduler::Config for Runtime { type Preimages = Preimage; } +impl pallet_root_testing::Config for Runtime {} + #[derive(Clone, Encode, Decode, Eq, PartialEq, Ord, PartialOrd, Debug, TypeInfo)] pub enum MockAsOriginId { Root, @@ -182,6 +184,7 @@ frame_support::construct_runtime!( Authority: authority::{Pallet, Call, Origin, Event}, Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event}, Preimage: pallet_preimage::{Pallet, Call, Storage, Event}, + RootTesting: pallet_root_testing::{Pallet, Call}, } ); diff --git a/authority/src/tests.rs b/authority/src/tests.rs index c4bd784d6..9aa301588 100644 --- a/authority/src/tests.rs +++ b/authority/src/tests.rs @@ -20,7 +20,8 @@ use sp_runtime::{traits::BadOrigin, Perbill}; #[test] fn dispatch_as_work() { ExtBuilder::default().build().execute_with(|| { - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { ratio: Perbill::one() }); + let ensure_root_call = + RuntimeCall::RootTesting(pallet_root_testing::Call::fill_block { ratio: Perbill::one() }); let ensure_signed_call = RuntimeCall::System(frame_system::Call::remark { remark: vec![] }); assert_ok!(Authority::dispatch_as( RuntimeOrigin::root(), @@ -59,7 +60,7 @@ fn dispatch_as_work() { #[test] fn schedule_dispatch_at_work() { ExtBuilder::default().build().execute_with(|| { - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { + let ensure_root_call = RuntimeCall::RootTesting(pallet_root_testing::Call::fill_block { ratio: Perbill::from_percent(50), }); let call = RuntimeCall::Authority(authority::Call::dispatch_as { @@ -129,7 +130,7 @@ fn schedule_dispatch_at_work() { #[test] fn schedule_dispatch_after_work() { ExtBuilder::default().build().execute_with(|| { - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { + let ensure_root_call = RuntimeCall::RootTesting(pallet_root_testing::Call::fill_block { ratio: Perbill::from_percent(50), }); let call = RuntimeCall::Authority(authority::Call::dispatch_as { @@ -200,7 +201,7 @@ fn schedule_dispatch_after_work() { fn fast_track_scheduled_dispatch_work() { ExtBuilder::default().build().execute_with(|| { System::set_block_number(1); - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { + let ensure_root_call = RuntimeCall::RootTesting(pallet_root_testing::Call::fill_block { ratio: Perbill::from_percent(50), }); let call = RuntimeCall::Authority(authority::Call::dispatch_as { @@ -279,7 +280,7 @@ fn fast_track_scheduled_dispatch_work() { fn delay_scheduled_dispatch_work() { ExtBuilder::default().build().execute_with(|| { System::set_block_number(1); - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { + let ensure_root_call = RuntimeCall::RootTesting(pallet_root_testing::Call::fill_block { ratio: Perbill::from_percent(50), }); let call = RuntimeCall::Authority(authority::Call::dispatch_as { @@ -357,7 +358,7 @@ fn delay_scheduled_dispatch_work() { #[test] fn cancel_scheduled_dispatch_work() { ExtBuilder::default().build().execute_with(|| { - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { + let ensure_root_call = RuntimeCall::RootTesting(pallet_root_testing::Call::fill_block { ratio: Perbill::from_percent(50), }); let call = RuntimeCall::Authority(authority::Call::dispatch_as { @@ -442,7 +443,7 @@ fn call_size_limit() { fn authorize_call_works() { ExtBuilder::default().build().execute_with(|| { run_to_block(1); - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { + let ensure_root_call = RuntimeCall::RootTesting(pallet_root_testing::Call::fill_block { ratio: Perbill::from_percent(50), }); let call = RuntimeCall::Authority(authority::Call::dispatch_as { @@ -481,7 +482,7 @@ fn authorize_call_works() { fn trigger_call_works() { ExtBuilder::default().build().execute_with(|| { run_to_block(1); - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { + let ensure_root_call = RuntimeCall::RootTesting(pallet_root_testing::Call::fill_block { ratio: Perbill::from_percent(50), }); let call = RuntimeCall::Authority(authority::Call::dispatch_as { @@ -559,7 +560,7 @@ fn trigger_call_works() { fn remove_authorized_call_works() { ExtBuilder::default().build().execute_with(|| { run_to_block(1); - let ensure_root_call = RuntimeCall::System(frame_system::Call::fill_block { + let ensure_root_call = RuntimeCall::RootTesting(pallet_root_testing::Call::fill_block { ratio: Perbill::from_percent(50), }); let call = RuntimeCall::Authority(authority::Call::dispatch_as { @@ -612,7 +613,7 @@ fn remove_authorized_call_works() { #[test] fn trigger_call_should_be_free_and_operational() { ExtBuilder::default().build().execute_with(|| { - let call = RuntimeCall::System(frame_system::Call::fill_block { + let call = RuntimeCall::RootTesting(pallet_root_testing::Call::fill_block { ratio: Perbill::from_percent(50), }); let hash = ::Hashing::hash_of(&call); @@ -654,7 +655,7 @@ fn trigger_call_should_be_free_and_operational() { #[test] fn trigger_old_call_should_be_free_and_operational() { ExtBuilder::default().build().execute_with(|| { - let call = RuntimeCall::System(frame_system::Call::fill_block { + let call = RuntimeCall::RootTesting(pallet_root_testing::Call::fill_block { ratio: Perbill::from_percent(50), }); let hash = ::Hashing::hash_of(&call); diff --git a/bencher/Cargo.toml b/bencher/Cargo.toml index bb4b16b1f..c18a02313 100644 --- a/bencher/Cargo.toml +++ b/bencher/Cargo.toml @@ -26,18 +26,18 @@ hash-db = { version = "0.15.2", default-features = false, optional = true } bencher-procedural = { path = "bencher-procedural", default-features = false } codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.33" } -sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["wasmtime"], optional = true , branch = "polkadot-v0.9.33" } -sc-executor-common = { git = "https://github.com/paritytech/substrate", optional = true , branch = "polkadot-v0.9.33" } -sc-client-db = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["rocksdb"], optional = true , branch = "polkadot-v0.9.33" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.33" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.36" } +sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.36" } +sc-executor-common = { git = "https://github.com/paritytech/substrate", optional = true , branch = "polkadot-v0.9.36" } +sc-client-db = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["rocksdb"], optional = true , branch = "polkadot-v0.9.36" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.36" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/bencher/test/Cargo.toml b/bencher/test/Cargo.toml index 2ab6fb22b..af39d8675 100644 --- a/bencher/test/Cargo.toml +++ b/bencher/test/Cargo.toml @@ -15,16 +15,16 @@ required-features = ["bench"] serde = { version = "1.0.136", optional = true } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } orml-bencher = { path = "..", default-features = false } orml-weight-meter = { path = "../../weight-meter", default-features = false } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/benchmarking/Cargo.toml b/benchmarking/Cargo.toml index db092525e..2aa6d5be4 100644 --- a/benchmarking/Cargo.toml +++ b/benchmarking/Cargo.toml @@ -14,19 +14,19 @@ paste = "1.0.7" scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } [dev-dependencies] hex-literal = "0.3.4" -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [features] default = [ "std" ] diff --git a/currencies/Cargo.toml b/currencies/Cargo.toml index fe977c8c7..b5263b85c 100644 --- a/currencies/Cargo.toml +++ b/currencies/Cargo.toml @@ -12,18 +12,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } orml_tokens = { package = "orml-tokens", path = "../tokens", version = "0.4.1-dev" } diff --git a/gradually-update/Cargo.toml b/gradually-update/Cargo.toml index 54a8c8919..5a91690bd 100644 --- a/gradually-update/Cargo.toml +++ b/gradually-update/Cargo.toml @@ -12,12 +12,12 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/nft/Cargo.toml b/nft/Cargo.toml index 804ab5127..5c24f821d 100644 --- a/nft/Cargo.toml +++ b/nft/Cargo.toml @@ -12,14 +12,14 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/oracle/Cargo.toml b/oracle/Cargo.toml index b68e4dd18..9edb37cec 100644 --- a/oracle/Cargo.toml +++ b/oracle/Cargo.toml @@ -12,18 +12,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/oracle/rpc/Cargo.toml b/oracle/rpc/Cargo.toml index 98f5a0df7..09100a4d8 100644 --- a/oracle/rpc/Cargo.toml +++ b/oracle/rpc/Cargo.toml @@ -12,8 +12,8 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } tracing = { version = "0.1.29" } tracing-core = { version = "0.1.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } orml-oracle-rpc-runtime-api = { path = "runtime-api", version = "0.4.1-dev" } diff --git a/oracle/rpc/runtime-api/Cargo.toml b/oracle/rpc/runtime-api/Cargo.toml index 406c03a3f..183a8a10c 100644 --- a/oracle/rpc/runtime-api/Cargo.toml +++ b/oracle/rpc/runtime-api/Cargo.toml @@ -8,8 +8,8 @@ description = "Runtime API module for orml-oracle-rpc." [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/payments/Cargo.toml b/payments/Cargo.toml index 033a2de92..ecc2ab0d7 100644 --- a/payments/Cargo.toml +++ b/payments/Cargo.toml @@ -14,18 +14,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = log = { version = "0.4.17", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } orml-traits = {path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] serde = { version = "1.0.136" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } orml-tokens = { path = "../tokens", version = "0.4.1-dev", default-features = false } diff --git a/rewards/Cargo.toml b/rewards/Cargo.toml index ed456b3e8..dad1b52c5 100644 --- a/rewards/Cargo.toml +++ b/rewards/Cargo.toml @@ -12,17 +12,17 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index 643895693..2c2bd59d6 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -12,18 +12,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/tokens/rpc/Cargo.toml b/tokens/rpc/Cargo.toml index ca361beb2..b396f57bd 100644 --- a/tokens/rpc/Cargo.toml +++ b/tokens/rpc/Cargo.toml @@ -12,11 +12,11 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } tracing = { version = "0.1.29" } tracing-core = { version = "0.1.28" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } orml-tokens-rpc-runtime-api = { version = "0.4.1-dev", path = "./runtime-api" } diff --git a/tokens/rpc/runtime-api/Cargo.toml b/tokens/rpc/runtime-api/Cargo.toml index 2fd46ef79..3d8491ce8 100644 --- a/tokens/rpc/runtime-api/Cargo.toml +++ b/tokens/rpc/runtime-api/Cargo.toml @@ -8,9 +8,9 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } orml-tokens = { default-features = false, path = "../../../tokens" } [features] diff --git a/tokens/src/impls.rs b/tokens/src/impls.rs index f5a53d52e..dca977509 100644 --- a/tokens/src/impls.rs +++ b/tokens/src/impls.rs @@ -67,6 +67,10 @@ where B::can_withdraw(asset, who, amount) } } + + fn asset_exists(_asset: Self::AssetId) -> bool { + false + } } impl fungibles::Transfer for Combiner diff --git a/tokens/src/lib.rs b/tokens/src/lib.rs index f6b531899..ffea8a501 100644 --- a/tokens/src/lib.rs +++ b/tokens/src/lib.rs @@ -1749,6 +1749,10 @@ impl fungibles::Inspect for Pallet { ) -> WithdrawConsequence { Self::withdraw_consequence(who, asset_id, amount, &Self::accounts(who, asset_id)) } + + fn asset_exists(_asset: Self::AssetId) -> bool { + false + } } impl fungibles::Mutate for Pallet { diff --git a/traits/Cargo.toml b/traits/Cargo.toml index 96f7592ca..7a7fa01d0 100644 --- a/traits/Cargo.toml +++ b/traits/Cargo.toml @@ -14,12 +14,12 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = num-traits = { version = "0.2.14", default-features = false } impl-trait-for-tuples = "0.2.2" -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.36" } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } diff --git a/unknown-tokens/Cargo.toml b/unknown-tokens/Cargo.toml index 9897291f5..e8a10eaaa 100644 --- a/unknown-tokens/Cargo.toml +++ b/unknown-tokens/Cargo.toml @@ -12,18 +12,18 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.36" } orml-xcm-support = { path = "../xcm-support", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/utilities/Cargo.toml b/utilities/Cargo.toml index cc889d2c8..be4e2dae5 100644 --- a/utilities/Cargo.toml +++ b/utilities/Cargo.toml @@ -12,15 +12,15 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } [dev-dependencies] serde_json = "1.0.64" -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/vesting/Cargo.toml b/vesting/Cargo.toml index 0ae17860d..6c8ac5109 100644 --- a/vesting/Cargo.toml +++ b/vesting/Cargo.toml @@ -12,15 +12,15 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/weight-meter/Cargo.toml b/weight-meter/Cargo.toml index 901d98945..a6b76278c 100644 --- a/weight-meter/Cargo.toml +++ b/weight-meter/Cargo.toml @@ -10,19 +10,19 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } weight-meter-procedural = { path = "weight-meter-procedural", default-features = false } [dev-dependencies] serde = { version = "1.0.136" } codec = { package = "parity-scale-codec", version = "3.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/xcm-support/Cargo.toml b/xcm-support/Cargo.toml index d00c46562..c2ef881a0 100644 --- a/xcm-support/Cargo.toml +++ b/xcm-support/Cargo.toml @@ -10,12 +10,12 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.36" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.36" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } diff --git a/xcm/Cargo.toml b/xcm/Cargo.toml index 1c5b6ab21..b96aef948 100644 --- a/xcm/Cargo.toml +++ b/xcm/Cargo.toml @@ -11,15 +11,15 @@ edition = "2021" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.36" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.36" } [dev-dependencies] -xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.36" } [features] default = ["std"] diff --git a/xtokens/Cargo.toml b/xtokens/Cargo.toml index 8fc7881cb..e52bc661e 100644 --- a/xtokens/Cargo.toml +++ b/xtokens/Cargo.toml @@ -13,19 +13,19 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } # substrate -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } # cumulus -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.33" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.36" } # polkadot -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.33" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.36" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.36" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.36" } # orml orml-traits = { path = "../traits", default-features = false} @@ -33,21 +33,21 @@ orml-xcm-support = { path = "../xcm-support", default-features = false } [dev-dependencies] # substrate -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } # cumulus -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.36" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.36" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.36" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.36" } +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.36" } # polkadot -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } -xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.36" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.36" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.36" } +xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.36" } # orml orml-tokens = { path = "../tokens" } diff --git a/xtokens/src/mock/para.rs b/xtokens/src/mock/para.rs index 6a91b6185..19f38d690 100644 --- a/xtokens/src/mock/para.rs +++ b/xtokens/src/mock/para.rs @@ -4,7 +4,7 @@ use crate as orml_xtokens; use frame_support::{ construct_runtime, match_types, parameter_types, traits::{ConstU128, ConstU32, ConstU64, Everything, Get, Nothing}, - weights::constants::WEIGHT_PER_SECOND, + weights::constants::WEIGHT_REF_TIME_PER_SECOND, }; use frame_system::EnsureRoot; use sp_core::H256; @@ -91,8 +91,8 @@ impl orml_tokens::Config for Runtime { } parameter_types! { - pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND.ref_time() / 4; - pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND.ref_time() / 4; + pub const ReservedXcmpWeight: Weight = WEIGHT_REF_TIME_PER_SECOND / 4; + pub const ReservedDmpWeight: Weight = WEIGHT_REF_TIME_PER_SECOND / 4; } impl parachain_info::Config for Runtime {} diff --git a/xtokens/src/mock/para_relative_view.rs b/xtokens/src/mock/para_relative_view.rs index 357e5cd07..a44283438 100644 --- a/xtokens/src/mock/para_relative_view.rs +++ b/xtokens/src/mock/para_relative_view.rs @@ -4,7 +4,7 @@ use crate as orml_xtokens; use frame_support::{ construct_runtime, match_types, parameter_types, traits::{ConstU128, ConstU32, ConstU64, Everything, Nothing}, - weights::constants::WEIGHT_PER_SECOND, + weights::constants::WEIGHT_REF_TIME_PER_SECOND, }; use frame_system::EnsureRoot; use sp_core::H256; @@ -94,8 +94,8 @@ impl orml_tokens::Config for Runtime { } parameter_types! { - pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND.ref_time() / 4; - pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND.ref_time() / 4; + pub const ReservedXcmpWeight: Weight = WEIGHT_REF_TIME_PER_SECOND / 4; + pub const ReservedDmpWeight: Weight = WEIGHT_REF_TIME_PER_SECOND / 4; } impl parachain_info::Config for Runtime {} diff --git a/xtokens/src/mock/para_teleport.rs b/xtokens/src/mock/para_teleport.rs index 01bc013e5..75fbd509c 100644 --- a/xtokens/src/mock/para_teleport.rs +++ b/xtokens/src/mock/para_teleport.rs @@ -4,7 +4,7 @@ use crate as orml_xtokens; use frame_support::{ construct_runtime, match_types, parameter_types, traits::{ConstU128, ConstU32, ConstU64, Everything, Get, Nothing}, - weights::constants::WEIGHT_PER_SECOND, + weights::constants::WEIGHT_REF_TIME_PER_SECOND, }; use frame_system::EnsureRoot; use sp_core::H256; @@ -92,8 +92,8 @@ impl orml_tokens::Config for Runtime { } parameter_types! { - pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND.ref_time() / 4; - pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND.ref_time() / 4; + pub const ReservedXcmpWeight: Weight = WEIGHT_REF_TIME_PER_SECOND / 4; + pub const ReservedDmpWeight: Weight = WEIGHT_REF_TIME_PER_SECOND / 4; } impl parachain_info::Config for Runtime {} From 4f5a3f34d8cbd98b7bc2e295219a3e7b99b9ecaf Mon Sep 17 00:00:00 2001 From: Xiliang Chen Date: Thu, 5 Jan 2023 14:48:21 +1300 Subject: [PATCH 23/27] update asset_exists (#866) --- tokens/src/impls.rs | 8 ++++++-- tokens/src/lib.rs | 4 ++-- tokens/src/tests_fungibles.rs | 9 ++++++++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/tokens/src/impls.rs b/tokens/src/impls.rs index dca977509..ff8c16f2a 100644 --- a/tokens/src/impls.rs +++ b/tokens/src/impls.rs @@ -68,8 +68,12 @@ where } } - fn asset_exists(_asset: Self::AssetId) -> bool { - false + fn asset_exists(asset: Self::AssetId) -> bool { + if TestKey::contains(&asset) { + true + } else { + B::asset_exists(asset) + } } } diff --git a/tokens/src/lib.rs b/tokens/src/lib.rs index ffea8a501..18333052a 100644 --- a/tokens/src/lib.rs +++ b/tokens/src/lib.rs @@ -1750,8 +1750,8 @@ impl fungibles::Inspect for Pallet { Self::withdraw_consequence(who, asset_id, amount, &Self::accounts(who, asset_id)) } - fn asset_exists(_asset: Self::AssetId) -> bool { - false + fn asset_exists(asset: Self::AssetId) -> bool { + TotalIssuance::::contains_key(asset) } } diff --git a/tokens/src/tests_fungibles.rs b/tokens/src/tests_fungibles.rs index d5a6ec5ef..600897fe2 100644 --- a/tokens/src/tests_fungibles.rs +++ b/tokens/src/tests_fungibles.rs @@ -22,6 +22,9 @@ fn fungibles_inspect_trait_should_work() { ); assert_ok!(>::can_deposit(DOT, &ALICE, 1, false).into_result()); assert_ok!(>::can_withdraw(DOT, &ALICE, 1).into_result()); + + assert!(>::asset_exists(DOT)); + assert!(!>::asset_exists(BTC)); }); } @@ -283,7 +286,7 @@ fn fungibles_inspect_convert_should_work() { >; ExtBuilder::default() - .balances(vec![(ALICE, DOT, 100), (BOB, DOT, 100)]) + .balances(vec![(ALICE, DOT, 100), (BOB, DOT, 100), (BOB, BTC, 100)]) .build() .execute_with(|| { assert_eq!( @@ -294,6 +297,10 @@ fn fungibles_inspect_convert_should_work() { >::total_issuance(DOT), 20000 ); + + assert!(>::asset_exists(DOT)); + assert!(>::asset_exists(BTC)); + assert!(!>::asset_exists(ETH)); }); } From e147d57daa1a6378ff5120ac8c85f9e9a4d0e5b6 Mon Sep 17 00:00:00 2001 From: devdanco Date: Sat, 7 Jan 2023 17:18:09 +0100 Subject: [PATCH 24/27] fix test --- asset-registry/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset-registry/src/tests.rs b/asset-registry/src/tests.rs index c03c99960..23f0842e9 100644 --- a/asset-registry/src/tests.rs +++ b/asset-registry/src/tests.rs @@ -367,7 +367,7 @@ fn test_register_duplicate_location_returns_error() { None )); let register_asset = RuntimeCall::AssetRegistry(crate::Call::::register_asset { - metadata, + metadata: metadata.clone(), asset_id: None, }); assert_noop!( From db0381f6363e0c8e781082b6f552c092b688fb1c Mon Sep 17 00:00:00 2001 From: zjb0807 Date: Tue, 17 Jan 2023 13:37:06 +1300 Subject: [PATCH 25/27] Update polkadot v0.9.36 (#878) * Fix payments on-idle (#868) * fix payments on-idle * update comment * Switch to Rust-1.66 (#869) * feat: derive MEL for Value enum (#867) * feat: impl MEL for Value enum * fmt: fix * feat:Make the XcmTransfer trait support transfer_multiasset_with_fee (#870) * update bencher deps (#872) * add BenchmarkError::Weightless (#873) * add BenchmarkError::Weightless * Update benchmarking/src/lib.rs Co-authored-by: zjb0807 Co-authored-by: zjb0807 * Update jsonrpsee 0.16.2 (#876) * Update jsonrpsee 0.16.2 * fix clippy * fix clippy Co-authored-by: William Freudenberger Co-authored-by: NingBo Wang <2536935847@qq.com> Co-authored-by: Ermal Kaleci Co-authored-by: Andrew Plaza --- .github/workflows/coverage.yml | 2 +- .github/workflows/master.yml.disabled | 2 +- .github/workflows/test.yml | 2 +- Cargo.dev.toml | 5 +++ Makefile | 4 +- asset-registry/src/lib.rs | 2 +- auction/src/lib.rs | 18 ++++----- bencher/Cargo.toml | 10 ++--- bencher/src/bench_runner.rs | 8 +--- bencher/src/bencher.rs | 10 ++--- bencher/src/build_wasm/prerequisites.rs | 12 ++---- bencher/src/build_wasm/wasm_project.rs | 2 +- bencher/src/handler.rs | 11 +++--- bencher/src/lib.rs | 2 +- bencher/src/macros.rs | 2 +- bencher/src/utils.rs | 12 ++++++ bencher/test/Cargo.toml | 7 +--- bencher/test/src/benches.rs | 8 +--- bencher/test/src/lib.rs | 10 ++--- bencher/test/src/mock.rs | 2 +- bencher/test/src/weights.rs | 29 ++++++++++---- benchmarking/src/lib.rs | 19 +++++++++ oracle/rpc/Cargo.toml | 2 +- oracle/src/lib.rs | 2 +- payments/src/lib.rs | 15 +++---- payments/src/tests.rs | 52 ++++++++++++++++++++++++- tokens/rpc/Cargo.toml | 2 +- traits/src/lib.rs | 9 ++--- traits/src/xcm_transfer.rs | 9 +++++ vesting/src/lib.rs | 4 +- weight-gen/src/main.rs | 6 +-- weight-meter/Cargo.toml | 2 + xtokens/src/lib.rs | 15 +++++-- 33 files changed, 201 insertions(+), 96 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 5b6b34f7a..96a48dacf 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -34,7 +34,7 @@ jobs: - name: Install toolchain uses: dtolnay/rust-toolchain@nightly with: - toolchain: nightly-2022-08-05 + toolchain: nightly-2022-10-30 components: rustfmt target: wasm32-unknown-unknown - name: Generate code coverage diff --git a/.github/workflows/master.yml.disabled b/.github/workflows/master.yml.disabled index 1436a32f5..a1bdac623 100644 --- a/.github/workflows/master.yml.disabled +++ b/.github/workflows/master.yml.disabled @@ -15,7 +15,7 @@ jobs: - name: Install toolchain uses: dtolnay/rust-toolchain@nightly with: - toolchain: nightly-2022-08-05 + 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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f6870a045..6b8f74e5f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,7 +34,7 @@ jobs: - name: Install toolchain uses: dtolnay/rust-toolchain@nightly with: - toolchain: nightly-2022-08-05 + toolchain: nightly-2022-10-30 components: rustfmt target: wasm32-unknown-unknown - name: Install Wasm toolchain diff --git a/Cargo.dev.toml b/Cargo.dev.toml index e8d806294..e2d51020f 100644 --- a/Cargo.dev.toml +++ b/Cargo.dev.toml @@ -4,6 +4,7 @@ members = [ "auction", "authority", "bencher", + "bencher/test", "benchmarking", "currencies", "gradually-update", @@ -11,6 +12,8 @@ members = [ "oracle/rpc", "oracle/rpc/runtime-api", "tokens", + "tokens/rpc", + "tokens/rpc/runtime-api", "traits", "utilities", "vesting", @@ -26,6 +29,8 @@ members = [ "payments" ] +exclude = ["bencher/test"] + resolver = "2" [profile.dev] diff --git a/Makefile b/Makefile index 51dfe8fe8..c57206900 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/asset-registry/src/lib.rs b/asset-registry/src/lib.rs index 2bea733e5..b9819566f 100644 --- a/asset-registry/src/lib.rs +++ b/asset-registry/src/lib.rs @@ -313,7 +313,7 @@ impl Pallet { fn do_insert_location(asset_id: T::AssetId, location: VersionedMultiLocation) -> DispatchResult { // if the metadata contains a location, set the LocationToAssetId let location: MultiLocation = location.try_into().map_err(|()| Error::::BadVersion)?; - LocationToAssetId::::try_mutate(&location, |maybe_asset_id| { + LocationToAssetId::::try_mutate(location, |maybe_asset_id| { ensure!(maybe_asset_id.is_none(), Error::::ConflictingLocation); *maybe_asset_id = Some(asset_id); Ok(()) diff --git a/auction/src/lib.rs b/auction/src/lib.rs index 2c9c3ec4b..5c4e00010 100644 --- a/auction/src/lib.rs +++ b/auction/src/lib.rs @@ -109,12 +109,12 @@ pub mod module { #[pallet::hooks] impl Hooks for Pallet { fn on_initialize(now: T::BlockNumber) -> Weight { - T::WeightInfo::on_finalize(AuctionEndTime::::iter_prefix(&now).count() as u32) + T::WeightInfo::on_finalize(AuctionEndTime::::iter_prefix(now).count() as u32) } fn on_finalize(now: T::BlockNumber) { - for (auction_id, _) in AuctionEndTime::::drain_prefix(&now) { - if let Some(auction) = Auctions::::take(&auction_id) { + for (auction_id, _) in AuctionEndTime::::drain_prefix(now) { + if let Some(auction) = Auctions::::take(auction_id) { T::Handler::on_auction_ended(auction_id, auction.bid); } } @@ -151,10 +151,10 @@ pub mod module { match bid_result.auction_end_change { Change::NewValue(new_end) => { if let Some(old_end_block) = auction.end { - AuctionEndTime::::remove(&old_end_block, id); + AuctionEndTime::::remove(old_end_block, id); } if let Some(new_end_block) = new_end { - AuctionEndTime::::insert(&new_end_block, id, ()); + AuctionEndTime::::insert(new_end_block, id, ()); } auction.end = new_end; } @@ -189,10 +189,10 @@ impl Auction for Pallet { ) -> DispatchResult { let auction = Auctions::::get(id).ok_or(Error::::AuctionNotExist)?; if let Some(old_end) = auction.end { - AuctionEndTime::::remove(&old_end, id); + AuctionEndTime::::remove(old_end, id); } if let Some(new_end) = info.end { - AuctionEndTime::::insert(&new_end, id, ()); + AuctionEndTime::::insert(new_end, id, ()); } Auctions::::insert(id, info); Ok(()) @@ -211,14 +211,14 @@ impl Auction for Pallet { })?; Auctions::::insert(auction_id, auction); if let Some(end_block) = end { - AuctionEndTime::::insert(&end_block, auction_id, ()); + AuctionEndTime::::insert(end_block, auction_id, ()); } Ok(auction_id) } fn remove_auction(id: Self::AuctionId) { - if let Some(auction) = Auctions::::take(&id) { + if let Some(auction) = Auctions::::take(id) { if let Some(end_block) = auction.end { AuctionEndTime::::remove(end_block, id); } diff --git a/bencher/Cargo.toml b/bencher/Cargo.toml index c18a02313..e61bf3fc1 100644 --- a/bencher/Cargo.toml +++ b/bencher/Cargo.toml @@ -10,15 +10,15 @@ edition = "2021" [dependencies] paste = "1.0.7" build-helper = { version = "0.1.1", optional = true } -cargo_metadata = { version = "0.14.1", optional = true } +cargo_metadata = { version = "0.15.2", optional = true } tempfile = { version = "3.2.0", optional = true } toml = { version = "0.5.8", optional = true } walkdir = { version = "2.3.1", optional = true } ansi_term = { version = "0.12.1", optional = true } wasm-gc-api = { version = "0.1.11", optional = true } rand = {version = "0.8.3", optional = true } -linregress = { version = "0.4.4", optional = true } -parking_lot = { version = "0.12.0", optional = true } +linregress = { version = "0.5.0", optional = true } +parking_lot = { version = "0.12.1", optional = true } thiserror = { version = "1.0", optional = true } serde = { version = "1.0.136", optional = true, features = ['derive'] } serde_json = {version = "1.0.68", optional = true } @@ -35,7 +35,7 @@ sc-executor = { git = "https://github.com/paritytech/substrate", default-feature sc-executor-common = { git = "https://github.com/paritytech/substrate", optional = true , branch = "polkadot-v0.9.36" } sc-client-db = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["rocksdb"], optional = true , branch = "polkadot-v0.9.36" } sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.36" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.36" } @@ -67,7 +67,7 @@ std = [ "sc-executor-common", "sc-client-db", "sp-maybe-compressed-blob", - "frame-benchmarking/std", + "frame-support/std", "sp-externalities/std", "sp-storage/std", ] diff --git a/bencher/src/bench_runner.rs b/bencher/src/bench_runner.rs index b48246515..1906c1494 100644 --- a/bencher/src/bench_runner.rs +++ b/bencher/src/bench_runner.rs @@ -2,18 +2,14 @@ use super::{ bench_ext::BenchExt, tracker::{BenchTracker, BenchTrackerExt}, }; -use frame_benchmarking::frame_support::sp_runtime::traits::Block; +use frame_support::sp_runtime::traits::Block; use sc_executor::{WasmExecutionMethod, WasmExecutor, WasmtimeInstantiationStrategy}; use sc_executor_common::runtime_blob::RuntimeBlob; use sp_externalities::Extensions; use sp_state_machine::{Ext, OverlayedChanges, StorageTransactionCache}; use sp_std::sync::Arc; -type ComposeHostFunctions = ( - sp_io::SubstrateHostFunctions, - frame_benchmarking::benchmarking::HostFunctions, - super::bench::HostFunctions, -); +type ComposeHostFunctions = (sp_io::SubstrateHostFunctions, super::bench::HostFunctions); /// Run benches pub fn run(wasm_code: Vec) -> std::result::Result, sc_executor_common::error::Error> { diff --git a/bencher/src/bencher.rs b/bencher/src/bencher.rs index bfbc210a4..3ac197f2b 100644 --- a/bencher/src/bencher.rs +++ b/bencher/src/bencher.rs @@ -40,8 +40,8 @@ impl Bencher { pub fn before_run(&self) { #[cfg(not(feature = "std"))] { - frame_benchmarking::benchmarking::commit_db(); - frame_benchmarking::benchmarking::wipe_db(); + crate::bench::commit_db(); + crate::bench::wipe_db(); } } @@ -56,8 +56,8 @@ impl Bencher { { #[cfg(not(feature = "std"))] { - frame_benchmarking::benchmarking::commit_db(); - frame_benchmarking::benchmarking::reset_read_write_count(); + crate::bench::commit_db(); + crate::bench::reset_read_write_count(); crate::bench::start_timer(); } @@ -68,7 +68,7 @@ impl Bencher { let elapsed = crate::bench::end_timer().saturating_sub(crate::bench::redundant_time()); self.current.elapses.push(elapsed); - frame_benchmarking::benchmarking::commit_db(); + crate::bench::commit_db(); // changed keys self.current.keys = crate::bench::read_written_keys(); diff --git a/bencher/src/build_wasm/prerequisites.rs b/bencher/src/build_wasm/prerequisites.rs index 3074480df..8377af327 100644 --- a/bencher/src/build_wasm/prerequisites.rs +++ b/bencher/src/build_wasm/prerequisites.rs @@ -77,11 +77,7 @@ fn get_rustup_nightly(selected: Option) -> Option { let version = match selected { Some(selected) => selected, None => { - let output = Command::new("rustup") - .args(&["toolchain", "list"]) - .output() - .ok()? - .stdout; + let output = Command::new("rustup").args(["toolchain", "list"]).output().ok()?.stdout; let lines = output.as_slice().lines(); let mut latest_nightly = None; @@ -194,7 +190,7 @@ fn create_check_toolchain_project(project_dir: &Path) { let manifest_path = project_dir.join("Cargo.toml"); write_file_if_changed( - &manifest_path, + manifest_path, r#" [package] name = "wasm-test" @@ -260,7 +256,7 @@ fn check_wasm_toolchain_installed(cargo_command: CargoCommand) -> Result Result, storage_infos: Vec) { comments.sort(); + let intercepted_value = model.parameters()[0] as u64; + println!( "{} {:<40} {:>20} storage: {:<20}", green_bold("Bench"), cyan(&name), - green_bold(&format!( - "{:?}", - Duration::from_nanos(model.parameters.intercept_value as u64) - )), + green_bold(&format!("{:?}", Duration::from_nanos(intercepted_value))), green_bold(&format!( "[r: {}, w: {}]", &total_reads.to_string(), @@ -83,7 +82,7 @@ pub fn handle(output: Vec, storage_infos: Vec) { BenchData { name, - weight: model.parameters.intercept_value as u64 * 1_000, + weight: intercepted_value * 1_000, reads: total_reads, writes: total_writes, comments, diff --git a/bencher/src/lib.rs b/bencher/src/lib.rs index e7c18d486..824248fa6 100644 --- a/bencher/src/lib.rs +++ b/bencher/src/lib.rs @@ -1,7 +1,7 @@ #![cfg_attr(not(feature = "std"), no_std)] #[doc(hidden)] -pub extern crate frame_benchmarking; +pub extern crate frame_support; #[doc(hidden)] pub extern crate paste; #[doc(hidden)] diff --git a/bencher/src/macros.rs b/bencher/src/macros.rs index f307e7617..4945b0046 100644 --- a/bencher/src/macros.rs +++ b/bencher/src/macros.rs @@ -125,7 +125,7 @@ macro_rules! run_benches { ) => { #[cfg(all(feature = "std", feature = "bench"))] pub fn main() -> std::io::Result<()> { - use $crate::frame_benchmarking::frame_support::traits::StorageInfoTrait; + use $crate::frame_support::traits::StorageInfoTrait; let wasm = $crate::build_wasm::build()?; let storage_info = $all_pallets_with_system::storage_info(); match $crate::bench_runner::run::<$block>(wasm) { diff --git a/bencher/src/utils.rs b/bencher/src/utils.rs index 4b0ee5379..f46f58e17 100644 --- a/bencher/src/utils.rs +++ b/bencher/src/utils.rs @@ -36,6 +36,18 @@ pub trait Bench { println!("{}", msg); } + fn commit_db(&mut self) { + self.commit() + } + + fn wipe_db(&mut self) { + self.wipe() + } + + fn reset_read_write_count(&mut self) { + self.reset_read_write_count() + } + fn start_timer(&mut self) { let tracker = &***self .extension::() diff --git a/bencher/test/Cargo.toml b/bencher/test/Cargo.toml index af39d8675..f4705f3b6 100644 --- a/bencher/test/Cargo.toml +++ b/bencher/test/Cargo.toml @@ -32,18 +32,15 @@ std = [ "serde", "scale-info/std", "codec/std", - "orml-bencher/std", "frame-support/std", "frame-system/std", "sp-runtime/std", - "sp-std/std", "sp-core/std", + "sp-std/std", + "orml-bencher/std", "orml-weight-meter/std", ] bench = [ "orml-bencher/bench", "orml-weight-meter/bench", - "frame-support/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "frame-system/runtime-benchmarks", ] diff --git a/bencher/test/src/benches.rs b/bencher/test/src/benches.rs index dbd98cc7e..62ac88231 100644 --- a/bencher/test/src/benches.rs +++ b/bencher/test/src/benches.rs @@ -42,10 +42,4 @@ fn whitelist(b: &mut Bencher) { }); } -benches!( - whitelist, - set_value, - set_foo, - remove_all_bar, - remove_all_bar_with_limit -); +benches!(whitelist, set_value, set_foo, remove_all_bar, remove_all_bar_with_limit); diff --git a/bencher/test/src/lib.rs b/bencher/test/src/lib.rs index 7881e2ea7..892e9231f 100644 --- a/bencher/test/src/lib.rs +++ b/bencher/test/src/lib.rs @@ -40,9 +40,9 @@ pub mod pallet { impl Pallet { #[pallet::call_index(0)] #[pallet::weight(0)] - #[orml_weight_meter::start(ModuleWeights::::set_value())] + #[orml_weight_meter::start(ModuleWeights::::set_value().ref_time())] pub fn set_value(origin: OriginFor, n: u32) -> DispatchResultWithPostInfo { - let _sender = frame_system::ensure_signed(origin)?; + frame_system::ensure_signed(origin)?; Value::::get(); Value::::put(n); Value::::put(n + 1); @@ -53,14 +53,14 @@ pub mod pallet { #[pallet::call_index(1)] #[pallet::weight(0)] pub fn dummy(origin: OriginFor, _n: u32) -> DispatchResult { - let _sender = frame_system::ensure_none(origin)?; + frame_system::ensure_none(origin)?; Foo::::put(1); Ok(()) } } impl Pallet { - #[orml_weight_meter::weight(ModuleWeights::::set_foo())] + #[orml_weight_meter::weight(ModuleWeights::::set_foo().ref_time())] pub(crate) fn set_foo() -> frame_support::dispatch::DispatchResult { Value::::put(2); @@ -87,4 +87,4 @@ pub mod pallet { _ = Bar::::clear(10, None); } } -} \ No newline at end of file +} diff --git a/bencher/test/src/mock.rs b/bencher/test/src/mock.rs index 54d84fcd2..af2ae2532 100644 --- a/bencher/test/src/mock.rs +++ b/bencher/test/src/mock.rs @@ -16,7 +16,7 @@ pub type Header = sp_runtime::generic::Header; pub type SignedExtra = (frame_system::CheckWeight,); -pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic; +pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic; pub type Block = sp_runtime::generic::Block; diff --git a/bencher/test/src/weights.rs b/bencher/test/src/weights.rs index bc946b082..8882be9cf 100644 --- a/bencher/test/src/weights.rs +++ b/bencher/test/src/weights.rs @@ -10,13 +10,21 @@ use sp_std::marker::PhantomData; pub struct ModuleWeights(PhantomData); impl ModuleWeights { + // Storage access info + // + // Test::Bar (r: 0, w: 1) + pub fn whitelist() -> Weight { + Weight::from_ref_time(5_356_000) + .saturating_add(T::DbWeight::get().writes(1)) + } // Storage access info // // Test::Value (r: 1, w: 1) + // Unknown 0x3a7472616e73616374696f6e5f6c6576656c3a (r: 1, w: 1) pub fn set_value() -> Weight { - (5_236_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(3_919_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage access info // @@ -24,13 +32,20 @@ impl ModuleWeights { // Test::Foo (r: 0, w: 1) // Test::Value (r: 0, w: 1) pub fn set_foo() -> Weight { - (13_274_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(5_133_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(4)) } // Storage access info // pub fn remove_all_bar() -> Weight { - (3_449_000 as Weight) + Weight::from_ref_time(1_533_000) + } + // Storage access info + // + // Test::Bar (r: 0, w: 10) + pub fn remove_all_bar_with_limit() -> Weight { + Weight::from_ref_time(1_600_000) + .saturating_add(T::DbWeight::get().writes(10)) } } diff --git a/benchmarking/src/lib.rs b/benchmarking/src/lib.rs index 4a4d8ec98..f165cb682 100644 --- a/benchmarking/src/lib.rs +++ b/benchmarking/src/lib.rs @@ -1180,6 +1180,14 @@ macro_rules! impl_benchmark_test_suite { $crate::str::from_utf8(benchmark_name) .expect("benchmark name is always a valid string!"), ); + }, + $crate::BenchmarkError::Weightless => { + // This is considered a success condition. + $crate::log::error!( + "WARNING: benchmark error weightless skipped - {}", + $crate::str::from_utf8(benchmark_name) + .expect("benchmark name is always a valid string!"), + ); } } }, @@ -1314,6 +1322,17 @@ macro_rules! add_benchmark { .expect("benchmark name is always a valid string!") ); None + }, + Err($crate::BenchmarkError::Weightless) => { + $crate::log::error!( + "WARNING: benchmark weightless skipped - {}", + $crate::str::from_utf8(benchmark) + .expect("benchmark name is always a valid string!") + ); + Some(vec![$crate::BenchmarkResult { + components: selected_components.clone(), + .. Default::default() + }]) } }; diff --git a/oracle/rpc/Cargo.toml b/oracle/rpc/Cargo.toml index 09100a4d8..32d66dabd 100644 --- a/oracle/rpc/Cargo.toml +++ b/oracle/rpc/Cargo.toml @@ -8,7 +8,7 @@ description = "RPC module for orml-oracle." [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0" } -jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } +jsonrpsee = { version = "0.16.2", features = ["client", "server", "macros"] } tracing = { version = "0.1.29" } tracing-core = { version = "0.1.28" } diff --git a/oracle/src/lib.rs b/oracle/src/lib.rs index 1d2513197..1ee385602 100644 --- a/oracle/src/lib.rs +++ b/oracle/src/lib.rs @@ -215,7 +215,7 @@ impl, I: 'static> Pallet { value: value.clone(), timestamp: now, }; - RawValues::::insert(&who, &key, timestamped); + RawValues::::insert(&who, key, timestamped); // Update `Values` storage if `combined` yielded result. if let Some(combined) = Self::combined(key) { diff --git a/payments/src/lib.rs b/payments/src/lib.rs index 8a66cbee6..9f14d1927 100644 --- a/payments/src/lib.rs +++ b/payments/src/lib.rs @@ -214,16 +214,17 @@ pub mod pallet { /// Hook that execute when there is leftover space in a block /// This function will look for any pending scheduled tasks that can /// be executed and will process them. - fn on_idle(now: T::BlockNumber, mut remaining_weight: Weight) -> Weight { + fn on_idle(now: T::BlockNumber, remaining_weight: Weight) -> Weight { const MAX_TASKS_TO_PROCESS: usize = 5; - // reduce the weight used to read the task list - remaining_weight = remaining_weight.saturating_sub(T::WeightInfo::remove_task()); + // used to read the task list + let mut used_weight = T::WeightInfo::remove_task(); let cancel_weight = T::WeightInfo::cancel(); // calculate count of tasks that can be processed with remaining weight let possible_task_count: usize = remaining_weight - .ref_time() + .saturating_sub(used_weight) .saturating_div(cancel_weight.ref_time()) + .ref_time() .try_into() .unwrap_or(MAX_TASKS_TO_PROCESS); @@ -239,9 +240,9 @@ pub mod pallet { // order by oldest task to process task_list.sort_by(|(_, t), (_, x)| x.when.cmp(&t.when)); - while !task_list.is_empty() && remaining_weight.all_gte(cancel_weight) { + while !task_list.is_empty() && used_weight.all_lte(remaining_weight) { if let Some((account_pair, _)) = task_list.pop() { - remaining_weight = remaining_weight.saturating_sub(cancel_weight); + used_weight = used_weight.saturating_add(cancel_weight); // remove the task form the tasks storage tasks.remove(&account_pair); @@ -268,7 +269,7 @@ pub mod pallet { } } }); - remaining_weight + used_weight } } diff --git a/payments/src/tests.rs b/payments/src/tests.rs index ddcc3fa79..ddd2bf7ab 100644 --- a/payments/src/tests.rs +++ b/payments/src/tests.rs @@ -1,9 +1,10 @@ use crate::{ mock::*, types::{PaymentDetail, PaymentState}, + weights::WeightInfo, Payment as PaymentStore, PaymentHandler, ScheduledTask, ScheduledTasks, Task, }; -use frame_support::{assert_noop, assert_ok, storage::with_transaction}; +use frame_support::{assert_noop, assert_ok, storage::with_transaction, traits::OnIdle, weights::Weight}; use orml_traits::MultiCurrency; use sp_runtime::{Percent, TransactionOutcome}; @@ -1398,3 +1399,52 @@ fn test_automatic_refund_works_for_multiple_payments() { assert_eq!(Tokens::free_balance(CURRENCY_ID, &PAYMENT_RECIPENT_TWO), 0); }); } + +#[test] +fn on_idle_works() { + new_test_ext().execute_with(|| { + assert_eq!( + Payment::on_idle(System::block_number(), Weight::MAX), + <()>::remove_task() + ); + + let payment_amount = 20; + let expected_cancel_block = CANCEL_BLOCK_BUFFER + 1; + + assert_ok!(Payment::pay( + RuntimeOrigin::signed(PAYMENT_CREATOR), + PAYMENT_RECIPENT, + CURRENCY_ID, + payment_amount, + None + )); + + // creator requests a refund + assert_ok!(Payment::request_refund( + RuntimeOrigin::signed(PAYMENT_CREATOR), + PAYMENT_RECIPENT + )); + // ensure the request is added to the refund queue + let scheduled_tasks_list = ScheduledTasks::::get(); + assert_eq!(scheduled_tasks_list.len(), 1); + assert_eq!( + scheduled_tasks_list.get(&(PAYMENT_CREATOR, PAYMENT_RECIPENT)).unwrap(), + &ScheduledTask { + task: Task::Cancel, + when: expected_cancel_block + } + ); + + assert_eq!(run_n_blocks(CANCEL_BLOCK_BUFFER - 1), 600); + assert_eq!( + Payment::on_idle(System::block_number(), Weight::MAX), + <()>::remove_task() + ); + + assert_eq!(run_n_blocks(1), 601); + assert_eq!( + Payment::on_idle(System::block_number(), Weight::MAX), + <()>::remove_task() + <()>::cancel() + ); + }); +} diff --git a/tokens/rpc/Cargo.toml b/tokens/rpc/Cargo.toml index b396f57bd..b873b2ebc 100644 --- a/tokens/rpc/Cargo.toml +++ b/tokens/rpc/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0" } -jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } +jsonrpsee = { version = "0.16.2", features = ["client", "server", "macros"] } tracing = { version = "0.1.29" } tracing-core = { version = "0.1.28" } diff --git a/traits/src/lib.rs b/traits/src/lib.rs index a5894d218..ea5231dd9 100644 --- a/traits/src/lib.rs +++ b/traits/src/lib.rs @@ -1,6 +1,6 @@ #![cfg_attr(not(feature = "std"), no_std)] -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; use impl_trait_for_tuples::impl_for_tuples; use sp_runtime::{DispatchResult, RuntimeDebug}; use sp_std::{ @@ -8,9 +8,6 @@ use sp_std::{ prelude::Vec, }; -#[cfg(feature = "std")] -use serde::{Deserialize, Serialize}; - pub use asset_registry::{FixedConversionRateProvider, WeightToFeeConverter}; pub use auction::{Auction, AuctionHandler, AuctionInfo, OnNewBidResult}; pub use currency::{ @@ -25,6 +22,8 @@ pub use nft::InspectExtended; pub use price::{DefaultPriceProvider, PriceProvider}; pub use rewards::RewardHandler; use scale_info::TypeInfo; +#[cfg(feature = "std")] +use serde::{Deserialize, Serialize}; pub use xcm_transfer::XcmTransfer; pub mod arithmetic; @@ -58,7 +57,7 @@ pub trait CombineData { } /// Indicate if should change a value -#[derive(Encode, Decode, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] pub enum Change { /// No change. NoChange, diff --git a/traits/src/xcm_transfer.rs b/traits/src/xcm_transfer.rs index cd671f5e6..c4dacb116 100644 --- a/traits/src/xcm_transfer.rs +++ b/traits/src/xcm_transfer.rs @@ -19,4 +19,13 @@ pub trait XcmTransfer { dest: MultiLocation, dest_weight_limit: WeightLimit, ) -> DispatchResult; + + /// Transfer `MultiAssetWithFee` + fn transfer_multiasset_with_fee( + who: AccountId, + asset: MultiAsset, + fee: MultiAsset, + dest: MultiLocation, + dest_weight_limit: WeightLimit, + ) -> DispatchResult; } diff --git a/vesting/src/lib.rs b/vesting/src/lib.rs index 8ca778c34..66edffc10 100644 --- a/vesting/src/lib.rs +++ b/vesting/src/lib.rs @@ -245,7 +245,7 @@ pub mod module { #[pallet::call] impl Pallet { #[pallet::call_index(0)] - #[pallet::weight(T::WeightInfo::claim((::MaxVestingSchedules::get() / 2) as u32))] + #[pallet::weight(T::WeightInfo::claim(::MaxVestingSchedules::get() / 2))] pub fn claim(origin: OriginFor) -> DispatchResult { let who = ensure_signed(origin)?; let locked_amount = Self::do_claim(&who); @@ -301,7 +301,7 @@ pub mod module { } #[pallet::call_index(3)] - #[pallet::weight(T::WeightInfo::claim((::MaxVestingSchedules::get() / 2) as u32))] + #[pallet::weight(T::WeightInfo::claim(::MaxVestingSchedules::get() / 2))] pub fn claim_for(origin: OriginFor, dest: ::Source) -> DispatchResult { let _ = ensure_signed(origin)?; let who = T::Lookup::lookup(dest)?; diff --git a/weight-gen/src/main.rs b/weight-gen/src/main.rs index 7fdf90211..b8f521ca5 100644 --- a/weight-gen/src/main.rs +++ b/weight-gen/src/main.rs @@ -162,7 +162,7 @@ fn main() { // Use empty header if a header path is not given. let header = { if let Some(path) = matches.get_one::("header") { - ::std::fs::read_to_string(&path).expect("Header file not found") + ::std::fs::read_to_string(path).expect("Header file not found") } else { String::from("") } @@ -175,7 +175,7 @@ fn main() { // Use default template if template path is not given. let template = { if let Some(path) = matches.get_one::("template") { - ::std::fs::read_to_string(&path).expect("Template file not found") + ::std::fs::read_to_string(path).expect("Template file not found") } else { String::from(DEFAULT_TEMPLATE) } @@ -183,7 +183,7 @@ fn main() { // Write benchmark to file or print to terminal if output path is not given. if let Some(path) = matches.get_one::("output") { - let mut output_file = ::std::fs::File::create(&path).expect("Could not create output file"); + let mut output_file = ::std::fs::File::create(path).expect("Could not create output file"); handlebars .render_template_to_write(&template, &hbs_data, &mut output_file) diff --git a/weight-meter/Cargo.toml b/weight-meter/Cargo.toml index a6b76278c..7f9d38ca7 100644 --- a/weight-meter/Cargo.toml +++ b/weight-meter/Cargo.toml @@ -24,6 +24,8 @@ frame-support = { git = "https://github.com/paritytech/substrate", branch = "pol frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +orml-bencher = { path = "../bencher" } + [features] default = ["std"] std = [ diff --git a/xtokens/src/lib.rs b/xtokens/src/lib.rs index e75585d31..0cf6ab4bf 100644 --- a/xtokens/src/lib.rs +++ b/xtokens/src/lib.rs @@ -924,10 +924,8 @@ pub mod module { fn get_reserve_location(assets: &MultiAssets, fee_item: &u32) -> Option { let reserve_idx = if assets.len() == 1 { 0 - } else if *fee_item == 0 { - 1 } else { - 0 + (*fee_item == 0) as usize }; let asset = assets.get(reserve_idx); asset.and_then(T::ReserveProvider::reserve) @@ -955,6 +953,17 @@ pub mod module { ) -> DispatchResult { Self::do_transfer_multiasset(who, asset, dest, dest_weight_limit) } + + #[require_transactional] + fn transfer_multiasset_with_fee( + who: T::AccountId, + asset: MultiAsset, + fee: MultiAsset, + dest: MultiLocation, + dest_weight_limit: WeightLimit, + ) -> DispatchResult { + Self::do_transfer_multiasset_with_fee(who, asset, fee, dest, dest_weight_limit) + } } } From bb1c600728fd820a107ebf91161b50538d11f7bc Mon Sep 17 00:00:00 2001 From: devdanco Date: Mon, 30 Jan 2023 21:55:40 +0100 Subject: [PATCH 26/27] update packages --- Cargo.dev.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.dev.toml b/Cargo.dev.toml index 3b34816f1..b965ad887 100644 --- a/Cargo.dev.toml +++ b/Cargo.dev.toml @@ -149,7 +149,8 @@ sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } sp-finality-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } +beefy-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36", package = "sp-beefy" } +remote-externalities = { git = "https://github.com/mangata-finance//substrate" } sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } From a8e916a9cc9d0555edfacf3416b956db1ecd95f1 Mon Sep 17 00:00:00 2001 From: devdanco Date: Tue, 14 Feb 2023 08:52:08 +0100 Subject: [PATCH 27/27] update reference --- Cargo.dev.toml | 350 +++++++++++++++++++------------------- asset-registry/Cargo.toml | 2 +- tokens/Cargo.toml | 2 +- 3 files changed, 177 insertions(+), 177 deletions(-) diff --git a/Cargo.dev.toml b/Cargo.dev.toml index 6ef0132bd..f59a2f46e 100644 --- a/Cargo.dev.toml +++ b/Cargo.dev.toml @@ -36,183 +36,183 @@ resolver = "2" split-debuginfo = "unpacked" [patch.'https://github.com/paritytech/substrate'] -pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-asset-tx-payment = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-assets = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -beefy-merkle-tree = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -#pallet-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-uniques = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-nicks = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-finality-grandpa-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-finality-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -beefy-gadget-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -beefy-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-consensus-uncles = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -pallet-template = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -node-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -substrate-test-utils-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -substrate-test-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-finality-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -beefy-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36", package = "sp-beefy" } +pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-asset-tx-payment = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-assets = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +beefy-merkle-tree = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +#pallet-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-uniques = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-nicks = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-finality-grandpa-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-finality-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +beefy-gadget-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +beefy-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-consensus-uncles = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +pallet-template = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +node-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +substrate-test-utils-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +substrate-test-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-finality-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +beefy-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev", package = "sp-beefy" } remote-externalities = { git = "https://github.com/mangata-finance//substrate" } -sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -#sp-npos-elections-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-serializer = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } -sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev-v0.9.36" } +sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +#sp-npos-elections-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-serializer = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } #[patch.'https://github.com/paritytech/cumulus'] -#cumulus-primitives-core = { git = "https://github.com/mangata-finance//cumulus", branch = "mangata-dev-v0.9.36" } -#parachain-info = { git = "https://github.com/mangata-finance//cumulus", branch = "mangata-dev-v0.9.36" } -#cumulus-pallet-dmp-queue = { git = "https://github.com/mangata-finance//cumulus", branch = "mangata-dev-v0.9.36" } -#cumulus-pallet-xcmp-queue = { git = "https://github.com/mangata-finance//cumulus", branch = "mangata-dev-v0.9.36" } -#cumulus-pallet-xcm = { git = "https://github.com/mangata-finance//cumulus", branch = "mangata-dev-v0.9.36" } +#cumulus-primitives-core = { git = "https://github.com/mangata-finance//cumulus", branch = "mangata-dev" } +#parachain-info = { git = "https://github.com/mangata-finance//cumulus", branch = "mangata-dev" } +#cumulus-pallet-dmp-queue = { git = "https://github.com/mangata-finance//cumulus", branch = "mangata-dev" } +#cumulus-pallet-xcmp-queue = { git = "https://github.com/mangata-finance//cumulus", branch = "mangata-dev" } +#cumulus-pallet-xcm = { git = "https://github.com/mangata-finance//cumulus", branch = "mangata-dev" } [patch.'https://github.com/paritytech/polkadot'] -xcm = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev-v0.9.36" } -xcm-executor = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev-v0.9.36" } -xcm-builder = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev-v0.9.36" } -pallet-xcm = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev-v0.9.36" } -polkadot-core-primitives = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev-v0.9.36" } -polkadot-runtime-parachains = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev-v0.9.36" } -polkadot-parachain = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev-v0.9.36" } -polkadot-primitives = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev-v0.9.36" } -xcm-simulator = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev-v0.9.36" } +xcm = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev" } +xcm-executor = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev" } +xcm-builder = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev" } +pallet-xcm = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev" } +polkadot-core-primitives = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev" } +polkadot-runtime-parachains = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev" } +polkadot-parachain = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev" } +polkadot-primitives = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev" } +xcm-simulator = { git = "https://github.com/mangata-finance//polkadot", branch = "mangata-dev" } diff --git a/asset-registry/Cargo.toml b/asset-registry/Cargo.toml index ef8eb7a80..6b121d52a 100644 --- a/asset-registry/Cargo.toml +++ b/asset-registry/Cargo.toml @@ -29,7 +29,7 @@ xcm-executor = { git = "https://github.com/paritytech/polkadot", default-feature orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } # mangata -mangata-types = { git = "https://github.com/mangata-finance/substrate", default-features = false, branch = "mangata-dev-v0.9.36" } +mangata-types = { git = "https://github.com/mangata-finance/substrate", default-features = false, branch = "mangata-dev" } [dev-dependencies] diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index ea637a204..b451ab41c 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -18,7 +18,7 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", default-features sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.36" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } -mangata-types = { git="https://github.com/mangata-finance/substrate", branch = "mangata-dev-v0.9.36", default-features = false, version = '0.1.0' } +mangata-types = { git="https://github.com/mangata-finance/substrate", branch = "mangata-dev", default-features = false, version = '0.1.0' } frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false, optional = true } [dev-dependencies]