git.delta.rocks / unique-network / refs/commits / f5faed258f1b

difftreelog

fix make check

Yaroslav Bolyukin2023-11-17parent: #7f81f6c.patch.diff
in: master

8 files changed

modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -10160,6 +10160,7 @@
  "pallet-xcm",
  "parity-scale-codec",
  "polkadot-parachain-primitives",
+ "polkadot-runtime-common",
  "precompile-utils-macro",
  "scale-info",
  "serde",
@@ -15037,6 +15038,7 @@
  "pallet-xcm",
  "parity-scale-codec",
  "polkadot-parachain-primitives",
+ "polkadot-runtime-common",
  "precompile-utils-macro",
  "scale-info",
  "serde",
modifiedCargo.tomldiffbeforeafterboth
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -131,13 +131,12 @@
 pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" }
 pallet-treasury = { default-features = false, version = "24.0.0" }
 pallet-utility = { default-features = false, version = "25.0.0" }
-pallet-xcm = { default-features = false , version = "4.0.0" }
-staging-parachain-info = { default-features = false, version = "0.4.0" }
+pallet-xcm = { default-features = false, version = "4.0.0" }
 parity-scale-codec = { version = "3.6.5", features = ["derive"], default-features = false }
 polkadot-cli = "4.0.0"
-polkadot-parachain-primitives = { default-features = false , version = "3.0.0" }
-polkadot-runtime-common = { default-features = false , version = "4.0.0" }
+polkadot-parachain-primitives = { default-features = false, version = "3.0.0" }
 polkadot-primitives = "4.0.0"
+polkadot-runtime-common = { default-features = false, version = "4.0.0" }
 polkadot-service = "4.0.0"
 sc-basic-authorship = "0.31.0"
 sc-chain-spec = "24.0.0"
@@ -179,9 +178,10 @@
 sp-trie = { default-features = false, version = "26.0.0" }
 sp-version = { default-features = false, version = "26.0.0" }
 sp-weights = { default-features = false, version = "24.0.0" }
-staging-xcm = { default-features = false , version = "4.0.0" }
-staging-xcm-builder = { default-features = false , version = "4.0.0" }
-staging-xcm-executor = { default-features = false , version = "4.0.0" }
+staging-parachain-info = { default-features = false, version = "0.4.0" }
+staging-xcm = { default-features = false, version = "4.0.0" }
+staging-xcm-builder = { default-features = false, version = "4.0.0" }
+staging-xcm-executor = { default-features = false, version = "4.0.0" }
 substrate-frame-rpc-system = "25.0.0"
 substrate-prometheus-endpoint = "0.16.0"
 
@@ -216,4 +216,3 @@
 num_enum = { version = "0.7.0", default-features = false }
 serde = { default-features = false, features = ['derive'], version = "1.0.188" }
 smallvec = "1.11.1"
-
modifiedpallets/inflation/Cargo.tomldiffbeforeafterboth
--- a/pallets/inflation/Cargo.toml
+++ b/pallets/inflation/Cargo.toml
@@ -16,6 +16,7 @@
 
 [features]
 default = ['std']
+fast-inflation = []
 runtime-benchmarks = ['frame-benchmarking']
 std = [
 	'frame-benchmarking/std',
@@ -27,7 +28,6 @@
 	'sp-std/std',
 ]
 try-runtime = ["frame-support/try-runtime"]
-fast-inflation = []
 
 [dependencies]
 parity-scale-codec = { workspace = true }
modifiedruntime/common/config/substrate.rsdiffbeforeafterboth
--- a/runtime/common/config/substrate.rs
+++ b/runtime/common/config/substrate.rs
@@ -241,6 +241,8 @@
 	type Paymaster = PayFromAccount<Balances, TreasuryAccount>;
 	type BalanceConverter = UnityAssetBalanceConversion;
 	type PayoutPeriod = ConstU32<10>;
+	#[cfg(feature = "runtime-benchmarks")]
+	type BenchmarkHelper = ();
 }
 
 impl pallet_sudo::Config for Runtime {
modifiedruntime/common/tests/xcm.rsdiffbeforeafterboth
before · runtime/common/tests/xcm.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617use frame_support::pallet_prelude::Weight;18use parity_scale_codec::Encode;19use staging_xcm::{20	latest::{prelude::*, Error},21	VersionedXcm,22};2324use super::{last_events, new_test_ext, AccountId};25use crate::{PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin};2627const ALICE: AccountId = AccountId::new([0u8; 32]);28const BOB: AccountId = AccountId::new([1u8; 32]);2930const INITIAL_BALANCE: u128 = 10_000_000_000_000_000_000_000; // 10_000 UNQ3132#[test]33pub fn xcm_transact_is_forbidden() {34	new_test_ext(vec![(ALICE, INITIAL_BALANCE)]).execute_with(|| {35		PolkadotXcm::execute(36			RuntimeOrigin::signed(ALICE),37			Box::new(VersionedXcm::from(Xcm(vec![Transact {38				origin_kind: OriginKind::Native,39				require_weight_at_most: Weight::from_parts(1000, 1000),40				call: RuntimeCall::Balances(pallet_balances::Call::<Runtime>::transfer {41					dest: BOB.into(),42					value: INITIAL_BALANCE / 2,43				})44				.encode()45				.into(),46			}]))),47			Weight::from_parts(1001000, 2000),48		)49		.expect(50			"XCM execute must succeed, the error should be in the `PolkadotXcm::Attempted` event",51		);5253		let xcm_event = &last_events(1)[0];54		match xcm_event {55			RuntimeEvent::PolkadotXcm(pallet_xcm::Event::<Runtime>::Attempted {56				outcome: Outcome::Incomplete(_weight, Error::NoPermission),57			}) => { /* Pass */ }58			_ => panic!(59				"Expected PolkadotXcm.Attempted(Incomplete(_weight, NoPermission)),\60				found: {xcm_event:#?}"61			),62		}63	});64}
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -61,6 +61,7 @@
 	'pallet-unique/runtime-benchmarks',
 	'pallet-utility/runtime-benchmarks',
 	'pallet-xcm/runtime-benchmarks',
+	'polkadot-runtime-common/runtime-benchmarks',
 	'sp-runtime/runtime-benchmarks',
 	'staging-xcm-builder/runtime-benchmarks',
 ]
@@ -126,7 +127,6 @@
 	'pallet-treasury/std',
 	'pallet-unique/std',
 	'pallet-utility/std',
-	'staging-parachain-info/std',
 	'polkadot-runtime-common/std',
 	'serde',
 	'sp-api/std',
@@ -141,6 +141,7 @@
 	'sp-storage/std',
 	'sp-transaction-pool/std',
 	'sp-version/std',
+	'staging-parachain-info/std',
 	'staging-xcm-builder/std',
 	'staging-xcm-executor/std',
 	'staging-xcm/std',
@@ -221,12 +222,13 @@
 	'pallet-unique/try-runtime',
 	'pallet-utility/try-runtime',
 	'pallet-xcm/try-runtime',
+	'polkadot-runtime-common/try-runtime',
 	'staging-parachain-info/try-runtime',
-	'polkadot-runtime-common/try-runtime',
 ]
 
 app-promotion = []
 collator-selection = []
+fast-inflation = []
 foreign-assets = []
 gov-test-timings = []
 governance = []
@@ -234,7 +236,6 @@
 preimage = []
 refungible = []
 session-test-timings = []
-fast-inflation = []
 
 ################################################################################
 # local dependencies
@@ -271,7 +272,6 @@
 pallet-treasury = { workspace = true }
 pallet-utility = { workspace = true }
 pallet-xcm = { workspace = true }
-staging-parachain-info = { workspace = true }
 parity-scale-codec = { workspace = true }
 polkadot-parachain-primitives = { workspace = true }
 polkadot-runtime-common = { workspace = true }
@@ -290,6 +290,7 @@
 sp-storage = { workspace = true }
 sp-transaction-pool = { workspace = true }
 sp-version = { workspace = true }
+staging-parachain-info = { workspace = true }
 staging-xcm = { workspace = true }
 staging-xcm-builder = { workspace = true }
 staging-xcm-executor = { workspace = true }
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -58,6 +58,7 @@
 	'pallet-unique/runtime-benchmarks',
 	'pallet-utility/runtime-benchmarks',
 	'pallet-xcm/runtime-benchmarks',
+	'polkadot-runtime-common/runtime-benchmarks',
 	'sp-runtime/runtime-benchmarks',
 	'staging-xcm-builder/runtime-benchmarks',
 ]
@@ -126,7 +127,7 @@
 	'pallet-treasury/std',
 	'pallet-unique/std',
 	'pallet-utility/std',
-	'staging-parachain-info/std',
+	'polkadot-runtime-common/std',
 	'serde',
 	'sp-api/std',
 	'sp-block-builder/std',
@@ -139,6 +140,7 @@
 	'sp-std/std',
 	'sp-transaction-pool/std',
 	'sp-version/std',
+	'staging-parachain-info/std',
 	'staging-xcm-builder/std',
 	'staging-xcm-executor/std',
 	'staging-xcm/std',
@@ -210,18 +212,19 @@
 	'pallet-unique/try-runtime',
 	'pallet-utility/try-runtime',
 	'pallet-xcm/try-runtime',
+	'polkadot-runtime-common/try-runtime',
 	'staging-parachain-info/try-runtime',
 ]
 
 app-promotion = []
 collator-selection = []
+fast-inflation = []
 foreign-assets = []
 gov-test-timings = []
 governance = []
 preimage = []
 refungible = []
 session-test-timings = []
-fast-inflation = []
 
 ################################################################################
 # local dependencies
@@ -257,9 +260,9 @@
 pallet-treasury = { workspace = true }
 pallet-utility = { workspace = true }
 pallet-xcm = { workspace = true }
-staging-parachain-info = { workspace = true }
 parity-scale-codec = { workspace = true }
 polkadot-parachain-primitives = { workspace = true }
+polkadot-runtime-common = { workspace = true }
 smallvec = { workspace = true }
 sp-api = { workspace = true }
 sp-arithmetic = { workspace = true }
@@ -275,6 +278,7 @@
 sp-storage = { workspace = true }
 sp-transaction-pool = { workspace = true }
 sp-version = { workspace = true }
+staging-parachain-info = { workspace = true }
 staging-xcm = { workspace = true }
 staging-xcm-builder = { workspace = true }
 staging-xcm-executor = { workspace = true }
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -55,6 +55,7 @@
 	'pallet-unique/runtime-benchmarks',
 	'pallet-utility/runtime-benchmarks',
 	'pallet-xcm/runtime-benchmarks',
+	'polkadot-runtime-common/runtime-benchmarks',
 	'sp-runtime/runtime-benchmarks',
 	'staging-xcm-builder/runtime-benchmarks',
 	'up-data-structs/runtime-benchmarks',
@@ -124,7 +125,7 @@
 	'pallet-treasury/std',
 	'pallet-unique/std',
 	'pallet-utility/std',
-	'staging-parachain-info/std',
+	'polkadot-runtime-common/std',
 	'sp-api/std',
 	'sp-block-builder/std',
 	'sp-core/std',
@@ -136,6 +137,7 @@
 	'sp-std/std',
 	'sp-transaction-pool/std',
 	'sp-version/std',
+	'staging-parachain-info/std',
 	'staging-xcm-builder/std',
 	'staging-xcm-executor/std',
 	'staging-xcm/std',
@@ -212,19 +214,20 @@
 	'pallet-unique/try-runtime',
 	'pallet-utility/try-runtime',
 	'pallet-xcm/try-runtime',
+	'polkadot-runtime-common/try-runtime',
 	'staging-parachain-info/try-runtime',
 ]
-unique-runtime = ['app-promotion', 'foreign-assets', 'refungible', 'governance', 'preimage']
+unique-runtime = ['app-promotion', 'foreign-assets', 'governance', 'preimage', 'refungible']
 
 app-promotion = []
 collator-selection = []
+fast-inflation = []
 foreign-assets = []
 gov-test-timings = []
 governance = []
 preimage = []
 refungible = []
 session-test-timings = []
-fast-inflation = []
 
 ################################################################################
 # local dependencies
@@ -260,9 +263,9 @@
 pallet-treasury = { workspace = true }
 pallet-utility = { workspace = true }
 pallet-xcm = { workspace = true }
-staging-parachain-info = { workspace = true }
 parity-scale-codec = { workspace = true }
 polkadot-parachain-primitives = { workspace = true }
+polkadot-runtime-common = { workspace = true }
 smallvec = { workspace = true }
 sp-api = { workspace = true }
 sp-arithmetic = { workspace = true }
@@ -278,6 +281,7 @@
 sp-storage = { workspace = true }
 sp-transaction-pool = { workspace = true }
 sp-version = { workspace = true }
+staging-parachain-info = { workspace = true }
 staging-xcm = { workspace = true }
 staging-xcm-builder = { workspace = true }
 staging-xcm-executor = { workspace = true }