git.delta.rocks / unique-network / refs/commits / 900be63a359f

difftreelog

Merge pull request #1004 from UniqueNetwork/feature/update-polkadot-1.1

Yaroslav Bolyukin2023-10-09parents: #bce2cc1 #c14994f.patch.diff
in: master
Upgrade to polkadot 1.1.0

181 files changed

deleted.docker/forkless-config/zombienet-forkless-data.tomldiffbeforeafterboth
--- a/.docker/forkless-config/zombienet-forkless-data.toml
+++ /dev/null
@@ -1,83 +0,0 @@
-[settings]
-provider = "native"
-
-[relaychain]
-default_command = "/polkadot/target/release/polkadot"
-default_args = [ "-lparachain::candidate_validation=debug", "-lxcm=trace", ]
-chain = "{{ RELAY_CHAIN_TYPE }}-local"
-
-  [[relaychain.nodes]]
-  name = "relay-alice"
-  rpc_port = 9844
-  p2p_port = 30444
-  prometheus_port = 33044
-  prometheus = false
-  # Zombienet does not grant the default balance to nodes created with [[nodes]].
-  balance = 2000000000000
-
-  [[relaychain.nodes]]
-  name = "relay-bob"
-  rpc_port = 9855
-  p2p_port = 30555
-  prometheus_port = 33055
-  prometheus = false
-  # Zombienet does not grant the default balance to nodes created with [[nodes]].
-  balance = 2000000000000
-
-  [[relaychain.nodes]]
-  name = "relay-charlie"
-  rpc_port = 9866
-  p2p_port = 30666
-  prometheus_port = 33066
-  prometheus = false
-  # Zombienet does not grant the default balance to nodes created with [[nodes]].
-  balance = 2000000000000
-
-  [[relaychain.nodes]]
-  name = "relay-dave"
-  rpc_port = 9877
-  p2p_port = 30777
-  prometheus_port = 33077
-  prometheus = false
-  # Zombienet does not grant the default balance to nodes created with [[nodes]].
-  balance = 2000000000000
-
-  [[relaychain.nodes]]
-  name = "relay-eve"
-  rpc_port = 9888
-  p2p_port = 3088
-  prometheus_port = 33088
-  prometheus = false
-  # Zombienet does not grant the default balance to nodes created with [[nodes]].
-  balance = 2000000000000
-
-[[parachains]]
-id = 1000
-chain_spec_modifier_commands = [[
-  "chainql",
-  "--tla-code=rawSpec=import '{{'raw'|chainSpec}}'",
-  "--tla-str=forkFrom={{ REPLICA_FROM }}",
-  "fork.jsonnet",
-]]
-
-  [[parachains.collators]]
-  name = "alice"
-  command = "/unique-chain/current/release/unique-collator"
-  rpc_port = 9944
-  p2p_port = 31200
-  prometheus_port = 33144
-  prometheus = false
-  args = [
-    "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug",
-  ]
-
-  [[parachains.collators]]
-  name = "bob"
-  command = "/unique-chain/current/release/unique-collator"
-  rpc_port = 9945
-  p2p_port = 31201
-  prometheus_port = 33155
-  prometheus = false
-  args = [
-    "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug",
-  ]
deleted.docker/forkless-config/zombienet-forkless-nodata.tomldiffbeforeafterboth
--- a/.docker/forkless-config/zombienet-forkless-nodata.toml
+++ /dev/null
@@ -1,39 +0,0 @@
-[settings]
-provider = "native"
-
-[relaychain]
-default_command = "/polkadot/target/release/polkadot"
-default_args = [ "-lparachain::candidate_validation=debug", "-lxcm=trace", ]
-chain = "{{ RELAY_CHAIN_TYPE }}-local"
-
-  [[relaychain.nodes]]
-  name = "relay-alice"
-  rpc_port = 9844
-  p2p_port = 30444
-
-  [[relaychain.node_groups]]
-  name = "relay"
-  count = 4
-
-[[parachains]]
-id = 1000
-
-  [[parachains.collators]]
-  name = "alice"
-  command = "/unique-chain/current/release/unique-collator"
-  rpc_port = 9944
-  p2p_port = 31200
-  args = [
-    "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug",
-    "--ws-max-connections=1000",
-  ]
-
-  [[parachains.collators]]
-  name = "bob"
-  command = "/unique-chain/current/release/unique-collator"
-  rpc_port = 9945
-  p2p_port = 31201
-  args = [
-    "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug",
-    "--ws-max-connections=1000",
-  ]
modified.githooks/pre-commitdiffbeforeafterboth
--- a/.githooks/pre-commit
+++ b/.githooks/pre-commit
@@ -20,7 +20,7 @@
     exit 1
 fi
 
-STAGED_TEST_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".ts$\|.js$")
+STAGED_TEST_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep "\.ts$\|\.js$")
 
 if [[ "$STAGED_TEST_FILES" = "" ]]; then
   echo -e "${GREEN}eslint succeded${NC}"
@@ -39,4 +39,4 @@
     exit 1
 fi
 
-exit $?
\ No newline at end of file
+exit $?
modified.rustfmt.tomldiffbeforeafterboth
--- a/.rustfmt.toml
+++ b/.rustfmt.toml
@@ -1,2 +1,3 @@
+group_imports = "stdexternalcrate"
 hard_tabs = true
-reorder_imports = false
+imports_granularity = "crate"
modifiedCargo.lockdiffbeforeafterboth
before · Cargo.lock
1144 packageslockfile v3
modifiedCargo.tomldiffbeforeafterboth
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,7 @@
 	'runtime/tests',
 	'runtime/unique',
 ]
-package.version = "0.9.43"
+package.version = "1.1.0"
 resolver = "2"
 
 [profile.release]
@@ -25,18 +25,16 @@
 opt-level = 3
 
 [profile.integration-tests]
-inherits = "release"
 debug-assertions = true
+inherits = "release"
 
 [workspace.dependencies]
 # Unique
 app-promotion-rpc = { path = "primitives/app_promotion_rpc", default-features = false }
-evm-coder = { version = "0.4.2", default-features = false, features = [
-	'bondrewd',
-] }
+evm-coder = { version = "0.4.2", default-features = false, features = ['bondrewd'] }
 pallet-app-promotion = { path = "pallets/app-promotion", default-features = false }
 pallet-balances-adapter = { default-features = false, path = "pallets/balances-adapter" }
-pallet-charge-transaction = { package = "pallet-template-transaction-payment", default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.43" }
+pallet-charge-transaction = { package = "pallet-template-transaction-payment", default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v1.1.0" }
 pallet-collator-selection = { default-features = false, path = "pallets/collator-selection" }
 pallet-common = { default-features = false, path = "pallets/common" }
 pallet-configuration = { default-features = false, path = "pallets/configuration" }
@@ -55,7 +53,6 @@
 pallet-structure = { default-features = false, path = "pallets/structure" }
 pallet-test-utils = { default-features = false, path = "test-pallets/utils" }
 pallet-unique = { path = "pallets/unique", default-features = false }
-pallet-unique-scheduler-v2 = { path = "pallets/scheduler-v2", default-features = false }
 precompile-utils-macro = { path = "runtime/common/ethereum/precompiles/utils/macro" }
 struct-versioning = { path = "crates/struct-versioning" }
 uc-rpc = { path = "client/rpc" }
@@ -64,7 +61,7 @@
 up-data-structs = { path = "primitives/data-structs", default-features = false }
 up-pov-estimate-rpc = { path = "primitives/pov-estimate-rpc", default-features = false }
 up-rpc = { path = "primitives/rpc", default-features = false }
-up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.43" }
+up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v1.1.0" }
 
 # Unique: Runtimes
 opal-runtime = { path = "runtime/opal" }
@@ -72,132 +69,138 @@
 unique-runtime = { path = "runtime/unique" }
 
 # Frontier (Unique patches over the Parity version)
-fc-consensus = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" }
-fc-db = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" }
-fc-mapping-sync = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" }
-fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" }
-fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" }
-fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" }
-fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" }
-fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" }
-fp-storage = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" }
-pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" }
-pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" }
+fc-api = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.1.0" }
+fc-consensus = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.1.0" }
+fc-db = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.1.0" }
+fc-mapping-sync = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.1.0" }
+fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.1.0" }
+fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.1.0" }
+fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.1.0" }
+fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.1.0" }
+fp-self-contained = { default-features = false, features = [
+	"serde",
+], git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.1.0" }
+fp-storage = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.1.0" }
+pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.1.0" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.1.0" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.1.0" }
+pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.1.0" }
 
 # Parity
-codec = { default-features = false, features = ['derive'], package = 'parity-scale-codec', version = "3.2.2" }
-cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-cumulus-pallet-aura-ext = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-cumulus-pallet-dmp-queue = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-cumulus-pallet-parachain-system = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-cumulus-pallet-xcm = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-cumulus-pallet-xcmp-queue = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-cumulus-primitives-core = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-cumulus-primitives-timestamp = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-cumulus-primitives-utility = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-aura = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-collective = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-democracy = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-membership = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-preimage = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-ranked-collective = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-referenda = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-scheduler = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-session = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-state-trie-migration = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-utility = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-treasury = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43", default-features = false }
-parachain-info = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }
-parity-scale-codec = { version = "3.2.2", features = ["derive"], default-features = false }
-polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" }
-polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43", default-features = false }
-polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" }
-polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" }
-sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
-sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-block-builder = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-consensus-aura = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-session = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-trie = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-sp-version = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43", default-features = false }
-xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43", default-features = false }
-xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43", default-features = false }
+codec = { default-features = false, features = ['derive'], package = 'parity-scale-codec', version = "3.6.5" }
+cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-client-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-pallet-aura-ext = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-pallet-dmp-queue = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-pallet-parachain-system = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-pallet-xcm = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-pallet-xcmp-queue = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-primitives-core = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-primitives-parachain-inherent = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-primitives-timestamp = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-primitives-utility = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+frame-executive = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+frame-support = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+frame-system = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-aura = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-authorship = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-balances = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-collective = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-democracy = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-membership = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-preimage = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-ranked-collective = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-referenda = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-scheduler = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-session = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-state-trie-migration = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-sudo = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-treasury = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-utility = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
+parachain-info = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+parity-scale-codec = { version = "3.6.5", features = ["derive"], default-features = false }
+polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
+polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+polkadot-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sc-consensus-manual-seal = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
+sp-api = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-block-builder = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-consensus-aura = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-core = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-externalities = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-inherents = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-io = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-offchain = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-runtime = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-session = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-staking = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-std = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-trie = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-version = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-weights = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+staging-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
+staging-xcm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
+staging-xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
+substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
 
 # Parity: Build utils
-substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
+substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
 
 # Parity: Benchmarking
-frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
+frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
 
 # Parity: Try Runtime
-frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
+frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
 
 # ORML
-orml-tokens = { default-features = false, git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" }
-orml-traits = { default-features = false, git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" }
-orml-vesting = { default-features = false, git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" }
-orml-xcm-support = { default-features = false, git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" }
-orml-xtokens = { default-features = false, git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" }
+orml-tokens = { default-features = false, git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "upgrade-to-polkadot-v1.1.0" }
+orml-traits = { default-features = false, git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "upgrade-to-polkadot-v1.1.0" }
+orml-vesting = { default-features = false, git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "upgrade-to-polkadot-v1.1.0" }
+orml-xcm-support = { default-features = false, git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "upgrade-to-polkadot-v1.1.0" }
+orml-xtokens = { default-features = false, git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "upgrade-to-polkadot-v1.1.0" }
 
 # Other
 derivative = { version = "2.2.0", features = ["use_core"] }
@@ -205,8 +208,8 @@
 evm-core = { git = "https://github.com/rust-blockchain/evm", rev = "b7b82c7e1fc57b7449d6dfa6826600de37cc1e65", default-features = false }
 hex-literal = "0.4.1"
 impl-trait-for-tuples = "0.2.2"
-jsonrpsee = { version = "0.16.2", features = ["macros", "server"] }
-log = { version = "0.4.16", default-features = false }
-num_enum = { version = "0.5.3", default-features = false }
-serde = { default-features = false, features = ['derive'], version = "1.0.136" }
-smallvec = "1.6.1"
+jsonrpsee = { version = "0.16.3", features = ["macros", "server"] }
+log = { version = "0.4.20", default-features = false }
+num_enum = { version = "0.7.0", default-features = false }
+serde = { default-features = false, features = ['derive'], version = "1.0.188" }
+smallvec = "1.11.1"
modifiedMakefilediffbeforeafterboth
--- a/Makefile
+++ b/Makefile
@@ -128,10 +128,6 @@
 bench-structure:
 	make _bench PALLET=structure
 
-.PHONY: bench-scheduler
-bench-scheduler:
-	make _bench PALLET=unique-scheduler-v2 PALLET_DIR=scheduler-v2
-
 .PHONY: bench-foreign-assets
 bench-foreign-assets:
 	make _bench PALLET=foreign-assets
@@ -157,7 +153,6 @@
 	make _bench PALLET=xcm OUTPUT=./runtime/common/weights/xcm.rs TEMPLATE="--template=.maintain/external-weight-template.hbs"
 
 .PHONY: bench
-# Disabled: bench-scheduler
 bench: bench-app-promotion bench-common bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-configuration bench-foreign-assets bench-maintenance bench-xcm bench-collator-selection bench-identity
 
 .PHONY: check
modifiedREADME.mddiffbeforeafterboth
--- a/README.md
+++ b/README.md
@@ -84,13 +84,6 @@
 
 Note: checkout this project and all related projects (see below) in the sibling folders (both under the same folder)
 
-### Polkadot launch utility
-
-```
-git clone https://github.com/UniqueNetwork/polkadot-launch.git
-git checkout unique-network
-```
-
 ### Build relay
 
 ```
@@ -118,14 +111,22 @@
 
 ## Running as Parachain locally
 
-```
-./launch-testnet.sh
-```
+### Dev mode
 
-Optional, full setup with Acala and Statemint
-```
-./launch-testnet-full.sh
-```
+You can launch the node in the dev mode where blocks are sealed automatically each 500 ms or on each new transaction.
+
+* Opal Runtime: `cargo run --release -- --dev`
+* Quartz Runtime: `cargo run --release --features quartz-runtime -- --dev`
+* Unique Runtime: `cargo run --release --features unique-runtime -- --dev`
+
+ You can tweak the dev mode with the following CLI options:
+ * --idle-autoseal-interval <IDLE_AUTOSEAL_INTERVAL>
+          When running the node in the `--dev` mode, an empty block will be sealed automatically after the `<IDLE_AUTOSEAL_INTERVAL>` milliseconds.
+ * --disable-autoseal-on-tx
+          Disable auto-sealing blocks on new transactions in the `--dev` mode
+ * --autoseal-finalization-delay <AUTOSEAL_FINALIZATION_DELAY>
+          Finalization delay (in seconds) of auto-sealed blocks in the `--dev` mode.
+          Disabled by default.
 
 ## Run Integration Tests
 
modifiedclient/rpc/Cargo.tomldiffbeforeafterboth
--- a/client/rpc/Cargo.toml
+++ b/client/rpc/Cargo.toml
@@ -5,14 +5,12 @@
 version = "0.1.4"
 
 [dependencies]
-anyhow = "1.0.57"
-jsonrpsee = { version = "0.16.2", features = ["macros", "server"] }
-trie-db = { version = "0.24.0", default-features = false }
-zstd = { version = "0.11.2", default-features = false }
+anyhow = "1.0.75"
+jsonrpsee = { version = "0.16.3", features = ["macros", "server"] }
+parity-scale-codec = { workspace = true }
+trie-db = { version = "0.27.1", default-features = false }
+zstd = { version = "0.12.4", default-features = false }
 
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
 app-promotion-rpc = { workspace = true }
 up-common = { workspace = true }
 up-data-structs = { workspace = true }
@@ -44,12 +42,8 @@
 hex-literal = { workspace = true }
 
 [features]
+all-runtimes = ['opal-runtime', 'quartz-runtime', 'unique-runtime']
 default = ['opal-runtime']
-all-runtimes = [
-	'opal-runtime',
-	'quartz-runtime',
-	'unique-runtime',
-]
 pov-estimate = [
 	'opal-runtime/pov-estimate',
 	'quartz-runtime?/pov-estimate',
modifiedclient/rpc/src/lib.rsdiffbeforeafterboth
--- a/client/rpc/src/lib.rs
+++ b/client/rpc/src/lib.rs
@@ -17,23 +17,19 @@
 // Original License
 use std::sync::Arc;
 
-use codec::Decode;
-use jsonrpsee::{
-	core::{RpcResult as Result},
-	proc_macros::rpc,
-};
 use anyhow::anyhow;
+use app_promotion_rpc::AppPromotionApi as AppPromotionRuntimeApi;
+pub use app_promotion_unique_rpc::AppPromotionApiServer;
+use jsonrpsee::{core::RpcResult as Result, proc_macros::rpc};
+use parity_scale_codec::Decode;
+use sp_api::{ApiExt, BlockT, ProvideRuntimeApi};
+use sp_blockchain::HeaderBackend;
 use sp_runtime::traits::{AtLeast32BitUnsigned, Member};
 use up_data_structs::{
-	RpcCollection, CollectionId, CollectionStats, CollectionLimits, TokenId, Property,
-	PropertyKeyPermission, TokenData, TokenChild,
+	CollectionId, CollectionLimits, CollectionStats, Property, PropertyKeyPermission,
+	RpcCollection, TokenChild, TokenData, TokenId,
 };
-use sp_api::{BlockT, ProvideRuntimeApi, ApiExt};
-use sp_blockchain::HeaderBackend;
 use up_rpc::UniqueApi as UniqueRuntimeApi;
-use app_promotion_rpc::AppPromotionApi as AppPromotionRuntimeApi;
-
-pub use app_promotion_unique_rpc::AppPromotionApiServer;
 
 #[cfg(feature = "pov-estimate")]
 pub mod pov_estimate;
@@ -549,16 +545,16 @@
 	keys.map(|keys| keys.into_iter().map(|key| key.into_bytes()).collect())
 }
 
-fn decode_collection_from_bytes<T: codec::Decode>(
+fn decode_collection_from_bytes<T: parity_scale_codec::Decode>(
 	bytes: &[u8],
-) -> core::result::Result<T, codec::Error> {
-	let mut reader = codec::IoReader(bytes);
+) -> core::result::Result<T, parity_scale_codec::Error> {
+	let mut reader = parity_scale_codec::IoReader(bytes);
 	T::decode(&mut reader)
 }
 
 fn detect_type_and_decode_collection<AccountId: Decode>(
 	bytes: &[u8],
-) -> core::result::Result<RpcCollection<AccountId>, codec::Error> {
+) -> core::result::Result<RpcCollection<AccountId>, parity_scale_codec::Error> {
 	use up_data_structs::{CollectionVersion1, RpcCollectionVersion1};
 
 	decode_collection_from_bytes::<RpcCollection<AccountId>>(bytes)
@@ -574,11 +570,12 @@
 
 #[cfg(test)]
 mod tests {
-	use super::*;
-	use codec::IoReader;
 	use hex_literal::hex;
+	use parity_scale_codec::IoReader;
 	use up_data_structs::{CollectionVersion1, RawEncoded};
 
+	use super::*;
+
 	const ENCODED_COLLECTION_V1: [u8; 180] = hex!("aab94a1ee784bc17f68d76d4d48d736916ca6ff6315b8c1fa1175726c8345a390000285000720069006d00610020004c00690076006500d04500730065006d00700069006f00200064006900200063007200650061007a0069006f006e006500200064006900200075006e00610020006e0075006f0076006100200063006f006c006c0065007a0069006f006e00650020006400690020004e004600540021000c464e5400000000000000000000000000000000");
 	const ENCODED_RPC_COLLECTION_V2: [u8; 618] = hex!("d00dcc24bf66750d3809aa26884b930ec8a3094d6f6f19fdc62020b2fbec013400604d0069006e007400460065007300740020002d002000460075006e006e007900200061006e0069006d0061006c0073008c430072006f00730073006f0076006500720020006200650074007700650065006e00200061006e0069006d0061006c00730020002d00200066006f0072002000660075006e00104d46464100000000000000000000010001000100000004385f6f6c645f636f6e7374446174610001000c5c5f6f6c645f636f6e73744f6e436861696e536368656d6139047b226e6573746564223a7b226f6e436861696e4d65746144617461223a7b226e6573746564223a7b224e46544d657461223a7b226669656c6473223a7b22697066734a736f6e223a7b226964223a312c2272756c65223a227265717569726564222c2274797065223a22737472696e67227d2c2248656164223a7b226964223a322c2272756c65223a227265717569726564222c2274797065223a22737472696e67227d2c22426f6479223a7b226964223a332c2272756c65223a227265717569726564222c2274797065223a22737472696e67227d2c225461696c223a7b226964223a342c2272756c65223a227265717569726564222c2274797065223a22737472696e67227d7d7d7d7d7d7d485f6f6c645f736368656d6156657273696f6e18556e69717565685f6f6c645f7661726961626c654f6e436861696e536368656d6111017b22636f6c6c656374696f6e436f766572223a22516d53557a7139354c357a556777795a584d3731576a3762786b36557048515468633162536965347766706e5435227d000000");
 
modifiedclient/rpc/src/pov_estimate.rsdiffbeforeafterboth
--- a/client/rpc/src/pov_estimate.rs
+++ b/client/rpc/src/pov_estimate.rs
@@ -16,39 +16,31 @@
 
 use std::sync::Arc;
 
-use codec::{Encode, Decode};
-use sp_externalities::Extensions;
-
-use up_pov_estimate_rpc::{PovEstimateApi as PovEstimateRuntimeApi};
-use up_common::types::opaque::RuntimeId;
-
-use sc_service::{NativeExecutionDispatch, config::ExecutionStrategy};
-use sp_state_machine::{StateMachine, TrieBackendBuilder};
-use trie_db::{Trie, TrieDBBuilder};
-
+use anyhow::anyhow;
 use jsonrpsee::{core::RpcResult as Result, proc_macros::rpc};
-use anyhow::anyhow;
-
+use parity_scale_codec::{Decode, Encode};
 use sc_client_api::backend::Backend;
+use sc_executor::NativeElseWasmExecutor;
+use sc_rpc_api::DenyUnsafe;
+use sc_service::{config::ExecutionStrategy, NativeExecutionDispatch};
+use sp_api::{AsTrieBackend, BlockId, BlockT, ProvideRuntimeApi};
 use sp_blockchain::HeaderBackend;
 use sp_core::{
-	Bytes,
 	offchain::{
 		testing::{TestOffchainExt, TestTransactionPoolExt},
 		OffchainDbExt, OffchainWorkerExt, TransactionPoolExt,
 	},
 	testing::TaskExecutor,
 	traits::TaskExecutorExt,
+	Bytes,
 };
+use sp_externalities::Extensions;
 use sp_keystore::{testing::KeyStore, KeystoreExt};
-use sp_api::{AsTrieBackend, BlockId, BlockT, ProvideRuntimeApi};
-
-use sc_executor::NativeElseWasmExecutor;
-use sc_rpc_api::DenyUnsafe;
-
 use sp_runtime::traits::Header;
-
-use up_pov_estimate_rpc::{PovInfo, TrieKeyValue};
+use sp_state_machine::{StateMachine, TrieBackendBuilder};
+use trie_db::{Trie, TrieDBBuilder};
+use up_common::types::opaque::RuntimeId;
+use up_pov_estimate_rpc::{PovEstimateApi as PovEstimateRuntimeApi, PovInfo, TrieKeyValue};
 
 use crate::define_struct_for_server_api;
 
modifiedcrates/struct-versioning/Cargo.tomldiffbeforeafterboth
--- a/crates/struct-versioning/Cargo.toml
+++ b/crates/struct-versioning/Cargo.toml
@@ -4,7 +4,7 @@
 version = "0.1.0"
 
 [dependencies]
-quote = "1.0.15"
+quote = "1.0.33"
 syn = { version = "1.0", features = ["full"] }
 
 [lib]
modifiedcrates/struct-versioning/src/lib.rsdiffbeforeafterboth
--- a/crates/struct-versioning/src/lib.rs
+++ b/crates/struct-versioning/src/lib.rs
@@ -17,13 +17,12 @@
 #![doc = include_str!("../README.md")]
 
 use proc_macro::TokenStream;
-use quote::format_ident;
+use quote::{format_ident, quote};
 use syn::{
-	parse::{Parse, ParseStream},
-	Token, LitInt, parse_macro_input, ItemStruct, Error, Fields, Result, Field, Expr,
 	parenthesized,
+	parse::{Parse, ParseStream},
+	parse_macro_input, Error, Expr, Field, Fields, ItemStruct, LitInt, Result, Token,
 };
-use quote::quote;
 
 mod kw {
 	syn::custom_keyword!(version);
modifiednode/cli/Cargo.tomldiffbeforeafterboth
--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -20,23 +20,24 @@
 targets = ['x86_64-unknown-linux-gnu']
 
 [dependencies]
-clap = "4.1"
+clap = "4.4"
 futures = '0.3.28'
-tokio = { version = "1.24", features = ["time"] }
 serde_json = "1.0"
+tokio = { version = "1.32", features = ["time"] }
 
 log = { workspace = true }
 
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
+parity-scale-codec = { workspace = true }
 
 cumulus-client-cli = { workspace = true }
+cumulus-client-collator = { workspace = true }
 cumulus-client-consensus-aura = { workspace = true }
 cumulus-client-consensus-common = { workspace = true }
+cumulus-client-consensus-proposer = { workspace = true }
 cumulus-client-network = { workspace = true }
 cumulus-client-service = { workspace = true }
 cumulus-primitives-core = { workspace = true }
-cumulus-primitives-parachain-inherent = { workspace = true }
+cumulus-primitives-parachain-inherent = { features = ["std"], workspace = true }
 cumulus-relay-chain-inprocess-interface = { workspace = true }
 cumulus-relay-chain-interface = { workspace = true }
 cumulus-relay-chain-minimal-node = { workspace = true }
@@ -85,28 +86,57 @@
 fc-consensus = { workspace = true }
 fc-db = { workspace = true }
 fc-mapping-sync = { workspace = true }
-fc-rpc = { workspace = true }
 fc-rpc-core = { workspace = true }
+fc-rpc.workspace = true
 fp-rpc = { workspace = true }
 
 app-promotion-rpc = { workspace = true }
+fc-api.workspace = true
+fp-storage.workspace = true
+jsonrpsee.workspace = true
+pallet-transaction-payment-rpc.workspace = true
+sc-rpc-api.workspace = true
+sc-rpc.workspace = true
+sp-inherents.workspace = true
 uc-rpc = { workspace = true }
-unique-rpc = { workspace = true }
 up-pov-estimate-rpc = { workspace = true }
 up-rpc = { workspace = true }
-jsonrpsee.workspace = true
-fp-storage.workspace = true
-sc-rpc.workspace = true
 
 [build-dependencies]
 substrate-build-script-utils = { workspace = true }
 
 [features]
+all-runtimes = ['opal-runtime', 'quartz-runtime', 'unique-runtime']
 default = ["opal-runtime"]
-all-runtimes = ['opal-runtime', 'quartz-runtime', 'unique-runtime']
-pov-estimate = ['opal-runtime/pov-estimate', 'quartz-runtime?/pov-estimate', 'uc-rpc/pov-estimate', 'unique-rpc/pov-estimate', 'unique-runtime?/pov-estimate']
-runtime-benchmarks = ['opal-runtime/runtime-benchmarks', 'polkadot-cli/runtime-benchmarks', 'polkadot-service/runtime-benchmarks', 'quartz-runtime?/runtime-benchmarks', 'sc-service/runtime-benchmarks', 'unique-runtime?/runtime-benchmarks']
+gov-test-timings = [
+	'opal-runtime/gov-test-timings',
+	'quartz-runtime?/gov-test-timings',
+	'unique-runtime?/gov-test-timings',
+]
+lookahead = []
+pov-estimate = [
+	'opal-runtime/pov-estimate',
+	'quartz-runtime?/pov-estimate',
+	'uc-rpc/pov-estimate',
+	'unique-runtime?/pov-estimate',
+]
+runtime-benchmarks = [
+	'opal-runtime/runtime-benchmarks',
+	'polkadot-cli/runtime-benchmarks',
+	'polkadot-service/runtime-benchmarks',
+	'quartz-runtime?/runtime-benchmarks',
+	'sc-service/runtime-benchmarks',
+	'unique-runtime?/runtime-benchmarks',
+]
 sapphire-runtime = ['quartz-runtime', 'quartz-runtime/become-sapphire']
-try-runtime = ['opal-runtime?/try-runtime', 'quartz-runtime?/try-runtime', 'try-runtime-cli/try-runtime', 'unique-runtime?/try-runtime']
-session-test-timings = ['opal-runtime/session-test-timings', 'quartz-runtime?/session-test-timings', 'unique-runtime?/session-test-timings']
-gov-test-timings = ['opal-runtime/gov-test-timings', 'quartz-runtime?/gov-test-timings', 'unique-runtime?/gov-test-timings']
+session-test-timings = [
+	'opal-runtime/session-test-timings',
+	'quartz-runtime?/session-test-timings',
+	'unique-runtime?/session-test-timings',
+]
+try-runtime = [
+	'opal-runtime?/try-runtime',
+	'quartz-runtime?/try-runtime',
+	'try-runtime-cli/try-runtime',
+	'unique-runtime?/try-runtime',
+]
modifiednode/cli/src/chain_spec.rsdiffbeforeafterboth
--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -14,36 +14,35 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
+use std::collections::BTreeMap;
+
+#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]
+pub use opal_runtime as default_runtime;
+#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]
+pub use quartz_runtime as default_runtime;
 use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
 use sc_service::ChainType;
+use serde::{Deserialize, Serialize};
+use serde_json::map::Map;
 use sp_core::{sr25519, Pair, Public};
 use sp_runtime::traits::{IdentifyAccount, Verify};
-use std::collections::BTreeMap;
-
-use serde::{Deserialize, Serialize};
-use serde_json::map::Map;
-
-use up_common::types::opaque::*;
-
 #[cfg(feature = "unique-runtime")]
 pub use unique_runtime as default_runtime;
-
-#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]
-pub use quartz_runtime as default_runtime;
-
-#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]
-pub use opal_runtime as default_runtime;
+use up_common::types::opaque::*;
 
 /// The `ChainSpec` parameterized for the unique runtime.
 #[cfg(feature = "unique-runtime")]
-pub type UniqueChainSpec = sc_service::GenericChainSpec<unique_runtime::GenesisConfig, Extensions>;
+pub type UniqueChainSpec =
+	sc_service::GenericChainSpec<unique_runtime::RuntimeGenesisConfig, Extensions>;
 
 /// The `ChainSpec` parameterized for the quartz runtime.
 #[cfg(feature = "quartz-runtime")]
-pub type QuartzChainSpec = sc_service::GenericChainSpec<quartz_runtime::GenesisConfig, Extensions>;
+pub type QuartzChainSpec =
+	sc_service::GenericChainSpec<quartz_runtime::RuntimeGenesisConfig, Extensions>;
 
 /// The `ChainSpec` parameterized for the opal runtime.
-pub type OpalChainSpec = sc_service::GenericChainSpec<opal_runtime::GenesisConfig, Extensions>;
+pub type OpalChainSpec =
+	sc_service::GenericChainSpec<opal_runtime::RuntimeGenesisConfig, Extensions>;
 
 #[cfg(feature = "unique-runtime")]
 pub type DefaultChainSpec = UniqueChainSpec;
@@ -153,11 +152,12 @@
 	) => {{
 		use $runtime::*;
 
-		GenesisConfig {
+		RuntimeGenesisConfig {
 			system: SystemConfig {
 				code: WASM_BINARY
 					.expect("WASM binary was not build, please build it!")
 					.to_vec(),
+				..Default::default()
 			},
 			balances: BalancesConfig {
 				balances: $endowed_accounts
@@ -167,10 +167,6 @@
 					.map(|k| (k, 1 << 100))
 					.collect(),
 			},
-			common: Default::default(),
-			configuration: Default::default(),
-			nonfungible: Default::default(),
-			treasury: Default::default(),
 			tokens: TokensConfig { balances: vec![] },
 			sudo: SudoConfig {
 				key: Some($root_key),
@@ -179,8 +175,8 @@
 			vesting: VestingConfig { vesting: vec![] },
 			parachain_info: ParachainInfoConfig {
 				parachain_id: $id.into(),
+				..Default::default()
 			},
-			parachain_system: Default::default(),
 			collator_selection: CollatorSelectionConfig {
 				invulnerables: $initial_invulnerables
 					.iter()
@@ -200,14 +196,10 @@
 					})
 					.collect(),
 			},
-			aura: Default::default(),
-			aura_ext: Default::default(),
 			evm: EVMConfig {
 				accounts: BTreeMap::new(),
+				..Default::default()
 			},
-			ethereum: EthereumConfig {},
-			polkadot_xcm: Default::default(),
-			transaction_payment: Default::default(),
 			..Default::default()
 		}
 	}};
@@ -224,15 +216,13 @@
 	) => {{
 		use $runtime::*;
 
-		GenesisConfig {
+		RuntimeGenesisConfig {
 			system: SystemConfig {
 				code: WASM_BINARY
 					.expect("WASM binary was not build, please build it!")
 					.to_vec(),
+				..Default::default()
 			},
-			common: Default::default(),
-			configuration: Default::default(),
-			nonfungible: Default::default(),
 			balances: BalancesConfig {
 				balances: $endowed_accounts
 					.iter()
@@ -241,7 +231,6 @@
 					.map(|k| (k, 1 << 100))
 					.collect(),
 			},
-			treasury: Default::default(),
 			tokens: TokensConfig { balances: vec![] },
 			sudo: SudoConfig {
 				key: Some($root_key),
@@ -249,21 +238,19 @@
 			vesting: VestingConfig { vesting: vec![] },
 			parachain_info: ParachainInfoConfig {
 				parachain_id: $id.into(),
+				Default::default()
 			},
-			parachain_system: Default::default(),
 			aura: AuraConfig {
 				authorities: $initial_invulnerables
 					.into_iter()
 					.map(|(_, aura)| aura)
 					.collect(),
 			},
-			aura_ext: Default::default(),
 			evm: EVMConfig {
 				accounts: BTreeMap::new(),
+				..Default::default()
 			},
-			ethereum: EthereumConfig {},
-			polkadot_xcm: Default::default(),
-			transaction_payment: Default::default(),
+			..Default::default()
 		}
 	}};
 }
modifiednode/cli/src/cli.rsdiffbeforeafterboth
--- a/node/cli/src/cli.rs
+++ b/node/cli/src/cli.rs
@@ -14,10 +14,12 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use crate::chain_spec;
 use std::path::PathBuf;
+
 use clap::Parser;
 
+use crate::chain_spec;
+
 /// Sub-commands supported by the collator.
 #[derive(Debug, Parser)]
 pub enum Subcommand {
modifiednode/cli/src/command.rsdiffbeforeafterboth
--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -32,38 +32,29 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-use crate::{
-	chain_spec::{self, RuntimeIdentification, ServiceId, ServiceIdentification},
-	cli::{Cli, RelayChainCli, Subcommand},
-	service::{new_partial, start_node, start_dev_node},
-};
-#[cfg(feature = "runtime-benchmarks")]
-use crate::chain_spec::default_runtime;
-
-#[cfg(feature = "unique-runtime")]
-use crate::service::UniqueRuntimeExecutor;
-
-#[cfg(feature = "quartz-runtime")]
-use crate::service::QuartzRuntimeExecutor;
-
-use crate::service::OpalRuntimeExecutor;
-
-#[cfg(feature = "runtime-benchmarks")]
-use crate::service::DefaultRuntimeExecutor;
-
-use codec::Encode;
 use cumulus_primitives_core::ParaId;
-use cumulus_client_cli::generate_genesis_block;
-use log::{debug, info};
+use log::info;
 use sc_cli::{
 	ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams,
-	NetworkParams, Result, RuntimeVersion, SharedParams, SubstrateCli,
+	NetworkParams, Result, SharedParams, SubstrateCli,
 };
 use sc_service::config::{BasePath, PrometheusConfig};
-use sp_core::hexdisplay::HexDisplay;
-use sp_runtime::traits::{AccountIdConversion, Block as BlockT};
+use sp_runtime::traits::AccountIdConversion;
+use up_common::types::opaque::RuntimeId;
 
-use up_common::types::opaque::{Block, RuntimeId};
+#[cfg(feature = "runtime-benchmarks")]
+use crate::chain_spec::default_runtime;
+#[cfg(feature = "runtime-benchmarks")]
+use crate::service::DefaultRuntimeExecutor;
+#[cfg(feature = "quartz-runtime")]
+use crate::service::QuartzRuntimeExecutor;
+#[cfg(feature = "unique-runtime")]
+use crate::service::UniqueRuntimeExecutor;
+use crate::{
+	chain_spec::{self, RuntimeIdentification, ServiceId, ServiceIdentification},
+	cli::{Cli, RelayChainCli, Subcommand},
+	service::{new_partial, start_dev_node, start_node, OpalRuntimeExecutor},
+};
 
 macro_rules! no_runtime_err {
 	($runtime_id:expr) => {
@@ -134,19 +125,6 @@
 
 	fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
 		load_spec(id)
-	}
-
-	fn native_runtime_version(chain_spec: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {
-		match chain_spec.runtime_id() {
-			#[cfg(feature = "unique-runtime")]
-			RuntimeId::Unique => &unique_runtime::VERSION,
-
-			#[cfg(feature = "quartz-runtime")]
-			RuntimeId::Quartz => &quartz_runtime::VERSION,
-
-			RuntimeId::Opal => &opal_runtime::VERSION,
-			runtime_id => panic!("{}", no_runtime_err!(runtime_id)),
-		}
 	}
 }
 
@@ -185,24 +163,20 @@
 	fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
 		polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id)
 	}
-
-	fn native_runtime_version(chain_spec: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {
-		polkadot_cli::Cli::native_runtime_version(chain_spec)
-	}
 }
 
 macro_rules! async_run_with_runtime {
 	(
-		$runtime_api:path, $executor:path,
+		$runtime:path, $runtime_api:path, $executor:path,
 		$runner:ident, $components:ident, $cli:ident, $cmd:ident, $config:ident,
 		$( $code:tt )*
 	) => {
 		$runner.async_run(|$config| {
 			let $components = new_partial::<
-				$runtime_api, $executor, _
+				$runtime, $runtime_api, $executor, _
 			>(
 				&$config,
-				crate::service::parachain_build_import_queue,
+				crate::service::parachain_build_import_queue::<$runtime, _, _>,
 			)?;
 			let task_manager = $components.task_manager;
 
@@ -218,18 +192,18 @@
 		match runner.config().chain_spec.runtime_id() {
 			#[cfg(feature = "unique-runtime")]
 			RuntimeId::Unique => async_run_with_runtime!(
-				unique_runtime::RuntimeApi, UniqueRuntimeExecutor,
+				unique_runtime::Runtime, unique_runtime::RuntimeApi, UniqueRuntimeExecutor,
 				runner, $components, $cli, $cmd, $config, $( $code )*
 			),
 
 			#[cfg(feature = "quartz-runtime")]
 			RuntimeId::Quartz => async_run_with_runtime!(
-				quartz_runtime::RuntimeApi, QuartzRuntimeExecutor,
+				quartz_runtime::Runtime, quartz_runtime::RuntimeApi, QuartzRuntimeExecutor,
 				runner, $components, $cli, $cmd, $config, $( $code )*
 			),
 
 			RuntimeId::Opal => async_run_with_runtime!(
-				opal_runtime::RuntimeApi, OpalRuntimeExecutor,
+				opal_runtime::Runtime, opal_runtime::RuntimeApi, OpalRuntimeExecutor,
 				runner, $components, $cli, $cmd, $config, $( $code )*
 			),
 
@@ -240,11 +214,18 @@
 
 macro_rules! sync_run_with_runtime {
 	(
-		$runtime_api:path, $executor:path,
+		$runtime:path, $runtime_api:path, $executor:path,
 		$runner:ident, $components:ident, $cli:ident, $cmd:ident, $config:ident,
 		$( $code:tt )*
 	) => {
 		$runner.sync_run(|$config| {
+			let $components = new_partial::<
+				$runtime, $runtime_api, $executor, _
+			>(
+				&$config,
+				crate::service::parachain_build_import_queue::<$runtime, _, _>,
+			)?;
+
 			$( $code )*
 		})
 	};
@@ -257,18 +238,18 @@
 		match runner.config().chain_spec.runtime_id() {
 			#[cfg(feature = "unique-runtime")]
 			RuntimeId::Unique => sync_run_with_runtime!(
-				unique_runtime::RuntimeApi, UniqueRuntimeExecutor,
+				unique_runtime::Runtime, unique_runtime::RuntimeApi, UniqueRuntimeExecutor,
 				runner, $components, $cli, $cmd, $config, $( $code )*
 			),
 
 			#[cfg(feature = "quartz-runtime")]
 			RuntimeId::Quartz => sync_run_with_runtime!(
-				quartz_runtime::RuntimeApi, QuartzRuntimeExecutor,
+				quartz_runtime::Runtime, quartz_runtime::RuntimeApi, QuartzRuntimeExecutor,
 				runner, $components, $cli, $cmd, $config, $( $code )*
 			),
 
 			RuntimeId::Opal => sync_run_with_runtime!(
-				opal_runtime::RuntimeApi, OpalRuntimeExecutor,
+				opal_runtime::Runtime, opal_runtime::RuntimeApi, OpalRuntimeExecutor,
 				runner, $components, $cli, $cmd, $config, $( $code )*
 			),
 
@@ -362,12 +343,11 @@
 		Some(Subcommand::ExportGenesisState(cmd)) => {
 			construct_sync_run!(|components, cli, cmd, _config| {
 				let spec = cli.load_spec(&cmd.shared_params.chain.clone().unwrap_or_default())?;
-				let state_version = Cli::native_runtime_version(&spec).state_version();
-				cmd.run::<Block>(&*spec, state_version)
+				cmd.run(&*spec, &*components.client)
 			})
 		}
 		Some(Subcommand::ExportGenesisWasm(cmd)) => {
-			construct_sync_run!(|components, cli, cmd, _config| {
+			construct_sync_run!(|_components, cli, cmd, _config| {
 				let spec = cli.load_spec(&cmd.shared_params.chain.clone().unwrap_or_default())?;
 				cmd.run(&*spec)
 			})
@@ -411,6 +391,7 @@
 		#[cfg(feature = "try-runtime")]
 		Some(Subcommand::TryRuntime(cmd)) => {
 			use std::{future::Future, pin::Pin};
+
 			use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch};
 			use try_runtime_cli::block_building_info::timestamp_with_aura_info;
 
@@ -506,12 +487,6 @@
 					AccountIdConversion::<polkadot_primitives::AccountId>::into_account_truncating(
 						&para_id,
 					);
-
-				let state_version = Cli::native_runtime_version(&config.chain_spec).state_version();
-				let block: Block = generate_genesis_block(&*config.chain_spec, state_version)
-					.map_err(|e| format!("{e:?}"))?;
-				let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode()));
-				let genesis_hash = format!("0x{:?}", HexDisplay::from(&block.header().hash().0));
 
 				let polkadot_config = SubstrateCli::create_configuration(
 					&polkadot_cli,
@@ -522,9 +497,6 @@
 
 				info!("Parachain id: {:?}", para_id);
 				info!("Parachain Account: {}", parachain_account);
-				info!("Parachain genesis state: {}", genesis_state);
-				info!("Parachain genesis hash: {}", genesis_hash);
-				debug!("Parachain genesis block: {:?}", block);
 				info!(
 					"Is collating: {}",
 					if config.role.is_authority() {
deletednode/cli/src/lib.rsdiffbeforeafterboth
--- a/node/cli/src/lib.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-pub mod chain_spec;
-pub mod service;
modifiednode/cli/src/main.rsdiffbeforeafterboth
--- a/node/cli/src/main.rs
+++ b/node/cli/src/main.rs
@@ -19,6 +19,7 @@
 mod service;
 mod cli;
 mod command;
+mod rpc;
 
 fn main() -> sc_cli::Result<()> {
 	command::run()
addednode/cli/src/rpc.rsdiffbeforeafterboth
--- /dev/null
+++ b/node/cli/src/rpc.rs
@@ -0,0 +1,279 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+use std::sync::Arc;
+
+use fc_mapping_sync::{EthereumBlockNotification, EthereumBlockNotificationSinks};
+use fc_rpc::{
+	pending::AuraConsensusDataProvider, EthBlockDataCacheTask, EthConfig, OverrideHandle,
+};
+use fc_rpc_core::types::{FeeHistoryCache, FilterPool};
+use fp_rpc::NoTransactionConverter;
+use jsonrpsee::RpcModule;
+use sc_client_api::{
+	backend::{AuxStore, StorageProvider},
+	client::BlockchainEvents,
+	UsageProvider,
+};
+use sc_network::NetworkService;
+use sc_network_sync::SyncingService;
+use sc_rpc::SubscriptionTaskExecutor;
+pub use sc_rpc_api::DenyUnsafe;
+use sc_service::TransactionPool;
+use sc_transaction_pool::{ChainApi, Pool};
+use sp_api::ProvideRuntimeApi;
+use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
+use sp_inherents::CreateInherentDataProviders;
+use sp_runtime::traits::BlakeTwo256;
+use up_common::types::opaque::*;
+
+use crate::service::RuntimeApiDep;
+
+#[cfg(feature = "pov-estimate")]
+type FullBackend = sc_service::TFullBackend<Block>;
+
+/// Full client dependencies.
+pub struct FullDeps<C, P, SC> {
+	/// The client instance to use.
+	pub client: Arc<C>,
+	/// Transaction pool instance.
+	pub pool: Arc<P>,
+	/// The SelectChain Strategy
+	pub select_chain: SC,
+	/// Whether to deny unsafe calls
+	pub deny_unsafe: DenyUnsafe,
+
+	/// Runtime identification (read from the chain spec)
+	pub runtime_id: RuntimeId,
+	/// Executor params for PoV estimating
+	#[cfg(feature = "pov-estimate")]
+	pub exec_params: uc_rpc::pov_estimate::ExecutorParams,
+	/// Substrate Backend.
+	#[cfg(feature = "pov-estimate")]
+	pub backend: Arc<FullBackend>,
+}
+
+/// Instantiate all Full RPC extensions.
+pub fn create_full<C, P, SC, R, A, B>(
+	io: &mut RpcModule<()>,
+	deps: FullDeps<C, P, SC>,
+) -> Result<(), Box<dyn std::error::Error + Send + Sync>>
+where
+	C: ProvideRuntimeApi<Block> + StorageProvider<Block, B> + AuxStore,
+	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,
+	C: Send + Sync + 'static,
+	C: BlockchainEvents<Block>,
+	C::Api: RuntimeApiDep<R>,
+	B: sc_client_api::Backend<Block> + Send + Sync + 'static,
+	P: TransactionPool<Block = Block> + 'static,
+	R: RuntimeInstance + Send + Sync + 'static,
+	<R as RuntimeInstance>::CrossAccountId: serde::Serialize,
+	C: sp_api::CallApiAt<
+		sp_runtime::generic::Block<
+			sp_runtime::generic::Header<u32, BlakeTwo256>,
+			sp_runtime::OpaqueExtrinsic,
+		>,
+	>,
+	for<'de> <R as RuntimeInstance>::CrossAccountId: serde::Deserialize<'de>,
+{
+	// use pallet_contracts_rpc::{Contracts, ContractsApi};
+	use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
+	use substrate_frame_rpc_system::{System, SystemApiServer};
+	#[cfg(feature = "pov-estimate")]
+	use uc_rpc::pov_estimate::{PovEstimate, PovEstimateApiServer};
+	use uc_rpc::{AppPromotion, AppPromotionApiServer, Unique, UniqueApiServer};
+
+	let FullDeps {
+		client,
+		pool,
+		select_chain: _,
+		deny_unsafe,
+
+		runtime_id: _,
+
+		#[cfg(feature = "pov-estimate")]
+		exec_params,
+
+		#[cfg(feature = "pov-estimate")]
+		backend,
+	} = deps;
+
+	io.merge(System::new(Arc::clone(&client), Arc::clone(&pool), deny_unsafe).into_rpc())?;
+	io.merge(TransactionPayment::new(Arc::clone(&client)).into_rpc())?;
+
+	io.merge(Unique::new(client.clone()).into_rpc())?;
+
+	io.merge(AppPromotion::new(client).into_rpc())?;
+
+	#[cfg(feature = "pov-estimate")]
+	io.merge(
+		PovEstimate::new(
+			client.clone(),
+			backend,
+			deny_unsafe,
+			exec_params,
+			runtime_id,
+		)
+		.into_rpc(),
+	)?;
+
+	Ok(())
+}
+
+pub struct EthDeps<C, P, CA: ChainApi, CIDP> {
+	/// The client instance to use.
+	pub client: Arc<C>,
+	/// Transaction pool instance.
+	pub pool: Arc<P>,
+	/// Graph pool instance.
+	pub graph: Arc<Pool<CA>>,
+	/// Syncing service
+	pub sync: Arc<SyncingService<Block>>,
+	/// The Node authority flag
+	pub is_authority: bool,
+	/// Network service
+	pub network: Arc<NetworkService<Block, Hash>>,
+
+	/// Ethereum Backend.
+	pub eth_backend: Arc<dyn fc_api::Backend<Block> + Send + Sync>,
+	/// Maximum number of logs in a query.
+	pub max_past_logs: u32,
+	/// Maximum fee history cache size.
+	pub fee_history_limit: u64,
+	/// Fee history cache.
+	pub fee_history_cache: FeeHistoryCache,
+	pub eth_block_data_cache: Arc<EthBlockDataCacheTask<Block>>,
+	/// EthFilterApi pool.
+	pub eth_filter_pool: Option<FilterPool>,
+	pub eth_pubsub_notification_sinks:
+		Arc<EthereumBlockNotificationSinks<EthereumBlockNotification<Block>>>,
+	/// Whether to enable eth dev signer
+	pub enable_dev_signer: bool,
+
+	pub overrides: Arc<OverrideHandle<Block>>,
+	pub pending_create_inherent_data_providers: CIDP,
+}
+
+pub fn create_eth<C, R, P, CA, B, CIDP, EC>(
+	io: &mut RpcModule<()>,
+	deps: EthDeps<C, P, CA, CIDP>,
+	subscription_task_executor: SubscriptionTaskExecutor,
+) -> Result<(), Box<dyn std::error::Error + Send + Sync>>
+where
+	C: ProvideRuntimeApi<Block> + StorageProvider<Block, B> + AuxStore,
+	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,
+	C: Send + Sync + 'static,
+	C: BlockchainEvents<Block>,
+	C: UsageProvider<Block>,
+	C::Api: RuntimeApiDep<R>,
+	P: TransactionPool<Block = Block> + 'static,
+	CA: ChainApi<Block = Block> + 'static,
+	B: sc_client_api::Backend<Block> + Send + Sync + 'static,
+	C: sp_api::CallApiAt<Block>,
+	CIDP: CreateInherentDataProviders<Block, ()> + Send + 'static,
+	EC: EthConfig<Block, C>,
+	R: RuntimeInstance,
+{
+	use fc_rpc::{
+		Eth, EthApiServer, EthDevSigner, EthFilter, EthFilterApiServer, EthPubSub,
+		EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer,
+	};
+
+	let EthDeps {
+		client,
+		pool,
+		graph,
+		eth_backend,
+		max_past_logs,
+		fee_history_limit,
+		fee_history_cache,
+		eth_block_data_cache,
+		eth_filter_pool,
+		eth_pubsub_notification_sinks,
+		enable_dev_signer,
+		sync,
+		is_authority,
+		network,
+		overrides,
+		pending_create_inherent_data_providers,
+	} = deps;
+
+	let mut signers = Vec::new();
+	if enable_dev_signer {
+		signers.push(Box::new(EthDevSigner::new()) as Box<dyn EthSigner>);
+	}
+	let execute_gas_limit_multiplier = 10;
+	io.merge(
+		Eth::<_, _, _, _, _, _, _, EC>::new(
+			client.clone(),
+			pool.clone(),
+			graph.clone(),
+			// We have no runtimes old enough to only accept converted transactions
+			None::<NoTransactionConverter>,
+			sync.clone(),
+			signers,
+			overrides.clone(),
+			eth_backend.clone(),
+			is_authority,
+			eth_block_data_cache.clone(),
+			fee_history_cache,
+			fee_history_limit,
+			execute_gas_limit_multiplier,
+			None,
+			pending_create_inherent_data_providers,
+			Some(Box::new(AuraConsensusDataProvider::new(client.clone()))),
+		)
+		.into_rpc(),
+	)?;
+
+	if let Some(filter_pool) = eth_filter_pool {
+		io.merge(
+			EthFilter::new(
+				client.clone(),
+				eth_backend,
+				graph.clone(),
+				filter_pool,
+				500_usize, // max stored filters
+				max_past_logs,
+				eth_block_data_cache,
+			)
+			.into_rpc(),
+		)?;
+	}
+	io.merge(
+		Net::new(
+			client.clone(),
+			network,
+			// Whether to format the `peer_count` response as Hex (default) or not.
+			true,
+		)
+		.into_rpc(),
+	)?;
+	io.merge(Web3::new(client.clone()).into_rpc())?;
+	io.merge(
+		EthPubSub::new(
+			pool,
+			client,
+			sync,
+			subscription_task_executor,
+			overrides,
+			eth_pubsub_notification_sinks,
+		)
+		.into_rpc(),
+	)?;
+
+	Ok(())
+}
modifiednode/cli/src/service.rsdiffbeforeafterboth
--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -15,73 +15,72 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 // std
-use std::sync::Arc;
-use std::sync::Mutex;
-use std::collections::BTreeMap;
-use std::time::Duration;
-use std::pin::Pin;
-use fc_mapping_sync::EthereumBlockNotificationSinks;
-use fc_rpc::EthBlockDataCacheTask;
-use fc_rpc::EthTask;
-use fc_rpc_core::types::FeeHistoryCache;
-use futures::{
-	Stream, StreamExt,
-	stream::select,
-	task::{Context, Poll},
+use std::{
+	collections::BTreeMap,
+	marker::PhantomData,
+	pin::Pin,
+	sync::{Arc, Mutex},
+	time::Duration,
 };
-use sc_rpc::SubscriptionTaskExecutor;
-use sp_keystore::KeystorePtr;
-use tokio::time::Interval;
-use jsonrpsee::RpcModule;
 
-use serde::{Serialize, Deserialize};
-
-// Cumulus Imports
-use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, SlotProportion};
-use cumulus_client_consensus_common::{
-	ParachainConsensus, ParachainBlockImport as TParachainBlockImport,
+use cumulus_client_cli::CollatorOptions;
+use cumulus_client_collator::service::CollatorService;
+#[cfg(not(feature = "lookahead"))]
+use cumulus_client_consensus_aura::collators::basic::{
+	run as run_aura, Params as BuildAuraConsensusParams,
+};
+#[cfg(feature = "lookahead")]
+use cumulus_client_consensus_aura::collators::lookahead::{
+	run as run_aura, Params as BuildAuraConsensusParams,
 };
+use cumulus_client_consensus_common::ParachainBlockImport as TParachainBlockImport;
+use cumulus_client_consensus_proposer::Proposer;
+use cumulus_client_network::RequireSecondedInBlockAnnounce;
 use cumulus_client_service::{
-	prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams,
+	build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks, DARecoveryProfile,
+	StartRelayChainTasksParams,
 };
-use cumulus_client_cli::CollatorOptions;
-use cumulus_client_network::BlockAnnounceValidator;
 use cumulus_primitives_core::ParaId;
-use cumulus_relay_chain_inprocess_interface::build_inprocess_relay_chain;
-use cumulus_relay_chain_interface::{RelayChainInterface, RelayChainResult};
-use cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node;
-
-// Substrate Imports
-use sp_api::{BlockT, HeaderT, ProvideRuntimeApi, StateBackend};
-use sc_executor::NativeElseWasmExecutor;
-use sc_executor::NativeExecutionDispatch;
+use cumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface};
+use fc_mapping_sync::{kv::MappingSyncWorker, EthereumBlockNotificationSinks, SyncStrategy};
+use fc_rpc::{
+	frontier_backend_client::SystemAccountId32StorageOverride, EthBlockDataCacheTask, EthConfig,
+	EthTask, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override, SchemaV2Override,
+	SchemaV3Override, StorageOverride,
+};
+use fc_rpc_core::types::{FeeHistoryCache, FilterPool};
+use fp_rpc::EthereumRuntimeRPCApi;
+use fp_storage::EthereumStorageSchema;
+use futures::{
+	stream::select,
+	task::{Context, Poll},
+	Stream, StreamExt,
+};
+use jsonrpsee::RpcModule;
+use polkadot_service::CollatorPair;
+use sc_client_api::{AuxStore, Backend, BlockOf, BlockchainEvents, StorageProvider};
+use sc_consensus::ImportQueue;
+use sc_executor::{NativeElseWasmExecutor, NativeExecutionDispatch};
 use sc_network::NetworkBlock;
 use sc_network_sync::SyncingService;
+use sc_rpc::SubscriptionTaskExecutor;
 use sc_service::{Configuration, PartialComponents, TaskManager};
 use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};
+use serde::{Deserialize, Serialize};
+use sp_api::{ProvideRuntimeApi, StateBackend};
+use sp_block_builder::BlockBuilder;
+use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
+use sp_consensus_aura::sr25519::AuthorityPair as AuraAuthorityPair;
+use sp_keystore::KeystorePtr;
 use sp_runtime::traits::BlakeTwo256;
 use substrate_prometheus_endpoint::Registry;
-use sc_client_api::{BlockchainEvents, BlockOf, Backend, AuxStore, StorageProvider};
-use sp_blockchain::{HeaderBackend, HeaderMetadata, Error as BlockChainError};
-use sc_consensus::ImportQueue;
-use sp_core::H256;
-use sp_block_builder::BlockBuilder;
-
-use polkadot_service::CollatorPair;
+use tokio::time::Interval;
+use up_common::types::{opaque::*, Nonce};
 
-// Frontier Imports
-use fc_rpc_core::types::FilterPool;
-use fc_mapping_sync::{kv::MappingSyncWorker, SyncStrategy};
-use fc_rpc::{
-	StorageOverride, OverrideHandle, SchemaV1Override, SchemaV2Override, SchemaV3Override,
-	RuntimeApiStorageOverride,
+use crate::{
+	chain_spec::RuntimeIdentification,
+	rpc::{create_eth, create_full, EthDeps, FullDeps},
 };
-use fp_rpc::EthereumRuntimeRPCApi;
-use fp_storage::EthereumStorageSchema;
-
-use up_common::types::opaque::*;
-
-use crate::chain_spec::RuntimeIdentification;
 
 /// Unique native executor instance.
 #[cfg(feature = "unique-runtime")]
@@ -185,7 +184,7 @@
 	}
 }
 
-pub fn open_frontier_backend<Block: BlockT, C: HeaderBackend<Block>>(
+pub fn open_frontier_backend<C: HeaderBackend<Block>>(
 	client: Arc<C>,
 	config: &Configuration,
 ) -> Result<Arc<fc_db::kv::Backend<Block>>, String> {
@@ -210,12 +209,42 @@
 type ParachainBlockImport<RuntimeApi, ExecutorDispatch> =
 	TParachainBlockImport<Block, Arc<FullClient<RuntimeApi, ExecutorDispatch>>, FullBackend>;
 
+/// Generate a supertrait based on bounds, and blanket impl for it.
+macro_rules! ez_bounds {
+	($vis:vis trait $name:ident$(<$($gen:ident $(: $($(+)? $bound:path)*)?),* $(,)?>)? $(:)? $($(+)? $super:path)* {}) => {
+		$vis trait $name $(<$($gen $(: $($bound+)*)?,)*>)?: $($super +)* {}
+		impl<T, $($($gen $(: $($bound+)*)?,)*)?> $name$(<$($gen,)*>)? for T
+		where T: $($super +)* {}
+	}
+}
+ez_bounds!(
+	pub trait RuntimeApiDep<Runtime: RuntimeInstance>:
+		sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
+		+ sp_consensus_aura::AuraApi<Block, AuraId>
+		+ fp_rpc::EthereumRuntimeRPCApi<Block>
+		+ sp_session::SessionKeys<Block>
+		+ sp_block_builder::BlockBuilder<Block>
+		+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
+		+ sp_api::ApiExt<Block>
+		+ up_rpc::UniqueApi<Block, Runtime::CrossAccountId, AccountId>
+		+ app_promotion_rpc::AppPromotionApi<Block, BlockNumber, Runtime::CrossAccountId, AccountId>
+		+ up_pov_estimate_rpc::PovEstimateApi<Block>
+		+ substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>
+		+ sp_api::Metadata<Block>
+		+ sp_offchain::OffchainWorkerApi<Block>
+		+ cumulus_primitives_core::CollectCollationInfo<Block>
+		// Deprecated, not used.
+		+ fp_rpc::ConvertTransactionRuntimeApi<Block>
+	{
+	}
+);
+
 /// Starts a `ServiceBuilder` for a full service.
 ///
 /// Use this macro if you don't actually need the full service, but just the builder in order to
 /// be able to perform chain operations.
 #[allow(clippy::type_complexity)]
-pub fn new_partial<RuntimeApi, ExecutorDispatch, BIQ>(
+pub fn new_partial<Runtime, RuntimeApi, ExecutorDispatch, BIQ>(
 	config: &Configuration,
 	build_import_queue: BIQ,
 ) -> Result<
@@ -223,7 +252,7 @@
 		FullClient<RuntimeApi, ExecutorDispatch>,
 		FullBackend,
 		FullSelectChain,
-		sc_consensus::DefaultImportQueue<Block, FullClient<RuntimeApi, ExecutorDispatch>>,
+		sc_consensus::DefaultImportQueue<Block>,
 		sc_transaction_pool::FullPool<Block, FullClient<RuntimeApi, ExecutorDispatch>>,
 		OtherPartial,
 	>,
@@ -235,7 +264,8 @@
 		+ Send
 		+ Sync
 		+ 'static,
-	RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>,
+	RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,
+	Runtime: RuntimeInstance,
 	ExecutorDispatch: NativeExecutionDispatch + 'static,
 	BIQ: FnOnce(
 		Arc<FullClient<RuntimeApi, ExecutorDispatch>>,
@@ -243,10 +273,7 @@
 		&Configuration,
 		Option<TelemetryHandle>,
 		&TaskManager,
-	) -> Result<
-		sc_consensus::DefaultImportQueue<Block, FullClient<RuntimeApi, ExecutorDispatch>>,
-		sc_service::Error,
-	>,
+	) -> Result<sc_consensus::DefaultImportQueue<Block>, sc_service::Error>,
 {
 	let telemetry = config
 		.telemetry_endpoints
@@ -319,35 +346,6 @@
 	Ok(params)
 }
 
-async fn build_relay_chain_interface(
-	polkadot_config: Configuration,
-	parachain_config: &Configuration,
-	telemetry_worker_handle: Option<TelemetryWorkerHandle>,
-	task_manager: &mut TaskManager,
-	collator_options: CollatorOptions,
-	hwbench: Option<sc_sysinfo::HwBench>,
-) -> RelayChainResult<(
-	Arc<(dyn RelayChainInterface + 'static)>,
-	Option<CollatorPair>,
-)> {
-	if collator_options.relay_chain_rpc_urls.is_empty() {
-		build_inprocess_relay_chain(
-			polkadot_config,
-			parachain_config,
-			telemetry_worker_handle,
-			task_manager,
-			hwbench,
-		)
-	} else {
-		build_minimal_relay_chain_node(
-			polkadot_config,
-			task_manager,
-			collator_options.relay_chain_rpc_urls,
-		)
-		.await
-	}
-}
-
 macro_rules! clone {
     ($($i:ident),* $(,)?) => {
 		$(
@@ -360,13 +358,11 @@
 ///
 /// This is the actual implementation that is abstract over the executor and the runtime api.
 #[sc_tracing::logging::prefix_logs_with("Parachain")]
-async fn start_node_impl<Runtime, RuntimeApi, ExecutorDispatch, BIQ, BIC>(
+pub async fn start_node<Runtime, RuntimeApi, ExecutorDispatch>(
 	parachain_config: Configuration,
 	polkadot_config: Configuration,
 	collator_options: CollatorOptions,
-	id: ParaId,
-	build_import_queue: BIQ,
-	build_consensus: BIC,
+	para_id: ParaId,
 	hwbench: Option<sc_sysinfo::HwBench>,
 ) -> sc_service::error::Result<(TaskManager, Arc<FullClient<RuntimeApi, ExecutorDispatch>>)>
 where
@@ -378,48 +374,16 @@
 		+ Send
 		+ Sync
 		+ 'static,
-	RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
-		+ fp_rpc::EthereumRuntimeRPCApi<Block>
-		+ fp_rpc::ConvertTransactionRuntimeApi<Block>
-		+ sp_session::SessionKeys<Block>
-		+ sp_block_builder::BlockBuilder<Block>
-		+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
-		+ sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>
-		+ up_rpc::UniqueApi<Block, Runtime::CrossAccountId, AccountId>
-		+ app_promotion_rpc::AppPromotionApi<Block, BlockNumber, Runtime::CrossAccountId, AccountId>
-		+ up_pov_estimate_rpc::PovEstimateApi<Block>
-		+ substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index>
-		+ sp_api::Metadata<Block>
-		+ sp_offchain::OffchainWorkerApi<Block>
-		+ cumulus_primitives_core::CollectCollationInfo<Block>,
+	RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,
+	Runtime: RuntimeInstance,
 	ExecutorDispatch: NativeExecutionDispatch + 'static,
-	BIQ: FnOnce(
-		Arc<FullClient<RuntimeApi, ExecutorDispatch>>,
-		Arc<FullBackend>,
-		&Configuration,
-		Option<TelemetryHandle>,
-		&TaskManager,
-	) -> Result<
-		sc_consensus::DefaultImportQueue<Block, FullClient<RuntimeApi, ExecutorDispatch>>,
-		sc_service::Error,
-	>,
-	BIC: FnOnce(
-		Arc<FullClient<RuntimeApi, ExecutorDispatch>>,
-		Arc<FullBackend>,
-		Option<&Registry>,
-		Option<TelemetryHandle>,
-		&TaskManager,
-		Arc<dyn RelayChainInterface>,
-		Arc<sc_transaction_pool::FullPool<Block, FullClient<RuntimeApi, ExecutorDispatch>>>,
-		Arc<SyncingService<Block>>,
-		KeystorePtr,
-		bool,
-	) -> Result<Box<dyn ParachainConsensus<Block>>, sc_service::Error>,
 {
 	let parachain_config = prepare_node_config(parachain_config);
 
-	let params =
-		new_partial::<RuntimeApi, ExecutorDispatch, BIQ>(&parachain_config, build_import_queue)?;
+	let params = new_partial::<Runtime, RuntimeApi, ExecutorDispatch, _>(
+		&parachain_config,
+		parachain_build_import_queue,
+	)?;
 	let OtherPartial {
 		mut telemetry,
 		telemetry_worker_handle,
@@ -443,9 +407,9 @@
 	.await
 	.map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?;
 
-	let block_announce_validator = BlockAnnounceValidator::new(relay_chain_interface.clone(), id);
+	let block_announce_validator =
+		RequireSecondedInBlockAnnounce::new(relay_chain_interface.clone(), para_id);
 
-	let force_authoring = parachain_config.force_authoring;
 	let validator = parachain_config.role.is_authority();
 	let prometheus_registry = parachain_config.prometheus_registry().cloned();
 	let transaction_pool = params.transaction_pool.clone();
@@ -531,7 +495,7 @@
 
 			let mut rpc_handle = RpcModule::new(());
 
-			let full_deps = unique_rpc::FullDeps {
+			let full_deps = FullDeps {
 				client: client.clone(),
 				runtime_id,
 
@@ -551,9 +515,9 @@
 				select_chain,
 			};
 
-			unique_rpc::create_full::<_, _, _, Runtime, RuntimeApi, _>(&mut rpc_handle, full_deps)?;
+			create_full::<_, _, _, Runtime, RuntimeApi, _>(&mut rpc_handle, full_deps)?;
 
-			let eth_deps = unique_rpc::EthDeps {
+			let eth_deps = EthDeps {
 				client,
 				graph: transaction_pool.pool().clone(),
 				pool: transaction_pool,
@@ -571,9 +535,18 @@
 				eth_pubsub_notification_sinks,
 				overrides,
 				sync: sync_service.clone(),
+				pending_create_inherent_data_providers: |_, ()| async move { Ok(()) },
 			};
 
-			unique_rpc::create_eth(
+			create_eth::<
+				_,
+				_,
+				_,
+				_,
+				_,
+				_,
+				DefaultEthConfig<FullClient<RuntimeApi, ExecutorDispatch>>,
+			>(
 				&mut rpc_handle,
 				eth_deps,
 				subscription_task_executor.clone(),
@@ -624,8 +597,25 @@
 		.overseer_handle()
 		.map_err(|e| sc_service::Error::Application(Box::new(e)))?;
 
+	start_relay_chain_tasks(StartRelayChainTasksParams {
+		client: client.clone(),
+		announce_block: announce_block.clone(),
+		para_id,
+		relay_chain_interface: relay_chain_interface.clone(),
+		task_manager: &mut task_manager,
+		da_recovery_profile: if validator {
+			DARecoveryProfile::Collator
+		} else {
+			DARecoveryProfile::FullNode
+		},
+		import_queue: import_queue_service,
+		relay_chain_slot_duration,
+		recovery_handle: Box::new(overseer_handle.clone()),
+		sync_service: sync_service.clone(),
+	})?;
+
 	if validator {
-		let parachain_consensus = build_consensus(
+		start_consensus(
 			client.clone(),
 			backend.clone(),
 			prometheus_registry.as_ref(),
@@ -635,42 +625,12 @@
 			transaction_pool,
 			sync_service.clone(),
 			params.keystore_container.keystore(),
-			force_authoring,
-		)?;
-
-		let spawner = task_manager.spawn_handle();
-
-		let params = StartCollatorParams {
-			para_id: id,
-			block_status: client.clone(),
-			announce_block,
-			client: client.clone(),
-			task_manager: &mut task_manager,
-			spawner,
-			parachain_consensus,
-			import_queue: import_queue_service,
-			collator_key: collator_key.expect("Command line arguments do not allow this. qed"),
-			relay_chain_interface,
+			overseer_handle,
 			relay_chain_slot_duration,
-			recovery_handle: Box::new(overseer_handle),
-			sync_service,
-		};
-
-		start_collator(params).await?;
-	} else {
-		let params = StartFullNodeParams {
-			client: client.clone(),
+			para_id,
+			collator_key.expect("cli args do not allow this"),
 			announce_block,
-			task_manager: &mut task_manager,
-			para_id: id,
-			import_queue: import_queue_service,
-			relay_chain_interface,
-			relay_chain_slot_duration,
-			recovery_handle: Box::new(overseer_handle),
-			sync_service,
-		};
-
-		start_full_node(params)?;
+		)?;
 	}
 
 	start_network.start_network();
@@ -679,25 +639,20 @@
 }
 
 /// Build the import queue for the the parachain runtime.
-pub fn parachain_build_import_queue<RuntimeApi, ExecutorDispatch>(
+pub fn parachain_build_import_queue<Runtime, RuntimeApi, ExecutorDispatch>(
 	client: Arc<FullClient<RuntimeApi, ExecutorDispatch>>,
 	backend: Arc<FullBackend>,
 	config: &Configuration,
 	telemetry: Option<TelemetryHandle>,
 	task_manager: &TaskManager,
-) -> Result<
-	sc_consensus::DefaultImportQueue<Block, FullClient<RuntimeApi, ExecutorDispatch>>,
-	sc_service::Error,
->
+) -> Result<sc_consensus::DefaultImportQueue<Block>, sc_service::Error>
 where
 	RuntimeApi: sp_api::ConstructRuntimeApi<Block, FullClient<RuntimeApi, ExecutorDispatch>>
 		+ Send
 		+ Sync
 		+ 'static,
-	RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
-		+ sp_block_builder::BlockBuilder<Block>
-		+ sp_consensus_aura::AuraApi<Block, AuraId>
-		+ sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>,
+	RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,
+	Runtime: RuntimeInstance,
 	ExecutorDispatch: NativeExecutionDispatch + 'static,
 {
 	let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;
@@ -732,120 +687,81 @@
 	.map_err(Into::into)
 }
 
-/// Start a normal parachain node.
-pub async fn start_node<Runtime, RuntimeApi, ExecutorDispatch>(
-	parachain_config: Configuration,
-	polkadot_config: Configuration,
-	collator_options: CollatorOptions,
-	id: ParaId,
-	hwbench: Option<sc_sysinfo::HwBench>,
-) -> sc_service::error::Result<(TaskManager, Arc<FullClient<RuntimeApi, ExecutorDispatch>>)>
+pub fn start_consensus<ExecutorDispatch, RuntimeApi, Runtime>(
+	client: Arc<FullClient<RuntimeApi, ExecutorDispatch>>,
+	backend: Arc<FullBackend>,
+	prometheus_registry: Option<&Registry>,
+	telemetry: Option<TelemetryHandle>,
+	task_manager: &TaskManager,
+	relay_chain_interface: Arc<dyn RelayChainInterface>,
+	transaction_pool: Arc<
+		sc_transaction_pool::FullPool<Block, FullClient<RuntimeApi, ExecutorDispatch>>,
+	>,
+	sync_oracle: Arc<SyncingService<Block>>,
+	keystore: KeystorePtr,
+	overseer_handle: OverseerHandle,
+	relay_chain_slot_duration: Duration,
+	para_id: ParaId,
+	collator_key: CollatorPair,
+	announce_block: Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>,
+) -> Result<(), sc_service::Error>
 where
-	Runtime: RuntimeInstance + Send + Sync + 'static,
-	<Runtime as RuntimeInstance>::CrossAccountId: Serialize,
-	for<'de> <Runtime as RuntimeInstance>::CrossAccountId: Deserialize<'de>,
+	ExecutorDispatch: NativeExecutionDispatch + 'static,
 	RuntimeApi: sp_api::ConstructRuntimeApi<Block, FullClient<RuntimeApi, ExecutorDispatch>>
 		+ Send
 		+ Sync
 		+ 'static,
-	RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
-		+ fp_rpc::EthereumRuntimeRPCApi<Block>
-		+ fp_rpc::ConvertTransactionRuntimeApi<Block>
-		+ sp_session::SessionKeys<Block>
-		+ sp_block_builder::BlockBuilder<Block>
-		+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
-		+ sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>
-		+ up_rpc::UniqueApi<Block, Runtime::CrossAccountId, AccountId>
-		+ app_promotion_rpc::AppPromotionApi<Block, BlockNumber, Runtime::CrossAccountId, AccountId>
-		+ up_pov_estimate_rpc::PovEstimateApi<Block>
-		+ substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index>
-		+ sp_api::Metadata<Block>
-		+ sp_offchain::OffchainWorkerApi<Block>
-		+ cumulus_primitives_core::CollectCollationInfo<Block>
-		+ sp_consensus_aura::AuraApi<Block, AuraId>,
-	ExecutorDispatch: NativeExecutionDispatch + 'static,
+	RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,
+	Runtime: RuntimeInstance,
 {
-	start_node_impl::<Runtime, RuntimeApi, ExecutorDispatch, _, _>(
-		parachain_config,
-		polkadot_config,
-		collator_options,
-		id,
-		parachain_build_import_queue,
-		|client,
-		 backend,
-		 prometheus_registry,
-		 telemetry,
-		 task_manager,
-		 relay_chain_interface,
-		 transaction_pool,
-		 sync_oracle,
-		 keystore,
-		 force_authoring| {
-			let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;
+	let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;
 
-			let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording(
-				task_manager.spawn_handle(),
-				client.clone(),
-				transaction_pool,
-				prometheus_registry,
-				telemetry.clone(),
-			);
+	let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording(
+		task_manager.spawn_handle(),
+		client.clone(),
+		transaction_pool,
+		prometheus_registry,
+		telemetry.clone(),
+	);
+	let proposer = Proposer::new(proposer_factory);
 
-			let block_import = ParachainBlockImport::new(client.clone(), backend);
+	let collator_service = CollatorService::new(
+		client.clone(),
+		Arc::new(task_manager.spawn_handle()),
+		announce_block,
+		client.clone(),
+	);
 
-			Ok(AuraConsensus::build::<
-				sp_consensus_aura::sr25519::AuthorityPair,
-				_,
-				_,
-				_,
-				_,
-				_,
-				_,
-			>(BuildAuraConsensusParams {
-				proposer_factory,
-				create_inherent_data_providers: move |_, (relay_parent, validation_data)| {
-					let relay_chain_interface = relay_chain_interface.clone();
-					async move {
-						let parachain_inherent =
-						cumulus_primitives_parachain_inherent::ParachainInherentData::create_at(
-							relay_parent,
-							&relay_chain_interface,
-							&validation_data,
-							id,
-						).await;
+	let block_import = ParachainBlockImport::new(client.clone(), backend);
 
-						let time = sp_timestamp::InherentDataProvider::from_system_time();
-
-						let slot =
-						sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
-							*time,
-							slot_duration,
-						);
+	let params = BuildAuraConsensusParams {
+		create_inherent_data_providers: move |_, ()| async move { Ok(()) },
+		block_import,
+		para_client: client,
+		#[cfg(feature = "lookahead")]
+		para_backend: backend,
+		para_id,
+		relay_client: relay_chain_interface,
+		sync_oracle,
+		keystore,
+		slot_duration,
+		proposer,
+		collator_service,
+		// With async-baking, we allowed to be both slower (longer authoring) and faster (multiple para blocks per relay block)
+		authoring_duration: Duration::from_millis(500),
+		overseer_handle,
+		#[cfg(feature = "lookahead")]
+		code_hash_provider: || {},
+		collator_key,
+		relay_chain_slot_duration,
+	};
 
-						let parachain_inherent = parachain_inherent.ok_or_else(|| {
-							Box::<dyn std::error::Error + Send + Sync>::from(
-								"Failed to create parachain inherent",
-							)
-						})?;
-						Ok((slot, time, parachain_inherent))
-					}
-				},
-				block_import,
-				para_client: client,
-				backoff_authoring_blocks: Option::<()>::None,
-				sync_oracle,
-				keystore,
-				force_authoring,
-				slot_duration,
-				// We got around 500ms for proposing
-				block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32),
-				telemetry,
-				max_block_proposal_slot_portion: None,
-			}))
-		},
-		hwbench,
-	)
-	.await
+	task_manager.spawn_essential_handle().spawn(
+		"aura",
+		None,
+		run_aura::<_, AuraAuthorityPair, _, _, _, _, _, _, _>(params),
+	);
+	Ok(())
 }
 
 fn dev_build_import_queue<RuntimeApi, ExecutorDispatch>(
@@ -854,17 +770,14 @@
 	config: &Configuration,
 	_: Option<TelemetryHandle>,
 	task_manager: &TaskManager,
-) -> Result<
-	sc_consensus::DefaultImportQueue<Block, FullClient<RuntimeApi, ExecutorDispatch>>,
-	sc_service::Error,
->
+) -> Result<sc_consensus::DefaultImportQueue<Block>, sc_service::Error>
 where
 	RuntimeApi: sp_api::ConstructRuntimeApi<Block, FullClient<RuntimeApi, ExecutorDispatch>>
 		+ Send
 		+ Sync
 		+ 'static,
-	RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
-		+ sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>,
+	RuntimeApi::RuntimeApi:
+		sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> + sp_api::ApiExt<Block>,
 	ExecutorDispatch: NativeExecutionDispatch + 'static,
 {
 	Ok(sc_consensus_manual_seal::import_queue(
@@ -881,6 +794,15 @@
 	pub eth_backend: Arc<fc_db::kv::Backend<Block>>,
 }
 
+struct DefaultEthConfig<C>(PhantomData<C>);
+impl<C> EthConfig<Block, C> for DefaultEthConfig<C>
+where
+	C: StorageProvider<Block, FullBackend> + Sync + Send + 'static,
+{
+	type EstimateGasAdapter = ();
+	type RuntimeStorageOverride = SystemAccountId32StorageOverride<Block, C, FullBackend>;
+}
+
 /// Builds a new development service. This service uses instant seal, and mocks
 /// the parachain inherent
 pub fn start_dev_node<Runtime, RuntimeApi, ExecutorDispatch>(
@@ -897,28 +819,14 @@
 		+ Send
 		+ Sync
 		+ 'static,
-	RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
-		+ fp_rpc::EthereumRuntimeRPCApi<Block>
-		+ fp_rpc::ConvertTransactionRuntimeApi<Block>
-		+ sp_session::SessionKeys<Block>
-		+ sp_block_builder::BlockBuilder<Block>
-		+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
-		+ sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>
-		+ up_rpc::UniqueApi<Block, Runtime::CrossAccountId, AccountId>
-		+ app_promotion_rpc::AppPromotionApi<Block, BlockNumber, Runtime::CrossAccountId, AccountId>
-		+ up_pov_estimate_rpc::PovEstimateApi<Block>
-		+ substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index>
-		+ sp_api::Metadata<Block>
-		+ sp_offchain::OffchainWorkerApi<Block>
-		+ cumulus_primitives_core::CollectCollationInfo<Block>
-		+ sp_consensus_aura::AuraApi<Block, AuraId>,
+	RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,
 	ExecutorDispatch: NativeExecutionDispatch + 'static,
 {
+	use fc_consensus::FrontierBlockImport;
 	use sc_consensus_manual_seal::{
-		run_manual_seal, run_delayed_finalize, EngineCommand, ManualSealParams,
-		DelayedFinalizeParams,
+		run_delayed_finalize, run_manual_seal, DelayedFinalizeParams, EngineCommand,
+		ManualSealParams,
 	};
-	use fc_consensus::FrontierBlockImport;
 
 	let sc_service::PartialComponents {
 		client,
@@ -935,7 +843,7 @@
 				eth_backend,
 				telemetry_worker_handle: _,
 			},
-	} = new_partial::<RuntimeApi, ExecutorDispatch, _>(
+	} = new_partial::<Runtime, RuntimeApi, ExecutorDispatch, _>(
 		&config,
 		dev_build_import_queue::<RuntimeApi, ExecutorDispatch>,
 	)?;
@@ -954,15 +862,6 @@
 			warp_sync_params: None,
 		})?;
 
-	if config.offchain_worker.enabled {
-		sc_service::build_offchain_workers(
-			&config,
-			task_manager.spawn_handle(),
-			client.clone(),
-			network.clone(),
-		);
-	}
-
 	let collator = config.role.is_authority();
 
 	let select_chain = maybe_select_chain;
@@ -1141,7 +1040,7 @@
 
 			let mut rpc_module = RpcModule::new(());
 
-			let full_deps = unique_rpc::FullDeps {
+			let full_deps = FullDeps {
 				runtime_id,
 
 				#[cfg(feature = "pov-estimate")]
@@ -1161,9 +1060,9 @@
 				select_chain,
 			};
 
-			unique_rpc::create_full::<_, _, _, Runtime, RuntimeApi, _>(&mut rpc_module, full_deps)?;
+			create_full::<_, _, _, Runtime, RuntimeApi, _>(&mut rpc_module, full_deps)?;
 
-			let eth_deps = unique_rpc::EthDeps {
+			let eth_deps = EthDeps {
 				client,
 				graph: transaction_pool.pool().clone(),
 				pool: transaction_pool,
@@ -1181,9 +1080,19 @@
 				eth_pubsub_notification_sinks,
 				overrides,
 				sync: sync_service.clone(),
+				// We don't have any inherents except parachain built-ins, which we can't even extract from inside `run_aura`.
+				pending_create_inherent_data_providers: |_, ()| async move { Ok(()) },
 			};
 
-			unique_rpc::create_eth(
+			create_eth::<
+				_,
+				_,
+				_,
+				_,
+				_,
+				_,
+				DefaultEthConfig<FullClient<RuntimeApi, ExecutorDispatch>>,
+			>(
 				&mut rpc_module,
 				eth_deps,
 				subscription_task_executor.clone(),
@@ -1241,37 +1150,35 @@
 	})
 }
 
-pub struct FrontierTaskParams<'a, B: BlockT, C, BE> {
+pub struct FrontierTaskParams<'a, C, B> {
 	pub task_manager: &'a TaskManager,
 	pub client: Arc<C>,
-	pub substrate_backend: Arc<BE>,
-	pub eth_backend: Arc<fc_db::kv::Backend<B>>,
+	pub substrate_backend: Arc<B>,
+	pub eth_backend: Arc<fc_db::kv::Backend<Block>>,
 	pub eth_filter_pool: Option<FilterPool>,
-	pub overrides: Arc<OverrideHandle<B>>,
+	pub overrides: Arc<OverrideHandle<Block>>,
 	pub fee_history_limit: u64,
 	pub fee_history_cache: FeeHistoryCache,
 	pub sync_strategy: SyncStrategy,
 	pub prometheus_registry: Option<Registry>,
 }
 
-pub fn spawn_frontier_tasks<B, C, BE>(
-	params: FrontierTaskParams<B, C, BE>,
-	sync: Arc<SyncingService<B>>,
+pub fn spawn_frontier_tasks<C, B>(
+	params: FrontierTaskParams<C, B>,
+	sync: Arc<SyncingService<Block>>,
 	pubsub_notification_sinks: Arc<
-		EthereumBlockNotificationSinks<fc_mapping_sync::EthereumBlockNotification<B>>,
+		EthereumBlockNotificationSinks<fc_mapping_sync::EthereumBlockNotification<Block>>,
 	>,
-) -> Arc<EthBlockDataCacheTask<B>>
+) -> Arc<EthBlockDataCacheTask<Block>>
 where
-	C: ProvideRuntimeApi<B> + BlockOf,
-	C: HeaderBackend<B> + HeaderMetadata<B, Error = BlockChainError> + 'static,
-	C: BlockchainEvents<B> + StorageProvider<B, BE>,
+	C: ProvideRuntimeApi<Block> + BlockOf,
+	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,
+	C: BlockchainEvents<Block> + StorageProvider<Block, B>,
 	C: Send + Sync + 'static,
-	C::Api: EthereumRuntimeRPCApi<B>,
-	C::Api: BlockBuilder<B>,
-	B: BlockT<Hash = H256> + Send + Sync + 'static,
-	B::Header: HeaderT<Number = u32>,
-	BE: Backend<B> + 'static,
-	BE::State: StateBackend<BlakeTwo256>,
+	C::Api: EthereumRuntimeRPCApi<Block>,
+	C::Api: BlockBuilder<Block>,
+	B: Backend<Block> + 'static,
+	B::State: StateBackend<BlakeTwo256>,
 {
 	let FrontierTaskParams {
 		task_manager,
deletednode/rpc/CHANGELOG.mddiffbeforeafterboth
--- a/node/rpc/CHANGELOG.md
+++ /dev/null
@@ -1,15 +0,0 @@
-<!-- bureaucrate goes here -->
-## [v0.1.2] 2022-09-08
-
-### Added
--  Support RPC for `AppPromotion` pallet. 
-
-## [v0.1.1] 2022-08-16
-
-### Other changes
-
-- build: Upgrade polkadot to v0.9.27 2c498572636f2b34d53b1c51b7283a761a7dc90a
-
-- build: Upgrade polkadot to v0.9.26 85515e54c4ca1b82a2630034e55dcc804c643bf8
-
-- build: Upgrade polkadot to v0.9.25 cdfb9bdc7b205ff1b5134f034ef9973d769e5e6b
\ No newline at end of file
deletednode/rpc/Cargo.tomldiffbeforeafterboth
--- a/node/rpc/Cargo.toml
+++ /dev/null
@@ -1,48 +0,0 @@
-[package]
-authors = ['Unique Network <support@uniquenetwork.io>']
-description = "Unique chain rpc"
-edition = "2021"
-license = 'GPLv3'
-name = "unique-rpc"
-version = "0.1.2"
-
-[package.metadata.docs.rs]
-targets = ["x86_64-unknown-linux-gnu"]
-
-[dependencies]
-jsonrpsee = { workspace = true }
-# pallet-contracts-rpc = { git = 'https://github.com/paritytech/substrate', branch = 'master' }
-pallet-transaction-payment-rpc = { workspace = true }
-sc-client-api = { workspace = true }
-sc-network = { workspace = true }
-sc-network-sync = { workspace = true }
-sc-rpc = { workspace = true }
-sc-rpc-api = { workspace = true }
-sc-service = { workspace = true }
-sc-transaction-pool = { workspace = true }
-sp-api = { workspace = true }
-sp-block-builder = { workspace = true }
-sp-blockchain = { workspace = true }
-sp-runtime = { workspace = true }
-substrate-frame-rpc-system = { workspace = true }
-
-fc-db = { workspace = true }
-fc-rpc = { workspace = true }
-fc-rpc-core = { workspace = true }
-fc-mapping-sync = { workspace = true }
-fp-rpc = { workspace = true }
-fp-storage = { workspace = true }
-
-app-promotion-rpc = { workspace = true }
-serde = { workspace = true }
-uc-rpc = { workspace = true }
-up-common = { workspace = true }
-up-data-structs = { workspace = true }
-up-pov-estimate-rpc = { workspace = true, default-features = true }
-up-rpc = { workspace = true }
-pallet-ethereum.workspace = true
-
-[features]
-default = []
-pov-estimate = ['uc-rpc/pov-estimate']
-std = []
deletednode/rpc/src/lib.rsdiffbeforeafterboth
--- a/node/rpc/src/lib.rs
+++ /dev/null
@@ -1,339 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-use fc_mapping_sync::{EthereumBlockNotificationSinks, EthereumBlockNotification};
-use sp_runtime::traits::BlakeTwo256;
-use fc_rpc::{
-	EthBlockDataCacheTask, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override,
-	StorageOverride, SchemaV2Override, SchemaV3Override,
-};
-use jsonrpsee::RpcModule;
-use fc_rpc_core::types::{FilterPool, FeeHistoryCache};
-use fp_storage::EthereumStorageSchema;
-use sc_client_api::{
-	backend::{AuxStore, StorageProvider},
-	client::BlockchainEvents,
-	StateBackend, Backend,
-};
-use sc_network::NetworkService;
-use sc_network_sync::SyncingService;
-use sc_rpc::SubscriptionTaskExecutor;
-pub use sc_rpc_api::DenyUnsafe;
-use sc_transaction_pool::{ChainApi, Pool};
-use sp_api::ProvideRuntimeApi;
-use sp_block_builder::BlockBuilder;
-use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
-use sc_service::TransactionPool;
-use std::{collections::BTreeMap, sync::Arc};
-
-use up_common::types::opaque::*;
-
-#[cfg(feature = "pov-estimate")]
-type FullBackend = sc_service::TFullBackend<Block>;
-
-/// Full client dependencies.
-pub struct FullDeps<C, P, SC> {
-	/// The client instance to use.
-	pub client: Arc<C>,
-	/// Transaction pool instance.
-	pub pool: Arc<P>,
-	/// The SelectChain Strategy
-	pub select_chain: SC,
-	/// Whether to deny unsafe calls
-	pub deny_unsafe: DenyUnsafe,
-
-	/// Runtime identification (read from the chain spec)
-	pub runtime_id: RuntimeId,
-	/// Executor params for PoV estimating
-	#[cfg(feature = "pov-estimate")]
-	pub exec_params: uc_rpc::pov_estimate::ExecutorParams,
-	/// Substrate Backend.
-	#[cfg(feature = "pov-estimate")]
-	pub backend: Arc<FullBackend>,
-}
-
-pub fn overrides_handle<C, BE, R>(client: Arc<C>) -> Arc<OverrideHandle<Block>>
-where
-	C: ProvideRuntimeApi<Block> + StorageProvider<Block, BE> + AuxStore,
-	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError>,
-	C: Send + Sync + 'static,
-	C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,
-	C::Api: up_rpc::UniqueApi<Block, <R as RuntimeInstance>::CrossAccountId, AccountId>,
-	BE: Backend<Block> + 'static,
-	BE::State: StateBackend<BlakeTwo256>,
-	R: RuntimeInstance + Send + Sync + 'static,
-{
-	let mut overrides_map = BTreeMap::new();
-	overrides_map.insert(
-		EthereumStorageSchema::V1,
-		Box::new(SchemaV1Override::new(client.clone())) as Box<dyn StorageOverride<_> + 'static>,
-	);
-	overrides_map.insert(
-		EthereumStorageSchema::V2,
-		Box::new(SchemaV2Override::new(client.clone())) as Box<dyn StorageOverride<_> + 'static>,
-	);
-	overrides_map.insert(
-		EthereumStorageSchema::V3,
-		Box::new(SchemaV3Override::new(client.clone())) as Box<dyn StorageOverride<_> + 'static>,
-	);
-
-	Arc::new(OverrideHandle {
-		schemas: overrides_map,
-		fallback: Box::new(RuntimeApiStorageOverride::new(client)),
-	})
-}
-
-/// Instantiate all Full RPC extensions.
-pub fn create_full<C, P, SC, R, A, B>(
-	io: &mut RpcModule<()>,
-	deps: FullDeps<C, P, SC>,
-) -> Result<(), Box<dyn std::error::Error + Send + Sync>>
-where
-	C: ProvideRuntimeApi<Block> + StorageProvider<Block, B> + AuxStore,
-	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,
-	C: Send + Sync + 'static,
-	C: BlockchainEvents<Block>,
-	C::Api: substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index>,
-	C::Api: BlockBuilder<Block>,
-	// C::Api: pallet_contracts_rpc::ContractsRuntimeApi<Block, AccountId, Balance, BlockNumber, Hash>,
-	C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
-	C::Api: up_rpc::UniqueApi<Block, <R as RuntimeInstance>::CrossAccountId, AccountId>,
-	C::Api: app_promotion_rpc::AppPromotionApi<
-		Block,
-		BlockNumber,
-		<R as RuntimeInstance>::CrossAccountId,
-		AccountId,
-	>,
-	C::Api: up_pov_estimate_rpc::PovEstimateApi<Block>,
-	B: sc_client_api::Backend<Block> + Send + Sync + 'static,
-	B::State: sc_client_api::backend::StateBackend<sp_runtime::traits::HashFor<Block>>,
-	P: TransactionPool<Block = Block> + 'static,
-	R: RuntimeInstance + Send + Sync + 'static,
-	<R as RuntimeInstance>::CrossAccountId: serde::Serialize,
-	C: sp_api::CallApiAt<
-		sp_runtime::generic::Block<
-			sp_runtime::generic::Header<u32, BlakeTwo256>,
-			sp_runtime::OpaqueExtrinsic,
-		>,
-	>,
-	for<'de> <R as RuntimeInstance>::CrossAccountId: serde::Deserialize<'de>,
-{
-	use uc_rpc::{UniqueApiServer, Unique};
-
-	use uc_rpc::{AppPromotionApiServer, AppPromotion};
-
-	#[cfg(feature = "pov-estimate")]
-	use uc_rpc::pov_estimate::{PovEstimateApiServer, PovEstimate};
-
-	// use pallet_contracts_rpc::{Contracts, ContractsApi};
-	use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
-	use substrate_frame_rpc_system::{System, SystemApiServer};
-
-	let FullDeps {
-		client,
-		pool,
-		select_chain: _,
-		deny_unsafe,
-
-		runtime_id: _,
-
-		#[cfg(feature = "pov-estimate")]
-		exec_params,
-
-		#[cfg(feature = "pov-estimate")]
-		backend,
-	} = deps;
-
-	io.merge(System::new(Arc::clone(&client), Arc::clone(&pool), deny_unsafe).into_rpc())?;
-	io.merge(TransactionPayment::new(Arc::clone(&client)).into_rpc())?;
-
-	io.merge(Unique::new(client.clone()).into_rpc())?;
-
-	io.merge(AppPromotion::new(client).into_rpc())?;
-
-	#[cfg(feature = "pov-estimate")]
-	io.merge(
-		PovEstimate::new(
-			client.clone(),
-			backend,
-			deny_unsafe,
-			exec_params,
-			runtime_id,
-		)
-		.into_rpc(),
-	)?;
-
-	Ok(())
-}
-
-pub struct EthDeps<C, P, CA: ChainApi> {
-	/// The client instance to use.
-	pub client: Arc<C>,
-	/// Transaction pool instance.
-	pub pool: Arc<P>,
-	/// Graph pool instance.
-	pub graph: Arc<Pool<CA>>,
-	/// Syncing service
-	pub sync: Arc<SyncingService<Block>>,
-	/// The Node authority flag
-	pub is_authority: bool,
-	/// Network service
-	pub network: Arc<NetworkService<Block, Hash>>,
-
-	/// Ethereum Backend.
-	pub eth_backend: Arc<dyn fc_db::BackendReader<Block> + Send + Sync>,
-	/// Maximum number of logs in a query.
-	pub max_past_logs: u32,
-	/// Maximum fee history cache size.
-	pub fee_history_limit: u64,
-	/// Fee history cache.
-	pub fee_history_cache: FeeHistoryCache,
-	pub eth_block_data_cache: Arc<EthBlockDataCacheTask<Block>>,
-	/// EthFilterApi pool.
-	pub eth_filter_pool: Option<FilterPool>,
-	pub eth_pubsub_notification_sinks:
-		Arc<EthereumBlockNotificationSinks<EthereumBlockNotification<Block>>>,
-	/// Whether to enable eth dev signer
-	pub enable_dev_signer: bool,
-
-	pub overrides: Arc<OverrideHandle<Block>>,
-}
-
-/// This converter is never used, but we have a generic
-/// Option<T>, where T should implement ConvertTransaction
-///
-/// TODO: remove after never-type (`!`) stabilization
-enum NeverConvert {}
-impl<T> fp_rpc::ConvertTransaction<T> for NeverConvert {
-	fn convert_transaction(&self, _transaction: pallet_ethereum::Transaction) -> T {
-		unreachable!()
-	}
-}
-
-pub fn create_eth<C, P, CA, B>(
-	io: &mut RpcModule<()>,
-	deps: EthDeps<C, P, CA>,
-	subscription_task_executor: SubscriptionTaskExecutor,
-) -> Result<(), Box<dyn std::error::Error + Send + Sync>>
-where
-	C: ProvideRuntimeApi<Block> + StorageProvider<Block, B> + AuxStore,
-	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,
-	C: Send + Sync + 'static,
-	C: BlockchainEvents<Block>,
-	C::Api: BlockBuilder<Block>,
-	C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,
-	C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>,
-	P: TransactionPool<Block = Block> + 'static,
-	CA: ChainApi<Block = Block> + 'static,
-	B: sc_client_api::Backend<Block> + Send + Sync + 'static,
-	C: sp_api::CallApiAt<
-		sp_runtime::generic::Block<
-			sp_runtime::generic::Header<u32, BlakeTwo256>,
-			sp_runtime::OpaqueExtrinsic,
-		>,
-	>,
-{
-	use fc_rpc::{
-		Eth, EthApiServer, EthDevSigner, EthFilter, EthFilterApiServer, EthPubSub,
-		EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer, TxPool,
-		TxPoolApiServer,
-	};
-
-	let EthDeps {
-		client,
-		pool,
-		graph,
-		eth_backend,
-		max_past_logs,
-		fee_history_limit,
-		fee_history_cache,
-		eth_block_data_cache,
-		eth_filter_pool,
-		eth_pubsub_notification_sinks,
-		enable_dev_signer,
-		sync,
-		is_authority,
-		network,
-		overrides,
-	} = deps;
-
-	let mut signers = Vec::new();
-	if enable_dev_signer {
-		signers.push(Box::new(EthDevSigner::new()) as Box<dyn EthSigner>);
-	}
-	let execute_gas_limit_multiplier = 10;
-	io.merge(
-		Eth::new(
-			client.clone(),
-			pool.clone(),
-			graph.clone(),
-			// We have no runtimes old enough to only accept converted transactions
-			None::<NeverConvert>,
-			sync.clone(),
-			signers,
-			overrides.clone(),
-			eth_backend.clone(),
-			is_authority,
-			eth_block_data_cache.clone(),
-			fee_history_cache,
-			fee_history_limit,
-			execute_gas_limit_multiplier,
-			None,
-		)
-		.into_rpc(),
-	)?;
-
-	let tx_pool = TxPool::new(client.clone(), graph);
-
-	if let Some(filter_pool) = eth_filter_pool {
-		io.merge(
-			EthFilter::new(
-				client.clone(),
-				eth_backend,
-				tx_pool.clone(),
-				filter_pool,
-				500_usize, // max stored filters
-				max_past_logs,
-				eth_block_data_cache,
-			)
-			.into_rpc(),
-		)?;
-	}
-	io.merge(
-		Net::new(
-			client.clone(),
-			network,
-			// Whether to format the `peer_count` response as Hex (default) or not.
-			true,
-		)
-		.into_rpc(),
-	)?;
-	io.merge(Web3::new(client.clone()).into_rpc())?;
-	io.merge(
-		EthPubSub::new(
-			pool,
-			client,
-			sync,
-			subscription_task_executor,
-			overrides,
-			eth_pubsub_notification_sinks,
-		)
-		.into_rpc(),
-	)?;
-	io.merge(tx_pool.into_rpc())?;
-
-	Ok(())
-}
modifiedpallets/app-promotion/Cargo.tomldiffbeforeafterboth
--- a/pallets/app-promotion/Cargo.toml
+++ b/pallets/app-promotion/Cargo.toml
@@ -23,11 +23,11 @@
 	# 'pallet-unique/runtime-benchmarks',
 ]
 std = [
-	'codec/std',
 	'frame-benchmarking/std',
 	'frame-support/std',
 	'frame-system/std',
 	'pallet-evm/std',
+	'parity-scale-codec/std',
 	'sp-core/std',
 	'sp-runtime/std',
 	'sp-std/std',
@@ -39,9 +39,7 @@
 ################################################################################
 # Substrate Dependencies
 
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
 
 frame-benchmarking = { workspace = true, optional = true }
@@ -68,4 +66,4 @@
 ################################################################################
 # Other
 
-log = { version = "0.4.16", default-features = false }
+log = { version = "0.4.20", default-features = false }
modifiedpallets/app-promotion/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/app-promotion/src/benchmarking.rs
+++ b/pallets/app-promotion/src/benchmarking.rs
@@ -16,23 +16,22 @@
 
 #![cfg(feature = "runtime-benchmarks")]
 
-use super::*;
-use crate::Pallet as PromototionPallet;
-use frame_support::traits::fungible::Unbalanced;
-use sp_runtime::traits::Bounded;
-
-use frame_benchmarking::{benchmarks, account};
-use frame_support::traits::OnInitialize;
+use frame_benchmarking::{account, benchmarks};
+use frame_support::traits::{fungible::Unbalanced, OnInitialize};
 use frame_system::RawOrigin;
-use pallet_unique::benchmarking::create_nft_collection;
 use pallet_evm_migration::Pallet as EvmMigrationPallet;
+use pallet_unique::benchmarking::create_nft_collection;
+use sp_runtime::traits::Bounded;
+
+use super::*;
+use crate::Pallet as PromototionPallet;
 
 const SEED: u32 = 0;
 
 fn set_admin<T>() -> Result<T::AccountId, sp_runtime::DispatchError>
 where
 	T: Config + pallet_unique::Config + pallet_evm_migration::Config,
-	T::BlockNumber: From<u32> + Into<u32>,
+	BlockNumberFor<T>: From<u32> + Into<u32>,
 	BalanceOf<T>: Sum + From<u128>,
 {
 	let pallet_admin = account::<T::AccountId>("admin", 0, SEED);
@@ -53,7 +52,7 @@
 benchmarks! {
 	where_clause{
 		where T:  Config + pallet_unique::Config + pallet_evm_migration::Config ,
-		T::BlockNumber: From<u32> + Into<u32>,
+		BlockNumberFor<T>: From<u32> + Into<u32>,
 		BalanceOf<T>: Sum + From<u128>
 	}
 
modifiedpallets/app-promotion/src/lib.rsdiffbeforeafterboth
--- a/pallets/app-promotion/src/lib.rs
+++ b/pallets/app-promotion/src/lib.rs
@@ -53,32 +53,32 @@
 pub mod types;
 pub mod weights;
 
-use sp_std::{vec::Vec, vec, iter::Sum, borrow::ToOwned, cell::RefCell};
-use sp_core::H160;
-use codec::EncodeLike;
-pub use types::*;
-
-use up_data_structs::CollectionId;
-
 use frame_support::{
-	dispatch::{DispatchResult},
+	dispatch::DispatchResult,
+	ensure,
+	pallet_prelude::*,
+	storage::Key,
 	traits::{
-		Get,
+		fungible::{Inspect, InspectFreeze, Mutate, MutateFreeze},
 		tokens::Balance,
-		fungible::{Inspect, InspectFreeze, Mutate, MutateFreeze},
+		Get,
 	},
-	ensure, BoundedVec,
+	weights::Weight,
+	Blake2_128Concat, BoundedVec, PalletId, Twox64Concat,
 };
-
-use weights::WeightInfo;
-
+use frame_system::pallet_prelude::*;
 pub use pallet::*;
 use pallet_evm::account::CrossAccountId;
+use parity_scale_codec::EncodeLike;
+use sp_core::H160;
 use sp_runtime::{
-	Perbill,
-	traits::{BlockNumberProvider, CheckedAdd, CheckedSub, AccountIdConversion, Zero},
-	ArithmeticError, DispatchError,
+	traits::{AccountIdConversion, BlockNumberProvider, CheckedAdd, CheckedSub, Zero},
+	ArithmeticError, DispatchError, Perbill,
 };
+use sp_std::{borrow::ToOwned, cell::RefCell, iter::Sum, vec, vec::Vec};
+pub use types::*;
+use up_data_structs::CollectionId;
+use weights::WeightInfo;
 
 const PENDING_LIMIT_PER_BLOCK: u32 = 3;
 
@@ -87,12 +87,8 @@
 
 #[frame_support::pallet]
 pub mod pallet {
+
 	use super::*;
-	use frame_support::{
-		Blake2_128Concat, Twox64Concat, pallet_prelude::*, storage::Key, PalletId, weights::Weight,
-	};
-	use frame_system::pallet_prelude::*;
-	use sp_runtime::DispatchError;
 
 	#[pallet::config]
 	pub trait Config:
@@ -125,11 +121,11 @@
 
 		/// In relay blocks.
 		#[pallet::constant]
-		type RecalculationInterval: Get<Self::BlockNumber>;
+		type RecalculationInterval: Get<BlockNumberFor<Self>>;
 
 		/// In parachain blocks.
 		#[pallet::constant]
-		type PendingInterval: Get<Self::BlockNumber>;
+		type PendingInterval: Get<BlockNumberFor<Self>>;
 
 		/// Rate of return for interval in blocks defined in `RecalculationInterval`.
 		#[pallet::constant]
@@ -146,7 +142,7 @@
 		type WeightInfo: WeightInfo;
 
 		// The relay block number provider
-		type RelayBlockNumberProvider: BlockNumberProvider<BlockNumber = Self::BlockNumber>;
+		type RelayBlockNumberProvider: BlockNumberProvider<BlockNumber = BlockNumberFor<Self>>;
 
 		/// Events compatible with [`frame_system::Config::Event`].
 		type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent> + From<Event<Self>>;
@@ -230,9 +226,9 @@
 	pub type Staked<T: Config> = StorageNMap<
 		Key = (
 			Key<Blake2_128Concat, T::AccountId>,
-			Key<Twox64Concat, T::BlockNumber>,
+			Key<Twox64Concat, BlockNumberFor<T>>,
 		),
-		Value = (BalanceOf<T>, T::BlockNumber),
+		Value = (BalanceOf<T>, BlockNumberFor<T>),
 		QueryKind = ValueQuery,
 	>;
 
@@ -252,7 +248,7 @@
 	pub type PendingUnstake<T: Config> = StorageMap<
 		_,
 		Twox64Concat,
-		T::BlockNumber,
+		BlockNumberFor<T>,
 		BoundedVec<(T::AccountId, BalanceOf<T>), ConstU32<PENDING_LIMIT_PER_BLOCK>>,
 		ValueQuery,
 	>;
@@ -262,16 +258,16 @@
 	#[pallet::storage]
 	#[pallet::getter(fn get_next_calculated_record)]
 	pub type PreviousCalculatedRecord<T: Config> =
-		StorageValue<Value = (T::AccountId, T::BlockNumber), QueryKind = OptionQuery>;
+		StorageValue<Value = (T::AccountId, BlockNumberFor<T>), QueryKind = OptionQuery>;
 
 	#[pallet::hooks]
 	impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
 		/// Block overflow is impossible due to the fact that the unstake algorithm in on_initialize
 		/// implies the execution of a strictly limited number of relatively lightweight operations.
 		/// A separate benchmark has been implemented to scale the weight depending on the number of pendings.
-		fn on_initialize(current_block_number: T::BlockNumber) -> Weight
+		fn on_initialize(current_block_number: BlockNumberFor<T>) -> Weight
 		where
-			<T as frame_system::Config>::BlockNumber: From<u32>,
+			BlockNumberFor<T>: From<u32>,
 		{
 			if T::IsMaintenanceModeEnabled::get() {
 				return T::DbWeight::get().reads_writes(1, 0);
@@ -302,7 +298,7 @@
 	#[pallet::call]
 	impl<T: Config> Pallet<T>
 	where
-		T::BlockNumber: From<u32> + Into<u32>,
+		BlockNumberFor<T>: From<u32> + Into<u32>,
 		<<T as Config>::Currency as Inspect<T::AccountId>>::Balance: Sum + From<u128>,
 	{
 		/// Sets an address as the the admin.
@@ -369,7 +365,7 @@
 
 			// Calculation of the number of recalculation periods,
 			// after how much the first interest calculation should be performed for the stake
-			let recalculate_after_interval: T::BlockNumber =
+			let recalculate_after_interval: BlockNumberFor<T> =
 				if block_number % config.recalculation_interval == 0u32.into() {
 					1u32.into()
 				} else {
@@ -705,7 +701,7 @@
 		#[pallet::weight(<T as Config>::WeightInfo::on_initialize(PENDING_LIMIT_PER_BLOCK*pending_blocks.len() as u32))]
 		pub fn force_unstake(
 			origin: OriginFor<T>,
-			pending_blocks: Vec<T::BlockNumber>,
+			pending_blocks: Vec<BlockNumberFor<T>>,
 		) -> DispatchResult {
 			ensure_root(origin)?;
 
@@ -917,7 +913,7 @@
 	/// - `staker`: staker account.
 	pub fn total_staked_by_id_per_block(
 		staker: impl EncodeLike<T::AccountId>,
-	) -> Option<Vec<(T::BlockNumber, BalanceOf<T>)>> {
+	) -> Option<Vec<(BlockNumberFor<T>, BalanceOf<T>)>> {
 		let mut staked = Staked::<T>::iter_prefix((staker,))
 			.map(|(block, (amount, _))| (block, amount))
 			.collect::<Vec<_>>();
@@ -944,14 +940,14 @@
 	/// - `staker`: staker account.
 	pub fn cross_id_total_staked_per_block(
 		staker: T::CrossAccountId,
-	) -> Vec<(T::BlockNumber, BalanceOf<T>)> {
+	) -> Vec<(BlockNumberFor<T>, BalanceOf<T>)> {
 		Self::total_staked_by_id_per_block(staker.as_sub()).unwrap_or_default()
 	}
 
 	fn recalculate_and_insert_stake(
 		staker: &T::AccountId,
-		staked_block: T::BlockNumber,
-		next_recalc_block: T::BlockNumber,
+		staked_block: BlockNumberFor<T>,
+		next_recalc_block: BlockNumberFor<T>,
 		base: BalanceOf<T>,
 		iters: u32,
 		income_acc: &mut BalanceOf<T>,
@@ -979,9 +975,9 @@
 	/// Get relay block number rounded down to multiples of config.recalculation_interval.
 	/// We need it to reward stakers in integer parts of recalculation_interval
 	fn get_current_recalc_block(
-		current_relay_block: T::BlockNumber,
+		current_relay_block: BlockNumberFor<T>,
 		config: &PalletConfiguration<T>,
-	) -> T::BlockNumber {
+	) -> BlockNumberFor<T> {
 		(current_relay_block / config.recalculation_interval) * config.recalculation_interval
 	}
 
@@ -1028,7 +1024,7 @@
 	/// - `staker`: staker account.
 	pub fn cross_id_pending_unstake_per_block(
 		staker: T::CrossAccountId,
-	) -> Vec<(T::BlockNumber, BalanceOf<T>)> {
+	) -> Vec<(BlockNumberFor<T>, BalanceOf<T>)> {
 		let mut unsorted_res = vec![];
 		PendingUnstake::<T>::iter().for_each(|(block, pendings)| {
 			pendings.into_iter().for_each(|(id, amount)| {
modifiedpallets/app-promotion/src/types.rsdiffbeforeafterboth
--- a/pallets/app-promotion/src/types.rs
+++ b/pallets/app-promotion/src/types.rs
@@ -1,13 +1,12 @@
-use frame_support::{dispatch::DispatchResult};
-
+use frame_support::dispatch::DispatchResult;
+use frame_system::pallet_prelude::*;
 use pallet_common::CollectionHandle;
-
+use pallet_configuration::AppPromomotionConfigurationOverride;
+use pallet_evm_contract_helpers::{Config as EvmHelpersConfig, Pallet as EvmHelpersPallet};
+use sp_core::Get;
 use sp_runtime::{DispatchError, Perbill};
-use up_data_structs::{CollectionId};
 use sp_std::borrow::ToOwned;
-use pallet_evm_contract_helpers::{Pallet as EvmHelpersPallet, Config as EvmHelpersConfig};
-use pallet_configuration::{AppPromomotionConfigurationOverride};
-use sp_core::Get;
+use up_data_structs::CollectionId;
 
 const MAX_NUMBER_PAYOUTS: u8 = 100;
 pub(crate) const DEFAULT_NUMBER_PAYOUTS: u8 = 20;
@@ -114,9 +113,9 @@
 }
 pub(crate) struct PalletConfiguration<T: crate::Config> {
 	/// In relay blocks.
-	pub recalculation_interval: T::BlockNumber,
+	pub recalculation_interval: BlockNumberFor<T>,
 	/// In parachain blocks.
-	pub pending_interval: T::BlockNumber,
+	pub pending_interval: BlockNumberFor<T>,
 	/// Value for `RecalculationInterval` based on 0.05% per 24h.
 	pub interval_income: Perbill,
 	/// Maximum allowable number of stakers calculated per call of the `app-promotion::PayoutStakers` extrinsic.
modifiedpallets/balances-adapter/Cargo.tomldiffbeforeafterboth
--- a/pallets/balances-adapter/Cargo.toml
+++ b/pallets/balances-adapter/Cargo.toml
@@ -15,7 +15,7 @@
 sp-std = { workspace = true }
 
 #Parity
-codec = { workspace = true, package = "parity-scale-codec" }
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
 
 # Unique
modifiedpallets/balances-adapter/src/common.rsdiffbeforeafterboth
--- a/pallets/balances-adapter/src/common.rs
+++ b/pallets/balances-adapter/src/common.rs
@@ -1,11 +1,13 @@
 use alloc::{vec, vec::Vec};
 use core::marker::PhantomData;
-use crate::{Config, NativeFungibleHandle, Pallet};
+
 use frame_support::{fail, weights::Weight};
 use pallet_balances::{weights::SubstrateWeight as BalancesWeight, WeightInfo};
 use pallet_common::{CommonCollectionOperations, CommonWeightInfo};
 use up_data_structs::TokenId;
 
+use crate::{Config, NativeFungibleHandle, Pallet};
+
 pub struct CommonWeights<T: Config>(PhantomData<T>);
 
 // All implementations with `Weight::default` used in methods that return error `UnsupportedOperation`.
modifiedpallets/balances-adapter/src/erc.rsdiffbeforeafterboth
--- a/pallets/balances-adapter/src/erc.rs
+++ b/pallets/balances-adapter/src/erc.rs
@@ -1,4 +1,3 @@
-use crate::{Config, NativeFungibleHandle, Pallet, SelfWeightOf};
 use evm_coder::{abi::AbiType, generate_stubgen, solidity_interface, types::*};
 use pallet_balances::WeightInfo;
 use pallet_common::{
@@ -10,8 +9,10 @@
 	execution::{PreDispatch, Result},
 	frontier_contract, WithRecorder,
 };
-use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};
-use sp_core::{U256, Get};
+use pallet_structure::{weights::WeightInfo as _, SelfWeightOf as StructureWeight};
+use sp_core::{Get, U256};
+
+use crate::{Config, NativeFungibleHandle, Pallet, SelfWeightOf};
 
 frontier_contract! {
 	macro_rules! NativeFungibleHandle_result {...}
modifiedpallets/balances-adapter/src/lib.rsdiffbeforeafterboth
--- a/pallets/balances-adapter/src/lib.rs
+++ b/pallets/balances-adapter/src/lib.rs
@@ -4,8 +4,8 @@
 use core::ops::Deref;
 
 use frame_support::sp_runtime::DispatchResult;
-use pallet_evm_coder_substrate::{WithRecorder, SubstrateRecorder};
 pub use pallet::*;
+use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};
 
 pub mod common;
 pub mod erc;
@@ -55,16 +55,16 @@
 }
 #[frame_support::pallet]
 pub mod pallet {
-	use super::*;
 	use alloc::string::String;
+
 	use frame_support::{
 		dispatch::PostDispatchInfo,
 		ensure,
-		pallet_prelude::{DispatchResultWithPostInfo, Pays},
+		pallet_prelude::*,
 		traits::{
-			Get,
 			fungible::{Inspect, Mutate},
 			tokens::Preservation,
+			Get,
 		},
 	};
 	use pallet_balances::WeightInfo;
@@ -74,6 +74,8 @@
 	use sp_runtime::DispatchError;
 	use up_data_structs::{budget::Budget, mapping::TokenAddressMapping};
 
+	use super::*;
+
 	#[pallet::config]
 	pub trait Config:
 		frame_system::Config
modifiedpallets/collator-selection/Cargo.tomldiffbeforeafterboth
--- a/pallets/collator-selection/Cargo.toml
+++ b/pallets/collator-selection/Cargo.toml
@@ -12,11 +12,9 @@
 targets = ["x86_64-unknown-linux-gnu"]
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
 log = { workspace = true }
-rand = { version = "0.8.5", features = ["std_rng"], default-features = false }
+parity-scale-codec = { workspace = true }
+rand = { version = "0.8.5", default-features = false }
 scale-info = { workspace = true }
 serde = { workspace = true }
 
@@ -48,13 +46,13 @@
 	"frame-system/runtime-benchmarks",
 ]
 std = [
-	"codec/std",
 	"frame-benchmarking/std",
 	"frame-support/std",
 	"frame-system/std",
 	"log/std",
 	"pallet-authorship/std",
 	"pallet-session/std",
+	"parity-scale-codec/std",
 	"rand/std",
 	"scale-info/std",
 	"sp-consensus-aura/std",
modifiedpallets/collator-selection/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/collator-selection/src/benchmarking.rs
+++ b/pallets/collator-selection/src/benchmarking.rs
@@ -32,25 +32,24 @@
 
 //! Benchmarking setup for pallet-collator-selection
 
-use super::*;
-
-#[allow(unused)]
-use crate::{Pallet as CollatorSelection, BalanceOf};
 use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite, whitelisted_caller};
 use frame_support::{
 	assert_ok,
-	codec::Decode,
 	traits::{
-		EnsureOrigin,
 		fungible::{Inspect, Mutate},
-		Get,
+		EnsureOrigin, Get,
 	},
 };
-use frame_system::{EventRecord, RawOrigin};
+use frame_system::{pallet_prelude::*, EventRecord, RawOrigin};
 use pallet_authorship::EventHandler;
 use pallet_session::{self as session, SessionManager};
+use parity_scale_codec::Decode;
 use sp_std::prelude::*;
 
+use super::*;
+#[allow(unused)]
+use crate::{BalanceOf, Pallet as CollatorSelection};
+
 const SEED: u32 = 0;
 
 // TODO: remove if this is given in substrate commit.
@@ -317,7 +316,7 @@
 			balance_unit::<T>() * 4u32.into(),
 		);
 		let author = account("author", 0, SEED);
-		let new_block: T::BlockNumber = 10u32.into();
+		let new_block: BlockNumberFor<T>= 10u32.into();
 
 		frame_system::Pallet::<T>::set_block_number(new_block);
 		assert!(T::Currency::balance(&author) == 0u32.into());
@@ -338,8 +337,8 @@
 		register_validators::<T>(c);
 		register_candidates::<T>(c);
 
-		let new_block: T::BlockNumber = 1800u32.into();
-		let zero_block: T::BlockNumber = 0u32.into();
+		let new_block: BlockNumberFor<T>= 1800u32.into();
+		let zero_block: BlockNumberFor<T> = 0u32.into();
 		let candidates = <Candidates<T>>::get();
 
 		let non_removals = c.saturating_sub(r);
modifiedpallets/collator-selection/src/lib.rsdiffbeforeafterboth
--- a/pallets/collator-selection/src/lib.rs
+++ b/pallets/collator-selection/src/lib.rs
@@ -96,26 +96,27 @@
 	<<T as Config>::Currency as Inspect<<T as frame_system::Config>::AccountId>>::Balance;
 #[frame_support::pallet]
 pub mod pallet {
-	use super::*;
-	pub use crate::weights::WeightInfo;
 	use core::ops::Div;
+
 	use frame_support::{
 		dispatch::{DispatchClass, DispatchResultWithPostInfo},
-		inherent::Vec,
 		pallet_prelude::*,
 		sp_runtime::traits::{AccountIdConversion, CheckedSub, Saturating, Zero},
 		traits::{
-			EnsureOrigin,
-			fungible::{Balanced, BalancedHold, Inspect, InspectHold, Mutate, MutateHold},
-			ValidatorRegistration,
+			fungible::{Balanced, BalancedHold, Inspect, Mutate, MutateHold},
 			tokens::{Precision, Preservation},
+			EnsureOrigin, ValidatorRegistration,
 		},
 		BoundedVec, PalletId,
 	};
 	use frame_system::pallet_prelude::*;
 	use pallet_session::SessionManager;
-	use sp_runtime::{Perbill, traits::Convert};
+	use sp_runtime::{traits::Convert, Perbill};
 	use sp_staking::SessionIndex;
+	use sp_std::vec::Vec;
+
+	use super::*;
+	pub use crate::weights::WeightInfo;
 
 	/// A convertor from collators id. Since this pallet does not have stash/controller, this is
 	/// just identity.
@@ -131,8 +132,11 @@
 	pub trait Config: frame_system::Config {
 		/// Overarching event type.
 		type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
+		/// Overarching hold reason.
+		type RuntimeHoldReason: From<HoldReason>;
+
 		type Currency: Mutate<Self::AccountId>
-			+ MutateHold<Self::AccountId>
+			+ MutateHold<Self::AccountId, Reason = Self::RuntimeHoldReason>
 			+ BalancedHold<Self::AccountId>;
 
 		/// Origin that can dictate updating parameters of this pallet.
@@ -164,16 +168,19 @@
 		/// The weight information of this pallet.
 		type WeightInfo: WeightInfo;
 
-		#[pallet::constant]
-		type LicenceBondIdentifier: Get<<Self::Currency as InspectHold<Self::AccountId>>::Reason>;
-
 		type DesiredCollators: Get<u32>;
 
 		type LicenseBond: Get<BalanceOf<Self>>;
 
-		type KickThreshold: Get<Self::BlockNumber>;
+		type KickThreshold: Get<BlockNumberFor<Self>>;
 	}
 
+	#[pallet::composite_enum]
+	pub enum HoldReason {
+		/// The funds are held as the license bond.
+		LicenseBond,
+	}
+
 	#[pallet::pallet]
 	pub struct Pallet<T>(_);
 
@@ -199,14 +206,13 @@
 	#[pallet::storage]
 	#[pallet::getter(fn last_authored_block)]
 	pub type LastAuthoredBlock<T: Config> =
-		StorageMap<_, Twox64Concat, T::AccountId, T::BlockNumber, ValueQuery>;
+		StorageMap<_, Twox64Concat, T::AccountId, BlockNumberFor<T>, ValueQuery>;
 
 	#[pallet::genesis_config]
 	pub struct GenesisConfig<T: Config> {
 		pub invulnerables: Vec<T::AccountId>,
 	}
 
-	#[cfg(feature = "std")]
 	impl<T: Config> Default for GenesisConfig<T> {
 		fn default() -> Self {
 			Self {
@@ -216,12 +222,11 @@
 	}
 
 	#[pallet::genesis_build]
-	impl<T: Config> GenesisBuild<T> for GenesisConfig<T> {
+	impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {
 		fn build(&self) {
-			let duplicate_invulnerables = self
-				.invulnerables
-				.iter()
-				.collect::<std::collections::BTreeSet<_>>();
+			use sp_std::collections::btree_set::BTreeSet;
+
+			let duplicate_invulnerables = self.invulnerables.iter().collect::<BTreeSet<_>>();
 			assert!(
 				duplicate_invulnerables.len() == self.invulnerables.len(),
 				"duplicate invulnerables in genesis."
@@ -375,7 +380,7 @@
 
 			let deposit = T::LicenseBond::get();
 
-			T::Currency::hold(&T::LicenceBondIdentifier::get(), &who, deposit)?;
+			T::Currency::hold(&HoldReason::LicenseBond.into(), &who, deposit)?;
 			LicenseDepositOf::<T>::insert(who.clone(), deposit);
 
 			Self::deposit_event(Event::LicenseObtained {
@@ -538,7 +543,7 @@
 						let remaining = deposit - slashed;
 
 						let (imbalance, _) =
-							T::Currency::slash(&T::LicenceBondIdentifier::get(), who, slashed);
+							T::Currency::slash(&HoldReason::LicenseBond.into(), who, slashed);
 						deposit_returned = remaining;
 
 						T::Currency::resolve(&T::TreasuryAccountId::get(), imbalance)
@@ -548,7 +553,7 @@
 					}
 
 					T::Currency::release(
-						&T::LicenceBondIdentifier::get(),
+						&HoldReason::LicenseBond.into(),
 						who,
 						deposit_returned,
 						Precision::Exact,
@@ -608,7 +613,7 @@
 	/// Keep track of number of authored blocks per authority, uncles are counted as well since
 	/// they're a valid proof of being online.
 	impl<T: Config + pallet_authorship::Config>
-		pallet_authorship::EventHandler<T::AccountId, T::BlockNumber> for Pallet<T>
+		pallet_authorship::EventHandler<T::AccountId, BlockNumberFor<T>> for Pallet<T>
 	{
 		fn note_author(author: T::AccountId) {
 			let pot = Self::account_id();
modifiedpallets/collator-selection/src/mock.rsdiffbeforeafterboth
--- a/pallets/collator-selection/src/mock.rs
+++ b/pallets/collator-selection/src/mock.rs
@@ -30,61 +30,56 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-use super::*;
-use crate as collator_selection;
 use frame_support::{
 	ord_parameter_types, parameter_types,
-	traits::{FindAuthor, GenesisBuild, ValidatorRegistration},
+	traits::{ConstU32, FindAuthor, ValidatorRegistration},
 	PalletId,
 };
 use frame_system as system;
 use frame_system::EnsureSignedBy;
-use sp_core::H256;
+use sp_core::{ConstBool, H256};
 use sp_runtime::{
-	testing::{Header, UintAuthorityId},
+	testing::UintAuthorityId,
 	traits::{BlakeTwo256, IdentityLookup, OpaqueKeys},
-	Perbill, RuntimeAppPublic,
+	BuildStorage, Perbill, RuntimeAppPublic,
 };
 
-type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
-type Block = frame_system::mocking::MockBlock<Test>;
+use super::*;
+use crate as collator_selection;
+
+type Block = frame_system::mocking::MockBlockU32<Test>;
 
 // Configure a mock runtime to test the pallet.
 frame_support::construct_runtime!(
-	pub enum Test where
-		Block = Block,
-		NodeBlock = Block,
-		UncheckedExtrinsic = UncheckedExtrinsic,
-	{
-		System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
-		Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
-		Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
-		Aura: pallet_aura::{Pallet, Storage, Config<T>},
-		Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
-		CollatorSelection: collator_selection::{Pallet, Call, Storage, Event<T>},
-		Authorship: pallet_authorship::{Pallet, Storage},
+	pub enum Test {
+		System: frame_system,
+		Timestamp: pallet_timestamp,
+		Session: pallet_session,
+		Aura: pallet_aura,
+		Balances: pallet_balances,
+		CollatorSelection: collator_selection,
+		Authorship: pallet_authorship,
 	}
 );
 
 parameter_types! {
-	pub const BlockHashCount: u64 = 250;
+	pub const BlockHashCount: u32 = 250;
 	pub const SS58Prefix: u8 = 42;
 }
 
 impl system::Config for Test {
 	type BaseCallFilter = frame_support::traits::Everything;
+	type Block = Block;
 	type BlockWeights = ();
 	type BlockLength = ();
 	type DbWeight = ();
 	type RuntimeOrigin = RuntimeOrigin;
 	type RuntimeCall = RuntimeCall;
-	type Index = u64;
-	type BlockNumber = u64;
+	type Nonce = u64;
 	type Hash = H256;
 	type Hashing = BlakeTwo256;
 	type AccountId = u64;
 	type Lookup = IdentityLookup<Self::AccountId>;
-	type Header = Header;
 	type RuntimeEvent = RuntimeEvent;
 	type BlockHashCount = BlockHashCount;
 	type Version = ();
@@ -95,7 +90,7 @@
 	type SystemWeightInfo = ();
 	type SS58Prefix = SS58Prefix;
 	type OnSetCode = ();
-	type MaxConsumers = frame_support::traits::ConstU32<16>;
+	type MaxConsumers = ConstU32<16>;
 }
 
 parameter_types! {
@@ -115,10 +110,10 @@
 	type MaxLocks = ();
 	type MaxReserves = MaxReserves;
 	type ReserveIdentifier = [u8; 8];
-	type HoldIdentifier = [u8; 16];
 	type FreezeIdentifier = [u8; 16];
 	type MaxHolds = MaxHolds;
 	type MaxFreezes = MaxFreezes;
+	type RuntimeHoldReason = RuntimeHoldReason;
 }
 
 pub struct Author4;
@@ -151,6 +146,7 @@
 	type AuthorityId = sp_consensus_aura::sr25519::AuthorityId;
 	type MaxAuthorities = MaxAuthorities;
 	type DisabledValidators = ();
+	type AllowMultipleBlocksPerSlot = ConstBool<true>;
 }
 
 sp_runtime::impl_opaque_keys! {
@@ -168,27 +164,27 @@
 
 parameter_types! {
 	pub static SessionHandlerCollators: Vec<u64> = Vec::new();
-	pub static SessionChangeBlock: u64 = 0;
+	pub static SessionChangeBlock: u32 = 0;
 }
 
 pub struct TestSessionHandler;
 impl pallet_session::SessionHandler<u64> for TestSessionHandler {
 	const KEY_TYPE_IDS: &'static [sp_runtime::KeyTypeId] = &[UintAuthorityId::ID];
 	fn on_genesis_session<Ks: OpaqueKeys>(keys: &[(u64, Ks)]) {
-		SessionHandlerCollators::set(keys.into_iter().map(|(a, _)| *a).collect::<Vec<_>>())
+		SessionHandlerCollators::set(keys.iter().map(|(a, _)| *a).collect::<Vec<_>>())
 	}
 	fn on_new_session<Ks: OpaqueKeys>(_: bool, keys: &[(u64, Ks)], _: &[(u64, Ks)]) {
 		SessionChangeBlock::set(System::block_number());
 		dbg!(keys.len());
-		SessionHandlerCollators::set(keys.into_iter().map(|(a, _)| *a).collect::<Vec<_>>())
+		SessionHandlerCollators::set(keys.iter().map(|(a, _)| *a).collect::<Vec<_>>())
 	}
 	fn on_before_session_ending() {}
 	fn on_disabled(_: u32) {}
 }
 
 parameter_types! {
-	pub const Offset: u64 = 0;
-	pub const Period: u64 = 10;
+	pub const Offset: u32 = 0;
+	pub const Period: u32 = 10;
 }
 
 impl pallet_session::Config for Test {
@@ -207,7 +203,7 @@
 parameter_types! {
 	pub const MaxCollators: u32 = 5;
 	pub const LicenseBond: u64 = 10;
-	pub const KickThreshold: u64 = 10;
+	pub const KickThreshold: u32 = 10;
 	// the following values do not matter and are meaningless, etc.
 	pub const DefaultWeightToFeeCoefficient: u64 = 100_000;
 	pub const DefaultMinGasPrice: u64 = 100_000;
@@ -236,6 +232,7 @@
 
 impl Config for Test {
 	type RuntimeEvent = RuntimeEvent;
+	type RuntimeHoldReason = RuntimeHoldReason;
 	type UpdateOrigin = EnsureSignedBy<RootAccount, u64>;
 	type PotId = PotId;
 	type MaxCollators = MaxCollators;
@@ -244,7 +241,6 @@
 	type ValidatorId = <Self as frame_system::Config>::AccountId;
 	type ValidatorIdOf = IdentityCollator;
 	type ValidatorRegistration = IsRegistered;
-	type LicenceBondIdentifier = LicenceBondIdentifier;
 	type Currency = Balances;
 	type DesiredCollators = MaxCollators;
 	type LicenseBond = LicenseBond;
@@ -254,8 +250,8 @@
 
 pub fn new_test_ext() -> sp_io::TestExternalities {
 	sp_tracing::try_init_simple();
-	let mut t = frame_system::GenesisConfig::default()
-		.build_storage::<Test>()
+	let mut t = <frame_system::GenesisConfig<Test>>::default()
+		.build_storage()
 		.unwrap();
 	let invulnerables = vec![1, 2];
 
@@ -290,9 +286,9 @@
 	t.into()
 }
 
-pub fn initialize_to_block(n: u64) {
+pub fn initialize_to_block(n: u32) {
 	for i in System::block_number() + 1..=n {
 		System::set_block_number(i);
-		<AllPalletsWithSystem as frame_support::traits::OnInitialize<u64>>::on_initialize(i);
+		<AllPalletsWithSystem as frame_support::traits::OnInitialize<u32>>::on_initialize(i);
 	}
 }
modifiedpallets/collator-selection/src/tests.rsdiffbeforeafterboth
--- a/pallets/collator-selection/src/tests.rs
+++ b/pallets/collator-selection/src/tests.rs
@@ -30,14 +30,14 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-use crate::{self as collator_selection, Config};
-use crate::{mock::*, Error};
 use frame_support::{
 	assert_noop, assert_ok,
-	traits::{fungible, GenesisBuild, OnInitialize},
+	traits::{fungible, OnInitialize},
 };
-use sp_runtime::{traits::BadOrigin, TokenError};
 use scale_info::prelude::*;
+use sp_runtime::{traits::BadOrigin, BuildStorage, TokenError};
+
+use crate::{self as collator_selection, mock::*, Config, Error};
 
 fn get_license_and_onboard(account_id: <Test as frame_system::Config>::AccountId) {
 	assert_ok!(CollatorSelection::get_license(RuntimeOrigin::signed(
@@ -464,8 +464,8 @@
 #[should_panic = "duplicate invulnerables in genesis."]
 fn cannot_set_genesis_value_twice() {
 	sp_tracing::try_init_simple();
-	let mut t = frame_system::GenesisConfig::default()
-		.build_storage::<Test>()
+	let mut t = <frame_system::GenesisConfig<Test>>::default()
+		.build_storage()
 		.unwrap();
 	let invulnerables = vec![1, 1];
 
modifiedpallets/common/Cargo.tomldiffbeforeafterboth
--- a/pallets/common/Cargo.toml
+++ b/pallets/common/Cargo.toml
@@ -5,9 +5,7 @@
 version = "0.1.14"
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
 
 bondrewd = { version = "0.1.14", features = ["derive"], default-features = false }
@@ -21,6 +19,7 @@
 sp-core = { workspace = true }
 sp-runtime = { workspace = true }
 sp-std = { workspace = true }
+sp-weights = { workspace = true }
 up-data-structs = { workspace = true }
 up-pov-estimate-rpc = { workspace = true }
 
@@ -28,14 +27,15 @@
 default = ["std"]
 runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks", "up-data-structs/runtime-benchmarks"]
 std = [
+	"evm-coder/std",
 	"frame-support/std",
 	"frame-system/std",
 	"pallet-evm/std",
 	"sp-runtime/std",
 	"sp-std/std",
+	"sp-weights/std",
 	"up-data-structs/std",
 	"up-pov-estimate-rpc/std",
-	"evm-coder/std",
 ]
 stubgen = ["evm-coder/stubgen", "up-data-structs/stubgen"]
 tests = []
modifiedpallets/common/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/common/src/benchmarking.rs
+++ b/pallets/common/src/benchmarking.rs
@@ -16,23 +16,25 @@
 
 #![allow(missing_docs)]
 
-use sp_std::vec::Vec;
-use crate::{Config, CollectionHandle, Pallet};
-use pallet_evm::account::CrossAccountId;
-use frame_benchmarking::{benchmarks, account};
-use up_data_structs::{
-	CollectionMode, CreateCollectionData, CollectionId, Property, PropertyKey, PropertyValue,
-	CollectionPermissions, NestingPermissions, AccessMode, PropertiesPermissionMap,
-	MAX_COLLECTION_NAME_LENGTH, MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
-	MAX_PROPERTIES_PER_ITEM,
-};
+use core::convert::TryInto;
+
+use frame_benchmarking::{account, benchmarks};
 use frame_support::{
-	traits::{Get, fungible::Balanced, Imbalance, tokens::Precision},
 	pallet_prelude::ConstU32,
+	traits::{fungible::Balanced, tokens::Precision, Get, Imbalance},
 	BoundedVec,
 };
-use core::convert::TryInto;
-use sp_runtime::{DispatchError, traits::Zero};
+use pallet_evm::account::CrossAccountId;
+use sp_runtime::{traits::Zero, DispatchError};
+use sp_std::vec::Vec;
+use up_data_structs::{
+	AccessMode, CollectionId, CollectionMode, CollectionPermissions, CreateCollectionData,
+	NestingPermissions, PropertiesPermissionMap, Property, PropertyKey, PropertyValue,
+	MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_COLLECTION_NAME_LENGTH, MAX_PROPERTIES_PER_ITEM,
+	MAX_TOKEN_PREFIX_LENGTH,
+};
+
+use crate::{CollectionHandle, Config, Pallet};
 
 const SEED: u32 = 1;
 
modifiedpallets/common/src/dispatch.rsdiffbeforeafterboth
--- a/pallets/common/src/dispatch.rs
+++ b/pallets/common/src/dispatch.rs
@@ -2,13 +2,13 @@
 
 use frame_support::{
 	dispatch::{
-		DispatchResultWithPostInfo, PostDispatchInfo, Weight, DispatchErrorWithPostInfo,
-		DispatchResult,
+		DispatchErrorWithPostInfo, DispatchResult, DispatchResultWithPostInfo, Pays,
+		PostDispatchInfo,
 	},
-	dispatch::Pays,
 	traits::Get,
 };
 use sp_runtime::DispatchError;
+use sp_weights::Weight;
 use up_data_structs::{CollectionId, CreateCollectionData};
 
 use crate::{pallet::Config, CommonCollectionOperations};
modifiedpallets/common/src/erc.rsdiffbeforeafterboth
--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -16,15 +16,17 @@
 
 //! This module contains the implementation of pallet methods for evm.
 
-pub use pallet_evm::{PrecompileOutput, PrecompileResult, PrecompileHandle, account::CrossAccountId};
+pub use pallet_evm::{
+	account::CrossAccountId, PrecompileHandle, PrecompileOutput, PrecompileResult,
+};
 use pallet_evm_coder_substrate::{
 	abi::AbiType,
-	solidity_interface, ToLog,
+	dispatch_to_evm,
+	execution::{Error, PreDispatch, Result},
+	frontier_contract, solidity_interface,
 	types::*,
-	execution::{Result, Error, PreDispatch},
-	frontier_contract,
+	ToLog,
 };
-use pallet_evm_coder_substrate::dispatch_to_evm;
 use sp_std::{vec, vec::Vec};
 use up_data_structs::{
 	CollectionMode, CollectionPermissions, OwnerRestrictedSet, Property, SponsoringRateLimit,
@@ -32,7 +34,7 @@
 };
 
 use crate::{
-	Pallet, CollectionHandle, Config, CollectionProperties, eth, SelfWeightOf, weights::WeightInfo,
+	eth, weights::WeightInfo, CollectionHandle, CollectionProperties, Config, Pallet, SelfWeightOf,
 };
 
 frontier_contract! {
@@ -727,11 +729,10 @@
 
 /// Contains static property keys and values.
 pub mod static_property {
-	use pallet_evm_coder_substrate::{
-		execution::{Result, Error},
-	};
 	use alloc::format;
 
+	use pallet_evm_coder_substrate::execution::{Error, Result};
+
 	const EXPECT_CONVERT_ERROR: &str = "length < limit";
 
 	/// Keys.
modifiedpallets/common/src/eth.rsdiffbeforeafterboth
--- a/pallets/common/src/eth.rs
+++ b/pallets/common/src/eth.rs
@@ -17,15 +17,16 @@
 //! The module contains a number of functions for converting and checking ethereum identifiers.
 
 use alloc::format;
-use sp_std::{vec, vec::Vec};
+
 use evm_coder::{
+	types::{Address, String},
 	AbiCoder,
-	types::{Address, String},
 };
-pub use pallet_evm::{Config, account::CrossAccountId};
-use sp_core::{H160, U256};
-use up_data_structs::{CollectionId, CollectionFlags};
+pub use pallet_evm::{account::CrossAccountId, Config};
 use pallet_evm_coder_substrate::execution::Error;
+use sp_core::{H160, U256};
+use sp_std::{vec, vec::Vec};
+use up_data_structs::{CollectionFlags, CollectionId};
 
 // 0x17c4e6453Cc49AAAaEACA894e6D9683e00000001 - collection 1
 // TODO: Unhardcode prefix
modifiedpallets/common/src/helpers.rsdiffbeforeafterboth
--- a/pallets/common/src/helpers.rs
+++ b/pallets/common/src/helpers.rs
@@ -3,9 +3,9 @@
 //! The module contains helpers.
 //!
 use frame_support::{
+	dispatch::{DispatchErrorWithPostInfo, PostDispatchInfo},
 	pallet_prelude::DispatchResultWithPostInfo,
 	weights::Weight,
-	dispatch::{DispatchErrorWithPostInfo, PostDispatchInfo},
 };
 
 /// Add weight for a `DispatchResultWithPostInfo`
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -54,42 +54,42 @@
 extern crate alloc;
 
 use core::{
+	marker::PhantomData,
 	ops::{Deref, DerefMut},
 	slice::from_ref,
-	marker::PhantomData,
 };
-use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};
-use sp_std::vec::Vec;
-use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};
+
 use evm_coder::ToLog;
 use frame_support::{
-	dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo, Weight, PostDispatchInfo},
-	ensure,
+	dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo, Pays, PostDispatchInfo},
+	ensure, fail,
 	traits::{
-		Get,
 		fungible::{Balanced, Debt, Inspect},
 		tokens::{Imbalance, Precision, Preservation},
+		Get,
 	},
-	dispatch::Pays,
-	transactional, fail,
+	transactional,
 };
+pub use pallet::*;
+use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};
+use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};
+use sp_core::H160;
+use sp_runtime::{traits::Zero, ArithmeticError, DispatchError, DispatchResult};
+use sp_std::vec::Vec;
+use sp_weights::Weight;
 use up_data_structs::{
-	AccessMode, COLLECTION_NUMBER_LIMIT, Collection, RpcCollection, RpcCollectionFlags,
-	CollectionId, CreateItemData, MAX_TOKEN_PREFIX_LENGTH, COLLECTION_ADMINS_LIMIT, TokenId,
-	TokenChild, CollectionStats, MAX_TOKEN_OWNERSHIP, CollectionMode, NFT_SPONSOR_TRANSFER_TIMEOUT,
-	FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MAX_SPONSOR_TIMEOUT,
-	CUSTOM_DATA_LIMIT, CollectionLimits, CreateCollectionData, SponsorshipState, CreateItemExData,
-	SponsoringRateLimit, budget::Budget, PhantomType, Property,
-	CollectionProperties as CollectionPropertiesT, TokenProperties, PropertiesPermissionMap,
-	PropertyKey, PropertyValue, PropertyPermission, PropertiesError, TokenOwnerError,
-	PropertyKeyPermission, TokenData, TrySetProperty, PropertyScope, CollectionPermissions,
+	budget::Budget, AccessMode, Collection, CollectionId, CollectionLimits, CollectionMode,
+	CollectionPermissions, CollectionProperties as CollectionPropertiesT, CollectionStats,
+	CreateCollectionData, CreateItemData, CreateItemExData, PhantomType, PropertiesError,
+	PropertiesPermissionMap, Property, PropertyKey, PropertyKeyPermission, PropertyPermission,
+	PropertyScope, PropertyValue, RpcCollection, RpcCollectionFlags, SponsoringRateLimit,
+	SponsorshipState, TokenChild, TokenData, TokenId, TokenOwnerError, TokenProperties,
+	TrySetProperty, COLLECTION_ADMINS_LIMIT, COLLECTION_NUMBER_LIMIT, CUSTOM_DATA_LIMIT,
+	FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MAX_SPONSOR_TIMEOUT, MAX_TOKEN_OWNERSHIP,
+	MAX_TOKEN_PREFIX_LENGTH, NFT_SPONSOR_TRANSFER_TIMEOUT, REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
 };
 use up_pov_estimate_rpc::PovInfo;
 
-pub use pallet::*;
-use sp_core::H160;
-use sp_runtime::{ArithmeticError, DispatchError, DispatchResult, traits::Zero};
-
 #[cfg(feature = "runtime-benchmarks")]
 pub mod benchmarking;
 pub mod dispatch;
@@ -401,13 +401,16 @@
 #[frame_support::pallet]
 pub mod pallet {
 
-	use super::*;
 	use dispatch::CollectionDispatch;
-	use frame_support::{Blake2_128Concat, pallet_prelude::*, storage::Key, traits::StorageVersion};
-	use up_data_structs::{TokenId, mapping::TokenAddressMapping};
+	use frame_support::{
+		pallet_prelude::*, storage::Key, traits::StorageVersion, Blake2_128Concat,
+	};
 	use scale_info::TypeInfo;
+	use up_data_structs::{mapping::TokenAddressMapping, TokenId};
 	use weights::WeightInfo;
 
+	use super::*;
+
 	#[pallet::config]
 	pub trait Config:
 		frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::Config + TypeInfo
@@ -463,7 +466,6 @@
 	#[pallet::genesis_config]
 	pub struct GenesisConfig<T>(PhantomData<T>);
 
-	#[cfg(feature = "std")]
 	impl<T: Config> Default for GenesisConfig<T> {
 		fn default() -> Self {
 			Self(Default::default())
@@ -471,7 +473,7 @@
 	}
 
 	#[pallet::genesis_build]
-	impl<T: Config> GenesisBuild<T> for GenesisConfig<T> {
+	impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {
 		fn build(&self) {
 			StorageVersion::new(1).put::<Pallet<T>>();
 		}
@@ -886,18 +888,18 @@
 
 	/// Get the value. If it is called the first time, the value will be initialized.
 	pub fn value(&mut self) -> &T {
-		self.compute_value_if_not_already();
+		self.force_value();
 		self.value.as_ref().unwrap()
 	}
 
 	/// Get the value. If it is called the first time, the value will be initialized.
 	pub fn value_mut(&mut self) -> &mut T {
-		self.compute_value_if_not_already();
+		self.force_value();
 		self.value.as_mut().unwrap()
 	}
 
 	fn into_inner(mut self) -> T {
-		self.compute_value_if_not_already();
+		self.force_value();
 		self.value.unwrap()
 	}
 
@@ -906,7 +908,7 @@
 		self.value.is_some()
 	}
 
-	fn compute_value_if_not_already(&mut self) {
+	fn force_value(&mut self) {
 		if self.value.is_none() {
 			self.value = Some(self.f.take().unwrap()())
 		}
@@ -2721,7 +2723,7 @@
 #[cfg(any(feature = "tests", test))]
 #[allow(missing_docs)]
 pub mod tests {
-	use crate::{DispatchResult, DispatchError, LazyValue, Config};
+	use crate::{Config, DispatchError, DispatchResult, LazyValue};
 
 	const fn to_bool(u: u8) -> bool {
 		u != 0
modifiedpallets/configuration/Cargo.tomldiffbeforeafterboth
--- a/pallets/configuration/Cargo.toml
+++ b/pallets/configuration/Cargo.toml
@@ -4,8 +4,7 @@
 version = "0.2.0"
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
+parity-scale-codec = { workspace = true }
 
 fp-evm = { workspace = true }
 frame-benchmarking = { workspace = true, optional = true }
@@ -16,23 +15,26 @@
 sp-arithmetic = { workspace = true }
 sp-core = { workspace = true }
 sp-io = { workspace = true }
+sp-runtime = { workspace = true }
 sp-std = { workspace = true }
+staging-xcm = { workspace = true }
 up-common = { workspace = true }
-xcm = { workspace = true }
 
 hex-literal = { workspace = true }
+log = { workspace = true }
 
 [features]
 default = ["std"]
 runtime-benchmarks = ["frame-benchmarking"]
 std = [
-	"codec/std",
 	"fp-evm/std",
 	"frame-benchmarking/std",
 	"frame-support/std",
 	"frame-system/std",
+	"parity-scale-codec/std",
 	"sp-arithmetic/std",
 	"sp-core/std",
+	"sp-runtime/std",
 	"sp-std/std",
 ]
 try-runtime = ["frame-support/try-runtime"]
modifiedpallets/configuration/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/configuration/src/benchmarking.rs
+++ b/pallets/configuration/src/benchmarking.rs
@@ -16,10 +16,11 @@
 
 //! Benchmarking setup for pallet-configuration
 
-use super::*;
 use frame_benchmarking::benchmarks;
-use frame_system::{EventRecord, RawOrigin};
 use frame_support::assert_ok;
+use frame_system::{pallet_prelude::*, EventRecord, RawOrigin};
+
+use super::*;
 
 fn assert_last_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) {
 	let events = frame_system::Pallet::<T>::events();
@@ -52,7 +53,7 @@
 	}
 
 	set_app_promotion_configuration_override {
-		let configuration: AppPromotionConfiguration<T::BlockNumber> = Default::default();
+		let configuration: AppPromotionConfiguration<BlockNumberFor<T>> = Default::default();
 	}: {
 		assert_ok!(
 			<Pallet<T>>::set_app_promotion_configuration_override(RawOrigin::Root.into(), configuration)
@@ -82,7 +83,7 @@
 	}
 
 	set_collator_selection_kick_threshold {
-		let threshold: Option<T::BlockNumber> = Some(900u32.into());
+		let threshold: Option<BlockNumberFor<T>> = Some(900u32.into());
 	}: {
 		assert_ok!(
 			<Pallet<T>>::set_collator_selection_kick_threshold(RawOrigin::Root.into(), threshold)
modifiedpallets/configuration/src/lib.rsdiffbeforeafterboth
--- a/pallets/configuration/src/lib.rs
+++ b/pallets/configuration/src/lib.rs
@@ -20,19 +20,17 @@
 
 use frame_support::{
 	pallet,
-	weights::{WeightToFeePolynomial, WeightToFeeCoefficients, WeightToFeeCoefficient, Weight},
 	traits::Get,
-	Parameter,
+	weights::{Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial},
 };
-use codec::{Decode, Encode, MaxEncodedLen};
+pub use pallet::*;
+use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
 use scale_info::TypeInfo;
+use smallvec::smallvec;
 use sp_arithmetic::{
-	per_things::{Perbill, PerThing},
+	per_things::{PerThing, Perbill},
 	traits::{BaseArithmetic, Unsigned},
 };
-use smallvec::smallvec;
-
-pub use pallet::*;
 use sp_core::U256;
 
 #[cfg(feature = "runtime-benchmarks")]
@@ -41,15 +39,14 @@
 
 #[pallet]
 mod pallet {
+	use core::fmt::Debug;
+
+	use frame_support::{pallet_prelude::*, traits::Get};
+	use frame_system::{ensure_root, pallet_prelude::*};
+	use parity_scale_codec::Codec;
+	use sp_arithmetic::{traits::AtLeast32BitUnsigned, FixedPointOperand, Permill};
+
 	use super::*;
-	use frame_support::{
-		traits::Get,
-		pallet_prelude::*,
-		log,
-		dispatch::{Codec, fmt::Debug},
-	};
-	use frame_system::{pallet_prelude::OriginFor, ensure_root, pallet_prelude::*};
-	use sp_arithmetic::{FixedPointOperand, traits::AtLeast32BitUnsigned, Permill};
 	pub use crate::weights::WeightInfo;
 
 	#[pallet::config]
@@ -80,14 +77,14 @@
 		#[pallet::constant]
 		type AppPromotionDailyRate: Get<Perbill>;
 		#[pallet::constant]
-		type DayRelayBlocks: Get<Self::BlockNumber>;
+		type DayRelayBlocks: Get<BlockNumberFor<Self>>;
 
 		#[pallet::constant]
 		type DefaultCollatorSelectionMaxCollators: Get<u32>;
 		#[pallet::constant]
 		type DefaultCollatorSelectionLicenseBond: Get<Self::Balance>;
 		#[pallet::constant]
-		type DefaultCollatorSelectionKickThreshold: Get<Self::BlockNumber>;
+		type DefaultCollatorSelectionKickThreshold: Get<BlockNumberFor<Self>>;
 
 		/// The weight information of this pallet.
 		type WeightInfo: WeightInfo;
@@ -103,7 +100,7 @@
 			bond_cost: Option<T::Balance>,
 		},
 		NewCollatorKickThreshold {
-			length_in_blocks: Option<T::BlockNumber>,
+			length_in_blocks: Option<BlockNumberFor<T>>,
 		},
 	}
 
@@ -134,7 +131,6 @@
 	#[pallet::genesis_config]
 	pub struct GenesisConfig<T>(PhantomData<T>);
 
-	#[cfg(feature = "std")]
 	impl<T: Config> Default for GenesisConfig<T> {
 		fn default() -> Self {
 			Self(Default::default())
@@ -142,7 +138,7 @@
 	}
 
 	#[pallet::genesis_build]
-	impl<T: Config> GenesisBuild<T> for GenesisConfig<T> {
+	impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {
 		fn build(&self) {
 			update_base_fee::<T>();
 		}
@@ -166,7 +162,7 @@
 
 	#[pallet::storage]
 	pub type AppPromomotionConfigurationOverride<T: Config> =
-		StorageValue<Value = AppPromotionConfiguration<T::BlockNumber>, QueryKind = ValueQuery>;
+		StorageValue<Value = AppPromotionConfiguration<BlockNumberFor<T>>, QueryKind = ValueQuery>;
 
 	#[pallet::storage]
 	pub type CollatorSelectionDesiredCollatorsOverride<T: Config> = StorageValue<
@@ -184,7 +180,7 @@
 
 	#[pallet::storage]
 	pub type CollatorSelectionKickThresholdOverride<T: Config> = StorageValue<
-		Value = T::BlockNumber,
+		Value = BlockNumberFor<T>,
 		QueryKind = ValueQuery,
 		OnEmpty = T::DefaultCollatorSelectionKickThreshold,
 	>;
@@ -228,7 +224,7 @@
 		#[pallet::weight(T::WeightInfo::set_app_promotion_configuration_override())]
 		pub fn set_app_promotion_configuration_override(
 			origin: OriginFor<T>,
-			mut configuration: AppPromotionConfiguration<T::BlockNumber>,
+			mut configuration: AppPromotionConfiguration<BlockNumberFor<T>>,
 		) -> DispatchResult {
 			ensure_root(origin)?;
 			if configuration.interval_income.is_some() {
@@ -287,7 +283,7 @@
 		#[pallet::weight(T::WeightInfo::set_collator_selection_kick_threshold())]
 		pub fn set_collator_selection_kick_threshold(
 			origin: OriginFor<T>,
-			threshold: Option<T::BlockNumber>,
+			threshold: Option<BlockNumberFor<T>>,
 		) -> DispatchResult {
 			ensure_root(origin)?;
 			if let Some(threshold) = threshold {
modifiedpallets/evm-coder-substrate/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-coder-substrate/Cargo.toml
+++ b/pallets/evm-coder-substrate/Cargo.toml
@@ -5,8 +5,7 @@
 version = "0.1.3"
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
 
 evm-coder = { workspace = true }
@@ -18,10 +17,11 @@
 pallet-evm = { workspace = true }
 sp-core = { workspace = true }
 sp-std = { workspace = true }
+sp-weights = { workspace = true }
 up-data-structs = { workspace = true }
 
 evm-coder-substrate-procedural = { path = "./procedural" }
-spez = "0.1.1"
+spez = "0.1.2"
 
 [features]
 default = ["std"]
@@ -33,6 +33,7 @@
 	"pallet-evm/std",
 	"sp-core/std",
 	"sp-std/std",
+	"sp-weights/std",
 	'frame-benchmarking/std',
 ]
 try-runtime = ["frame-support/try-runtime"]
modifiedpallets/evm-coder-substrate/procedural/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-coder-substrate/procedural/src/lib.rs
+++ b/pallets/evm-coder-substrate/procedural/src/lib.rs
@@ -1,12 +1,12 @@
 use std::result;
 
-use proc_macro2::{TokenStream, Ident};
+use proc_macro2::{Ident, TokenStream};
 use quote::quote;
 use syn::{
-	Error, DeriveInput, Data, Attribute,
+	parenthesized,
 	parse::{Parse, ParseBuffer},
 	spanned::Spanned,
-	Expr, parenthesized,
+	Attribute, Data, DeriveInput, Error, Expr,
 };
 
 type Result<T = TokenStream, E = syn::Error> = result::Result<T, E>;
modifiedpallets/evm-coder-substrate/src/execution.rsdiffbeforeafterboth
--- a/pallets/evm-coder-substrate/src/execution.rs
+++ b/pallets/evm-coder-substrate/src/execution.rs
@@ -22,10 +22,9 @@
 use std::string::{String, ToString};
 
 use evm_coder::ERC165Call;
+pub use evm_coder_substrate_procedural::PreDispatch;
 use evm_core::{ExitError, ExitFatal};
-
 pub use frame_support::weights::Weight;
-pub use evm_coder_substrate_procedural::PreDispatch;
 
 /// Execution error, should be convertible between EVM and Substrate.
 #[derive(Debug, Clone)]
modifiedpallets/evm-coder-substrate/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-coder-substrate/src/lib.rs
+++ b/pallets/evm-coder-substrate/src/lib.rs
@@ -22,42 +22,39 @@
 extern crate alloc;
 #[cfg(not(feature = "std"))]
 use alloc::format;
-use execution::PreDispatch;
-use frame_support::dispatch::Weight;
-
 use core::marker::PhantomData;
-use sp_std::{cell::RefCell, vec::Vec};
 
-use codec::Decode;
-use frame_support::pallet_prelude::DispatchError;
-use frame_support::traits::PalletInfo;
-use frame_support::{ensure, sp_runtime::ModuleError};
-use up_data_structs::budget;
+use execution::PreDispatch;
+use frame_support::{
+	ensure, pallet_prelude::DispatchError, sp_runtime::ModuleError, traits::PalletInfo,
+};
 use pallet_evm::{
-	ExitError, ExitRevert, ExitSucceed, GasWeightMapping, PrecompileFailure, PrecompileOutput,
-	PrecompileResult, PrecompileHandle,
+	ExitError, ExitRevert, ExitSucceed, GasWeightMapping, PrecompileFailure, PrecompileHandle,
+	PrecompileOutput, PrecompileResult,
 };
+use parity_scale_codec::Decode;
 use sp_core::{Get, H160};
+use sp_std::{cell::RefCell, vec::Vec};
+use sp_weights::Weight;
+use up_data_structs::budget;
 // #[cfg(feature = "runtime-benchmarks")]
 // pub mod benchmarking;
 pub mod execution;
 
-#[doc(hidden)]
-pub use spez::spez;
-
+pub use evm_coder::{abi, solidity_interface, types, Contract, ResultWithPostInfoOf, ToLog};
 use evm_coder::{
 	types::{Msg, Value},
 	AbiEncode,
 };
-
 pub use pallet::*;
-pub use evm_coder::{ResultWithPostInfoOf, Contract, abi, solidity_interface, ToLog, types};
+#[doc(hidden)]
+pub use spez::spez;
 
 #[frame_support::pallet]
 pub mod pallet {
+	pub use frame_support::dispatch::DispatchResult;
+
 	use super::*;
-
-	pub use frame_support::dispatch::DispatchResult;
 
 	/// DispatchError is opaque, but we need to somehow extract correct error in case of OutOfGas failure
 	/// So we have this pallet, which defines OutOfGas error, and knews its own id to check if DispatchError
modifiedpallets/evm-contract-helpers/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-contract-helpers/Cargo.toml
+++ b/pallets/evm-contract-helpers/Cargo.toml
@@ -18,13 +18,11 @@
 up-sponsorship = { workspace = true }
 
 # Locals
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
 evm-coder = { workspace = true }
 pallet-common = { workspace = true }
 pallet-evm-coder-substrate = { workspace = true }
 pallet-evm-transaction-payment = { workspace = true }
+parity-scale-codec = { workspace = true }
 up-data-structs = { workspace = true, features = ['serde1'] }
 
 [features]
modifiedpallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/eth.rs
+++ b/pallets/evm-contract-helpers/src/eth.rs
@@ -18,32 +18,35 @@
 
 extern crate alloc;
 use core::marker::PhantomData;
+
 use evm_coder::{
-	abi::{AbiType, AbiEncode},
+	abi::{AbiEncode, AbiType},
 	generate_stubgen, solidity_interface,
 	types::*,
 	ToLog,
 };
+use frame_support::traits::Get;
+use frame_system::pallet_prelude::*;
 use pallet_common::eth;
 use pallet_evm::{
-	ExitRevert, OnCreate, OnMethodCall, PrecompileResult, PrecompileFailure, PrecompileHandle,
-	account::CrossAccountId,
+	account::CrossAccountId, ExitRevert, OnCreate, OnMethodCall, PrecompileFailure,
+	PrecompileHandle, PrecompileResult,
 };
 use pallet_evm_coder_substrate::{
-	SubstrateRecorder, WithRecorder, dispatch_to_evm,
-	execution::{Result, PreDispatch},
-	frontier_contract,
+	dispatch_to_evm,
+	execution::{PreDispatch, Result},
+	frontier_contract, SubstrateRecorder, WithRecorder,
 };
 use pallet_evm_transaction_payment::CallContext;
 use sp_core::{H160, U256};
+use sp_std::vec::Vec;
 use up_data_structs::SponsorshipState;
+use up_sponsorship::SponsorshipHandler;
+
 use crate::{
-	AllowlistEnabled, Config, Owner, Pallet, SponsorBasket, SponsoringFeeLimit,
-	SponsoringRateLimit, SponsoringModeT, Sponsoring,
+	AllowlistEnabled, Config, Owner, Pallet, SponsorBasket, Sponsoring, SponsoringFeeLimit,
+	SponsoringModeT, SponsoringRateLimit,
 };
-use frame_support::traits::Get;
-use up_sponsorship::SponsorshipHandler;
-use sp_std::vec::Vec;
 
 frontier_contract! {
 	macro_rules! ContractHelpers_result {...}
@@ -422,7 +425,7 @@
 		{
 			return None;
 		}
-		let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;
+		let block_number = <frame_system::Pallet<T>>::block_number() as BlockNumberFor<T>;
 
 		if let Some(last_tx_block) = <SponsorBasket<T>>::get(contract_address, who.as_eth()) {
 			let limit = <SponsoringRateLimit<T>>::get(contract_address);
modifiedpallets/evm-contract-helpers/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/lib.rs
+++ b/pallets/evm-contract-helpers/src/lib.rs
@@ -18,12 +18,12 @@
 #![cfg_attr(not(feature = "std"), no_std)]
 #![warn(missing_docs)]
 
-use codec::{Decode, Encode, MaxEncodedLen};
+pub use eth::*;
 use evm_coder::AbiCoder;
+use frame_support::storage::bounded_btree_map::BoundedBTreeMap;
 pub use pallet::*;
-pub use eth::*;
+use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
 use scale_info::TypeInfo;
-use frame_support::storage::bounded_btree_map::BoundedBTreeMap;
 pub mod eth;
 
 /// Maximum number of methods per contract that could have fee limit
@@ -31,15 +31,16 @@
 
 #[frame_support::pallet]
 pub mod pallet {
-	pub use super::*;
+	use evm_coder::ToLog;
 	use frame_support::{pallet_prelude::*, sp_runtime::DispatchResult};
-	use frame_system::{pallet_prelude::OriginFor, ensure_root};
+	use frame_system::{ensure_root, pallet_prelude::*};
+	use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};
 	use sp_core::{H160, U256};
 	use sp_std::vec::Vec;
-	use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};
 	use up_data_structs::SponsorshipState;
-	use evm_coder::ToLog;
 
+	pub use super::*;
+
 	#[pallet::config]
 	pub trait Config:
 		frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::Config
@@ -53,7 +54,7 @@
 
 		/// In case of enabled sponsoring, but no sponsoring rate limit set,
 		/// this value will be used implicitly
-		type DefaultSponsoringRateLimit: Get<Self::BlockNumber>;
+		type DefaultSponsoringRateLimit: Get<BlockNumberFor<Self>>;
 	}
 
 	#[pallet::error]
@@ -115,7 +116,7 @@
 	pub(super) type SponsoringRateLimit<T: Config> = StorageMap<
 		Hasher = Twox128,
 		Key = H160,
-		Value = T::BlockNumber,
+		Value = BlockNumberFor<T>,
 		QueryKind = ValueQuery,
 		OnEmpty = T::DefaultSponsoringRateLimit,
 	>;
@@ -139,7 +140,7 @@
 		Key1 = H160,
 		Hasher2 = Twox128,
 		Key2 = H160,
-		Value = T::BlockNumber,
+		Value = BlockNumberFor<T>,
 		QueryKind = OptionQuery,
 	>;
 
@@ -393,7 +394,7 @@
 		}
 
 		/// Set duration between two sponsored contract calls
-		pub fn set_sponsoring_rate_limit(contract: H160, rate_limit: T::BlockNumber) {
+		pub fn set_sponsoring_rate_limit(contract: H160, rate_limit: BlockNumberFor<T>) {
 			<SponsoringRateLimit<T>>::insert(contract, rate_limit);
 		}
 
modifiedpallets/evm-migration/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-migration/Cargo.toml
+++ b/pallets/evm-migration/Cargo.toml
@@ -5,21 +5,27 @@
 version = "0.1.1"
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
 ethereum = { workspace = true }
 frame-benchmarking = { workspace = true, optional = true }
 frame-support = { workspace = true }
 frame-system = { workspace = true }
 pallet-evm = { workspace = true }
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
 sp-core = { workspace = true }
+sp-io = { workspace = true }
 sp-std = { workspace = true }
-sp-io = { workspace = true }
 
 [features]
 default = ["runtime-benchmarks", "std"]
 runtime-benchmarks = ["frame-benchmarking"]
-std = ["frame-benchmarking/std", "frame-support/std", "frame-system/std", "pallet-evm/std", "sp-core/std", "sp-std/std", "sp-io/std"]
+std = [
+	"frame-benchmarking/std",
+	"frame-support/std",
+	"frame-system/std",
+	"pallet-evm/std",
+	"sp-core/std",
+	"sp-io/std",
+	"sp-std/std",
+]
 try-runtime = ["frame-support/try-runtime"]
modifiedpallets/evm-migration/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/evm-migration/src/benchmarking.rs
+++ b/pallets/evm-migration/src/benchmarking.rs
@@ -16,14 +16,15 @@
 
 #![allow(missing_docs)]
 
-use super::{Call, Config, Pallet};
 use frame_benchmarking::benchmarks;
 use frame_system::RawOrigin;
 use sp_core::{H160, H256};
-use sp_std::{vec::Vec, vec};
+use sp_std::{vec, vec::Vec};
+
+use super::{Call, Config, Pallet};
 
 benchmarks! {
-	where_clause { where <T as Config>::RuntimeEvent: codec::Encode }
+	where_clause { where <T as Config>::RuntimeEvent: parity_scale_codec::Encode }
 
 	begin {
 	}: _(RawOrigin::Root, H160::default())
@@ -59,7 +60,7 @@
 
 	insert_events {
 		let b in 0..200;
-		use codec::Encode;
+		use parity_scale_codec::Encode;
 		let logs = (0..b).map(|_| <T as Config>::RuntimeEvent::from(crate::Event::<T>::TestEvent).encode()).collect::<Vec<_>>();
 	}: _(RawOrigin::Root, logs)
 }
modifiedpallets/evm-migration/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-migration/src/lib.rs
+++ b/pallets/evm-migration/src/lib.rs
@@ -26,15 +26,13 @@
 
 #[frame_support::pallet]
 pub mod pallet {
-	use frame_support::{
-		pallet_prelude::{*, DispatchResult},
-		traits::IsType,
-	};
-	use frame_system::pallet_prelude::{*, OriginFor};
+	use frame_support::{pallet_prelude::*, traits::IsType};
+	use frame_system::pallet_prelude::*;
+	use pallet_evm::{Pallet as PalletEvm, PrecompileHandle};
 	use sp_core::{H160, H256};
 	use sp_std::vec::Vec;
+
 	use super::weights::WeightInfo;
-	use pallet_evm::{PrecompileHandle, Pallet as PalletEvm};
 
 	#[pallet::config]
 	pub trait Config: frame_system::Config + pallet_evm::Config {
modifiedpallets/evm-transaction-payment/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-transaction-payment/Cargo.toml
+++ b/pallets/evm-transaction-payment/Cargo.toml
@@ -5,9 +5,7 @@
 version = "0.1.1"
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
 
 fp-evm = { workspace = true }
modifiedpallets/evm-transaction-payment/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-transaction-payment/src/lib.rs
+++ b/pallets/evm-transaction-payment/src/lib.rs
@@ -19,20 +19,27 @@
 #![deny(missing_docs)]
 
 use core::marker::PhantomData;
-use fp_evm::WithdrawReason;
-use frame_support::traits::IsSubType;
+
+use fp_evm::{CheckEvmTransaction, FeeCalculator, TransactionValidationError, WithdrawReason};
+use frame_support::{
+	storage::with_transaction,
+	traits::{Currency, Imbalance, IsSubType, OnUnbalanced},
+};
 pub use pallet::*;
-use pallet_evm::{account::CrossAccountId, EnsureAddressOrigin};
+use pallet_evm::{
+	account::CrossAccountId, EnsureAddressOrigin, NegativeImbalanceOf, OnChargeEVMTransaction,
+	OnCheckEvmTransaction,
+};
 use sp_core::{H160, U256};
-use sp_runtime::{TransactionOutcome, DispatchError};
+use sp_runtime::{traits::UniqueSaturatedInto, DispatchError, TransactionOutcome};
 use up_sponsorship::SponsorshipHandler;
 
 #[frame_support::pallet]
 pub mod pallet {
-	use super::*;
-
 	use sp_std::vec::Vec;
 
+	use super::*;
+
 	/// Contains call data
 	pub struct CallContext {
 		/// Contract address
@@ -53,29 +60,64 @@
 	pub struct Pallet<T>(_);
 }
 
-/// Implements [`fp_evm::TransactionValidityHack`], which provides sponsor address to pallet-evm
-pub struct TransactionValidityHack<T: Config>(PhantomData<*const T>);
-impl<T: Config> fp_evm::TransactionValidityHack<T::CrossAccountId> for TransactionValidityHack<T> {
-	fn who_pays_fee(
-		origin: H160,
-		max_fee: U256,
-		reason: &WithdrawReason,
-	) -> Option<T::CrossAccountId> {
-		match reason {
-			WithdrawReason::Call { target, input } => {
-				let origin_sub = T::CrossAccountId::from_eth(origin);
-				let call_context = CallContext {
-					contract_address: *target,
-					input: input.clone(),
-					max_fee,
-				};
-				T::EvmSponsorshipHandler::get_sponsor(&origin_sub, &call_context)
-			}
-			_ => None,
+fn who_pays_fee<T: Config>(
+	origin: H160,
+	max_fee: U256,
+	reason: &WithdrawReason,
+) -> Option<T::CrossAccountId> {
+	match reason {
+		WithdrawReason::Call { target, input, .. } => {
+			let origin_sub = T::CrossAccountId::from_eth(origin);
+			let call_context = CallContext {
+				contract_address: *target,
+				input: input.clone(),
+				max_fee,
+			};
+			T::EvmSponsorshipHandler::get_sponsor(&origin_sub, &call_context)
 		}
+		_ => None,
 	}
 }
 
+fn get_sponsor<T: Config>(
+	source: H160,
+	max_fee_per_gas: Option<U256>,
+	gas_limit: u64,
+	reason: &WithdrawReason,
+	is_transactional: bool,
+	is_check: bool,
+) -> Option<T::CrossAccountId> {
+	let accept_gas_fee = |gas_fee| {
+		let (base_fee, _) = T::FeeCalculator::min_gas_price();
+		// Metamask specifies base fee twice as much as chain reported minGasPrice
+		// But we allow further leeway (why?), sponsored base_fee to be 2.1*minGasPrice, thus 21/10.
+		base_fee <= gas_fee && gas_fee <= base_fee * 21 / 10
+	};
+	let (max_fee_per_gas, may_sponsor) = match (max_fee_per_gas, is_transactional) {
+		(Some(max_fee_per_gas), _) => (max_fee_per_gas, accept_gas_fee(max_fee_per_gas)),
+		// Gas price check is skipped for non-transactional calls that don't
+		// define a `max_fee_per_gas` input.
+		(None, false) => (Default::default(), true),
+		_ => return None,
+	};
+
+	let max_fee = max_fee_per_gas.saturating_mul(gas_limit.into());
+
+	// #[cfg(feature = "debug-logging")]
+	// log::trace!(target: "sponsoring", "checking who will pay fee for {:?} {:?}", source, reason);
+	with_transaction(|| {
+		let result = may_sponsor
+			.then(|| who_pays_fee::<T>(source, max_fee, reason))
+			.flatten();
+		if is_check {
+			TransactionOutcome::Rollback(Ok::<_, DispatchError>(result))
+		} else {
+			TransactionOutcome::Commit(Ok(result))
+		}
+	})
+	.ok()
+	.flatten()
+}
 /// Implements sponsoring for evm calls performed from pallet-evm (via api.tx.ethereum.transact/api.tx.evm.call)
 pub struct BridgeSponsorshipHandler<T>(PhantomData<T>);
 impl<T, C> SponsorshipHandler<T::AccountId, C> for BridgeSponsorshipHandler<T>
@@ -120,3 +162,135 @@
 		}
 	}
 }
+
+/// Set transaction sponsor if available and enough balance.
+pub struct TransactionValidity<T>(PhantomData<T>);
+impl<T: Config> OnCheckEvmTransaction<T> for TransactionValidity<T> {
+	fn on_check_evm_transaction(
+		v: &mut CheckEvmTransaction,
+		origin: &T::CrossAccountId,
+	) -> Result<(), TransactionValidationError> {
+		let who = &v.who;
+		let max_fee_per_gas = Some(v.transaction_fee_input()?.0);
+		let gas_limit = v.transaction.gas_limit.low_u64();
+		let reason = if let Some(to) = v.transaction.to {
+			WithdrawReason::Call {
+				target: to,
+				input: v.transaction.input.clone(),
+				max_fee_per_gas,
+				gas_limit,
+				is_transactional: v.config.is_transactional,
+				is_check: true,
+			}
+		} else {
+			WithdrawReason::Create
+		};
+		let sponsor = get_sponsor::<T>(
+			*origin.as_eth(),
+			max_fee_per_gas,
+			gas_limit,
+			&reason,
+			v.config.is_transactional,
+			true,
+		)
+		.as_ref()
+		.map(pallet_evm::Pallet::<T>::account_basic_by_id)
+		.map(|v| v.0);
+		let fee = max_fee_per_gas
+			.unwrap()
+			.saturating_mul(v.transaction.gas_limit);
+		if let Some(sponsor) = sponsor.as_ref() {
+			if who.balance < v.transaction.value || sponsor.balance < fee {
+				return Err(TransactionValidationError::BalanceTooLow);
+			}
+		} else {
+			let total_payment = v.transaction.value.saturating_add(fee);
+			if who.balance < total_payment {
+				return Err(TransactionValidationError::BalanceTooLow);
+			}
+		}
+
+		let who = sponsor.unwrap_or_else(|| v.who.clone());
+		v.who.balance = who.balance;
+		Ok(())
+	}
+}
+
+/// Implements the transaction payment for a pallet implementing the `Currency`
+/// trait (eg. the pallet_balances) using an unbalance handler (implementing
+/// `OnUnbalanced`).
+/// Similar to `CurrencyAdapter` of `pallet_transaction_payment`
+pub struct WrappedEVMCurrencyAdapter<C, OU>(sp_std::marker::PhantomData<(C, OU)>);
+impl<T, C, OU> OnChargeEVMTransaction<T> for WrappedEVMCurrencyAdapter<C, OU>
+where
+	T: Config,
+	C: Currency<<T as frame_system::Config>::AccountId>,
+	C::PositiveImbalance: Imbalance<
+		<C as Currency<<T as frame_system::Config>::AccountId>>::Balance,
+		Opposite = C::NegativeImbalance,
+	>,
+	C::NegativeImbalance: Imbalance<
+		<C as Currency<<T as frame_system::Config>::AccountId>>::Balance,
+		Opposite = C::PositiveImbalance,
+	>,
+	OU: OnUnbalanced<NegativeImbalanceOf<C, T>>,
+	U256: UniqueSaturatedInto<<C as Currency<<T as frame_system::Config>::AccountId>>::Balance>,
+{
+	// Kept type as Option to satisfy bound of Default
+	type LiquidityInfo = (Option<NegativeImbalanceOf<C, T>>, Option<T::CrossAccountId>);
+
+	fn withdraw_fee(
+		who: &T::CrossAccountId,
+		reason: WithdrawReason,
+		fee: U256,
+	) -> Result<Self::LiquidityInfo, pallet_evm::Error<T>> {
+		let sponsor = match reason {
+			WithdrawReason::Call {
+				max_fee_per_gas,
+				gas_limit,
+				is_transactional,
+				is_check,
+				..
+			} => get_sponsor::<T>(
+				*who.as_eth(),
+				max_fee_per_gas,
+				gas_limit,
+				&reason,
+				is_transactional,
+				is_check,
+			),
+			_ => None,
+		};
+
+		let who = sponsor.as_ref().unwrap_or(who);
+		<pallet_evm::EVMCurrencyAdapter<C, OU> as OnChargeEVMTransaction<T>>::withdraw_fee(
+			who, reason, fee,
+		)
+		.map(|li| (li, sponsor))
+	}
+
+	fn correct_and_deposit_fee(
+		who: &T::CrossAccountId,
+		corrected_fee: U256,
+		base_fee: U256,
+		already_withdrawn: Self::LiquidityInfo,
+	) -> Self::LiquidityInfo {
+		let (already_withdrawn, sponsor) = already_withdrawn;
+		let who = sponsor.as_ref().unwrap_or(who);
+		(
+			<pallet_evm::EVMCurrencyAdapter<C, OU> as OnChargeEVMTransaction<T>>::correct_and_deposit_fee(
+				who,
+				corrected_fee,
+				base_fee,
+				already_withdrawn,
+			),
+			None
+		)
+	}
+
+	fn pay_priority_fee(tip: Self::LiquidityInfo) {
+		<pallet_evm::EVMCurrencyAdapter<C, OU> as OnChargeEVMTransaction<T>>::pay_priority_fee(
+			tip.0,
+		)
+	}
+}
modifiedpallets/foreign-assets/Cargo.tomldiffbeforeafterboth
--- a/pallets/foreign-assets/Cargo.toml
+++ b/pallets/foreign-assets/Cargo.toml
@@ -5,9 +5,7 @@
 version = "0.1.0"
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
 
 frame-benchmarking = { workspace = true, optional = true }
@@ -18,18 +16,17 @@
 pallet-balances = { features = ["insecure_zero_ed"], workspace = true }
 pallet-common = { workspace = true }
 pallet-fungible = { workspace = true }
-serde = { workspace = true, optional = true }
+serde = { workspace = true }
 sp-runtime = { workspace = true }
 sp-std = { workspace = true }
+staging-xcm = { workspace = true }
+staging-xcm-executor = { workspace = true }
 up-data-structs = { workspace = true }
-xcm = { workspace = true }
-xcm-executor = { workspace = true }
 
 [features]
 default = ["std"]
 runtime-benchmarks = ['frame-benchmarking', 'pallet-common/runtime-benchmarks']
 std = [
-	"codec/std",
 	"frame-support/std",
 	"frame-system/std",
 	"log/std",
@@ -37,11 +34,11 @@
 	"pallet-balances/std",
 	"pallet-common/std",
 	"pallet-fungible/std",
+	"parity-scale-codec/std",
 	"scale-info/std",
-	"serde",
 	"sp-runtime/std",
 	"sp-std/std",
+	"staging-xcm-executor/std",
 	"up-data-structs/std",
-	"xcm-executor/std"
 ]
 try-runtime = ["frame-support/try-runtime"]
modifiedpallets/foreign-assets/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/foreign-assets/src/benchmarking.rs
+++ b/pallets/foreign-assets/src/benchmarking.rs
@@ -16,15 +16,14 @@
 
 #![allow(missing_docs)]
 
-use super::{Config, Pallet, Call};
-use frame_benchmarking::{benchmarks, account};
+use frame_benchmarking::{account, benchmarks};
+use frame_support::traits::Currency;
 use frame_system::RawOrigin;
+use sp_std::{boxed::Box, vec::Vec};
+use staging_xcm::{opaque::latest::Junction::Parachain, v3::Junctions::X1, VersionedMultiLocation};
+
+use super::{Call, Config, Pallet};
 use crate::AssetMetadata;
-use xcm::opaque::latest::Junction::Parachain;
-use xcm::VersionedMultiLocation;
-use xcm::v3::Junctions::X1;
-use frame_support::traits::Currency;
-use sp_std::{vec::Vec, boxed::Box};
 
 fn bounded<T: TryFrom<Vec<u8>>>(slice: &[u8]) -> T {
 	T::try_from(slice.to_vec())
modifiedpallets/foreign-assets/src/impl_fungibles.rsdiffbeforeafterboth
--- a/pallets/foreign-assets/src/impl_fungibles.rs
+++ b/pallets/foreign-assets/src/impl_fungibles.rs
@@ -16,44 +16,43 @@
 
 //! Implementations for fungibles trait.
 
-use super::*;
-use frame_system::Config as SystemConfig;
-
 use frame_support::traits::tokens::{
-	DepositConsequence, WithdrawConsequence, Preservation, Fortitude, Provenance, Precision,
+	DepositConsequence, Fortitude, Precision, Preservation, Provenance, WithdrawConsequence,
 };
-use pallet_common::CollectionHandle;
+use frame_system::Config as SystemConfig;
+use pallet_common::{CollectionHandle, CommonCollectionOperations};
 use pallet_fungible::FungibleHandle;
-use pallet_common::CommonCollectionOperations;
+use sp_runtime::traits::{CheckedAdd, CheckedSub};
 use up_data_structs::budget::Value;
-use sp_runtime::traits::{CheckedAdd, CheckedSub};
 
+use super::*;
+
 impl<T: Config> fungibles::Inspect<<T as SystemConfig>::AccountId> for Pallet<T>
 where
-	T: orml_tokens::Config<CurrencyId = AssetIds>,
+	T: orml_tokens::Config<CurrencyId = AssetId>,
 	BalanceOf<T>: From<<T as pallet_balances::Config>::Balance>,
 	BalanceOf<T>: From<<T as orml_tokens::Config>::Balance>,
 	<T as pallet_balances::Config>::Balance: From<BalanceOf<T>>,
 	<T as orml_tokens::Config>::Balance: From<BalanceOf<T>>,
 {
-	type AssetId = AssetIds;
+	type AssetId = AssetId;
 	type Balance = BalanceOf<T>;
 
 	fn total_issuance(asset: Self::AssetId) -> Self::Balance {
 		log::trace!(target: "fassets::impl_foreign_assets", "impl_fungible total_issuance");
 
 		match asset {
-			AssetIds::NativeAssetId(NativeCurrency::Here) => {
+			AssetId::NativeAssetId(NativeCurrency::Here) => {
 				<pallet_balances::Pallet<T> as fungible::Inspect<T::AccountId>>::total_issuance()
 					.into()
 			}
-			AssetIds::NativeAssetId(NativeCurrency::Parent) => {
+			AssetId::NativeAssetId(NativeCurrency::Parent) => {
 				<orml_tokens::Pallet<T> as fungibles::Inspect<T::AccountId>>::total_issuance(
-					AssetIds::NativeAssetId(NativeCurrency::Parent),
+					AssetId::NativeAssetId(NativeCurrency::Parent),
 				)
 				.into()
 			}
-			AssetIds::ForeignAssetId(fid) => {
+			AssetId::ForeignAssetId(fid) => {
 				let target_collection_id = match <AssetBinding<T>>::get(fid) {
 					Some(v) => v,
 					None => return Zero::zero(),
@@ -71,38 +70,36 @@
 	fn minimum_balance(asset: Self::AssetId) -> Self::Balance {
 		log::trace!(target: "fassets::impl_foreign_assets", "impl_fungible minimum_balance");
 		match asset {
-			AssetIds::NativeAssetId(NativeCurrency::Here) => {
+			AssetId::NativeAssetId(NativeCurrency::Here) => {
 				<pallet_balances::Pallet<T> as fungible::Inspect<T::AccountId>>::minimum_balance()
 					.into()
 			}
-			AssetIds::NativeAssetId(NativeCurrency::Parent) => {
+			AssetId::NativeAssetId(NativeCurrency::Parent) => {
 				<orml_tokens::Pallet<T> as fungibles::Inspect<T::AccountId>>::minimum_balance(
-					AssetIds::NativeAssetId(NativeCurrency::Parent),
+					AssetId::NativeAssetId(NativeCurrency::Parent),
 				)
 				.into()
 			}
-			AssetIds::ForeignAssetId(fid) => {
-				AssetMetadatas::<T>::get(AssetIds::ForeignAssetId(fid))
-					.map(|x| x.minimal_balance)
-					.unwrap_or_else(Zero::zero)
-			}
+			AssetId::ForeignAssetId(fid) => AssetMetadatas::<T>::get(AssetId::ForeignAssetId(fid))
+				.map(|x| x.minimal_balance)
+				.unwrap_or_else(Zero::zero),
 		}
 	}
 
 	fn balance(asset: Self::AssetId, who: &<T as SystemConfig>::AccountId) -> Self::Balance {
 		log::trace!(target: "fassets::impl_foreign_assets", "impl_fungible balance");
 		match asset {
-			AssetIds::NativeAssetId(NativeCurrency::Here) => {
+			AssetId::NativeAssetId(NativeCurrency::Here) => {
 				<pallet_balances::Pallet<T> as fungible::Inspect<T::AccountId>>::balance(who).into()
 			}
-			AssetIds::NativeAssetId(NativeCurrency::Parent) => {
+			AssetId::NativeAssetId(NativeCurrency::Parent) => {
 				<orml_tokens::Pallet<T> as fungibles::Inspect<T::AccountId>>::balance(
-					AssetIds::NativeAssetId(NativeCurrency::Parent),
+					AssetId::NativeAssetId(NativeCurrency::Parent),
 					who,
 				)
 				.into()
 			}
-			AssetIds::ForeignAssetId(fid) => {
+			AssetId::ForeignAssetId(fid) => {
 				let target_collection_id = match <AssetBinding<T>>::get(fid) {
 					Some(v) => v,
 					None => return Zero::zero(),
@@ -133,7 +130,7 @@
 		log::trace!(target: "fassets::impl_foreign_assets", "impl_fungible reducible_balance");
 
 		match asset {
-			AssetIds::NativeAssetId(NativeCurrency::Here) => {
+			AssetId::NativeAssetId(NativeCurrency::Here) => {
 				<pallet_balances::Pallet<T> as fungible::Inspect<T::AccountId>>::reducible_balance(
 					who,
 					preservation,
@@ -141,9 +138,9 @@
 				)
 				.into()
 			}
-			AssetIds::NativeAssetId(NativeCurrency::Parent) => {
+			AssetId::NativeAssetId(NativeCurrency::Parent) => {
 				<orml_tokens::Pallet<T> as fungibles::Inspect<T::AccountId>>::reducible_balance(
-					AssetIds::NativeAssetId(NativeCurrency::Parent),
+					AssetId::NativeAssetId(NativeCurrency::Parent),
 					who,
 					preservation,
 					fortitude,
@@ -163,16 +160,16 @@
 		log::trace!(target: "fassets::impl_foreign_assets", "impl_fungible can_deposit");
 
 		match asset {
-			AssetIds::NativeAssetId(NativeCurrency::Here) => {
+			AssetId::NativeAssetId(NativeCurrency::Here) => {
 				<pallet_balances::Pallet<T> as fungible::Inspect<T::AccountId>>::can_deposit(
 					who,
 					amount.into(),
 					provenance,
 				)
 			}
-			AssetIds::NativeAssetId(NativeCurrency::Parent) => {
+			AssetId::NativeAssetId(NativeCurrency::Parent) => {
 				<orml_tokens::Pallet<T> as fungibles::Inspect<T::AccountId>>::can_deposit(
-					AssetIds::NativeAssetId(NativeCurrency::Parent),
+					AssetId::NativeAssetId(NativeCurrency::Parent),
 					who,
 					amount.into(),
 					provenance,
@@ -219,7 +216,7 @@
 		};
 
 		match asset {
-			AssetIds::NativeAssetId(NativeCurrency::Here) => {
+			AssetId::NativeAssetId(NativeCurrency::Here) => {
 				let this_amount: <T as pallet_balances::Config>::Balance = match value.try_into() {
 					Ok(val) => val,
 					Err(_) => {
@@ -240,7 +237,7 @@
 					_ => WithdrawConsequence::BalanceLow,
 				}
 			}
-			AssetIds::NativeAssetId(NativeCurrency::Parent) => {
+			AssetId::NativeAssetId(NativeCurrency::Parent) => {
 				let parent_amount: <T as orml_tokens::Config>::Balance = match value.try_into() {
 					Ok(val) => val,
 					Err(_) => {
@@ -248,7 +245,7 @@
 					}
 				};
 				match <orml_tokens::Pallet<T> as fungibles::Inspect<T::AccountId>>::can_withdraw(
-					AssetIds::NativeAssetId(NativeCurrency::Parent),
+					AssetId::NativeAssetId(NativeCurrency::Parent),
 					who,
 					parent_amount,
 				) {
@@ -269,17 +266,17 @@
 		}
 	}
 
-	fn asset_exists(asset: AssetIds) -> bool {
+	fn asset_exists(asset: AssetId) -> bool {
 		match asset {
-			AssetIds::NativeAssetId(_) => true,
-			AssetIds::ForeignAssetId(fid) => <AssetBinding<T>>::contains_key(fid),
+			AssetId::NativeAssetId(_) => true,
+			AssetId::ForeignAssetId(fid) => <AssetBinding<T>>::contains_key(fid),
 		}
 	}
 }
 
 impl<T: Config> fungibles::Mutate<<T as SystemConfig>::AccountId> for Pallet<T>
 where
-	T: orml_tokens::Config<CurrencyId = AssetIds>,
+	T: orml_tokens::Config<CurrencyId = AssetId>,
 	BalanceOf<T>: From<<T as pallet_balances::Config>::Balance>,
 	BalanceOf<T>: From<<T as orml_tokens::Config>::Balance>,
 	<T as pallet_balances::Config>::Balance: From<BalanceOf<T>>,
@@ -295,22 +292,22 @@
 		log::trace!(target: "fassets::impl_foreign_assets", "impl_fungible mint_into {:?}", asset);
 
 		match asset {
-			AssetIds::NativeAssetId(NativeCurrency::Here) => {
+			AssetId::NativeAssetId(NativeCurrency::Here) => {
 				<pallet_balances::Pallet<T> as fungible::Mutate<T::AccountId>>::mint_into(
 					who,
 					amount.into(),
 				)
 				.map(Into::into)
 			}
-			AssetIds::NativeAssetId(NativeCurrency::Parent) => {
+			AssetId::NativeAssetId(NativeCurrency::Parent) => {
 				<orml_tokens::Pallet<T> as fungibles::Mutate<T::AccountId>>::mint_into(
-					AssetIds::NativeAssetId(NativeCurrency::Parent),
+					AssetId::NativeAssetId(NativeCurrency::Parent),
 					who,
 					amount.into(),
 				)
 				.map(Into::into)
 			}
-			AssetIds::ForeignAssetId(fid) => {
+			AssetId::ForeignAssetId(fid) => {
 				let target_collection_id = match <AssetBinding<T>>::get(fid) {
 					Some(v) => v,
 					None => {
@@ -349,7 +346,7 @@
 		log::trace!(target: "fassets::impl_foreign_assets", "impl_fungible burn_from");
 
 		match asset {
-			AssetIds::NativeAssetId(NativeCurrency::Here) => {
+			AssetId::NativeAssetId(NativeCurrency::Here) => {
 				<pallet_balances::Pallet<T> as fungible::Mutate<T::AccountId>>::burn_from(
 					who,
 					amount.into(),
@@ -358,9 +355,9 @@
 				)
 				.map(Into::into)
 			}
-			AssetIds::NativeAssetId(NativeCurrency::Parent) => {
+			AssetId::NativeAssetId(NativeCurrency::Parent) => {
 				<orml_tokens::Pallet<T> as fungibles::Mutate<T::AccountId>>::burn_from(
-					AssetIds::NativeAssetId(NativeCurrency::Parent),
+					AssetId::NativeAssetId(NativeCurrency::Parent),
 					who,
 					amount.into(),
 					precision,
@@ -368,7 +365,7 @@
 				)
 				.map(Into::into)
 			}
-			AssetIds::ForeignAssetId(fid) => {
+			AssetId::ForeignAssetId(fid) => {
 				let target_collection_id = match <AssetBinding<T>>::get(fid) {
 					Some(v) => v,
 					None => {
@@ -401,7 +398,7 @@
 		log::trace!(target: "fassets::impl_foreign_assets", "impl_fungible transfer");
 
 		match asset {
-			AssetIds::NativeAssetId(NativeCurrency::Here) => {
+			AssetId::NativeAssetId(NativeCurrency::Here) => {
 				match <pallet_balances::Pallet<T> as fungible::Mutate<T::AccountId>>::transfer(
 					source,
 					dest,
@@ -414,9 +411,9 @@
 					)),
 				}
 			}
-			AssetIds::NativeAssetId(NativeCurrency::Parent) => {
+			AssetId::NativeAssetId(NativeCurrency::Parent) => {
 				match <orml_tokens::Pallet<T> as fungibles::Mutate<T::AccountId>>::transfer(
-					AssetIds::NativeAssetId(NativeCurrency::Parent),
+					AssetId::NativeAssetId(NativeCurrency::Parent),
 					source,
 					dest,
 					amount.into(),
@@ -426,7 +423,7 @@
 					Err(e) => Err(e),
 				}
 			}
-			AssetIds::ForeignAssetId(fid) => {
+			AssetId::ForeignAssetId(fid) => {
 				let target_collection_id = match <AssetBinding<T>>::get(fid) {
 					Some(v) => v,
 					None => {
@@ -479,7 +476,7 @@
 
 impl<T: Config> fungibles::Unbalanced<<T as SystemConfig>::AccountId> for Pallet<T>
 where
-	T: orml_tokens::Config<CurrencyId = AssetIds>,
+	T: orml_tokens::Config<CurrencyId = AssetId>,
 	BalanceOf<T>: From<<T as pallet_balances::Config>::Balance>,
 	BalanceOf<T>: From<<T as orml_tokens::Config>::Balance>,
 	<T as pallet_balances::Config>::Balance: From<BalanceOf<T>>,
modifiedpallets/foreign-assets/src/lib.rsdiffbeforeafterboth
--- a/pallets/foreign-assets/src/lib.rs
+++ b/pallets/foreign-assets/src/lib.rs
@@ -39,30 +39,27 @@
 	ensure,
 	pallet_prelude::*,
 	traits::{fungible, fungibles, Currency, EnsureOrigin},
-	RuntimeDebug,
 };
 use frame_system::pallet_prelude::*;
-use up_data_structs::CollectionMode;
+use pallet_common::erc::CrossAccountId;
 use pallet_fungible::Pallet as PalletFungible;
 use scale_info::TypeInfo;
+use serde::{Deserialize, Serialize};
 use sp_runtime::{
 	traits::{One, Zero},
 	ArithmeticError,
 };
 use sp_std::{boxed::Box, vec::Vec};
-use up_data_structs::{CollectionId, TokenId, CreateCollectionData};
-
+use staging_xcm::{latest::MultiLocation, VersionedMultiLocation};
 // NOTE: MultiLocation is used in storages, we will need to do migration if upgrade the
 // MultiLocation to the XCM v3.
-use xcm::opaque::latest::{prelude::XcmError, Weight};
-use xcm::{latest::MultiLocation, VersionedMultiLocation};
-use xcm_executor::{traits::WeightTrader, Assets};
+use staging_xcm::{
+	opaque::latest::{prelude::XcmError, Weight},
+	v3::XcmContext,
+};
+use staging_xcm_executor::{traits::WeightTrader, Assets};
+use up_data_structs::{CollectionId, CollectionMode, CreateCollectionData, TokenId};
 
-use pallet_common::erc::CrossAccountId;
-
-#[cfg(feature = "std")]
-use serde::{Deserialize, Serialize};
-
 // TODO: Move to primitives
 // Id of native currency.
 // 0 - QTZ\UNQ
@@ -79,8 +76,9 @@
 	Encode,
 	Decode,
 	TypeInfo,
+	Serialize,
+	Deserialize,
 )]
-#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
 pub enum NativeCurrency {
 	Here = 0,
 	Parent = 1,
@@ -98,9 +96,10 @@
 	Encode,
 	Decode,
 	TypeInfo,
+	Serialize,
+	Deserialize,
 )]
-#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
-pub enum AssetIds {
+pub enum AssetId {
 	ForeignAssetId(ForeignAssetId),
 	NativeAssetId(NativeCurrency),
 }
@@ -109,17 +108,17 @@
 	fn try_as_foreign(asset: T) -> Option<F>;
 }
 
-impl TryAsForeign<AssetIds, ForeignAssetId> for AssetIds {
-	fn try_as_foreign(asset: AssetIds) -> Option<ForeignAssetId> {
+impl TryAsForeign<AssetId, ForeignAssetId> for AssetId {
+	fn try_as_foreign(asset: AssetId) -> Option<ForeignAssetId> {
 		match asset {
-			AssetIds::ForeignAssetId(id) => Some(id),
+			Self::ForeignAssetId(id) => Some(id),
 			_ => None,
 		}
 	}
 }
 
 pub type ForeignAssetId = u32;
-pub type CurrencyId = AssetIds;
+pub type CurrencyId = AssetId;
 
 mod impl_fungibles;
 pub mod weights;
@@ -151,7 +150,7 @@
 {
 	fn get_asset_metadata(foreign_asset_id: ForeignAssetId) -> Option<AssetMetadata<BalanceOf<T>>> {
 		log::trace!(target: "fassets::asset_metadatas", "call");
-		Pallet::<T>::asset_metadatas(AssetIds::ForeignAssetId(foreign_asset_id))
+		Pallet::<T>::asset_metadatas(AssetId::ForeignAssetId(foreign_asset_id))
 	}
 
 	fn get_multi_location(foreign_asset_id: ForeignAssetId) -> Option<MultiLocation> {
@@ -161,7 +160,7 @@
 
 	fn get_currency_id(multi_location: MultiLocation) -> Option<CurrencyId> {
 		log::trace!(target: "fassets::get_currency_id", "call");
-		Pallet::<T>::location_to_currency_ids(multi_location).map(AssetIds::ForeignAssetId)
+		Pallet::<T>::location_to_currency_ids(multi_location).map(AssetId::ForeignAssetId)
 	}
 }
 
@@ -231,12 +230,12 @@
 		},
 		/// The asset registered.
 		AssetRegistered {
-			asset_id: AssetIds,
+			asset_id: AssetId,
 			metadata: AssetMetadata<BalanceOf<T>>,
 		},
 		/// The asset updated.
 		AssetUpdated {
-			asset_id: AssetIds,
+			asset_id: AssetId,
 			metadata: AssetMetadata<BalanceOf<T>>,
 		},
 	}
@@ -253,7 +252,7 @@
 	#[pallet::storage]
 	#[pallet::getter(fn foreign_asset_locations)]
 	pub type ForeignAssetLocations<T: Config> =
-		StorageMap<_, Twox64Concat, ForeignAssetId, xcm::v3::MultiLocation, OptionQuery>;
+		StorageMap<_, Twox64Concat, ForeignAssetId, staging_xcm::v3::MultiLocation, OptionQuery>;
 
 	/// The storages for CurrencyIds.
 	///
@@ -261,7 +260,7 @@
 	#[pallet::storage]
 	#[pallet::getter(fn location_to_currency_ids)]
 	pub type LocationToCurrencyIds<T: Config> =
-		StorageMap<_, Twox64Concat, xcm::v3::MultiLocation, ForeignAssetId, OptionQuery>;
+		StorageMap<_, Twox64Concat, staging_xcm::v3::MultiLocation, ForeignAssetId, OptionQuery>;
 
 	/// The storages for AssetMetadatas.
 	///
@@ -269,7 +268,7 @@
 	#[pallet::storage]
 	#[pallet::getter(fn asset_metadatas)]
 	pub type AssetMetadatas<T: Config> =
-		StorageMap<_, Twox64Concat, AssetIds, AssetMetadata<BalanceOf<T>>, OptionQuery>;
+		StorageMap<_, Twox64Concat, AssetId, AssetMetadata<BalanceOf<T>>, OptionQuery>;
 
 	/// The storages for assets to fungible collection binding
 	///
@@ -381,7 +380,7 @@
 					*maybe_location = Some(*location);
 
 					AssetMetadatas::<T>::try_mutate(
-						AssetIds::ForeignAssetId(foreign_asset_id),
+						AssetId::ForeignAssetId(foreign_asset_id),
 						|maybe_asset_metadatas| -> DispatchResult {
 							ensure!(maybe_asset_metadatas.is_none(), Error::<T>::AssetIdExisted);
 							*maybe_asset_metadatas = Some(metadata.clone());
@@ -413,7 +412,7 @@
 					.ok_or(Error::<T>::AssetIdNotExists)?;
 
 				AssetMetadatas::<T>::try_mutate(
-					AssetIds::ForeignAssetId(foreign_asset_id),
+					AssetId::ForeignAssetId(foreign_asset_id),
 					|maybe_asset_metadatas| -> DispatchResult {
 						ensure!(
 							maybe_asset_metadatas.is_some(),
@@ -450,7 +449,7 @@
 	traits::{
 		fungibles::Balanced, tokens::currency::Currency as CurrencyT, OnUnbalanced as OnUnbalancedT,
 	},
-	weights::{WeightToFeePolynomial, WeightToFee},
+	weights::{WeightToFee, WeightToFeePolynomial},
 };
 
 pub struct FreeForAll<
@@ -477,7 +476,12 @@
 		Self(Weight::default(), Zero::zero(), PhantomData)
 	}
 
-	fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result<Assets, XcmError> {
+	fn buy_weight(
+		&mut self,
+		weight: Weight,
+		payment: Assets,
+		_xcm: &XcmContext,
+	) -> Result<Assets, XcmError> {
 		log::trace!(target: "fassets::weight", "buy_weight weight: {:?}, payment: {:?}", weight, payment);
 		Ok(payment)
 	}
modifiedpallets/fungible/Cargo.tomldiffbeforeafterboth
--- a/pallets/fungible/Cargo.toml
+++ b/pallets/fungible/Cargo.toml
@@ -5,9 +5,7 @@
 version = "0.1.11"
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
 
 evm-coder = { workspace = true }
modifiedpallets/fungible/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/fungible/src/benchmarking.rs
+++ b/pallets/fungible/src/benchmarking.rs
@@ -14,14 +14,13 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use super::*;
-use crate::{Pallet, Config, FungibleHandle};
-
+use frame_benchmarking::{account, benchmarks};
+use pallet_common::{bench_init, benchmarking::create_collection_raw};
 use sp_std::prelude::*;
-use pallet_common::benchmarking::create_collection_raw;
-use frame_benchmarking::{benchmarks, account};
-use up_data_structs::{CollectionMode, MAX_ITEMS_PER_BATCH, budget::Unlimited};
-use pallet_common::bench_init;
+use up_data_structs::{budget::Unlimited, CollectionMode, MAX_ITEMS_PER_BATCH};
+
+use super::*;
+use crate::{Config, FungibleHandle, Pallet};
 
 const SEED: u32 = 1;
 
modifiedpallets/fungible/src/common.rsdiffbeforeafterboth
--- a/pallets/fungible/src/common.rs
+++ b/pallets/fungible/src/common.rs
@@ -16,22 +16,24 @@
 
 use core::marker::PhantomData;
 
-use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight, traits::Get};
-use up_data_structs::{
-	TokenId, CollectionId, CreateItemExData, budget::Budget, CreateItemData, TokenOwnerError,
+use frame_support::{
+	dispatch::DispatchResultWithPostInfo, ensure, fail, traits::Get, weights::Weight,
 };
 use pallet_common::{
-	CommonCollectionOperations, CommonWeightInfo, RefungibleExtensions, with_weight,
-	weights::WeightInfo as _, SelfWeightOf as PalletCommonWeightOf,
+	weights::WeightInfo as _, with_weight, CommonCollectionOperations, CommonWeightInfo,
+	RefungibleExtensions, SelfWeightOf as PalletCommonWeightOf,
 };
 use pallet_structure::Error as StructureError;
 use sp_runtime::{ArithmeticError, DispatchError};
-use sp_std::{vec::Vec, vec};
-use up_data_structs::{Property, PropertyKey, PropertyValue, PropertyKeyPermission};
+use sp_std::{vec, vec::Vec};
+use up_data_structs::{
+	budget::Budget, CollectionId, CreateItemData, CreateItemExData, Property, PropertyKey,
+	PropertyKeyPermission, PropertyValue, TokenId, TokenOwnerError,
+};
 
 use crate::{
-	Allowance, TotalSupply, Balance, Config, Error, FungibleHandle, Pallet, SelfWeightOf,
-	weights::WeightInfo,
+	weights::WeightInfo, Allowance, Balance, Config, Error, FungibleHandle, Pallet, SelfWeightOf,
+	TotalSupply,
 };
 
 pub struct CommonWeights<T: Config>(PhantomData<T>);
modifiedpallets/fungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/fungible/src/erc.rs
+++ b/pallets/fungible/src/erc.rs
@@ -17,30 +17,31 @@
 //! ERC-20 standart support implementation.
 
 extern crate alloc;
-use core::char::{REPLACEMENT_CHARACTER, decode_utf16};
-use core::convert::TryInto;
-use evm_coder::AbiCoder;
-use evm_coder::{abi::AbiType, ToLog, generate_stubgen, solidity_interface, types::*};
-use up_data_structs::CollectionMode;
+use core::{
+	char::{decode_utf16, REPLACEMENT_CHARACTER},
+	convert::TryInto,
+};
+
+use evm_coder::{abi::AbiType, generate_stubgen, solidity_interface, types::*, AbiCoder, ToLog};
 use pallet_common::{
-	CollectionHandle,
-	erc::{CommonEvmHandler, PrecompileResult, CollectionCall},
+	erc::{CollectionCall, CommonEvmHandler, PrecompileResult},
 	eth::CrossAddress,
-	CommonWeightInfo as _,
+	CollectionHandle, CommonWeightInfo as _,
 };
-use sp_std::vec::Vec;
 use pallet_evm::{account::CrossAccountId, PrecompileHandle};
 use pallet_evm_coder_substrate::{
 	call, dispatch_to_evm,
 	execution::{PreDispatch, Result},
 	frontier_contract,
 };
-use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};
-use sp_core::{U256, Get};
+use pallet_structure::{weights::WeightInfo as _, SelfWeightOf as StructureWeight};
+use sp_core::{Get, U256};
+use sp_std::vec::Vec;
+use up_data_structs::CollectionMode;
 
 use crate::{
-	Allowance, Balance, Config, FungibleHandle, Pallet, TotalSupply, SelfWeightOf,
-	weights::WeightInfo, common::CommonWeights,
+	common::CommonWeights, weights::WeightInfo, Allowance, Balance, Config, FungibleHandle, Pallet,
+	SelfWeightOf, TotalSupply,
 };
 
 frontier_contract! {
modifiedpallets/fungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/fungible/src/lib.rs
+++ b/pallets/fungible/src/lib.rs
@@ -79,30 +79,26 @@
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use core::ops::Deref;
+
 use evm_coder::ToLog;
-use frame_support::{
-	ensure,
-	pallet_prelude::{DispatchResultWithPostInfo, Pays},
-	dispatch::PostDispatchInfo,
-};
-use pallet_evm::account::CrossAccountId;
-use up_data_structs::{
-	AccessMode, CollectionId, TokenId, CreateCollectionData, mapping::TokenAddressMapping,
-	budget::Budget, PropertyKey, Property,
-};
+use frame_support::{dispatch::PostDispatchInfo, ensure, pallet_prelude::*};
+pub use pallet::*;
 use pallet_common::{
-	Error as CommonError, Event as CommonEvent, Pallet as PalletCommon,
-	eth::collection_id_to_address, SelfWeightOf as PalletCommonWeightOf,
-	weights::WeightInfo as CommonWeightInfo, helpers::add_weight_to_post_info,
+	eth::collection_id_to_address, helpers::add_weight_to_post_info,
+	weights::WeightInfo as CommonWeightInfo, Error as CommonError, Event as CommonEvent,
+	Pallet as PalletCommon, SelfWeightOf as PalletCommonWeightOf,
 };
-use pallet_evm::Pallet as PalletEvm;
+use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};
+use pallet_evm_coder_substrate::WithRecorder;
 use pallet_structure::Pallet as PalletStructure;
-use pallet_evm_coder_substrate::WithRecorder;
 use sp_core::H160;
 use sp_runtime::{ArithmeticError, DispatchError, DispatchResult};
 use sp_std::{collections::btree_map::BTreeMap, vec::Vec};
+use up_data_structs::{
+	budget::Budget, mapping::TokenAddressMapping, AccessMode, CollectionId, CreateCollectionData,
+	Property, PropertyKey, TokenId,
+};
 use weights::WeightInfo;
-pub use pallet::*;
 
 use crate::erc::ERC20Events;
 #[cfg(feature = "runtime-benchmarks")]
@@ -116,8 +112,11 @@
 
 #[frame_support::pallet]
 pub mod pallet {
-	use frame_support::{Blake2_128, Blake2_128Concat, Twox64Concat, pallet_prelude::*, storage::Key};
+	use frame_support::{
+		pallet_prelude::*, storage::Key, Blake2_128, Blake2_128Concat, Twox64Concat,
+	};
 	use up_data_structs::CollectionId;
+
 	use super::weights::WeightInfo;
 
 	#[pallet::error]
modifiedpallets/gov-origins/Cargo.tomldiffbeforeafterboth
--- a/pallets/gov-origins/Cargo.toml
+++ b/pallets/gov-origins/Cargo.toml
@@ -23,9 +23,7 @@
 ################################################################################
 # Substrate Dependencies
 
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
 parity-scale-codec = { workspace = true }
-
 scale-info = { workspace = true }
 
 frame-support = { workspace = true }
modifiedpallets/gov-origins/src/lib.rsdiffbeforeafterboth
--- a/pallets/gov-origins/src/lib.rs
+++ b/pallets/gov-origins/src/lib.rs
@@ -17,7 +17,6 @@
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use frame_support::pallet_prelude::*;
-
 pub use pallet::*;
 
 #[frame_support::pallet]
modifiedpallets/identity/Cargo.tomldiffbeforeafterboth
--- a/pallets/identity/Cargo.toml
+++ b/pallets/identity/Cargo.toml
@@ -13,10 +13,9 @@
 targets = ["x86_64-unknown-linux-gnu"]
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec", features = ["max-encoded-len"] }
+parity-scale-codec = { workspace = true, features = ["max-encoded-len"] }
 
-enumflags2 = "0.7.4"
+enumflags2 = "0.7.8"
 frame-benchmarking = { workspace = true, optional = true }
 frame-support = { workspace = true }
 frame-system = { workspace = true }
@@ -38,14 +37,14 @@
 	"sp-runtime/runtime-benchmarks",
 ]
 std = [
-	"codec/std",
 	"frame-benchmarking?/std",
 	"frame-support/std",
 	"frame-system/std",
+	"pallet-balances/std",
+	"parity-scale-codec/std",
 	"scale-info/std",
 	"sp-io/std",
 	"sp-runtime/std",
 	"sp-std/std",
-	"pallet-balances/std",
 ]
 try-runtime = ["frame-support/try-runtime"]
modifiedpallets/identity/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/identity/src/benchmarking.rs
+++ b/pallets/identity/src/benchmarking.rs
@@ -37,17 +37,17 @@
 #![cfg(feature = "runtime-benchmarks")]
 #![allow(clippy::no_effect)]
 
-use super::*;
-
-use crate::Pallet as Identity;
 use frame_benchmarking::{account, benchmarks, whitelisted_caller};
 use frame_support::{
-	ensure, assert_ok,
+	assert_ok, ensure,
 	traits::{EnsureOrigin, Get},
 };
 use frame_system::RawOrigin;
 use sp_runtime::traits::Bounded;
 
+use super::*;
+use crate::Pallet as Identity;
+
 const SEED: u32 = 0;
 
 fn assert_last_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) {
modifiedpallets/identity/src/lib.rsdiffbeforeafterboth
--- a/pallets/identity/src/lib.rs
+++ b/pallets/identity/src/lib.rs
@@ -95,21 +95,18 @@
 mod types;
 pub mod weights;
 
-use frame_support::{
-	traits::{BalanceStatus, Currency, OnUnbalanced, ReservableCurrency},
-};
+use frame_support::traits::{BalanceStatus, Currency, OnUnbalanced, ReservableCurrency};
+pub use pallet::*;
 use sp_runtime::{
-	BoundedVec,
 	traits::{AppendZerosInput, Hash, Saturating, StaticLookup, Zero},
+	BoundedVec,
 };
 use sp_std::prelude::*;
-pub use weights::WeightInfo;
-
-pub use pallet::*;
 pub use types::{
 	Data, IdentityField, IdentityFields, IdentityInfo, Judgement, RegistrarIndex, RegistrarInfo,
 	Registration,
 };
+pub use weights::WeightInfo;
 
 pub type BalanceOf<T> =
 	<<T as Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance;
@@ -132,10 +129,11 @@
 
 #[frame_support::pallet]
 pub mod pallet {
-	use super::*;
 	use frame_support::pallet_prelude::*;
 	use frame_system::pallet_prelude::*;
 
+	use super::*;
+
 	#[pallet::config]
 	pub trait Config: frame_system::Config {
 		/// The overarching event type.
modifiedpallets/identity/src/tests.rsdiffbeforeafterboth
--- a/pallets/identity/src/tests.rs
+++ b/pallets/identity/src/tests.rs
@@ -34,34 +34,29 @@
 
 // Tests for Identity Pallet
 
-use super::*;
-use crate as pallet_identity;
-
-use codec::{Decode, Encode};
 use frame_support::{
 	assert_noop, assert_ok, ord_parameter_types, parameter_types,
 	traits::{ConstU32, ConstU64, EitherOfDiverse},
 	BoundedVec,
 };
 use frame_system::{EnsureRoot, EnsureSignedBy};
+use parity_scale_codec::{Decode, Encode};
 use sp_core::H256;
 use sp_runtime::{
-	testing::Header,
 	traits::{BadOrigin, BlakeTwo256, IdentityLookup},
+	BuildStorage,
 };
 
-type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
-type Block = frame_system::mocking::MockBlock<Test>;
+use super::*;
+use crate as pallet_identity;
+
+type Block = frame_system::mocking::MockBlockU32<Test>;
 
 frame_support::construct_runtime!(
-	pub enum Test where
-		Block = Block,
-		NodeBlock = Block,
-		UncheckedExtrinsic = UncheckedExtrinsic,
-	{
-		System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
-		Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
-		Identity: pallet_identity::{Pallet, Call, Storage, Event<T>},
+	pub enum Test {
+		System: frame_system,
+		Balances: pallet_balances,
+		Identity: pallet_identity,
 	}
 );
 
@@ -71,19 +66,18 @@
 }
 impl frame_system::Config for Test {
 	type BaseCallFilter = frame_support::traits::Everything;
+	type Block = Block;
 	type BlockWeights = ();
 	type BlockLength = ();
 	type RuntimeOrigin = RuntimeOrigin;
-	type Index = u64;
-	type BlockNumber = u64;
+	type Nonce = u64;
 	type Hash = H256;
 	type RuntimeCall = RuntimeCall;
 	type Hashing = BlakeTwo256;
 	type AccountId = u64;
 	type Lookup = IdentityLookup<Self::AccountId>;
-	type Header = Header;
 	type RuntimeEvent = RuntimeEvent;
-	type BlockHashCount = ConstU64<250>;
+	type BlockHashCount = ConstU32<250>;
 	type DbWeight = ();
 	type Version = ();
 	type PalletInfo = PalletInfo;
@@ -106,7 +100,7 @@
 	type MaxReserves = ();
 	type ReserveIdentifier = [u8; 8];
 	type WeightInfo = ();
-	type HoldIdentifier = ();
+	type RuntimeHoldReason = RuntimeHoldReason;
 	type FreezeIdentifier = ();
 	type MaxHolds = ();
 	type MaxFreezes = ();
@@ -139,8 +133,8 @@
 }
 
 pub fn new_test_ext() -> sp_io::TestExternalities {
-	let mut t = frame_system::GenesisConfig::default()
-		.build_storage::<Test>()
+	let mut t = <frame_system::GenesisConfig<Test>>::default()
+		.build_storage()
 		.unwrap();
 	pallet_balances::GenesisConfig::<Test> {
 		balances: vec![(1, 10), (2, 10), (3, 10), (10, 100), (20, 100), (30, 100)],
modifiedpallets/identity/src/types.rsdiffbeforeafterboth
--- a/pallets/identity/src/types.rs
+++ b/pallets/identity/src/types.rs
@@ -32,13 +32,12 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-use super::*;
-use codec::{Decode, Encode, MaxEncodedLen};
 use enumflags2::{bitflags, BitFlags};
 use frame_support::{
 	traits::{ConstU32, Get},
 	BoundedVec, CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound,
 };
+use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
 use scale_info::{
 	build::{Fields, Variants},
 	meta_type, Path, Type, TypeInfo, TypeParameter,
@@ -46,6 +45,8 @@
 use sp_runtime::{traits::Zero, RuntimeDebug};
 use sp_std::{fmt::Debug, iter::once, ops::Add, prelude::*};
 
+use super::*;
+
 /// Either underlying data blob if it is at most 32 bytes, or a hash of it. If the data is greater
 /// than 32-bytes then it will be truncated when encoding.
 ///
@@ -77,7 +78,9 @@
 }
 
 impl Decode for Data {
-	fn decode<I: codec::Input>(input: &mut I) -> sp_std::result::Result<Self, codec::Error> {
+	fn decode<I: parity_scale_codec::Input>(
+		input: &mut I,
+	) -> sp_std::result::Result<Self, parity_scale_codec::Error> {
 		let b = input.read_byte()?;
 		Ok(match b {
 			0 => Data::None,
@@ -92,7 +95,7 @@
 			35 => Data::Sha256(<[u8; 32]>::decode(input)?),
 			36 => Data::Keccak256(<[u8; 32]>::decode(input)?),
 			37 => Data::ShaThree256(<[u8; 32]>::decode(input)?),
-			_ => return Err(codec::Error::from("invalid leading byte")),
+			_ => return Err(parity_scale_codec::Error::from("invalid leading byte")),
 		})
 	}
 }
@@ -114,7 +117,7 @@
 		}
 	}
 }
-impl codec::EncodeLike for Data {}
+impl parity_scale_codec::EncodeLike for Data {}
 
 /// Add a Raw variant with the given index and a fixed sized byte array
 macro_rules! data_raw_variants {
@@ -284,7 +287,9 @@
 	}
 }
 impl Decode for IdentityFields {
-	fn decode<I: codec::Input>(input: &mut I) -> sp_std::result::Result<Self, codec::Error> {
+	fn decode<I: parity_scale_codec::Input>(
+		input: &mut I,
+	) -> sp_std::result::Result<Self, parity_scale_codec::Error> {
 		let field = u64::decode(input)?;
 		Ok(Self(
 			<BitFlags<IdentityField>>::from_bits(field).map_err(|_| "invalid value")?,
@@ -445,7 +450,9 @@
 		MaxAdditionalFields: Get<u32>,
 	> Decode for Registration<Balance, MaxJudgements, MaxAdditionalFields>
 {
-	fn decode<I: codec::Input>(input: &mut I) -> sp_std::result::Result<Self, codec::Error> {
+	fn decode<I: parity_scale_codec::Input>(
+		input: &mut I,
+	) -> sp_std::result::Result<Self, parity_scale_codec::Error> {
 		let (judgements, deposit, info) = Decode::decode(&mut AppendZerosInput::new(input))?;
 		Ok(Self {
 			judgements,
modifiedpallets/inflation/Cargo.tomldiffbeforeafterboth
--- a/pallets/inflation/Cargo.toml
+++ b/pallets/inflation/Cargo.toml
@@ -18,20 +18,18 @@
 default = ['std']
 runtime-benchmarks = ['frame-benchmarking']
 std = [
-	'codec/std',
 	'frame-benchmarking/std',
 	'frame-support/std',
 	'frame-system/std',
 	'pallet-balances/std',
+	'parity-scale-codec/std',
 	'sp-runtime/std',
 	'sp-std/std',
 ]
 try-runtime = ["frame-support/try-runtime"]
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
 
 frame-benchmarking = { workspace = true, optional = true }
modifiedpallets/inflation/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/inflation/src/benchmarking.rs
+++ b/pallets/inflation/src/benchmarking.rs
@@ -16,18 +16,18 @@
 
 #![cfg(feature = "runtime-benchmarks")]
 
+use frame_benchmarking::benchmarks;
+use frame_support::{pallet_prelude::*, traits::Hooks};
+
 use super::*;
 use crate::Pallet as Inflation;
 
-use frame_benchmarking::{benchmarks};
-use frame_support::traits::OnInitialize;
-
 benchmarks! {
 
 	on_initialize {
-		let block1: T::BlockNumber = T::BlockNumber::from(1u32);
-		let block2: T::BlockNumber = T::BlockNumber::from(2u32);
-		Inflation::<T>::on_initialize(block1); // Create Treasury account
-	}: { Inflation::<T>::on_initialize(block2); } // Benchmark deposit_into_existing path
+		let block1: BlockNumberFor<T> = 1u32.into();
+		let block2: BlockNumberFor<T> = 2u32.into();
+		<Inflation<T> as Hooks>::on_initialize(block1); // Create Treasury account
+	}: { <Inflation<T> as Hooks>::on_initialize(block2); } // Benchmark deposit_into_existing path
 
 }
modifiedpallets/inflation/src/lib.rsdiffbeforeafterboth
--- a/pallets/inflation/src/lib.rs
+++ b/pallets/inflation/src/lib.rs
@@ -37,17 +37,14 @@
 #[cfg(test)]
 mod tests;
 
-use frame_support::{
-	dispatch::{DispatchResult},
-	traits::{
-		fungible::{Balanced, Inspect, Mutate},
-		Get,
-		tokens::Precision,
-	},
+use frame_support::traits::{
+	fungible::{Balanced, Inspect, Mutate},
+	tokens::Precision,
+	Get,
 };
+use frame_system::pallet_prelude::BlockNumberFor;
 pub use pallet::*;
-use sp_runtime::{Perbill, traits::BlockNumberProvider};
-
+use sp_runtime::{traits::BlockNumberProvider, Perbill};
 use sp_std::convert::TryInto;
 
 type BalanceOf<T> =
@@ -61,10 +58,11 @@
 
 #[frame_support::pallet]
 pub mod pallet {
-	use super::*;
 	use frame_support::pallet_prelude::*;
 	use frame_system::pallet_prelude::*;
 
+	use super::*;
+
 	#[pallet::config]
 	pub trait Config: frame_system::Config {
 		type Currency: Balanced<Self::AccountId>
@@ -73,11 +71,11 @@
 		type TreasuryAccountId: Get<Self::AccountId>;
 
 		// The block number provider
-		type BlockNumberProvider: BlockNumberProvider<BlockNumber = Self::BlockNumber>;
+		type BlockNumberProvider: BlockNumberProvider<BlockNumber = BlockNumberFor<Self>>;
 
 		/// Number of blocks that pass between treasury balance updates due to inflation
 		#[pallet::constant]
-		type InflationBlockInterval: Get<Self::BlockNumber>;
+		type InflationBlockInterval: Get<BlockNumberFor<Self>>;
 	}
 
 	#[pallet::pallet]
@@ -95,22 +93,23 @@
 	/// Next target (relay) block when inflation will be applied
 	#[pallet::storage]
 	pub type NextInflationBlock<T: Config> =
-		StorageValue<Value = T::BlockNumber, QueryKind = ValueQuery>;
+		StorageValue<Value = BlockNumberFor<T>, QueryKind = ValueQuery>;
 
 	/// Next target (relay) block when inflation is recalculated
 	#[pallet::storage]
 	pub type NextRecalculationBlock<T: Config> =
-		StorageValue<Value = T::BlockNumber, QueryKind = ValueQuery>;
+		StorageValue<Value = BlockNumberFor<T>, QueryKind = ValueQuery>;
 
 	/// Relay block when inflation has started
 	#[pallet::storage]
-	pub type StartBlock<T: Config> = StorageValue<Value = T::BlockNumber, QueryKind = ValueQuery>;
+	pub type StartBlock<T: Config> =
+		StorageValue<Value = BlockNumberFor<T>, QueryKind = ValueQuery>;
 
 	#[pallet::hooks]
 	impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
-		fn on_initialize(_: T::BlockNumber) -> Weight
+		fn on_initialize(_: BlockNumberFor<T>) -> Weight
 		where
-			<T as frame_system::Config>::BlockNumber: From<u32>,
+			BlockNumberFor<T>: From<u32>,
 		{
 			let mut consumed_weight = Weight::zero();
 			let mut add_weight = |reads, writes, weight| {
@@ -120,7 +119,7 @@
 
 			let block_interval: u32 = T::InflationBlockInterval::get().try_into().unwrap_or(0);
 			let current_relay_block = T::BlockNumberProvider::current_block_number();
-			let next_inflation: T::BlockNumber = <NextInflationBlock<T>>::get();
+			let next_inflation: BlockNumberFor<T> = <NextInflationBlock<T>>::get();
 			add_weight(1, 0, Weight::from_parts(5_000_000, 0));
 
 			// Apply inflation every InflationBlockInterval blocks
@@ -129,7 +128,7 @@
 				// Recalculate inflation on the first block of the year (or if it is not initialized yet)
 				// Do the "current_relay_block >= next_recalculation" check in the "current_relay_block >= next_inflation"
 				// block because it saves InflationBlockInterval DB reads for NextRecalculationBlock.
-				let next_recalculation: T::BlockNumber = <NextRecalculationBlock<T>>::get();
+				let next_recalculation: BlockNumberFor<T> = <NextRecalculationBlock<T>>::get();
 				add_weight(1, 0, Weight::zero());
 				if current_relay_block >= next_recalculation {
 					Self::recalculate_inflation(next_recalculation);
@@ -169,10 +168,10 @@
 		#[pallet::weight(Weight::from_parts(0, 0))]
 		pub fn start_inflation(
 			origin: OriginFor<T>,
-			inflation_start_relay_block: T::BlockNumber,
+			inflation_start_relay_block: BlockNumberFor<T>,
 		) -> DispatchResult
 		where
-			<T as frame_system::Config>::BlockNumber: From<u32>,
+			BlockNumberFor<T>: From<u32>,
 		{
 			ensure_root(origin)?;
 
@@ -200,9 +199,9 @@
 }
 
 impl<T: Config> Pallet<T> {
-	pub fn recalculate_inflation(recalculation_block: T::BlockNumber) {
+	pub fn recalculate_inflation(recalculation_block: BlockNumberFor<T>) {
 		let current_year: u32 = ((recalculation_block - <StartBlock<T>>::get())
-			/ T::BlockNumber::from(YEAR))
+			/ BlockNumberFor::<T>::from(YEAR))
 		.try_into()
 		.unwrap_or(0);
 		let block_interval: u32 = T::InflationBlockInterval::get().try_into().unwrap_or(0);
modifiedpallets/inflation/src/tests.rsdiffbeforeafterboth
--- a/pallets/inflation/src/tests.rs
+++ b/pallets/inflation/src/tests.rs
@@ -16,14 +16,12 @@
 
 #![cfg(test)]
 #![allow(clippy::from_over_into)]
-use crate as pallet_inflation;
-
 use frame_support::{
 	assert_ok, parameter_types,
 	traits::{
 		fungible::{Balanced, Inspect},
-		OnInitialize, Everything, ConstU32,
 		tokens::Precision,
+		ConstU32, Everything, OnInitialize,
 	},
 	weights::Weight,
 };
@@ -31,15 +29,17 @@
 use sp_core::H256;
 use sp_runtime::{
 	traits::{BlakeTwo256, BlockNumberProvider, IdentityLookup},
-	testing::Header,
+	BuildStorage,
 };
 
-type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
-type Block = frame_system::mocking::MockBlock<Test>;
+use crate as pallet_inflation;
 
-const YEAR: u64 = 5_259_600; // 6-second blocks
-							 // const YEAR: u64 = 2_629_800; // 12-second blocks
-							 // Expected 100-block inflation for year 1 is 100 * 100_000_000 / YEAR = FIRST_YEAR_BLOCK_INFLATION
+type Block = frame_system::mocking::MockBlockU32<Test>;
+
+// 6-second blocks
+// const YEAR: u32 = 2_629_800; // 12-second blocks
+// Expected 100-block inflation for year 1 is 100 * 100_000_000 / YEAR = FIRST_YEAR_BLOCK_INFLATION
+const YEAR: u32 = 5_259_600;
 const FIRST_YEAR_BLOCK_INFLATION: u64 = 1901;
 
 parameter_types! {
@@ -57,26 +57,22 @@
 	type MaxLocks = MaxLocks;
 	type MaxReserves = ();
 	type ReserveIdentifier = ();
-	type HoldIdentifier = ();
 	type FreezeIdentifier = ();
 	type MaxHolds = ();
 	type MaxFreezes = ();
+	type RuntimeHoldReason = RuntimeHoldReason;
 }
 
 frame_support::construct_runtime!(
-	pub enum Test where
-		Block = Block,
-		NodeBlock = Block,
-		UncheckedExtrinsic = UncheckedExtrinsic,
-	{
-		Balances: pallet_balances::{Pallet, Call, Storage},
-		System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
-		Inflation: pallet_inflation::{Pallet, Call, Storage},
+	pub enum Test {
+		Balances: pallet_balances,
+		System: frame_system,
+		Inflation: pallet_inflation,
 	}
 );
 
 parameter_types! {
-	pub const BlockHashCount: u64 = 250;
+	pub const BlockHashCount: u32 = 250;
 	pub BlockWeights: frame_system::limits::BlockWeights =
 		frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1024, 0));
 	pub const SS58Prefix: u8 = 42;
@@ -84,18 +80,17 @@
 
 impl frame_system::Config for Test {
 	type BaseCallFilter = Everything;
+	type Block = Block;
 	type BlockWeights = ();
 	type BlockLength = ();
 	type DbWeight = ();
 	type RuntimeOrigin = RuntimeOrigin;
 	type RuntimeCall = RuntimeCall;
-	type Index = u64;
-	type BlockNumber = u64;
+	type Nonce = u64;
 	type Hash = H256;
 	type Hashing = BlakeTwo256;
 	type AccountId = u64;
 	type Lookup = IdentityLookup<Self::AccountId>;
-	type Header = Header;
 	type RuntimeEvent = ();
 	type BlockHashCount = BlockHashCount;
 	type Version = ();
@@ -112,11 +107,11 @@
 parameter_types! {
 	pub TreasuryAccountId: u64 = 1234;
 	pub const InflationBlockInterval: u32 = 100; // every time per how many blocks inflation is applied
-	pub static MockBlockNumberProvider: u64 = 0;
+	pub static MockBlockNumberProvider: u32 = 0;
 }
 
 impl BlockNumberProvider for MockBlockNumberProvider {
-	type BlockNumber = u64;
+	type BlockNumber = u32;
 
 	fn current_block_number() -> Self::BlockNumber {
 		Self::get()
@@ -131,8 +126,8 @@
 }
 
 pub fn new_test_ext() -> sp_io::TestExternalities {
-	frame_system::GenesisConfig::default()
-		.build_storage::<Test>()
+	<frame_system::GenesisConfig<Test>>::default()
+		.build_storage()
 		.unwrap()
 		.into()
 }
@@ -194,7 +189,7 @@
 fn inflation_second_deposit() {
 	new_test_ext().execute_with(|| {
 		// Total issuance = 1_000_000_000
-		let initial_issuance: u64 = 1_000_000_000;
+		let initial_issuance = 1_000_000_000;
 		let _ = <Balances as Balanced<_>>::deposit(&1234, initial_issuance, Precision::Exact);
 		assert_eq!(Balances::free_balance(1234), initial_issuance);
 		MockBlockNumberProvider::set(1);
@@ -203,20 +198,20 @@
 		assert_ok!(Inflation::start_inflation(RawOrigin::Root.into(), 1));
 
 		// Next inflation deposit happens when block is greater then or equal to NextInflationBlock
-		let mut block: u64 = 2;
-		let balance_before: u64 = Balances::free_balance(1234);
+		let mut block = 2;
+		let balance_before = Balances::free_balance(1234);
 		while block < <pallet_inflation::NextInflationBlock<Test>>::get() {
-			MockBlockNumberProvider::set(block as u64);
+			MockBlockNumberProvider::set(block);
 			Inflation::on_initialize(0);
 			block += 1;
 		}
-		let balance_just_before: u64 = Balances::free_balance(1234);
+		let balance_just_before = Balances::free_balance(1234);
 		assert_eq!(balance_before, balance_just_before);
 
 		// The block with inflation
-		MockBlockNumberProvider::set(block as u64);
+		MockBlockNumberProvider::set(block);
 		Inflation::on_initialize(0);
-		let balance_after: u64 = Balances::free_balance(1234);
+		let balance_after = Balances::free_balance(1234);
 		assert_eq!(balance_after - balance_just_before, block_inflation!());
 	});
 }
@@ -241,7 +236,7 @@
 			Inflation::on_initialize(0);
 		}
 		assert_eq!(
-			initial_issuance + (FIRST_YEAR_BLOCK_INFLATION * (YEAR / 100)),
+			initial_issuance + (FIRST_YEAR_BLOCK_INFLATION * ((YEAR as u64) / 100)),
 			<Balances as Inspect<_>>::total_issuance()
 		);
 
@@ -250,8 +245,8 @@
 		let block_inflation_year_2 = block_inflation!();
 		// Expected 100-block inflation for year 2: 100 * 9.33% * initial issuance * 110% / YEAR == 1951
 		let expecter_year_2_inflation: u64 = (initial_issuance
-			+ FIRST_YEAR_BLOCK_INFLATION * YEAR / 100)
-			* 933 * 100 / (10000 * YEAR);
+			+ FIRST_YEAR_BLOCK_INFLATION * (YEAR as u64) / 100)
+			* 933 * 100 / (10000 * (YEAR as u64));
 		assert_eq!(block_inflation_year_2 / 10, expecter_year_2_inflation / 10); // divide by 10 for approx. equality
 	});
 }
@@ -260,8 +255,8 @@
 fn inflation_start_large_kusama_block() {
 	new_test_ext().execute_with(|| {
 		// Total issuance = 1_000_000_000
-		let initial_issuance: u64 = 1_000_000_000;
-		let start_block: u64 = 10457457;
+		let initial_issuance = 1_000_000_000;
+		let start_block = 10457457;
 		let _ = <Balances as Balanced<_>>::deposit(&1234, initial_issuance, Precision::Exact);
 		assert_eq!(Balances::free_balance(1234), initial_issuance);
 		MockBlockNumberProvider::set(start_block);
@@ -280,7 +275,7 @@
 			Inflation::on_initialize(0);
 		}
 		assert_eq!(
-			initial_issuance + (FIRST_YEAR_BLOCK_INFLATION * (YEAR / 100)),
+			initial_issuance + (FIRST_YEAR_BLOCK_INFLATION * ((YEAR as u64) / 100)),
 			<Balances as Inspect<_>>::total_issuance()
 		);
 
@@ -289,8 +284,8 @@
 		let block_inflation_year_2 = block_inflation!();
 		// Expected 100-block inflation for year 2: 100 * 9.33% * initial issuance * 110% / YEAR == 1951
 		let expecter_year_2_inflation: u64 = (initial_issuance
-			+ FIRST_YEAR_BLOCK_INFLATION * YEAR / 100)
-			* 933 * 100 / (10000 * YEAR);
+			+ FIRST_YEAR_BLOCK_INFLATION * (YEAR as u64) / 100)
+			* 933 * 100 / (10000 * (YEAR as u64));
 		assert_eq!(block_inflation_year_2 / 10, expecter_year_2_inflation / 10); // divide by 10 for approx. equality
 	});
 }
@@ -327,14 +322,14 @@
 #[test]
 fn inflation_rate_by_year() {
 	new_test_ext().execute_with(|| {
-		let payouts: u64 = YEAR / InflationBlockInterval::get() as u64;
+		let payouts = (YEAR / InflationBlockInterval::get()) as u64;
 
 		// Inflation starts at 10% and does down by 2/3% every year until year 9 (included),
 		// then it is flat.
 		let payout_by_year: [u64; 11] = [1000, 933, 867, 800, 733, 667, 600, 533, 467, 400, 400];
 
 		// For accuracy total issuance = payout0 * payouts * 10;
-		let initial_issuance: u64 = payout_by_year[0] * payouts * 10;
+		let initial_issuance = payout_by_year[0] * payouts * 10;
 		let _ = <Balances as Balanced<_>>::deposit(&1234, initial_issuance, Precision::Exact);
 		assert_eq!(Balances::free_balance(1234), initial_issuance);
 
modifiedpallets/maintenance/Cargo.tomldiffbeforeafterboth
--- a/pallets/maintenance/Cargo.toml
+++ b/pallets/maintenance/Cargo.toml
@@ -10,19 +10,27 @@
 version = "0.1.0"
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
 
 frame-benchmarking = { workspace = true, optional = true }
 frame-support = { workspace = true }
 frame-system = { workspace = true }
 sp-core = { workspace = true }
+sp-runtime = { workspace = true }
 sp-std = { workspace = true }
 
 [features]
 default = ["std"]
 runtime-benchmarks = ["frame-benchmarking", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks"]
-std = ["codec/std", "frame-benchmarking/std", "frame-support/std", "frame-system/std", "scale-info/std", "sp-core/std", "sp-std/std"]
+std = [
+	"frame-benchmarking/std",
+	"frame-support/std",
+	"frame-system/std",
+	"parity-scale-codec/std",
+	"scale-info/std",
+	"sp-core/std",
+	"sp-runtime/std",
+	"sp-std/std",
+]
 try-runtime = ["frame-support/try-runtime"]
modifiedpallets/maintenance/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/maintenance/src/benchmarking.rs
+++ b/pallets/maintenance/src/benchmarking.rs
@@ -14,13 +14,13 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use super::*;
-use crate::{Pallet as Maintenance, Config};
-
-use codec::Encode;
 use frame_benchmarking::benchmarks;
+use frame_support::{ensure, pallet_prelude::Weight, traits::StorePreimage};
 use frame_system::RawOrigin;
-use frame_support::{ensure, pallet_prelude::Weight, traits::StorePreimage};
+use parity_scale_codec::Encode;
+
+use super::*;
+use crate::{Config, Pallet as Maintenance};
 
 benchmarks! {
 	enable {
modifiedpallets/maintenance/src/lib.rsdiffbeforeafterboth
--- a/pallets/maintenance/src/lib.rs
+++ b/pallets/maintenance/src/lib.rs
@@ -26,10 +26,14 @@
 #[frame_support::pallet]
 pub mod pallet {
 
-	use frame_support::{dispatch::*, pallet_prelude::*};
-	use frame_support::traits::{QueryPreimage, StorePreimage, EnsureOrigin};
+	use frame_support::{
+		dispatch::*,
+		pallet_prelude::*,
+		traits::{EnsureOrigin, QueryPreimage, StorePreimage},
+	};
 	use frame_system::pallet_prelude::*;
 	use sp_core::H256;
+	use sp_runtime::traits::Dispatchable;
 
 	use crate::weights::WeightInfo;
 
@@ -111,7 +115,7 @@
 			hash: H256,
 			weight_bound: Weight,
 		) -> DispatchResultWithPostInfo {
-			use codec::Decode;
+			use parity_scale_codec::Decode;
 
 			T::PreimageOrigin::ensure_origin(origin.clone())?;
 
modifiedpallets/nonfungible/Cargo.tomldiffbeforeafterboth
--- a/pallets/nonfungible/Cargo.toml
+++ b/pallets/nonfungible/Cargo.toml
@@ -5,9 +5,6 @@
 version = "0.1.14"
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
 evm-coder = { workspace = true }
 frame-benchmarking = { workspace = true, optional = true }
 frame-support = { workspace = true }
@@ -16,6 +13,7 @@
 pallet-evm = { workspace = true }
 pallet-evm-coder-substrate = { workspace = true }
 pallet-structure = { workspace = true }
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
 sp-core = { workspace = true }
 sp-runtime = { workspace = true }
modifiedpallets/nonfungible/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/benchmarking.rs
+++ b/pallets/nonfungible/src/benchmarking.rs
@@ -14,23 +14,23 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use super::*;
-use crate::{Pallet, Config, NonfungibleHandle};
-
-use frame_benchmarking::{benchmarks, account};
+use frame_benchmarking::{account, benchmarks};
 use pallet_common::{
 	bench_init,
 	benchmarking::{
-		create_collection_raw, property_key, property_value, load_is_admin_and_property_permissions,
+		create_collection_raw, load_is_admin_and_property_permissions, property_key, property_value,
 	},
 	CommonCollectionOperations,
 };
 use sp_std::prelude::*;
 use up_data_structs::{
-	CollectionMode, MAX_ITEMS_PER_BATCH, MAX_PROPERTIES_PER_ITEM, budget::Unlimited,
-	PropertyPermission,
+	budget::Unlimited, CollectionMode, PropertyPermission, MAX_ITEMS_PER_BATCH,
+	MAX_PROPERTIES_PER_ITEM,
 };
 
+use super::*;
+use crate::{Config, NonfungibleHandle, Pallet};
+
 const SEED: u32 = 1;
 
 fn create_max_item_data<T: Config>(owner: T::CrossAccountId) -> CreateItemData<T> {
modifiedpallets/nonfungible/src/common.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/common.rs
+++ b/pallets/nonfungible/src/common.rs
@@ -17,21 +17,21 @@
 use core::marker::PhantomData;
 
 use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight};
-use up_data_structs::{
-	TokenId, CreateItemExData, CollectionId, budget::Budget, Property, PropertyKey,
-	PropertyKeyPermission, PropertyValue, TokenOwnerError,
-};
 use pallet_common::{
-	CommonCollectionOperations, CommonWeightInfo, RefungibleExtensions, with_weight,
-	weights::WeightInfo as _, SelfWeightOf as PalletCommonWeightOf, init_token_properties_delta,
+	init_token_properties_delta, weights::WeightInfo as _, with_weight, CommonCollectionOperations,
+	CommonWeightInfo, RefungibleExtensions, SelfWeightOf as PalletCommonWeightOf,
 };
 use pallet_structure::Pallet as PalletStructure;
 use sp_runtime::DispatchError;
-use sp_std::{vec::Vec, vec};
+use sp_std::{vec, vec::Vec};
+use up_data_structs::{
+	budget::Budget, CollectionId, CreateItemExData, Property, PropertyKey, PropertyKeyPermission,
+	PropertyValue, TokenId, TokenOwnerError,
+};
 
 use crate::{
-	AccountBalance, Allowance, Config, CreateItemData, Error, NonfungibleHandle, Owned, Pallet,
-	SelfWeightOf, TokenData, weights::WeightInfo, TokensMinted, TokenProperties,
+	weights::WeightInfo, AccountBalance, Allowance, Config, CreateItemData, Error,
+	NonfungibleHandle, Owned, Pallet, SelfWeightOf, TokenData, TokenProperties, TokensMinted,
 };
 
 pub struct CommonWeights<T: Config>(PhantomData<T>);
modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -23,34 +23,34 @@
 
 use alloc::string::ToString;
 use core::{
-	char::{REPLACEMENT_CHARACTER, decode_utf16},
+	char::{decode_utf16, REPLACEMENT_CHARACTER},
 	convert::TryInto,
 };
-use evm_coder::{abi::AbiType, AbiCoder, ToLog, generate_stubgen, solidity_interface, types::*};
+
+use evm_coder::{abi::AbiType, generate_stubgen, solidity_interface, types::*, AbiCoder, ToLog};
 use frame_support::BoundedVec;
-use up_data_structs::{
-	TokenId, PropertyPermission, PropertyKeyPermission, Property, CollectionId, PropertyKey,
-	CollectionPropertiesVec,
+use pallet_common::{
+	erc::{static_property::key, CollectionCall, CommonEvmHandler, PrecompileResult},
+	eth::{self, TokenUri},
+	CollectionHandle, CollectionPropertyPermissions, CommonCollectionOperations, CommonWeightInfo,
 };
+use pallet_evm::{account::CrossAccountId, PrecompileHandle};
 use pallet_evm_coder_substrate::{
-	dispatch_to_evm, frontier_contract,
-	execution::{Result, PreDispatch, Error},
+	call, dispatch_to_evm,
+	execution::{Error, PreDispatch, Result},
+	frontier_contract,
 };
-use sp_std::{vec::Vec, vec};
-use pallet_common::{
-	CollectionHandle, CollectionPropertyPermissions, CommonCollectionOperations,
-	erc::{CommonEvmHandler, PrecompileResult, CollectionCall, static_property::key},
-	eth::{self, TokenUri},
-	CommonWeightInfo,
+use pallet_structure::{weights::WeightInfo as _, SelfWeightOf as StructureWeight};
+use sp_core::{Get, U256};
+use sp_std::{vec, vec::Vec};
+use up_data_structs::{
+	CollectionId, CollectionPropertiesVec, Property, PropertyKey, PropertyKeyPermission,
+	PropertyPermission, TokenId,
 };
-use pallet_evm::{account::CrossAccountId, PrecompileHandle};
-use pallet_evm_coder_substrate::call;
-use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};
-use sp_core::{U256, Get};
 
 use crate::{
-	AccountBalance, Config, CreateItemData, NonfungibleHandle, Pallet, TokenData, TokensMinted,
-	TokenProperties, SelfWeightOf, weights::WeightInfo, common::CommonWeights,
+	common::CommonWeights, weights::WeightInfo, AccountBalance, Config, CreateItemData,
+	NonfungibleHandle, Pallet, SelfWeightOf, TokenData, TokenProperties, TokensMinted,
 };
 
 /// Nft events.
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -90,37 +90,37 @@
 
 #![cfg_attr(not(feature = "std"), no_std)]
 
+use core::ops::Deref;
+
 use erc::ERC721Events;
 use evm_coder::ToLog;
 use frame_support::{
-	BoundedVec, ensure, fail, transactional,
+	dispatch::{Pays, PostDispatchInfo},
+	ensure, fail,
+	pallet_prelude::*,
 	storage::with_transaction,
-	pallet_prelude::DispatchResultWithPostInfo,
-	pallet_prelude::Weight,
-	dispatch::{PostDispatchInfo, Pays},
+	transactional, BoundedVec,
 };
-use up_data_structs::{
-	AccessMode, CollectionId, CustomDataLimit, TokenId, CreateCollectionData, CreateNftExData,
-	mapping::TokenAddressMapping, budget::Budget, Property, PropertyKey, PropertyValue,
-	PropertyKeyPermission, PropertyScope, TokenChild, AuxPropertyValue, PropertiesPermissionMap,
-	TokenProperties as TokenPropertiesT,
+pub use pallet::*;
+use pallet_common::{
+	eth::collection_id_to_address, helpers::add_weight_to_post_info,
+	weights::WeightInfo as CommonWeightInfo, CollectionHandle, Error as CommonError,
+	Event as CommonEvent, Pallet as PalletCommon, SelfWeightOf as PalletCommonWeightOf,
 };
 use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};
-use pallet_common::{
-	Error as CommonError, Pallet as PalletCommon, Event as CommonEvent, CollectionHandle,
-	eth::collection_id_to_address, SelfWeightOf as PalletCommonWeightOf,
-	weights::WeightInfo as CommonWeightInfo, helpers::add_weight_to_post_info,
-};
-use pallet_structure::{Pallet as PalletStructure, Error as StructureError};
 use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};
+use pallet_structure::{Error as StructureError, Pallet as PalletStructure};
+use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
+use scale_info::TypeInfo;
 use sp_core::{Get, H160};
 use sp_runtime::{ArithmeticError, DispatchError, DispatchResult, TransactionOutcome};
-use sp_std::{vec::Vec, vec, collections::btree_map::BTreeMap};
-use core::ops::Deref;
-use codec::{Encode, Decode, MaxEncodedLen};
-use scale_info::TypeInfo;
-
-pub use pallet::*;
+use sp_std::{collections::btree_map::BTreeMap, vec, vec::Vec};
+use up_data_structs::{
+	budget::Budget, mapping::TokenAddressMapping, AccessMode, AuxPropertyValue, CollectionId,
+	CreateCollectionData, CreateNftExData, CustomDataLimit, PropertiesPermissionMap, Property,
+	PropertyKey, PropertyKeyPermission, PropertyScope, PropertyValue, TokenChild, TokenId,
+	TokenProperties as TokenPropertiesT,
+};
 use weights::WeightInfo;
 #[cfg(feature = "runtime-benchmarks")]
 pub mod benchmarking;
@@ -147,13 +147,13 @@
 
 #[frame_support::pallet]
 pub mod pallet {
-	use super::*;
 	use frame_support::{
-		Blake2_128Concat, Twox64Concat, pallet_prelude::*, storage::Key, traits::StorageVersion,
+		pallet_prelude::*, storage::Key, traits::StorageVersion, Blake2_128Concat, Twox64Concat,
 	};
 	use up_data_structs::{CollectionId, TokenId};
-	use super::weights::WeightInfo;
 
+	use super::{weights::WeightInfo, *};
+
 	#[pallet::error]
 	pub enum Error<T> {
 		/// Not Nonfungible item data used to mint in Nonfungible collection.
@@ -285,7 +285,6 @@
 	#[pallet::genesis_config]
 	pub struct GenesisConfig<T>(PhantomData<T>);
 
-	#[cfg(feature = "std")]
 	impl<T: Config> Default for GenesisConfig<T> {
 		fn default() -> Self {
 			Self(Default::default())
@@ -293,7 +292,7 @@
 	}
 
 	#[pallet::genesis_build]
-	impl<T: Config> GenesisBuild<T> for GenesisConfig<T> {
+	impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {
 		fn build(&self) {
 			StorageVersion::new(1).put::<Pallet<T>>();
 		}
modifiedpallets/refungible/Cargo.tomldiffbeforeafterboth
--- a/pallets/refungible/Cargo.toml
+++ b/pallets/refungible/Cargo.toml
@@ -5,9 +5,7 @@
 version = "0.2.13"
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
 
 evm-coder = { workspace = true }
modifiedpallets/refungible/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/refungible/src/benchmarking.rs
+++ b/pallets/refungible/src/benchmarking.rs
@@ -14,24 +14,24 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use super::*;
-use crate::{Pallet, Config, RefungibleHandle};
+use core::{convert::TryInto, iter::IntoIterator};
 
-use core::convert::TryInto;
-use core::iter::IntoIterator;
-use frame_benchmarking::{benchmarks, account};
+use frame_benchmarking::{account, benchmarks};
 use pallet_common::{
 	bench_init,
 	benchmarking::{
-		create_collection_raw, property_key, property_value, load_is_admin_and_property_permissions,
+		create_collection_raw, load_is_admin_and_property_permissions, property_key, property_value,
 	},
 };
 use sp_std::prelude::*;
 use up_data_structs::{
-	CollectionMode, MAX_ITEMS_PER_BATCH, MAX_PROPERTIES_PER_ITEM, budget::Unlimited,
-	PropertyPermission,
+	budget::Unlimited, CollectionMode, PropertyPermission, MAX_ITEMS_PER_BATCH,
+	MAX_PROPERTIES_PER_ITEM,
 };
 
+use super::*;
+use crate::{Config, Pallet, RefungibleHandle};
+
 const SEED: u32 = 1;
 
 fn create_max_item_data<T: Config>(
modifiedpallets/refungible/src/common.rsdiffbeforeafterboth
--- a/pallets/refungible/src/common.rs
+++ b/pallets/refungible/src/common.rs
@@ -16,24 +16,25 @@
 
 use core::marker::PhantomData;
 
-use sp_std::collections::btree_map::BTreeMap;
-use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight, traits::Get};
-use up_data_structs::{
-	CollectionId, TokenId, CreateItemExData, budget::Budget, Property, PropertyKey, PropertyValue,
-	PropertyKeyPermission, CreateRefungibleExMultipleOwners, CreateRefungibleExSingleOwner,
-	TokenOwnerError,
+use frame_support::{
+	dispatch::DispatchResultWithPostInfo, ensure, fail, traits::Get, weights::Weight,
 };
 use pallet_common::{
-	CommonCollectionOperations, CommonWeightInfo, RefungibleExtensions, with_weight,
-	weights::WeightInfo as _, init_token_properties_delta,
+	init_token_properties_delta, weights::WeightInfo as _, with_weight, CommonCollectionOperations,
+	CommonWeightInfo, RefungibleExtensions,
 };
-use pallet_structure::{Pallet as PalletStructure, Error as StructureError};
-use sp_runtime::{DispatchError};
-use sp_std::{vec::Vec, vec};
+use pallet_structure::{Error as StructureError, Pallet as PalletStructure};
+use sp_runtime::DispatchError;
+use sp_std::{collections::btree_map::BTreeMap, vec, vec::Vec};
+use up_data_structs::{
+	budget::Budget, CollectionId, CreateItemExData, CreateRefungibleExMultipleOwners,
+	CreateRefungibleExSingleOwner, Property, PropertyKey, PropertyKeyPermission, PropertyValue,
+	TokenId, TokenOwnerError,
+};
 
 use crate::{
-	AccountBalance, Allowance, Balance, Config, Error, Owned, Pallet, RefungibleHandle,
-	SelfWeightOf, weights::WeightInfo, TokensMinted, TotalSupply, CreateItemData, TokenProperties,
+	weights::WeightInfo, AccountBalance, Allowance, Balance, Config, CreateItemData, Error, Owned,
+	Pallet, RefungibleHandle, SelfWeightOf, TokenProperties, TokensMinted, TotalSupply,
 };
 
 macro_rules! max_weight_of {
@@ -496,15 +497,13 @@
 			return Ok(false);
 		}
 
-		let is_bundle_owner = <PalletStructure<T>>::check_indirectly_owned(
+		<PalletStructure<T>>::check_indirectly_owned(
 			maybe_owner.clone(),
 			self.id,
 			token,
 			None,
 			nesting_budget,
-		)?;
-
-		Ok(is_bundle_owner)
+		)
 	}
 
 	/// Returns 10 token in no particular order.
modifiedpallets/refungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/refungible/src/erc.rs
+++ b/pallets/refungible/src/erc.rs
@@ -23,34 +23,35 @@
 
 use alloc::string::ToString;
 use core::{
-	char::{REPLACEMENT_CHARACTER, decode_utf16},
+	char::{decode_utf16, REPLACEMENT_CHARACTER},
 	convert::TryInto,
 };
-use evm_coder::{abi::AbiType, AbiCoder, ToLog, generate_stubgen, solidity_interface, types::*};
+
+use evm_coder::{abi::AbiType, generate_stubgen, solidity_interface, types::*, AbiCoder, ToLog};
 use frame_support::{BoundedBTreeMap, BoundedVec};
 use pallet_common::{
+	erc::{static_property::key, CollectionCall, CommonEvmHandler},
+	eth::{self, TokenUri},
 	CollectionHandle, CollectionPropertyPermissions, CommonCollectionOperations,
 	Error as CommonError,
-	erc::{CommonEvmHandler, CollectionCall, static_property::key},
-	eth::{self, TokenUri},
 };
 use pallet_evm::{account::CrossAccountId, PrecompileHandle};
 use pallet_evm_coder_substrate::{
 	call, dispatch_to_evm,
-	execution::{PreDispatch, Result, Error},
+	execution::{Error, PreDispatch, Result},
 	frontier_contract,
 };
-use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};
-use sp_core::{H160, U256, Get};
-use sp_std::{collections::btree_map::BTreeMap, vec::Vec, vec};
+use pallet_structure::{weights::WeightInfo as _, SelfWeightOf as StructureWeight};
+use sp_core::{Get, H160, U256};
+use sp_std::{collections::btree_map::BTreeMap, vec, vec::Vec};
 use up_data_structs::{
-	CollectionId, CollectionPropertiesVec, mapping::TokenAddressMapping, Property, PropertyKey,
+	mapping::TokenAddressMapping, CollectionId, CollectionPropertiesVec, Property, PropertyKey,
 	PropertyKeyPermission, PropertyPermission, TokenId, TokenOwnerError,
 };
 
 use crate::{
-	AccountBalance, Balance, Config, CreateItemData, Pallet, RefungibleHandle, TokenProperties,
-	TokensMinted, TotalSupply, SelfWeightOf, weights::WeightInfo,
+	weights::WeightInfo, AccountBalance, Balance, Config, CreateItemData, Pallet, RefungibleHandle,
+	SelfWeightOf, TokenProperties, TokensMinted, TotalSupply,
 };
 
 frontier_contract! {
modifiedpallets/refungible/src/erc_token.rsdiffbeforeafterboth
--- a/pallets/refungible/src/erc_token.rs
+++ b/pallets/refungible/src/erc_token.rs
@@ -20,11 +20,12 @@
 //! Method implementations are mostly doing parameter conversion and calling Nonfungible Pallet methods.
 
 use core::{
-	char::{REPLACEMENT_CHARACTER, decode_utf16},
+	char::{decode_utf16, REPLACEMENT_CHARACTER},
 	convert::TryInto,
 	ops::Deref,
 };
-use evm_coder::{abi::AbiType, ToLog, generate_stubgen, solidity_interface, types::*};
+
+use evm_coder::{abi::AbiType, generate_stubgen, solidity_interface, types::*, ToLog};
 use pallet_common::{
 	erc::{CommonEvmHandler, PrecompileResult},
 	eth::{collection_id_to_address, CrossAddress},
@@ -32,17 +33,18 @@
 };
 use pallet_evm::{account::CrossAccountId, PrecompileHandle};
 use pallet_evm_coder_substrate::{
-	call, dispatch_to_evm, WithRecorder, frontier_contract,
-	execution::{Result, PreDispatch},
+	call, dispatch_to_evm,
+	execution::{PreDispatch, Result},
+	frontier_contract, WithRecorder,
 };
-use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};
-use sp_std::vec::Vec;
+use pallet_structure::{weights::WeightInfo as _, SelfWeightOf as StructureWeight};
 use sp_core::U256;
+use sp_std::vec::Vec;
 use up_data_structs::TokenId;
 
 use crate::{
-	Allowance, Balance, Config, Pallet, RefungibleHandle, TotalSupply, common::CommonWeights,
-	SelfWeightOf, weights::WeightInfo,
+	common::CommonWeights, weights::WeightInfo, Allowance, Balance, Config, Pallet,
+	RefungibleHandle, SelfWeightOf, TotalSupply,
 };
 
 /// Refungible token handle contains information about token's collection and id
modifiedpallets/refungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -87,30 +87,29 @@
 
 #![cfg_attr(not(feature = "std"), no_std)]
 
-use crate::erc_token::ERC20Events;
-use crate::erc::ERC721Events;
+use core::{cmp::Ordering, ops::Deref};
 
-use core::{ops::Deref, cmp::Ordering};
 use evm_coder::ToLog;
 use frame_support::{ensure, storage::with_transaction, transactional};
-use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};
-use pallet_evm_coder_substrate::WithRecorder;
+pub use pallet::*;
 use pallet_common::{
-	Error as CommonError, eth::collection_id_to_address, Event as CommonEvent,
+	eth::collection_id_to_address, Error as CommonError, Event as CommonEvent,
 	Pallet as PalletCommon,
 };
+use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};
+use pallet_evm_coder_substrate::WithRecorder;
 use pallet_structure::Pallet as PalletStructure;
 use sp_core::{Get, H160};
 use sp_runtime::{ArithmeticError, DispatchError, DispatchResult, TransactionOutcome};
-use sp_std::{vec::Vec, vec, collections::btree_map::BTreeMap};
+use sp_std::{collections::btree_map::BTreeMap, vec, vec::Vec};
 use up_data_structs::{
-	AccessMode, budget::Budget, CollectionId, CreateCollectionData, mapping::TokenAddressMapping,
-	MAX_REFUNGIBLE_PIECES, Property, PropertyKey, PropertyKeyPermission, PropertyScope,
-	PropertyValue, TokenId, PropertiesPermissionMap, CreateRefungibleExMultipleOwners,
-	TokenOwnerError, TokenProperties as TokenPropertiesT,
+	budget::Budget, mapping::TokenAddressMapping, AccessMode, CollectionId, CreateCollectionData,
+	CreateRefungibleExMultipleOwners, PropertiesPermissionMap, Property, PropertyKey,
+	PropertyKeyPermission, PropertyScope, PropertyValue, TokenId, TokenOwnerError,
+	TokenProperties as TokenPropertiesT, MAX_REFUNGIBLE_PIECES,
 };
 
-pub use pallet::*;
+use crate::{erc::ERC721Events, erc_token::ERC20Events};
 #[cfg(feature = "runtime-benchmarks")]
 pub mod benchmarking;
 pub mod common;
@@ -124,14 +123,14 @@
 
 #[frame_support::pallet]
 pub mod pallet {
-	use super::*;
 	use frame_support::{
-		Blake2_128, Blake2_128Concat, Twox64Concat, pallet_prelude::*, storage::Key,
-		traits::StorageVersion,
+		pallet_prelude::*, storage::Key, traits::StorageVersion, Blake2_128, Blake2_128Concat,
+		Twox64Concat,
 	};
 	use up_data_structs::{CollectionId, TokenId};
-	use super::weights::WeightInfo;
 
+	use super::{weights::WeightInfo, *};
+
 	#[pallet::error]
 	pub enum Error<T> {
 		/// Not Refungible item data used to mint in Refungible collection.
deletedpallets/scheduler-v2/Cargo.tomldiffbeforeafterboth
--- a/pallets/scheduler-v2/Cargo.toml
+++ /dev/null
@@ -1,45 +0,0 @@
-[package]
-authors = ["Unique Network <support@uniquenetwork.io>"]
-description = "Unique Scheduler pallet"
-edition = "2021"
-homepage = "https://unique.network"
-license = "GPLv3"
-name = "pallet-unique-scheduler-v2"
-readme = "README.md"
-repository = "https://github.com/UniqueNetwork/unique-chain"
-version = "0.1.0"
-
-[dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
-frame-benchmarking = { workspace = true, optional = true }
-frame-support = { workspace = true }
-frame-system = { workspace = true }
-log = { workspace = true }
-scale-info = { workspace = true }
-sp-core = { workspace = true }
-sp-io = { workspace = true }
-sp-runtime = { workspace = true }
-sp-std = { workspace = true }
-
-[dev-dependencies]
-pallet-preimage = { workspace = true }
-substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
-
-[features]
-default = ["std"]
-runtime-benchmarks = ["frame-benchmarking", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks"]
-std = [
-	"codec/std",
-	"frame-benchmarking?/std",
-	"frame-support/std",
-	"frame-system/std",
-	"log/std",
-	"scale-info/std",
-	"sp-core/std",
-	"sp-io/std",
-	"sp-runtime/std",
-	"sp-std/std",
-]
-try-runtime = ["frame-support/try-runtime"]
deletedpallets/scheduler-v2/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/scheduler-v2/src/benchmarking.rs
+++ /dev/null
@@ -1,374 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-// Original license:
-// This file is part of Substrate.
-
-// Copyright (C) 2020-2022 Parity Technologies (UK) Ltd.
-// SPDX-License-Identifier: Apache-2.0
-
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// 	http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-//! Scheduler pallet benchmarking.
-
-use super::*;
-use frame_benchmarking::{account, benchmarks};
-use frame_support::{
-	ensure,
-	traits::{schedule::Priority, PreimageRecipient},
-};
-use frame_system::RawOrigin;
-use sp_std::{prelude::*, vec};
-use sp_io::hashing::blake2_256;
-
-use crate::{Pallet as Scheduler, ScheduledCall, EncodedCall};
-use frame_system::Call as SystemCall;
-
-const SEED: u32 = 0;
-
-const BLOCK_NUMBER: u32 = 2;
-
-/// Add `n` items to the schedule.
-///
-/// For `resolved`:
-/// - `
-/// - `None`: aborted (hash without preimage)
-/// - `Some(true)`: hash resolves into call if possible, plain call otherwise
-/// - `Some(false)`: plain call
-fn fill_schedule<T: Config>(when: T::BlockNumber, n: u32) -> Result<(), &'static str> {
-	let t = DispatchTime::At(when);
-	let origin: <T as Config>::PalletsOrigin = frame_system::RawOrigin::Root.into();
-	for i in 0..n {
-		let call = make_call::<T>(None);
-		let period = Some(((i + 100).into(), 100));
-		let name = u32_to_name(i);
-		Scheduler::<T>::do_schedule_named(name, t, period, 0, origin.clone(), call)?;
-	}
-	ensure!(
-		Agenda::<T>::get(when).agenda.len() == n as usize,
-		"didn't fill schedule"
-	);
-	Ok(())
-}
-
-/// Generate a name for a scheduled task from an unsigned integer.
-fn u32_to_name(i: u32) -> TaskName {
-	i.using_encoded(blake2_256)
-}
-
-/// A utility for creating simple scheduled tasks.
-///
-/// # Arguments
-/// * `periodic` - makes the task periodic.
-///     Sets the task's period and repetition count to `100`.
-/// * `named` - gives a name to the task: `u32_to_name(0)`.
-/// * `signed` - determines the origin of the task.
-///     If true, it will have the Signed origin. Otherwise it will have the Root origin.
-///     See [`make_origin`] for details.
-/// * maybe_lookup_len - sets optional lookup length. It is used to benchmark task fetching from the `Preimages` store.
-/// * priority - the task's priority.
-fn make_task<T: Config>(
-	periodic: bool,
-	named: bool,
-	signed: bool,
-	maybe_lookup_len: Option<u32>,
-	priority: Priority,
-) -> ScheduledOf<T> {
-	let call = make_call::<T>(maybe_lookup_len);
-	let maybe_periodic = match periodic {
-		true => Some((100u32.into(), 100)),
-		false => None,
-	};
-	let maybe_id = match named {
-		true => Some(u32_to_name(0)),
-		false => None,
-	};
-	let origin = make_origin::<T>(signed);
-	Scheduled {
-		maybe_id,
-		priority,
-		call,
-		maybe_periodic,
-		origin,
-		_phantom: PhantomData,
-	}
-}
-
-/// Creates a `SystemCall::remark` scheduled call with a given `len` in bytes.
-/// Returns `None` if the call is too large to encode.
-fn bounded<T: Config>(len: u32) -> Option<ScheduledCall<T>> {
-	let call = <<T as Config>::RuntimeCall>::from(SystemCall::remark {
-		remark: vec![0; len as usize],
-	});
-	ScheduledCall::new(call).ok()
-}
-
-/// Creates a scheduled call and maximizes its size.
-///
-/// If the `maybe_lookup_len` is not supplied, the task will create the maximal `Inline` scheduled call.
-///
-/// Otherwise, the function will take the length value from the `maybe_lookup_len`
-/// and find a minimal length value that ensures that the scheduled call will require a Preimage lookup.
-fn make_call<T: Config>(maybe_lookup_len: Option<u32>) -> ScheduledCall<T> {
-	let bound = EncodedCall::bound() as u32;
-	let mut len = match maybe_lookup_len {
-		Some(len) => {
-			len.clamp(
-				bound,
-				<T::Preimages as PreimageRecipient<T::Hash>>::MaxSize::get() - 2,
-			) - 3
-		}
-		None => bound.saturating_sub(4),
-	};
-
-	loop {
-		let c = match bounded::<T>(len) {
-			Some(x) => x,
-			None => {
-				len -= 1;
-				continue;
-			}
-		};
-		if c.lookup_needed() == maybe_lookup_len.is_some() {
-			break c;
-		}
-		if maybe_lookup_len.is_some() {
-			len += 1;
-		} else if len > 0 {
-			len -= 1;
-		} else {
-			break c;
-		}
-	}
-}
-
-/// Creates an origin for a scheduled call.
-///
-/// If `signed` is true, it creates the Signed origin from a default account `account("origin", 0, SEED)`.
-/// Otherwise, it creates the Root origin.
-fn make_origin<T: Config>(signed: bool) -> <T as Config>::PalletsOrigin {
-	match signed {
-		true => frame_system::RawOrigin::Signed(account("origin", 0, SEED)).into(),
-		false => frame_system::RawOrigin::Root.into(),
-	}
-}
-
-/// Creates a dummy `WeightCounter` with the maximum possible weight limit.
-fn dummy_counter() -> WeightCounter {
-	WeightCounter {
-		used: Weight::zero(),
-		limit: Weight::MAX,
-	}
-}
-
-benchmarks! {
-	// `service_agendas` when no work is done.
-	// (multiple agendas - scheduled tasks in several blocks)
-	service_agendas_base {
-		let now = T::BlockNumber::from(BLOCK_NUMBER);
-		IncompleteSince::<T>::put(now - One::one());
-	}: {
-		Scheduler::<T>::service_agendas(&mut dummy_counter(), now, 0);
-	} verify {
-		assert_eq!(IncompleteSince::<T>::get(), Some(now - One::one()));
-	}
-
-	// `service_agenda` when no work is done.
-	// (only one agenda - scheduled tasks in a single block)
-	service_agenda_base {
-		let now = BLOCK_NUMBER.into();
-		let s in 0 .. T::MaxScheduledPerBlock::get();
-		fill_schedule::<T>(now, s)?;
-		let mut executed = 0;
-	}: {
-		Scheduler::<T>::service_agenda(&mut dummy_counter(), &mut executed, now, now, 0);
-	} verify {
-		assert_eq!(executed, 0);
-	}
-
-	// `service_task` when the task is a non-periodic, non-named, non-fetched call which is not
-	// dispatched (e.g. due to being overweight).
-	service_task_base {
-		let now = BLOCK_NUMBER.into();
-		let task = make_task::<T>(false, false, false, None, 0);
-		// prevent any tasks from actually being executed as we only want the surrounding weight.
-		let mut counter = WeightCounter { used: Weight::zero(), limit: Weight::zero() };
-	}: {
-		let result = Scheduler::<T>::service_task(&mut counter, now, now, 0, true, task);
-	} verify {
-		//assert_eq!(result, Ok(()));
-	}
-
-	// TODO uncomment if we will use the Preimages
-	// // `service_task` when the task is a non-periodic, non-named, fetched call (with a known
-	// // preimage length) and which is not dispatched (e.g. due to being overweight).
-	// service_task_fetched {
-	// 	let s in (EncodedCall::bound() as u32) .. (<T::Preimages as PreimageRecipient<T::Hash>>::MaxSize::get());
-	// 	let now = BLOCK_NUMBER.into();
-	// 	let task = make_task::<T>(false, false, false, Some(s), 0);
-	// 	// prevent any tasks from actually being executed as we only want the surrounding weight.
-	// 	let mut counter = WeightCounter { used: Weight::zero(), limit: Weight::zero() };
-	// }: {
-	// 	let result = Scheduler::<T>::service_task(&mut counter, now, now, 0, true, task);
-	// } verify {
-	// }
-
-	// `service_task` when the task is a non-periodic, named, non-fetched call which is not
-	// dispatched (e.g. due to being overweight).
-	service_task_named {
-		let now = BLOCK_NUMBER.into();
-		let task = make_task::<T>(false, true, false, None, 0);
-		// prevent any tasks from actually being executed as we only want the surrounding weight.
-		let mut counter = WeightCounter { used: Weight::zero(), limit: Weight::zero() };
-	}: {
-		let result = Scheduler::<T>::service_task(&mut counter, now, now, 0, true, task);
-	} verify {
-	}
-
-	// `service_task` when the task is a periodic, non-named, non-fetched call which is not
-	// dispatched (e.g. due to being overweight).
-	service_task_periodic {
-		let now = BLOCK_NUMBER.into();
-		let task = make_task::<T>(true, false, false, None, 0);
-		// prevent any tasks from actually being executed as we only want the surrounding weight.
-		let mut counter = WeightCounter { used: Weight::zero(), limit: Weight::zero() };
-	}: {
-		let result = Scheduler::<T>::service_task(&mut counter, now, now, 0, true, task);
-	} verify {
-	}
-
-	// `execute_dispatch` when the origin is `Signed`, not counting the dispatable's weight.
-	execute_dispatch_signed {
-		let mut counter = WeightCounter { used: Weight::zero(), limit: Weight::MAX };
-		let origin = make_origin::<T>(true);
-		let call = T::Preimages::realize(&make_call::<T>(None)).unwrap().0;
-	}: {
-		assert!(Scheduler::<T>::execute_dispatch(&mut counter, origin, call).is_ok());
-	}
-	verify {
-	}
-
-	// `execute_dispatch` when the origin is not `Signed`, not counting the dispatable's weight.
-	execute_dispatch_unsigned {
-		let mut counter = WeightCounter { used: Weight::zero(), limit: Weight::MAX };
-		let origin = make_origin::<T>(false);
-		let call = T::Preimages::realize(&make_call::<T>(None)).unwrap().0;
-	}: {
-		assert!(Scheduler::<T>::execute_dispatch(&mut counter, origin, call).is_ok());
-	}
-	verify {
-	}
-
-	schedule {
-		let s in 0 .. (T::MaxScheduledPerBlock::get() - 1);
-		let when = BLOCK_NUMBER.into();
-		let periodic = Some((T::BlockNumber::one(), 100));
-		let priority = Some(0);
-		// Essentially a no-op call.
-		let call = Box::new(SystemCall::set_storage { items: vec![] }.into());
-
-		fill_schedule::<T>(when, s)?;
-	}: _(RawOrigin::Root, when, periodic, priority, call)
-	verify {
-		ensure!(
-			Agenda::<T>::get(when).agenda.len() == (s + 1) as usize,
-			"didn't add to schedule"
-		);
-	}
-
-	cancel {
-		let s in 1 .. T::MaxScheduledPerBlock::get();
-		let when = BLOCK_NUMBER.into();
-
-		fill_schedule::<T>(when, s)?;
-		assert_eq!(Agenda::<T>::get(when).agenda.len(), s as usize);
-	}: _(RawOrigin::Root, when, 0)
-	verify {
-		ensure!(
-			Lookup::<T>::get(u32_to_name(0)).is_none(),
-			"didn't remove from lookup"
-		);
-		// Removed schedule is NONE
-		ensure!(
-			Agenda::<T>::get(when).agenda[0].is_none(),
-			"didn't remove from schedule"
-		);
-	}
-
-	schedule_named {
-		let s in 0 .. (T::MaxScheduledPerBlock::get() - 1);
-		let id = u32_to_name(s);
-		let when = BLOCK_NUMBER.into();
-		let periodic = Some((T::BlockNumber::one(), 100));
-		let priority = Some(0);
-		// Essentially a no-op call.
-		let call = Box::new(SystemCall::set_storage { items: vec![] }.into());
-
-		fill_schedule::<T>(when, s)?;
-	}: _(RawOrigin::Root, id, when, periodic, priority, call)
-	verify {
-		ensure!(
-			Agenda::<T>::get(when).agenda.len() == (s + 1) as usize,
-			"didn't add to schedule"
-		);
-	}
-
-	cancel_named {
-		let s in 1 .. T::MaxScheduledPerBlock::get();
-		let when = BLOCK_NUMBER.into();
-
-		fill_schedule::<T>(when, s)?;
-	}: _(RawOrigin::Root, u32_to_name(0))
-	verify {
-		ensure!(
-			Lookup::<T>::get(u32_to_name(0)).is_none(),
-			"didn't remove from lookup"
-		);
-		// Removed schedule is NONE
-		ensure!(
-			Agenda::<T>::get(when).agenda[0].is_none(),
-			"didn't remove from schedule"
-		);
-	}
-
-	change_named_priority {
-		let origin: RawOrigin<T::AccountId> = frame_system::RawOrigin::Root;
-		let s in 1 .. T::MaxScheduledPerBlock::get();
-		let when = BLOCK_NUMBER.into();
-		let idx = s - 1;
-		let id = u32_to_name(idx);
-		let priority = 42;
-		fill_schedule::<T>(when, s)?;
-	}: _(origin, id, priority)
-	verify {
-		ensure!(
-			Agenda::<T>::get(when).agenda[idx as usize].clone().unwrap().priority == priority,
-			"didn't change the priority"
-		);
-	}
-
-	impl_benchmark_test_suite!(Scheduler, crate::mock::new_test_ext(), crate::mock::Test);
-}
deletedpallets/scheduler-v2/src/lib.rsdiffbeforeafterboth
--- a/pallets/scheduler-v2/src/lib.rs
+++ /dev/null
@@ -1,1338 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-// Original license:
-// This file is part of Substrate.
-
-// Copyright (C) 2017-2022 Parity Technologies (UK) Ltd.
-// SPDX-License-Identifier: Apache-2.0
-
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// 	http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-//! # Scheduler
-//! A Pallet for scheduling dispatches.
-//!
-//! - [`Config`]
-//! - [`Call`]
-//! - [`Pallet`]
-//!
-//! ## Overview
-//!
-//! This Pallet exposes capabilities for scheduling dispatches to occur at a
-//! specified block number or at a specified period. These scheduled dispatches
-//! may be named or anonymous and may be canceled.
-//!
-//! **NOTE:** The scheduled calls will be dispatched with the default filter
-//! for the origin: namely `frame_system::Config::BaseCallFilter` for all origin
-//! except root which will get no filter. And not the filter contained in origin
-//! use to call `fn schedule`.
-//!
-//! If a call is scheduled using proxy or whatever mecanism which adds filter,
-//! then those filter will not be used when dispatching the schedule call.
-//!
-//! ## Interface
-//!
-//! ### Dispatchable Functions
-//!
-//! * `schedule` - schedule a dispatch, which may be periodic, to occur at a specified block and
-//!   with a specified priority.
-//! * `cancel` - cancel a scheduled dispatch, specified by block number and index.
-//! * `schedule_named` - augments the `schedule` interface with an additional `Vec<u8>` parameter
-//!   that can be used for identification.
-//! * `cancel_named` - the named complement to the cancel function.
-
-// Ensure we're `no_std` when compiling for Wasm.
-#![cfg_attr(not(feature = "std"), no_std)]
-#![deny(missing_docs)]
-
-#[cfg(feature = "runtime-benchmarks")]
-mod benchmarking;
-#[cfg(test)]
-mod mock;
-#[cfg(test)]
-mod tests;
-// We dont use this pallet right now
-#[allow(deprecated)]
-pub mod weights;
-
-use codec::{Codec, Decode, Encode, MaxEncodedLen};
-use frame_support::{
-	dispatch::{
-		DispatchError, DispatchResult, Dispatchable, GetDispatchInfo, Parameter, PostDispatchInfo,
-	},
-	traits::{
-		schedule::{self, DispatchTime, LOWEST_PRIORITY},
-		EnsureOrigin, Get, IsType, OriginTrait, PrivilegeCmp, StorageVersion, PreimageRecipient,
-		ConstU32, UnfilteredDispatchable,
-	},
-	weights::Weight,
-	unsigned::TransactionValidityError,
-};
-
-use frame_system::{self as system};
-use scale_info::TypeInfo;
-use sp_runtime::{
-	traits::{BadOrigin, One, Saturating, Zero, Hash},
-	BoundedVec, RuntimeDebug, DispatchErrorWithPostInfo,
-};
-use sp_core::H160;
-use sp_std::{cmp::Ordering, marker::PhantomData, prelude::*};
-pub use weights::WeightInfo;
-
-pub use pallet::*;
-
-/// Just a simple index for naming period tasks.
-pub type PeriodicIndex = u32;
-/// The location of a scheduled task that can be used to remove it.
-pub type TaskAddress<BlockNumber> = (BlockNumber, u32);
-
-/// A an encoded bounded `Call`. Its encoding must be at most 128 bytes.
-pub type EncodedCall = BoundedVec<u8, ConstU32<128>>;
-
-#[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)]
-#[scale_info(skip_type_params(T))]
-/// A scheduled call is stored as is or as a preimage hash to lookup.
-/// This enum represents both variants.
-pub enum ScheduledCall<T: Config> {
-	/// A an encoded bounded `Call`. Its encoding must be at most 128 bytes.
-	Inline(EncodedCall),
-
-	/// A Blake2-256 hash of the call together with an upper limit for its size.
-	PreimageLookup {
-		/// A call hash to lookup
-		hash: T::Hash,
-
-		/// The length of the decoded call
-		unbounded_len: u32,
-	},
-}
-
-impl<T: Config> ScheduledCall<T> {
-	/// Convert an otherwise unbounded or large value into a type ready for placing in storage.
-	///
-	/// NOTE: Once this API is used, you should use either `drop` or `realize`.
-	pub fn new(call: <T as Config>::RuntimeCall) -> Result<Self, DispatchError> {
-		let encoded = call.encode();
-		let len = encoded.len();
-
-		match EncodedCall::try_from(encoded.clone()) {
-			Ok(bounded) => Ok(Self::Inline(bounded)),
-			Err(_) => {
-				let hash = <T as system::Config>::Hashing::hash_of(&encoded);
-				<T as Config>::Preimages::note_preimage(
-					encoded
-						.try_into()
-						.map_err(|_| <Error<T>>::TooBigScheduledCall)?,
-				);
-
-				Ok(Self::PreimageLookup {
-					hash,
-					unbounded_len: len as u32,
-				})
-			}
-		}
-	}
-
-	/// The maximum length of the lookup that is needed to peek `Self`.
-	pub fn lookup_len(&self) -> Option<u32> {
-		match self {
-			Self::Inline(..) => None,
-			Self::PreimageLookup { unbounded_len, .. } => Some(*unbounded_len),
-		}
-	}
-
-	/// Returns whether the image will require a lookup to be peeked.
-	pub fn lookup_needed(&self) -> bool {
-		match self {
-			Self::Inline(_) => false,
-			Self::PreimageLookup { .. } => true,
-		}
-	}
-
-	// Decodes a runtime call
-	fn decode(mut data: &[u8]) -> Result<<T as Config>::RuntimeCall, DispatchError> {
-		<T as Config>::RuntimeCall::decode(&mut data)
-			.map_err(|_| <Error<T>>::ScheduledCallCorrupted.into())
-	}
-}
-
-/// Weight Info for the Preimages fetches.
-pub trait SchedulerPreimagesWeightInfo<W: WeightInfo> {
-	/// Get the weight of a task fetches with a given decoded length.
-	fn service_task_fetched(call_length: u32) -> Weight;
-}
-
-impl<W: WeightInfo> SchedulerPreimagesWeightInfo<W> for () {
-	fn service_task_fetched(_call_length: u32) -> Weight {
-		W::service_task_base()
-	}
-}
-
-/// A scheduler's interface for managing preimages to hashes
-/// and looking up preimages from their hash on-chain.
-pub trait SchedulerPreimages<T: Config>:
-	PreimageRecipient<T::Hash> + SchedulerPreimagesWeightInfo<T::WeightInfo>
-{
-	/// No longer request that the data for decoding the given `call` is available.
-	fn drop(call: &ScheduledCall<T>);
-
-	/// Convert the given `call` instance back into its original instance, also returning the
-	/// exact size of its encoded form if it needed to be looked-up from a stored preimage.
-	///
-	/// NOTE: This does not remove any data needed for realization. If you will no longer use the
-	/// `call`, use `realize` instead or use `drop` afterwards.
-	fn peek(
-		call: &ScheduledCall<T>,
-	) -> Result<(<T as pallet::Config>::RuntimeCall, Option<u32>), DispatchError>;
-
-	/// Convert the given scheduled `call` value back into its original instance. If successful,
-	/// `drop` any data backing it. This will not break the realisability of independently
-	/// created instances of `ScheduledCall` which happen to have identical data.
-	fn realize(
-		call: &ScheduledCall<T>,
-	) -> Result<(<T as pallet::Config>::RuntimeCall, Option<u32>), DispatchError>;
-}
-
-impl<T: Config, PP: PreimageRecipient<T::Hash> + SchedulerPreimagesWeightInfo<T::WeightInfo>>
-	SchedulerPreimages<T> for PP
-{
-	fn drop(call: &ScheduledCall<T>) {
-		match call {
-			ScheduledCall::Inline(_) => {}
-			ScheduledCall::PreimageLookup { hash, .. } => Self::unrequest_preimage(hash),
-		}
-	}
-
-	fn peek(
-		call: &ScheduledCall<T>,
-	) -> Result<(<T as pallet::Config>::RuntimeCall, Option<u32>), DispatchError> {
-		match call {
-			ScheduledCall::Inline(data) => Ok((ScheduledCall::<T>::decode(data)?, None)),
-			ScheduledCall::PreimageLookup {
-				hash,
-				unbounded_len,
-			} => {
-				let (preimage, len) = Self::get_preimage(hash)
-					.ok_or(<Error<T>>::PreimageNotFound)
-					.map(|preimage| (preimage, *unbounded_len))?;
-
-				Ok((ScheduledCall::<T>::decode(preimage.as_slice())?, Some(len)))
-			}
-		}
-	}
-
-	fn realize(
-		call: &ScheduledCall<T>,
-	) -> Result<(<T as pallet::Config>::RuntimeCall, Option<u32>), DispatchError> {
-		let r = Self::peek(call)?;
-		Self::drop(call);
-		Ok(r)
-	}
-}
-
-/// Scheduler's supported origins.
-pub enum ScheduledEnsureOriginSuccess<AccountId> {
-	/// A scheduled transaction has the Root origin.
-	Root,
-
-	/// A specific account has signed a scheduled transaction.
-	Signed(AccountId),
-}
-
-/// An identifier of a scheduled task.
-pub type TaskName = [u8; 32];
-
-/// Information regarding an item to be executed in the future.
-#[cfg_attr(any(feature = "std", test), derive(PartialEq, Eq))]
-#[derive(Clone, RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)]
-pub struct Scheduled<Name, Call, BlockNumber, PalletsOrigin, AccountId> {
-	/// The unique identity for this task, if there is one.
-	maybe_id: Option<Name>,
-
-	/// This task's priority.
-	priority: schedule::Priority,
-
-	/// The call to be dispatched.
-	call: Call,
-
-	/// If the call is periodic, then this points to the information concerning that.
-	maybe_periodic: Option<schedule::Period<BlockNumber>>,
-
-	/// The origin with which to dispatch the call.
-	origin: PalletsOrigin,
-	_phantom: PhantomData<AccountId>,
-}
-
-/// Information regarding an item to be executed in the future.
-pub type ScheduledOf<T> = Scheduled<
-	TaskName,
-	ScheduledCall<T>,
-	<T as frame_system::Config>::BlockNumber,
-	<T as Config>::PalletsOrigin,
-	<T as frame_system::Config>::AccountId,
->;
-
-#[derive(Encode, Decode, MaxEncodedLen, TypeInfo)]
-#[scale_info(skip_type_params(T))]
-/// A structure for storing scheduled tasks in a block.
-/// The `BlockAgenda` tracks the available free space for a new task in a block.4
-///
-/// The agenda's maximum amount of tasks is `T::MaxScheduledPerBlock`.
-pub struct BlockAgenda<T: Config> {
-	agenda: BoundedVec<Option<ScheduledOf<T>>, T::MaxScheduledPerBlock>,
-	free_places: u32,
-}
-
-impl<T: Config> BlockAgenda<T> {
-	/// Tries to push a new scheduled task into the block's agenda.
-	/// If there is a free place, the new task will take it,
-	/// and the `BlockAgenda` will record that the number of free places has decreased.
-	///
-	/// An error containing the scheduled task will be returned if there are no free places.
-	///
-	/// The complexity of the check for the *existence* of a free place is O(1).
-	/// The complexity of *finding* the free slot is O(n).
-	fn try_push(&mut self, scheduled: ScheduledOf<T>) -> Result<u32, ScheduledOf<T>> {
-		if self.free_places == 0 {
-			return Err(scheduled);
-		}
-
-		self.free_places = self.free_places.saturating_sub(1);
-
-		if (self.agenda.len() as u32) < T::MaxScheduledPerBlock::get() {
-			// will always succeed due to the above check.
-			let _ = self.agenda.try_push(Some(scheduled));
-			Ok((self.agenda.len() - 1) as u32)
-		} else {
-			match self.agenda.iter().position(|i| i.is_none()) {
-				Some(hole_index) => {
-					self.agenda[hole_index] = Some(scheduled);
-					Ok(hole_index as u32)
-				}
-				None => unreachable!("free_places was greater than 0; qed"),
-			}
-		}
-	}
-
-	/// Sets a slot by the given index and the slot value.
-	///
-	/// ### Panics
-	/// If the index is out of range, the function will panic.
-	fn set_slot(&mut self, index: u32, slot: Option<ScheduledOf<T>>) {
-		self.agenda[index as usize] = slot;
-	}
-
-	/// Returns an iterator containing references to the agenda's slots.
-	fn iter(&self) -> impl Iterator<Item = &'_ Option<ScheduledOf<T>>> + '_ {
-		self.agenda.iter()
-	}
-
-	/// Returns an immutable reference to a scheduled task if there is one under the given index.
-	///
-	///  The function returns `None` if:
-	/// * The `index` is out of range
-	/// * No scheduled task occupies the agenda slot under the given index.
-	fn get(&self, index: u32) -> Option<&ScheduledOf<T>> {
-		match self.agenda.get(index as usize) {
-			Some(Some(scheduled)) => Some(scheduled),
-			_ => None,
-		}
-	}
-
-	/// Returns a mutable reference to a scheduled task if there is one under the given index.
-	///
-	///  The function returns `None` if:
-	/// * The `index` is out of range
-	/// * No scheduled task occupies the agenda slot under the given index.
-	fn get_mut(&mut self, index: u32) -> Option<&mut ScheduledOf<T>> {
-		match self.agenda.get_mut(index as usize) {
-			Some(Some(scheduled)) => Some(scheduled),
-			_ => None,
-		}
-	}
-
-	/// Take a scheduled task by the given index.
-	///
-	/// If there is a task under the index, the function will:
-	/// * Free the corresponding agenda slot.
-	/// * Decrease the number of free places.
-	/// * Return the scheduled task.
-	///
-	/// The function returns `None` if there is no task under the index.
-	fn take(&mut self, index: u32) -> Option<ScheduledOf<T>> {
-		let removed = self.agenda.get_mut(index as usize)?.take();
-
-		if removed.is_some() {
-			self.free_places = self.free_places.saturating_add(1);
-		}
-
-		removed
-	}
-}
-
-impl<T: Config> Default for BlockAgenda<T> {
-	fn default() -> Self {
-		let agenda = Default::default();
-		let free_places = T::MaxScheduledPerBlock::get();
-
-		Self {
-			agenda,
-			free_places,
-		}
-	}
-}
-/// A structure for tracking the used weight
-/// and checking if it does not exceed the weight limit.
-struct WeightCounter {
-	used: Weight,
-	limit: Weight,
-}
-
-impl WeightCounter {
-	/// Checks if the weight `w` can be accommodated by the counter.
-	///
-	/// If there is room for the additional weight `w`,
-	/// the function will update the used weight and return true.
-	fn check_accrue(&mut self, w: Weight) -> bool {
-		let test = self.used.saturating_add(w);
-		if test.any_gt(self.limit) {
-			false
-		} else {
-			self.used = test;
-			true
-		}
-	}
-
-	/// Checks if the weight `w` can be accommodated by the counter.
-	fn can_accrue(&mut self, w: Weight) -> bool {
-		self.used.saturating_add(w).all_lte(self.limit)
-	}
-}
-
-pub(crate) struct MarginalWeightInfo<T: Config>(sp_std::marker::PhantomData<T>);
-
-impl<T: Config> MarginalWeightInfo<T> {
-	/// Return the weight of servicing a single task.
-	fn service_task(maybe_lookup_len: Option<usize>, named: bool, periodic: bool) -> Weight {
-		let base = T::WeightInfo::service_task_base();
-		let mut total = match maybe_lookup_len {
-			None => base,
-			Some(l) => T::Preimages::service_task_fetched(l as u32),
-		};
-		if named {
-			total.saturating_accrue(T::WeightInfo::service_task_named().saturating_sub(base));
-		}
-		if periodic {
-			total.saturating_accrue(T::WeightInfo::service_task_periodic().saturating_sub(base));
-		}
-		total
-	}
-}
-
-#[frame_support::pallet]
-pub mod pallet {
-	use super::*;
-	use frame_support::{dispatch::PostDispatchInfo, pallet_prelude::*};
-	use system::pallet_prelude::*;
-
-	/// The current storage version.
-	const STORAGE_VERSION: StorageVersion = StorageVersion::new(0);
-
-	#[pallet::pallet]
-	#[pallet::storage_version(STORAGE_VERSION)]
-	pub struct Pallet<T>(_);
-
-	#[pallet::config]
-	pub trait Config: frame_system::Config {
-		/// The overarching event type.
-		type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
-
-		/// The aggregated origin which the dispatch will take.
-		type RuntimeOrigin: OriginTrait<PalletsOrigin = Self::PalletsOrigin>
-			+ From<Self::PalletsOrigin>
-			+ IsType<<Self as system::Config>::RuntimeOrigin>
-			+ Clone;
-
-		/// The caller origin, overarching type of all pallets origins.
-		type PalletsOrigin: From<system::RawOrigin<Self::AccountId>>
-			+ Codec
-			+ Clone
-			+ Eq
-			+ TypeInfo
-			+ MaxEncodedLen;
-
-		/// The aggregated call type.
-		type RuntimeCall: Parameter
-			+ Dispatchable<
-				RuntimeOrigin = <Self as Config>::RuntimeOrigin,
-				PostInfo = PostDispatchInfo,
-			> + UnfilteredDispatchable<RuntimeOrigin = <Self as system::Config>::RuntimeOrigin>
-			+ GetDispatchInfo
-			+ From<system::Call<Self>>;
-
-		/// The maximum weight that may be scheduled per block for any dispatchables.
-		#[pallet::constant]
-		type MaximumWeight: Get<Weight>;
-
-		/// Required origin to schedule or cancel calls.
-		type ScheduleOrigin: EnsureOrigin<
-			<Self as system::Config>::RuntimeOrigin,
-			Success = ScheduledEnsureOriginSuccess<Self::AccountId>,
-		>;
-
-		/// Compare the privileges of origins.
-		///
-		/// This will be used when canceling a task, to ensure that the origin that tries
-		/// to cancel has greater or equal privileges as the origin that created the scheduled task.
-		///
-		/// For simplicity the [`EqualPrivilegeOnly`](frame_support::traits::EqualPrivilegeOnly) can
-		/// be used. This will only check if two given origins are equal.
-		type OriginPrivilegeCmp: PrivilegeCmp<Self::PalletsOrigin>;
-
-		/// The maximum number of scheduled calls in the queue for a single block.
-		#[pallet::constant]
-		type MaxScheduledPerBlock: Get<u32>;
-
-		/// Weight information for extrinsics in this pallet.
-		type WeightInfo: WeightInfo;
-
-		/// The preimage provider with which we look up call hashes to get the call.
-		type Preimages: SchedulerPreimages<Self>;
-
-		/// The helper type used for custom transaction fee logic.
-		type CallExecutor: DispatchCall<Self, H160>;
-
-		/// Required origin to set/change calls' priority.
-		type PrioritySetOrigin: EnsureOrigin<<Self as system::Config>::RuntimeOrigin>;
-	}
-
-	/// It contains the block number from which we should service tasks.
-	/// It's used for delaying the servicing of future blocks' agendas if we had overweight tasks.
-	#[pallet::storage]
-	pub type IncompleteSince<T: Config> = StorageValue<_, T::BlockNumber>;
-
-	/// Items to be executed, indexed by the block number that they should be executed on.
-	#[pallet::storage]
-	pub type Agenda<T: Config> =
-		StorageMap<_, Twox64Concat, T::BlockNumber, BlockAgenda<T>, ValueQuery>;
-
-	/// Lookup from a name to the block number and index of the task.
-	#[pallet::storage]
-	pub(crate) type Lookup<T: Config> =
-		StorageMap<_, Twox64Concat, TaskName, TaskAddress<T::BlockNumber>>;
-
-	/// Events type.
-	#[pallet::event]
-	#[pallet::generate_deposit(pub(super) fn deposit_event)]
-	pub enum Event<T: Config> {
-		/// Scheduled some task.
-		Scheduled {
-			/// The block number in which the scheduled task should be executed.
-			when: T::BlockNumber,
-
-			/// The index of the block's agenda slot.
-			index: u32,
-		},
-		/// Canceled some task.
-		Canceled {
-			/// The block number in which the canceled task has been.
-			when: T::BlockNumber,
-
-			/// The index of the block's agenda slot that had become available.
-			index: u32,
-		},
-		/// Dispatched some task.
-		Dispatched {
-			/// The task's address - the block number and the block's agenda index.
-			task: TaskAddress<T::BlockNumber>,
-
-			/// The task's name if it is not anonymous.
-			id: Option<[u8; 32]>,
-
-			/// The task's execution result.
-			result: DispatchResult,
-		},
-		/// Scheduled task's priority has changed
-		PriorityChanged {
-			/// The task's address - the block number and the block's agenda index.
-			task: TaskAddress<T::BlockNumber>,
-
-			/// The new priority of the task.
-			priority: schedule::Priority,
-		},
-		/// The call for the provided hash was not found so the task has been aborted.
-		CallUnavailable {
-			/// The task's address - the block number and the block's agenda index.
-			task: TaskAddress<T::BlockNumber>,
-
-			/// The task's name if it is not anonymous.
-			id: Option<[u8; 32]>,
-		},
-		/// The given task can never be executed since it is overweight.
-		PermanentlyOverweight {
-			/// The task's address - the block number and the block's agenda index.
-			task: TaskAddress<T::BlockNumber>,
-
-			/// The task's name if it is not anonymous.
-			id: Option<[u8; 32]>,
-		},
-	}
-
-	#[pallet::error]
-	pub enum Error<T> {
-		/// Failed to schedule a call
-		FailedToSchedule,
-		/// There is no place for a new task in the agenda
-		AgendaIsExhausted,
-		/// Scheduled call is corrupted
-		ScheduledCallCorrupted,
-		/// Scheduled call preimage is not found
-		PreimageNotFound,
-		/// Scheduled call is too big
-		TooBigScheduledCall,
-		/// Cannot find the scheduled call.
-		NotFound,
-		/// Given target block number is in the past.
-		TargetBlockNumberInPast,
-		/// Attempt to use a non-named function on a named task.
-		Named,
-	}
-
-	#[pallet::hooks]
-	impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
-		/// Execute the scheduled calls
-		fn on_initialize(now: T::BlockNumber) -> Weight {
-			let mut weight_counter = WeightCounter {
-				used: Weight::zero(),
-				limit: T::MaximumWeight::get(),
-			};
-			Self::service_agendas(&mut weight_counter, now, u32::max_value());
-			weight_counter.used
-		}
-	}
-
-	#[pallet::call]
-	impl<T: Config> Pallet<T> {
-		/// Anonymously schedule a task.
-		///
-		/// Only `T::ScheduleOrigin` is allowed to schedule a task.
-		/// Only `T::PrioritySetOrigin` is allowed to set the task's priority.
-		#[pallet::call_index(0)]
-		#[pallet::weight(<T as Config>::WeightInfo::schedule(T::MaxScheduledPerBlock::get()))]
-		pub fn schedule(
-			origin: OriginFor<T>,
-			when: T::BlockNumber,
-			maybe_periodic: Option<schedule::Period<T::BlockNumber>>,
-			priority: Option<schedule::Priority>,
-			call: Box<<T as Config>::RuntimeCall>,
-		) -> DispatchResult {
-			T::ScheduleOrigin::ensure_origin(origin.clone())?;
-
-			if priority.is_some() {
-				T::PrioritySetOrigin::ensure_origin(origin.clone())?;
-			}
-
-			let origin = <T as Config>::RuntimeOrigin::from(origin);
-			Self::do_schedule(
-				DispatchTime::At(when),
-				maybe_periodic,
-				priority.unwrap_or(LOWEST_PRIORITY),
-				origin.caller().clone(),
-				<ScheduledCall<T>>::new(*call)?,
-			)?;
-			Ok(())
-		}
-
-		/// Cancel an anonymously scheduled task.
-		///
-		/// The `T::OriginPrivilegeCmp` decides whether the given origin is allowed to cancel the task or not.
-		#[pallet::call_index(1)]
-		#[pallet::weight(<T as Config>::WeightInfo::cancel(T::MaxScheduledPerBlock::get()))]
-		pub fn cancel(origin: OriginFor<T>, when: T::BlockNumber, index: u32) -> DispatchResult {
-			T::ScheduleOrigin::ensure_origin(origin.clone())?;
-			let origin = <T as Config>::RuntimeOrigin::from(origin);
-			Self::do_cancel(Some(origin.caller().clone()), (when, index))?;
-			Ok(())
-		}
-
-		/// Schedule a named task.
-		///
-		/// Only `T::ScheduleOrigin` is allowed to schedule a task.
-		/// Only `T::PrioritySetOrigin` is allowed to set the task's priority.
-		#[pallet::call_index(2)]
-		#[pallet::weight(<T as Config>::WeightInfo::schedule_named(T::MaxScheduledPerBlock::get()))]
-		pub fn schedule_named(
-			origin: OriginFor<T>,
-			id: TaskName,
-			when: T::BlockNumber,
-			maybe_periodic: Option<schedule::Period<T::BlockNumber>>,
-			priority: Option<schedule::Priority>,
-			call: Box<<T as Config>::RuntimeCall>,
-		) -> DispatchResult {
-			T::ScheduleOrigin::ensure_origin(origin.clone())?;
-
-			if priority.is_some() {
-				T::PrioritySetOrigin::ensure_origin(origin.clone())?;
-			}
-
-			let origin = <T as Config>::RuntimeOrigin::from(origin);
-			Self::do_schedule_named(
-				id,
-				DispatchTime::At(when),
-				maybe_periodic,
-				priority.unwrap_or(LOWEST_PRIORITY),
-				origin.caller().clone(),
-				<ScheduledCall<T>>::new(*call)?,
-			)?;
-			Ok(())
-		}
-
-		/// Cancel a named scheduled task.
-		///
-		/// The `T::OriginPrivilegeCmp` decides whether the given origin is allowed to cancel the task or not.
-		#[pallet::call_index(3)]
-		#[pallet::weight(<T as Config>::WeightInfo::cancel_named(T::MaxScheduledPerBlock::get()))]
-		pub fn cancel_named(origin: OriginFor<T>, id: TaskName) -> DispatchResult {
-			T::ScheduleOrigin::ensure_origin(origin.clone())?;
-			let origin = <T as Config>::RuntimeOrigin::from(origin);
-			Self::do_cancel_named(Some(origin.caller().clone()), id)?;
-			Ok(())
-		}
-
-		/// Anonymously schedule a task after a delay.
-		///
-		/// # <weight>
-		/// Same as [`schedule`].
-		/// # </weight>
-		#[pallet::call_index(4)]
-		#[pallet::weight(<T as Config>::WeightInfo::schedule(T::MaxScheduledPerBlock::get()))]
-		pub fn schedule_after(
-			origin: OriginFor<T>,
-			after: T::BlockNumber,
-			maybe_periodic: Option<schedule::Period<T::BlockNumber>>,
-			priority: Option<schedule::Priority>,
-			call: Box<<T as Config>::RuntimeCall>,
-		) -> DispatchResult {
-			T::ScheduleOrigin::ensure_origin(origin.clone())?;
-
-			if priority.is_some() {
-				T::PrioritySetOrigin::ensure_origin(origin.clone())?;
-			}
-
-			let origin = <T as Config>::RuntimeOrigin::from(origin);
-			Self::do_schedule(
-				DispatchTime::After(after),
-				maybe_periodic,
-				priority.unwrap_or(LOWEST_PRIORITY),
-				origin.caller().clone(),
-				<ScheduledCall<T>>::new(*call)?,
-			)?;
-			Ok(())
-		}
-
-		/// Schedule a named task after a delay.
-		///
-		/// Only `T::ScheduleOrigin` is allowed to schedule a task.
-		/// Only `T::PrioritySetOrigin` is allowed to set the task's priority.
-		///
-		/// # <weight>
-		/// Same as [`schedule_named`](Self::schedule_named).
-		/// # </weight>
-		#[pallet::call_index(5)]
-		#[pallet::weight(<T as Config>::WeightInfo::schedule_named(T::MaxScheduledPerBlock::get()))]
-		pub fn schedule_named_after(
-			origin: OriginFor<T>,
-			id: TaskName,
-			after: T::BlockNumber,
-			maybe_periodic: Option<schedule::Period<T::BlockNumber>>,
-			priority: Option<schedule::Priority>,
-			call: Box<<T as Config>::RuntimeCall>,
-		) -> DispatchResult {
-			T::ScheduleOrigin::ensure_origin(origin.clone())?;
-
-			if priority.is_some() {
-				T::PrioritySetOrigin::ensure_origin(origin.clone())?;
-			}
-
-			let origin = <T as Config>::RuntimeOrigin::from(origin);
-			Self::do_schedule_named(
-				id,
-				DispatchTime::After(after),
-				maybe_periodic,
-				priority.unwrap_or(LOWEST_PRIORITY),
-				origin.caller().clone(),
-				<ScheduledCall<T>>::new(*call)?,
-			)?;
-			Ok(())
-		}
-
-		/// Change a named task's priority.
-		///
-		/// Only the `T::PrioritySetOrigin` is allowed to change the task's priority.
-		#[pallet::call_index(6)]
-		#[pallet::weight(<T as Config>::WeightInfo::change_named_priority(T::MaxScheduledPerBlock::get()))]
-		pub fn change_named_priority(
-			origin: OriginFor<T>,
-			id: TaskName,
-			priority: schedule::Priority,
-		) -> DispatchResult {
-			T::PrioritySetOrigin::ensure_origin(origin.clone())?;
-			let origin = <T as Config>::RuntimeOrigin::from(origin);
-			Self::do_change_named_priority(origin.caller().clone(), id, priority)
-		}
-	}
-}
-
-impl<T: Config> Pallet<T> {
-	/// Converts the `DispatchTime` to the `BlockNumber`.
-	///
-	/// Returns an error if the block number is in the past.
-	fn resolve_time(when: DispatchTime<T::BlockNumber>) -> Result<T::BlockNumber, DispatchError> {
-		let now = frame_system::Pallet::<T>::block_number();
-
-		let when = match when {
-			DispatchTime::At(x) => x,
-			// The current block has already completed it's scheduled tasks, so
-			// Schedule the task at lest one block after this current block.
-			DispatchTime::After(x) => now.saturating_add(x).saturating_add(One::one()),
-		};
-
-		if when <= now {
-			return Err(Error::<T>::TargetBlockNumberInPast.into());
-		}
-
-		Ok(when)
-	}
-
-	/// Places the mandatory task.
-	///
-	/// It will try to place the task into the block pointed by the `when` parameter.
-	///
-	/// If the block has no room for a task,
-	/// the function will search for a future block that can accommodate the task.
-	fn mandatory_place_task(when: T::BlockNumber, what: ScheduledOf<T>) {
-		Self::place_task(when, what, true).expect("mandatory place task always succeeds; qed");
-	}
-
-	/// Tries to place a task `what` into the given block `when`.
-	///
-	/// Returns an error if the block has no room for the task.
-	fn try_place_task(
-		when: T::BlockNumber,
-		what: ScheduledOf<T>,
-	) -> Result<TaskAddress<T::BlockNumber>, DispatchError> {
-		Self::place_task(when, what, false)
-	}
-
-	/// If `is_mandatory` is true, the function behaves like [`mandatory_place_task`](Self::mandatory_place_task);
-	/// otherwise it acts like [`try_place_task`](Self::try_place_task).
-	///
-	/// The function also updates the `Lookup` storage.
-	fn place_task(
-		mut when: T::BlockNumber,
-		what: ScheduledOf<T>,
-		is_mandatory: bool,
-	) -> Result<TaskAddress<T::BlockNumber>, DispatchError> {
-		let maybe_name = what.maybe_id;
-		let index = Self::push_to_agenda(&mut when, what, is_mandatory)?;
-		let address = (when, index);
-		if let Some(name) = maybe_name {
-			Lookup::<T>::insert(name, address)
-		}
-		Self::deposit_event(Event::Scheduled {
-			when: address.0,
-			index: address.1,
-		});
-		Ok(address)
-	}
-
-	/// Pushes the scheduled task into the block's agenda.
-	///
-	/// If `is_mandatory` is true, it searches for a block with a free slot for the given task.
-	///
-	/// If `is_mandatory` is false and there is no free slot, the function returns an error.
-	fn push_to_agenda(
-		when: &mut T::BlockNumber,
-		mut what: ScheduledOf<T>,
-		is_mandatory: bool,
-	) -> Result<u32, DispatchError> {
-		let mut agenda;
-
-		let index = loop {
-			agenda = Agenda::<T>::get(*when);
-
-			match agenda.try_push(what) {
-				Ok(index) => break index,
-				Err(returned_what) if is_mandatory => {
-					what = returned_what;
-					when.saturating_inc();
-				}
-				Err(_) => return Err(<Error<T>>::AgendaIsExhausted.into()),
-			}
-		};
-
-		Agenda::<T>::insert(when, agenda);
-		Ok(index)
-	}
-
-	fn do_schedule(
-		when: DispatchTime<T::BlockNumber>,
-		maybe_periodic: Option<schedule::Period<T::BlockNumber>>,
-		priority: schedule::Priority,
-		origin: T::PalletsOrigin,
-		call: ScheduledCall<T>,
-	) -> Result<TaskAddress<T::BlockNumber>, DispatchError> {
-		let when = Self::resolve_time(when)?;
-
-		// sanitize maybe_periodic
-		let maybe_periodic = maybe_periodic
-			.filter(|p| p.1 > 1 && !p.0.is_zero())
-			// Remove one from the number of repetitions since we will schedule one now.
-			.map(|(p, c)| (p, c - 1));
-		let task = Scheduled {
-			maybe_id: None,
-			priority,
-			call,
-			maybe_periodic,
-			origin,
-			_phantom: PhantomData,
-		};
-		Self::try_place_task(when, task)
-	}
-
-	fn do_cancel(
-		origin: Option<T::PalletsOrigin>,
-		(when, index): TaskAddress<T::BlockNumber>,
-	) -> Result<(), DispatchError> {
-		let scheduled = Agenda::<T>::try_mutate(
-			when,
-			|agenda| -> Result<Option<Scheduled<_, _, _, _, _>>, DispatchError> {
-				let scheduled = match agenda.get(index) {
-					Some(scheduled) => scheduled,
-					None => return Ok(None),
-				};
-
-				if let Some(ref o) = origin {
-					if matches!(
-						T::OriginPrivilegeCmp::cmp_privilege(o, &scheduled.origin),
-						Some(Ordering::Less) | None
-					) {
-						return Err(BadOrigin.into());
-					}
-				}
-
-				Ok(agenda.take(index))
-			},
-		)?;
-		if let Some(s) = scheduled {
-			T::Preimages::drop(&s.call);
-
-			if let Some(id) = s.maybe_id {
-				Lookup::<T>::remove(id);
-			}
-			Self::deposit_event(Event::Canceled { when, index });
-			Ok(())
-		} else {
-			Err(Error::<T>::NotFound.into())
-		}
-	}
-
-	fn do_schedule_named(
-		id: TaskName,
-		when: DispatchTime<T::BlockNumber>,
-		maybe_periodic: Option<schedule::Period<T::BlockNumber>>,
-		priority: schedule::Priority,
-		origin: T::PalletsOrigin,
-		call: ScheduledCall<T>,
-	) -> Result<TaskAddress<T::BlockNumber>, DispatchError> {
-		// ensure id it is unique
-		if Lookup::<T>::contains_key(id) {
-			return Err(Error::<T>::FailedToSchedule.into());
-		}
-
-		let when = Self::resolve_time(when)?;
-
-		// sanitize maybe_periodic
-		let maybe_periodic = maybe_periodic
-			.filter(|p| p.1 > 1 && !p.0.is_zero())
-			// Remove one from the number of repetitions since we will schedule one now.
-			.map(|(p, c)| (p, c - 1));
-
-		let task = Scheduled {
-			maybe_id: Some(id),
-			priority,
-			call,
-			maybe_periodic,
-			origin,
-			_phantom: Default::default(),
-		};
-		Self::try_place_task(when, task)
-	}
-
-	fn do_cancel_named(origin: Option<T::PalletsOrigin>, id: TaskName) -> DispatchResult {
-		Lookup::<T>::try_mutate_exists(id, |lookup| -> DispatchResult {
-			if let Some((when, index)) = lookup.take() {
-				Agenda::<T>::try_mutate(when, |agenda| -> DispatchResult {
-					let scheduled = match agenda.get(index) {
-						Some(scheduled) => scheduled,
-						None => return Ok(()),
-					};
-
-					if let Some(ref o) = origin {
-						if matches!(
-							T::OriginPrivilegeCmp::cmp_privilege(o, &scheduled.origin),
-							Some(Ordering::Less) | None
-						) {
-							return Err(BadOrigin.into());
-						}
-						T::Preimages::drop(&scheduled.call);
-					}
-
-					agenda.take(index);
-
-					Ok(())
-				})?;
-				Self::deposit_event(Event::Canceled { when, index });
-				Ok(())
-			} else {
-				Err(Error::<T>::NotFound.into())
-			}
-		})
-	}
-
-	fn do_change_named_priority(
-		origin: T::PalletsOrigin,
-		id: TaskName,
-		priority: schedule::Priority,
-	) -> DispatchResult {
-		match Lookup::<T>::get(id) {
-			Some((when, index)) => Agenda::<T>::try_mutate(when, |agenda| {
-				let scheduled = match agenda.get_mut(index) {
-					Some(scheduled) => scheduled,
-					None => return Ok(()),
-				};
-
-				if matches!(
-					T::OriginPrivilegeCmp::cmp_privilege(&origin, &scheduled.origin),
-					Some(Ordering::Less) | None
-				) {
-					return Err(BadOrigin.into());
-				}
-
-				scheduled.priority = priority;
-				Self::deposit_event(Event::PriorityChanged {
-					task: (when, index),
-					priority,
-				});
-
-				Ok(())
-			}),
-			None => Err(Error::<T>::NotFound.into()),
-		}
-	}
-}
-
-enum ServiceTaskError {
-	/// Could not be executed due to missing preimage.
-	Unavailable,
-	/// Could not be executed due to weight limitations.
-	Overweight,
-}
-use ServiceTaskError::*;
-
-/// A Scheduler-Runtime interface for finer payment handling.
-pub trait DispatchCall<T: frame_system::Config + Config, SelfContainedSignedInfo> {
-	/// Resolve the call dispatch, including any post-dispatch operations.
-	fn dispatch_call(
-		signer: Option<T::AccountId>,
-		function: <T as Config>::RuntimeCall,
-	) -> Result<
-		Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>,
-		TransactionValidityError,
-	>;
-}
-
-impl<T: Config> Pallet<T> {
-	/// Service up to `max` agendas queue starting from earliest incompletely executed agenda.
-	fn service_agendas(weight: &mut WeightCounter, now: T::BlockNumber, max: u32) {
-		if !weight.check_accrue(T::WeightInfo::service_agendas_base()) {
-			return;
-		}
-
-		let mut incomplete_since = now + One::one();
-		let mut when = IncompleteSince::<T>::take().unwrap_or(now);
-		let mut executed = 0;
-
-		let max_items = T::MaxScheduledPerBlock::get();
-		let mut count_down = max;
-		let service_agenda_base_weight = T::WeightInfo::service_agenda_base(max_items);
-		while count_down > 0 && when <= now && weight.can_accrue(service_agenda_base_weight) {
-			if !Self::service_agenda(weight, &mut executed, now, when, u32::max_value()) {
-				incomplete_since = incomplete_since.min(when);
-			}
-			when.saturating_inc();
-			count_down.saturating_dec();
-		}
-		incomplete_since = incomplete_since.min(when);
-		if incomplete_since <= now {
-			IncompleteSince::<T>::put(incomplete_since);
-		}
-	}
-
-	/// Returns `true` if the agenda was fully completed, `false` if it should be revisited at a
-	/// later block.
-	fn service_agenda(
-		weight: &mut WeightCounter,
-		executed: &mut u32,
-		now: T::BlockNumber,
-		when: T::BlockNumber,
-		max: u32,
-	) -> bool {
-		let mut agenda = Agenda::<T>::get(when);
-		let mut ordered = agenda
-			.iter()
-			.enumerate()
-			.filter_map(|(index, maybe_item)| {
-				maybe_item
-					.as_ref()
-					.map(|item| (index as u32, item.priority))
-			})
-			.collect::<Vec<_>>();
-		ordered.sort_by_key(|k| k.1);
-		let within_limit =
-			weight.check_accrue(T::WeightInfo::service_agenda_base(ordered.len() as u32));
-		debug_assert!(
-			within_limit,
-			"weight limit should have been checked in advance"
-		);
-
-		// Items which we know can be executed and have postponed for execution in a later block.
-		let mut postponed = (ordered.len() as u32).saturating_sub(max);
-		// Items which we don't know can ever be executed.
-		let mut dropped = 0;
-
-		for (agenda_index, _) in ordered.into_iter().take(max as usize) {
-			let task = match agenda.take(agenda_index).take() {
-				None => continue,
-				Some(t) => t,
-			};
-			let base_weight = MarginalWeightInfo::<T>::service_task(
-				task.call.lookup_len().map(|x| x as usize),
-				task.maybe_id.is_some(),
-				task.maybe_periodic.is_some(),
-			);
-			if !weight.can_accrue(base_weight) {
-				postponed += 1;
-				break;
-			}
-			let result = Self::service_task(weight, now, when, agenda_index, *executed == 0, task);
-			match result {
-				Err((Unavailable, slot)) => {
-					dropped += 1;
-					agenda.set_slot(agenda_index, slot);
-				}
-				Err((Overweight, slot)) => {
-					postponed += 1;
-					agenda.set_slot(agenda_index, slot);
-				}
-				Ok(()) => {
-					*executed += 1;
-				}
-			};
-		}
-		if postponed > 0 || dropped > 0 {
-			Agenda::<T>::insert(when, agenda);
-		} else {
-			Agenda::<T>::remove(when);
-		}
-		postponed == 0
-	}
-
-	/// Service (i.e. execute) the given task, being careful not to overflow the `weight` counter.
-	///
-	/// This involves:
-	/// - removing and potentially replacing the `Lookup` entry for the task.
-	/// - realizing the task's call which can include a preimage lookup.
-	/// - Rescheduling the task for execution in a later agenda if periodic.
-	fn service_task(
-		weight: &mut WeightCounter,
-		now: T::BlockNumber,
-		when: T::BlockNumber,
-		agenda_index: u32,
-		is_first: bool,
-		mut task: ScheduledOf<T>,
-	) -> Result<(), (ServiceTaskError, Option<ScheduledOf<T>>)> {
-		let (call, lookup_len) = match T::Preimages::peek(&task.call) {
-			Ok(c) => c,
-			Err(_) => {
-				if let Some(ref id) = task.maybe_id {
-					Lookup::<T>::remove(id);
-				}
-
-				return Err((Unavailable, Some(task)));
-			}
-		};
-
-		weight.check_accrue(MarginalWeightInfo::<T>::service_task(
-			lookup_len.map(|x| x as usize),
-			task.maybe_id.is_some(),
-			task.maybe_periodic.is_some(),
-		));
-
-		match Self::execute_dispatch(weight, task.origin.clone(), call) {
-			Err(Unavailable) => {
-				debug_assert!(false, "Checked to exist with `peek`");
-
-				if let Some(ref id) = task.maybe_id {
-					Lookup::<T>::remove(id);
-				}
-
-				Self::deposit_event(Event::CallUnavailable {
-					task: (when, agenda_index),
-					id: task.maybe_id,
-				});
-				Err((Unavailable, Some(task)))
-			}
-			Err(Overweight) if is_first && !Self::is_runtime_upgraded() => {
-				T::Preimages::drop(&task.call);
-
-				if let Some(ref id) = task.maybe_id {
-					Lookup::<T>::remove(id);
-				}
-
-				Self::deposit_event(Event::PermanentlyOverweight {
-					task: (when, agenda_index),
-					id: task.maybe_id,
-				});
-				Err((Unavailable, Some(task)))
-			}
-			Err(Overweight) => {
-				// Preserve Lookup -- the task will be postponed.
-				Err((Overweight, Some(task)))
-			}
-			Ok(result) => {
-				Self::deposit_event(Event::Dispatched {
-					task: (when, agenda_index),
-					id: task.maybe_id,
-					result,
-				});
-
-				let is_canceled = task
-					.maybe_id
-					.as_ref()
-					.map(|id| !Lookup::<T>::contains_key(id))
-					.unwrap_or(false);
-
-				match &task.maybe_periodic {
-					&Some((period, count)) if !is_canceled => {
-						if count > 1 {
-							task.maybe_periodic = Some((period, count - 1));
-						} else {
-							task.maybe_periodic = None;
-						}
-						let wake = now.saturating_add(period);
-						Self::mandatory_place_task(wake, task);
-					}
-					_ => {
-						if let Some(ref id) = task.maybe_id {
-							Lookup::<T>::remove(id);
-						}
-
-						T::Preimages::drop(&task.call)
-					}
-				}
-				Ok(())
-			}
-		}
-	}
-
-	fn is_runtime_upgraded() -> bool {
-		let last = system::LastRuntimeUpgrade::<T>::get();
-		let current = T::Version::get();
-
-		last.map(|v| v.was_upgraded(&current)).unwrap_or(true)
-	}
-
-	/// Make a dispatch to the given `call` from the given `origin`, ensuring that the `weight`
-	/// counter does not exceed its limit and that it is counted accurately (e.g. accounted using
-	/// post info if available).
-	///
-	/// NOTE: Only the weight for this function will be counted (origin lookup, dispatch and the
-	/// call itself).
-	fn execute_dispatch(
-		weight: &mut WeightCounter,
-		origin: T::PalletsOrigin,
-		call: <T as Config>::RuntimeCall,
-	) -> Result<DispatchResult, ServiceTaskError> {
-		let dispatch_origin: <T as Config>::RuntimeOrigin = origin.into();
-		let base_weight = match dispatch_origin.clone().as_signed() {
-			Some(_) => T::WeightInfo::execute_dispatch_signed(),
-			_ => T::WeightInfo::execute_dispatch_unsigned(),
-		};
-		let call_weight = call.get_dispatch_info().weight;
-		// We only allow a scheduled call if it cannot push the weight past the limit.
-		let max_weight = base_weight.saturating_add(call_weight);
-
-		if !weight.can_accrue(max_weight) {
-			return Err(Overweight);
-		}
-
-		let ensured_origin = T::ScheduleOrigin::ensure_origin(dispatch_origin.into());
-
-		let r = match ensured_origin {
-			Ok(ScheduledEnsureOriginSuccess::Root) => {
-				Ok(call.dispatch_bypass_filter(frame_system::RawOrigin::Root.into()))
-			}
-			Ok(ScheduledEnsureOriginSuccess::Signed(sender)) => {
-				// Execute transaction via chain default pipeline
-				// That means dispatch will be processed like any user's extrinsic e.g. transaction fees will be taken
-				T::CallExecutor::dispatch_call(Some(sender), call)
-			}
-			Err(e) => Ok(Err(e.into())),
-		};
-
-		let (maybe_actual_call_weight, result) = match r {
-			Ok(result) => match result {
-				Ok(post_info) => (post_info.actual_weight, Ok(())),
-				Err(error_and_info) => (
-					error_and_info.post_info.actual_weight,
-					Err(error_and_info.error),
-				),
-			},
-			Err(_) => {
-				log::error!(
-					target: "runtime::scheduler",
-					"Warning: Scheduler has failed to execute a post-dispatch transaction. \
-					This block might have become invalid.");
-				(None, Err(DispatchError::CannotLookup))
-			}
-		};
-		let call_weight = maybe_actual_call_weight.unwrap_or(call_weight);
-		weight.check_accrue(base_weight);
-		weight.check_accrue(call_weight);
-		Ok(result)
-	}
-}
deletedpallets/scheduler-v2/src/mock.rsdiffbeforeafterboth
--- a/pallets/scheduler-v2/src/mock.rs
+++ /dev/null
@@ -1,292 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-// Original license:
-// This file is part of Substrate.
-
-// Copyright (C) 2017-2022 Parity Technologies (UK) Ltd.
-// SPDX-License-Identifier: Apache-2.0
-
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// 	http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-//! # Scheduler test environment.
-#![allow(deprecated)]
-
-use super::*;
-
-use crate as scheduler;
-use frame_support::{
-	ord_parameter_types, parameter_types,
-	traits::{ConstU32, ConstU64, Contains, EqualPrivilegeOnly, OnFinalize, OnInitialize},
-	weights::constants::RocksDbWeight,
-};
-use frame_system::{EnsureRoot, RawOrigin};
-use sp_core::H256;
-use sp_runtime::{
-	testing::Header,
-	traits::{BlakeTwo256, IdentityLookup},
-	Perbill,
-};
-
-// Logger module to track execution.
-#[frame_support::pallet]
-pub mod logger {
-	use super::{OriginCaller, OriginTrait};
-	use frame_support::{pallet_prelude::*, parameter_types};
-	use frame_system::pallet_prelude::*;
-
-	parameter_types! {
-		static Log: Vec<(OriginCaller, u32)> = Vec::new();
-	}
-	pub fn log() -> Vec<(OriginCaller, u32)> {
-		Log::get().clone()
-	}
-
-	#[pallet::pallet]
-	pub struct Pallet<T>(PhantomData<T>);
-
-	#[pallet::hooks]
-	impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
-
-	#[pallet::config]
-	pub trait Config: frame_system::Config {
-		type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
-	}
-
-	#[pallet::event]
-	#[pallet::generate_deposit(pub(super) fn deposit_event)]
-	pub enum Event<T: Config> {
-		Logged(u32, Weight),
-	}
-
-	#[pallet::call]
-	impl<T: Config> Pallet<T>
-	where
-		<T as frame_system::Config>::RuntimeOrigin: OriginTrait<PalletsOrigin = OriginCaller>,
-	{
-		#[pallet::call_index(0)]
-		#[pallet::weight(*weight)]
-		pub fn log(origin: OriginFor<T>, i: u32, weight: Weight) -> DispatchResult {
-			Self::deposit_event(Event::Logged(i, weight));
-			Log::mutate(|log| {
-				log.push((origin.caller().clone(), i));
-			});
-			Ok(())
-		}
-
-		#[pallet::call_index(1)]
-		#[pallet::weight(*weight)]
-		pub fn log_without_filter(origin: OriginFor<T>, i: u32, weight: Weight) -> DispatchResult {
-			Self::deposit_event(Event::Logged(i, weight));
-			Log::mutate(|log| {
-				log.push((origin.caller().clone(), i));
-			});
-			Ok(())
-		}
-	}
-}
-
-type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
-type Block = frame_system::mocking::MockBlock<Test>;
-
-frame_support::construct_runtime!(
-	pub enum Test where
-		Block = Block,
-		NodeBlock = Block,
-		UncheckedExtrinsic = UncheckedExtrinsic,
-	{
-		System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
-		Logger: logger::{Pallet, Call, Event<T>},
-		Scheduler: scheduler::{Pallet, Call, Storage, Event<T>},
-	}
-);
-
-// Scheduler must dispatch with root and no filter, this tests base filter is indeed not used.
-pub struct BaseFilter;
-impl Contains<RuntimeCall> for BaseFilter {
-	fn contains(call: &RuntimeCall) -> bool {
-		!matches!(call, RuntimeCall::Logger(LoggerCall::log { .. }))
-	}
-}
-
-parameter_types! {
-	pub BlockWeights: frame_system::limits::BlockWeights =
-		frame_system::limits::BlockWeights::simple_max(
-			Weight::from_ref_time(2_000_000_000_000).set_proof_size(u64::MAX)
-		);
-}
-impl system::Config for Test {
-	type BaseCallFilter = BaseFilter;
-	type BlockWeights = BlockWeights;
-	type BlockLength = ();
-	type DbWeight = RocksDbWeight;
-	type RuntimeOrigin = RuntimeOrigin;
-	type RuntimeCall = RuntimeCall;
-	type Index = u64;
-	type BlockNumber = u64;
-	type Hash = H256;
-	type Hashing = BlakeTwo256;
-	type AccountId = u64;
-	type Lookup = IdentityLookup<Self::AccountId>;
-	type Header = Header;
-	type RuntimeEvent = RuntimeEvent;
-	type BlockHashCount = ConstU64<250>;
-	type Version = ();
-	type PalletInfo = PalletInfo;
-	type AccountData = ();
-	type OnNewAccount = ();
-	type OnKilledAccount = ();
-	type SystemWeightInfo = ();
-	type SS58Prefix = ();
-	type OnSetCode = ();
-	type MaxConsumers = ConstU32<16>;
-}
-impl logger::Config for Test {
-	type RuntimeEvent = RuntimeEvent;
-}
-ord_parameter_types! {
-	pub const One: u64 = 1;
-}
-
-pub struct TestWeightInfo;
-impl WeightInfo for TestWeightInfo {
-	fn service_agendas_base() -> Weight {
-		Weight::from_ref_time(0b0000_0001)
-	}
-	fn service_agenda_base(i: u32) -> Weight {
-		Weight::from_ref_time((i << 8) as u64 + 0b0000_0010)
-	}
-	fn service_task_base() -> Weight {
-		Weight::from_ref_time(0b0000_0100)
-	}
-	fn service_task_periodic() -> Weight {
-		Weight::from_ref_time(0b0000_1100)
-	}
-	fn service_task_named() -> Weight {
-		Weight::from_ref_time(0b0001_0100)
-	}
-	// fn service_task_fetched(s: u32) -> Weight {
-	// 	Weight::from_ref_time((s << 8) as u64 + 0b0010_0100)
-	// }
-	fn execute_dispatch_signed() -> Weight {
-		Weight::from_ref_time(0b0100_0000)
-	}
-	fn execute_dispatch_unsigned() -> Weight {
-		Weight::from_ref_time(0b1000_0000)
-	}
-	fn schedule(_s: u32) -> Weight {
-		Weight::from_ref_time(50)
-	}
-	fn cancel(_s: u32) -> Weight {
-		Weight::from_ref_time(50)
-	}
-	fn schedule_named(_s: u32) -> Weight {
-		Weight::from_ref_time(50)
-	}
-	fn cancel_named(_s: u32) -> Weight {
-		Weight::from_ref_time(50)
-	}
-	fn change_named_priority(_s: u32) -> Weight {
-		Weight::from_ref_time(50)
-	}
-}
-parameter_types! {
-	pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) *
-		BlockWeights::get().max_block;
-}
-
-pub struct EnsureSignedOneOrRoot;
-impl<O: Into<Result<RawOrigin<u64>, O>> + From<RawOrigin<u64>>> EnsureOrigin<O>
-	for EnsureSignedOneOrRoot
-{
-	type Success = ScheduledEnsureOriginSuccess<u64>;
-	fn try_origin(o: O) -> Result<Self::Success, O> {
-		o.into().and_then(|o| match o {
-			RawOrigin::Root => Ok(ScheduledEnsureOriginSuccess::Root),
-			RawOrigin::Signed(1) => Ok(ScheduledEnsureOriginSuccess::Signed(1)),
-			r => Err(O::from(r)),
-		})
-	}
-	#[cfg(feature = "runtime-benchmarks")]
-	fn try_successful_origin() -> Result<O, ()> {
-		Ok(O::from(RawOrigin::Root))
-	}
-}
-
-pub struct Executor;
-impl DispatchCall<Test, sp_core::H160> for Executor {
-	fn dispatch_call(
-		signer: Option<u64>,
-		function: RuntimeCall,
-	) -> Result<
-		Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>,
-		TransactionValidityError,
-	> {
-		let origin = match signer {
-			Some(who) => RuntimeOrigin::signed(who),
-			None => RuntimeOrigin::none(),
-		};
-		Ok(function.dispatch(origin))
-	}
-}
-
-impl Config for Test {
-	type RuntimeEvent = RuntimeEvent;
-	type RuntimeOrigin = RuntimeOrigin;
-	type PalletsOrigin = OriginCaller;
-	type RuntimeCall = RuntimeCall;
-	type MaximumWeight = MaximumSchedulerWeight;
-	type ScheduleOrigin = EnsureSignedOneOrRoot;
-	type MaxScheduledPerBlock = ConstU32<10>;
-	type WeightInfo = TestWeightInfo;
-	type OriginPrivilegeCmp = EqualPrivilegeOnly;
-	type Preimages = ();
-	type PrioritySetOrigin = EnsureRoot<u64>;
-	type CallExecutor = Executor;
-}
-
-pub type LoggerCall = logger::Call<Test>;
-
-pub type SystemCall = frame_system::Call<Test>;
-
-pub fn new_test_ext() -> sp_io::TestExternalities {
-	let t = system::GenesisConfig::default()
-		.build_storage::<Test>()
-		.unwrap();
-	t.into()
-}
-
-pub fn run_to_block(n: u64) {
-	while System::block_number() < n {
-		Scheduler::on_finalize(System::block_number());
-		System::set_block_number(System::block_number() + 1);
-		Scheduler::on_initialize(System::block_number());
-	}
-}
-
-pub fn root() -> OriginCaller {
-	system::RawOrigin::Root.into()
-}
deletedpallets/scheduler-v2/src/tests.rsdiffbeforeafterboth
--- a/pallets/scheduler-v2/src/tests.rs
+++ /dev/null
@@ -1,901 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-// Original license:
-// This file is part of Substrate.
-
-// Copyright (C) 2017-2022 Parity Technologies (UK) Ltd.
-// SPDX-License-Identifier: Apache-2.0
-
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// 	http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-//! # Scheduler tests.
-#![allow(deprecated)]
-
-use super::*;
-use crate::mock::{
-	logger, new_test_ext, root, run_to_block, LoggerCall, RuntimeCall, Scheduler, Test, *,
-};
-use frame_support::{
-	assert_noop, assert_ok,
-	traits::{Contains, OnInitialize},
-	assert_err,
-};
-
-#[test]
-fn basic_scheduling_works() {
-	new_test_ext().execute_with(|| {
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: Weight::from_ref_time(10),
-		});
-		assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(
-			&call
-		));
-		assert_ok!(Scheduler::do_schedule(
-			DispatchTime::At(4),
-			None,
-			127,
-			root(),
-			<ScheduledCall<Test>>::new(call).unwrap(),
-		));
-		run_to_block(3);
-		assert!(logger::log().is_empty());
-		run_to_block(4);
-		assert_eq!(logger::log(), vec![(root(), 42u32)]);
-		run_to_block(100);
-		assert_eq!(logger::log(), vec![(root(), 42u32)]);
-	});
-}
-
-#[test]
-fn schedule_after_works() {
-	new_test_ext().execute_with(|| {
-		run_to_block(2);
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: Weight::from_ref_time(10),
-		});
-		assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(
-			&call
-		));
-		// This will schedule the call 3 blocks after the next block... so block 3 + 3 = 6
-		assert_ok!(Scheduler::do_schedule(
-			DispatchTime::After(3),
-			None,
-			127,
-			root(),
-			<ScheduledCall<Test>>::new(call).unwrap(),
-		));
-		run_to_block(5);
-		assert!(logger::log().is_empty());
-		run_to_block(6);
-		assert_eq!(logger::log(), vec![(root(), 42u32)]);
-		run_to_block(100);
-		assert_eq!(logger::log(), vec![(root(), 42u32)]);
-	});
-}
-
-#[test]
-fn schedule_after_zero_works() {
-	new_test_ext().execute_with(|| {
-		run_to_block(2);
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: Weight::from_ref_time(10),
-		});
-		assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(
-			&call
-		));
-		assert_ok!(Scheduler::do_schedule(
-			DispatchTime::After(0),
-			None,
-			127,
-			root(),
-			<ScheduledCall<Test>>::new(call).unwrap(),
-		));
-		// Will trigger on the next block.
-		run_to_block(3);
-		assert_eq!(logger::log(), vec![(root(), 42u32)]);
-		run_to_block(100);
-		assert_eq!(logger::log(), vec![(root(), 42u32)]);
-	});
-}
-
-#[test]
-fn periodic_scheduling_works() {
-	new_test_ext().execute_with(|| {
-		// at #4, every 3 blocks, 3 times.
-		assert_ok!(Scheduler::do_schedule(
-			DispatchTime::At(4),
-			Some((3, 3)),
-			127,
-			root(),
-			<ScheduledCall<Test>>::new(RuntimeCall::Logger(logger::Call::log {
-				i: 42,
-				weight: Weight::from_ref_time(10)
-			}))
-			.unwrap()
-		));
-		run_to_block(3);
-		assert!(logger::log().is_empty());
-		run_to_block(4);
-		assert_eq!(logger::log(), vec![(root(), 42u32)]);
-		run_to_block(6);
-		assert_eq!(logger::log(), vec![(root(), 42u32)]);
-		run_to_block(7);
-		assert_eq!(logger::log(), vec![(root(), 42u32), (root(), 42u32)]);
-		run_to_block(9);
-		assert_eq!(logger::log(), vec![(root(), 42u32), (root(), 42u32)]);
-		run_to_block(10);
-		assert_eq!(
-			logger::log(),
-			vec![(root(), 42u32), (root(), 42u32), (root(), 42u32)]
-		);
-		run_to_block(100);
-		assert_eq!(
-			logger::log(),
-			vec![(root(), 42u32), (root(), 42u32), (root(), 42u32)]
-		);
-	});
-}
-
-#[test]
-fn cancel_named_scheduling_works_with_normal_cancel() {
-	new_test_ext().execute_with(|| {
-		// at #4.
-		Scheduler::do_schedule_named(
-			[1u8; 32],
-			DispatchTime::At(4),
-			None,
-			127,
-			root(),
-			<ScheduledCall<Test>>::new(RuntimeCall::Logger(LoggerCall::log {
-				i: 69,
-				weight: Weight::from_ref_time(10),
-			}))
-			.unwrap(),
-		)
-		.unwrap();
-		let i = Scheduler::do_schedule(
-			DispatchTime::At(4),
-			None,
-			127,
-			root(),
-			<ScheduledCall<Test>>::new(RuntimeCall::Logger(LoggerCall::log {
-				i: 42,
-				weight: Weight::from_ref_time(10),
-			}))
-			.unwrap(),
-		)
-		.unwrap();
-		run_to_block(3);
-		assert!(logger::log().is_empty());
-		assert_ok!(Scheduler::do_cancel_named(None, [1u8; 32]));
-		assert_ok!(Scheduler::do_cancel(None, i));
-		run_to_block(100);
-		assert!(logger::log().is_empty());
-	});
-}
-
-#[test]
-fn cancel_named_periodic_scheduling_works() {
-	new_test_ext().execute_with(|| {
-		// at #4, every 3 blocks, 3 times.
-		Scheduler::do_schedule_named(
-			[1u8; 32],
-			DispatchTime::At(4),
-			Some((3, 3)),
-			127,
-			root(),
-			<ScheduledCall<Test>>::new(RuntimeCall::Logger(LoggerCall::log {
-				i: 42,
-				weight: Weight::from_ref_time(10),
-			}))
-			.unwrap(),
-		)
-		.unwrap();
-		// same id results in error.
-		assert!(Scheduler::do_schedule_named(
-			[1u8; 32],
-			DispatchTime::At(4),
-			None,
-			127,
-			root(),
-			<ScheduledCall<Test>>::new(RuntimeCall::Logger(LoggerCall::log {
-				i: 69,
-				weight: Weight::from_ref_time(10)
-			}))
-			.unwrap(),
-		)
-		.is_err());
-		// different id is ok.
-		Scheduler::do_schedule_named(
-			[2u8; 32],
-			DispatchTime::At(8),
-			None,
-			127,
-			root(),
-			<ScheduledCall<Test>>::new(RuntimeCall::Logger(LoggerCall::log {
-				i: 69,
-				weight: Weight::from_ref_time(10),
-			}))
-			.unwrap(),
-		)
-		.unwrap();
-		run_to_block(3);
-		assert!(logger::log().is_empty());
-		run_to_block(4);
-		assert_eq!(logger::log(), vec![(root(), 42u32)]);
-		run_to_block(6);
-		assert_ok!(Scheduler::do_cancel_named(None, [1u8; 32]));
-		run_to_block(100);
-		assert_eq!(logger::log(), vec![(root(), 42u32), (root(), 69u32)]);
-	});
-}
-
-#[test]
-fn scheduler_respects_weight_limits() {
-	let max_weight: Weight = <Test as Config>::MaximumWeight::get();
-	new_test_ext().execute_with(|| {
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: max_weight / 3 * 2,
-		});
-		assert_ok!(Scheduler::do_schedule(
-			DispatchTime::At(4),
-			None,
-			127,
-			root(),
-			<ScheduledCall<Test>>::new(call).unwrap(),
-		));
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 69,
-			weight: max_weight / 3 * 2,
-		});
-		assert_ok!(Scheduler::do_schedule(
-			DispatchTime::At(4),
-			None,
-			127,
-			root(),
-			<ScheduledCall<Test>>::new(call).unwrap(),
-		));
-		// 69 and 42 do not fit together
-		run_to_block(4);
-		assert_eq!(logger::log(), vec![(root(), 42u32)]);
-		run_to_block(5);
-		assert_eq!(logger::log(), vec![(root(), 42u32), (root(), 69u32)]);
-	});
-}
-
-/// Permanently overweight calls are not deleted but also not executed.
-#[test]
-fn scheduler_does_not_delete_permanently_overweight_call() {
-	let max_weight: Weight = <Test as Config>::MaximumWeight::get();
-	new_test_ext().execute_with(|| {
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: max_weight,
-		});
-		assert_ok!(Scheduler::do_schedule(
-			DispatchTime::At(4),
-			None,
-			127,
-			root(),
-			<ScheduledCall<Test>>::new(call).unwrap(),
-		));
-		// Never executes.
-		run_to_block(100);
-		assert_eq!(logger::log(), vec![]);
-
-		// Assert the `PermanentlyOverweight` event.
-		assert_eq!(
-			System::events().last().unwrap().event,
-			crate::Event::PermanentlyOverweight {
-				task: (4, 0),
-				id: None
-			}
-			.into(),
-		);
-		// The call is still in the agenda.
-		assert!(Agenda::<Test>::get(4).agenda[0].is_some());
-	});
-}
-
-#[test]
-fn scheduler_periodic_tasks_always_find_place() {
-	let max_weight: Weight = <Test as Config>::MaximumWeight::get();
-	let max_per_block = <Test as Config>::MaxScheduledPerBlock::get();
-
-	new_test_ext().execute_with(|| {
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: (max_weight / 3) * 2,
-		});
-		let call = <ScheduledCall<Test>>::new(call).unwrap();
-
-		assert_ok!(Scheduler::do_schedule(
-			DispatchTime::At(4),
-			Some((4, u32::MAX)),
-			127,
-			root(),
-			call.clone(),
-		));
-		// Executes 5 times till block 20.
-		run_to_block(20);
-		assert_eq!(logger::log().len(), 5);
-
-		// Block 28 will already be full.
-		for _ in 0..max_per_block {
-			assert_ok!(Scheduler::do_schedule(
-				DispatchTime::At(28),
-				None,
-				120,
-				root(),
-				call.clone(),
-			));
-		}
-
-		run_to_block(24);
-		assert_eq!(logger::log().len(), 6);
-
-		// The periodic task should be postponed
-		assert_eq!(<Agenda<Test>>::get(29).agenda.len(), 1);
-
-		run_to_block(27); // will call on_initialize(28)
-		assert_eq!(logger::log().len(), 6);
-
-		run_to_block(28); // will call on_initialize(29)
-		assert_eq!(logger::log().len(), 7);
-	});
-}
-
-#[test]
-fn scheduler_respects_priority_ordering() {
-	let max_weight: Weight = <Test as Config>::MaximumWeight::get();
-	new_test_ext().execute_with(|| {
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: max_weight / 3,
-		});
-		assert_ok!(Scheduler::do_schedule(
-			DispatchTime::At(4),
-			None,
-			1,
-			root(),
-			<ScheduledCall<Test>>::new(call).unwrap(),
-		));
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 69,
-			weight: max_weight / 3,
-		});
-		assert_ok!(Scheduler::do_schedule(
-			DispatchTime::At(4),
-			None,
-			0,
-			root(),
-			<ScheduledCall<Test>>::new(call).unwrap(),
-		));
-		run_to_block(4);
-		assert_eq!(logger::log(), vec![(root(), 69u32), (root(), 42u32)]);
-	});
-}
-
-#[test]
-fn scheduler_respects_priority_ordering_with_soft_deadlines() {
-	new_test_ext().execute_with(|| {
-		let max_weight: Weight = <Test as Config>::MaximumWeight::get();
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: max_weight / 5 * 2,
-		});
-		assert_ok!(Scheduler::do_schedule(
-			DispatchTime::At(4),
-			None,
-			255,
-			root(),
-			<ScheduledCall<Test>>::new(call).unwrap(),
-		));
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 69,
-			weight: max_weight / 5 * 2,
-		});
-		assert_ok!(Scheduler::do_schedule(
-			DispatchTime::At(4),
-			None,
-			127,
-			root(),
-			<ScheduledCall<Test>>::new(call).unwrap(),
-		));
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 2600,
-			weight: max_weight / 5 * 4,
-		});
-		assert_ok!(Scheduler::do_schedule(
-			DispatchTime::At(4),
-			None,
-			126,
-			root(),
-			<ScheduledCall<Test>>::new(call).unwrap(),
-		));
-
-		// 2600 does not fit with 69 or 42, but has higher priority, so will go through
-		run_to_block(4);
-		assert_eq!(logger::log(), vec![(root(), 2600u32)]);
-		// 69 and 42 fit together
-		run_to_block(5);
-		assert_eq!(
-			logger::log(),
-			vec![(root(), 2600u32), (root(), 69u32), (root(), 42u32)]
-		);
-	});
-}
-
-#[test]
-fn on_initialize_weight_is_correct() {
-	new_test_ext().execute_with(|| {
-		let call_weight = Weight::from_ref_time(25);
-
-		// Named
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 3,
-			weight: call_weight + Weight::from_ref_time(1),
-		});
-		assert_ok!(Scheduler::do_schedule_named(
-			[1u8; 32],
-			DispatchTime::At(3),
-			None,
-			255,
-			root(),
-			<ScheduledCall<Test>>::new(call).unwrap(),
-		));
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: call_weight + Weight::from_ref_time(2),
-		});
-		// Anon Periodic
-		assert_ok!(Scheduler::do_schedule(
-			DispatchTime::At(2),
-			Some((1000, 3)),
-			128,
-			root(),
-			<ScheduledCall<Test>>::new(call).unwrap(),
-		));
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 69,
-			weight: call_weight + Weight::from_ref_time(3),
-		});
-		// Anon
-		assert_ok!(Scheduler::do_schedule(
-			DispatchTime::At(2),
-			None,
-			127,
-			root(),
-			<ScheduledCall<Test>>::new(call).unwrap(),
-		));
-		// Named Periodic
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 2600,
-			weight: call_weight + Weight::from_ref_time(4),
-		});
-		assert_ok!(Scheduler::do_schedule_named(
-			[2u8; 32],
-			DispatchTime::At(1),
-			Some((1000, 3)),
-			126,
-			root(),
-			<ScheduledCall<Test>>::new(call).unwrap(),
-		));
-
-		// Will include the named periodic only
-		assert_eq!(
-			Scheduler::on_initialize(1),
-			TestWeightInfo::service_agendas_base()
-				+ TestWeightInfo::service_agenda_base(1)
-				+ <MarginalWeightInfo<Test>>::service_task(None, true, true)
-				+ TestWeightInfo::execute_dispatch_unsigned()
-				+ call_weight + Weight::from_ref_time(4)
-		);
-		assert_eq!(IncompleteSince::<Test>::get(), None);
-		assert_eq!(logger::log(), vec![(root(), 2600u32)]);
-
-		// Will include anon and anon periodic
-		assert_eq!(
-			Scheduler::on_initialize(2),
-			TestWeightInfo::service_agendas_base()
-				+ TestWeightInfo::service_agenda_base(2)
-				+ <MarginalWeightInfo<Test>>::service_task(None, false, true)
-				+ TestWeightInfo::execute_dispatch_unsigned()
-				+ call_weight + Weight::from_ref_time(3)
-				+ <MarginalWeightInfo<Test>>::service_task(None, false, false)
-				+ TestWeightInfo::execute_dispatch_unsigned()
-				+ call_weight + Weight::from_ref_time(2)
-		);
-		assert_eq!(IncompleteSince::<Test>::get(), None);
-		assert_eq!(
-			logger::log(),
-			vec![(root(), 2600u32), (root(), 69u32), (root(), 42u32)]
-		);
-
-		// Will include named only
-		assert_eq!(
-			Scheduler::on_initialize(3),
-			TestWeightInfo::service_agendas_base()
-				+ TestWeightInfo::service_agenda_base(1)
-				+ <MarginalWeightInfo<Test>>::service_task(None, true, false)
-				+ TestWeightInfo::execute_dispatch_unsigned()
-				+ call_weight + Weight::from_ref_time(1)
-		);
-		assert_eq!(IncompleteSince::<Test>::get(), None);
-		assert_eq!(
-			logger::log(),
-			vec![
-				(root(), 2600u32),
-				(root(), 69u32),
-				(root(), 42u32),
-				(root(), 3u32)
-			]
-		);
-
-		// Will contain none
-		let actual_weight = Scheduler::on_initialize(4);
-		assert_eq!(
-			actual_weight,
-			TestWeightInfo::service_agendas_base() + TestWeightInfo::service_agenda_base(0)
-		);
-	});
-}
-
-#[test]
-fn root_calls_works() {
-	new_test_ext().execute_with(|| {
-		let call = Box::new(RuntimeCall::Logger(LoggerCall::log {
-			i: 69,
-			weight: Weight::from_ref_time(10),
-		}));
-		let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: Weight::from_ref_time(10),
-		}));
-		assert_ok!(Scheduler::schedule_named(
-			RuntimeOrigin::root(),
-			[1u8; 32],
-			4,
-			None,
-			Some(127),
-			call,
-		));
-		assert_ok!(Scheduler::schedule(
-			RuntimeOrigin::root(),
-			4,
-			None,
-			Some(127),
-			call2
-		));
-		run_to_block(3);
-		// Scheduled calls are in the agenda.
-		assert_eq!(Agenda::<Test>::get(4).agenda.len(), 2);
-		assert!(logger::log().is_empty());
-		assert_ok!(Scheduler::cancel_named(RuntimeOrigin::root(), [1u8; 32]));
-		assert_ok!(Scheduler::cancel(RuntimeOrigin::root(), 4, 1));
-		// Scheduled calls are made NONE, so should not effect state
-		run_to_block(100);
-		assert!(logger::log().is_empty());
-	});
-}
-
-#[test]
-fn fails_to_schedule_task_in_the_past() {
-	new_test_ext().execute_with(|| {
-		run_to_block(3);
-
-		let call1 = Box::new(RuntimeCall::Logger(LoggerCall::log {
-			i: 69,
-			weight: Weight::from_ref_time(10),
-		}));
-		let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: Weight::from_ref_time(10),
-		}));
-		let call3 = Box::new(RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: Weight::from_ref_time(10),
-		}));
-
-		assert_noop!(
-			Scheduler::schedule_named(RuntimeOrigin::root(), [1u8; 32], 2, None, Some(127), call1),
-			Error::<Test>::TargetBlockNumberInPast,
-		);
-
-		assert_noop!(
-			Scheduler::schedule(RuntimeOrigin::root(), 2, None, Some(127), call2),
-			Error::<Test>::TargetBlockNumberInPast,
-		);
-
-		assert_noop!(
-			Scheduler::schedule(RuntimeOrigin::root(), 3, None, Some(127), call3),
-			Error::<Test>::TargetBlockNumberInPast,
-		);
-	});
-}
-
-#[test]
-fn should_use_origin() {
-	new_test_ext().execute_with(|| {
-		let call = Box::new(RuntimeCall::Logger(LoggerCall::log {
-			i: 69,
-			weight: Weight::from_ref_time(10),
-		}));
-		let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: Weight::from_ref_time(10),
-		}));
-		assert_ok!(Scheduler::schedule_named(
-			system::RawOrigin::Signed(1).into(),
-			[1u8; 32],
-			4,
-			None,
-			None,
-			call,
-		));
-		assert_ok!(Scheduler::schedule(
-			system::RawOrigin::Signed(1).into(),
-			4,
-			None,
-			None,
-			call2,
-		));
-		run_to_block(3);
-		// Scheduled calls are in the agenda.
-		assert_eq!(Agenda::<Test>::get(4).agenda.len(), 2);
-		assert!(logger::log().is_empty());
-		assert_ok!(Scheduler::cancel_named(
-			system::RawOrigin::Signed(1).into(),
-			[1u8; 32]
-		));
-		assert_ok!(Scheduler::cancel(system::RawOrigin::Signed(1).into(), 4, 1));
-		// Scheduled calls are made NONE, so should not effect state
-		run_to_block(100);
-		assert!(logger::log().is_empty());
-	});
-}
-
-#[test]
-fn should_check_origin() {
-	new_test_ext().execute_with(|| {
-		let call = Box::new(RuntimeCall::Logger(LoggerCall::log {
-			i: 69,
-			weight: Weight::from_ref_time(10),
-		}));
-		let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: Weight::from_ref_time(10),
-		}));
-		assert_noop!(
-			Scheduler::schedule_named(
-				system::RawOrigin::Signed(2).into(),
-				[1u8; 32],
-				4,
-				None,
-				None,
-				call
-			),
-			BadOrigin
-		);
-		assert_noop!(
-			Scheduler::schedule(system::RawOrigin::Signed(2).into(), 4, None, None, call2),
-			BadOrigin
-		);
-	});
-}
-
-#[test]
-fn should_check_origin_for_cancel() {
-	new_test_ext().execute_with(|| {
-		let call = Box::new(RuntimeCall::Logger(LoggerCall::log_without_filter {
-			i: 69,
-			weight: Weight::from_ref_time(10),
-		}));
-		let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log_without_filter {
-			i: 42,
-			weight: Weight::from_ref_time(10),
-		}));
-		assert_ok!(Scheduler::schedule_named(
-			system::RawOrigin::Signed(1).into(),
-			[1u8; 32],
-			4,
-			None,
-			None,
-			call,
-		));
-		assert_ok!(Scheduler::schedule(
-			system::RawOrigin::Signed(1).into(),
-			4,
-			None,
-			None,
-			call2,
-		));
-		run_to_block(3);
-		// Scheduled calls are in the agenda.
-		assert_eq!(Agenda::<Test>::get(4).agenda.len(), 2);
-		assert!(logger::log().is_empty());
-		assert_noop!(
-			Scheduler::cancel_named(system::RawOrigin::Signed(2).into(), [1u8; 32]),
-			BadOrigin
-		);
-		assert_noop!(
-			Scheduler::cancel(system::RawOrigin::Signed(2).into(), 4, 1),
-			BadOrigin
-		);
-		assert_noop!(
-			Scheduler::cancel_named(system::RawOrigin::Root.into(), [1u8; 32]),
-			BadOrigin
-		);
-		assert_noop!(
-			Scheduler::cancel(system::RawOrigin::Root.into(), 4, 1),
-			BadOrigin
-		);
-		run_to_block(5);
-		assert_eq!(
-			logger::log(),
-			vec![
-				(system::RawOrigin::Signed(1).into(), 69u32),
-				(system::RawOrigin::Signed(1).into(), 42u32)
-			]
-		);
-	});
-}
-
-/// Cancelling a call and then scheduling a second call for the same
-/// block results in different addresses.
-#[test]
-fn schedule_does_not_resuse_addr() {
-	new_test_ext().execute_with(|| {
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: Weight::from_ref_time(10),
-		});
-
-		// Schedule both calls.
-		let addr_1 = Scheduler::do_schedule(
-			DispatchTime::At(4),
-			None,
-			127,
-			root(),
-			<ScheduledCall<Test>>::new(call.clone()).unwrap(),
-		)
-		.unwrap();
-		// Cancel the call.
-		assert_ok!(Scheduler::do_cancel(None, addr_1));
-		let addr_2 = Scheduler::do_schedule(
-			DispatchTime::At(4),
-			None,
-			127,
-			root(),
-			<ScheduledCall<Test>>::new(call).unwrap(),
-		)
-		.unwrap();
-
-		// Should not re-use the address.
-		assert!(addr_1 != addr_2);
-	});
-}
-
-#[test]
-fn schedule_agenda_overflows() {
-	let max: u32 = <Test as Config>::MaxScheduledPerBlock::get();
-
-	new_test_ext().execute_with(|| {
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: Weight::from_ref_time(10),
-		});
-		let call = <ScheduledCall<Test>>::new(call).unwrap();
-
-		// Schedule the maximal number allowed per block.
-		for _ in 0..max {
-			Scheduler::do_schedule(DispatchTime::At(4), None, 127, root(), call.clone()).unwrap();
-		}
-
-		// One more time and it errors.
-		assert_noop!(
-			Scheduler::do_schedule(DispatchTime::At(4), None, 127, root(), call,),
-			<Error<Test>>::AgendaIsExhausted,
-		);
-
-		run_to_block(4);
-		// All scheduled calls are executed.
-		assert_eq!(logger::log().len() as u32, max);
-	});
-}
-
-/// Cancelling and scheduling does not overflow the agenda but fills holes.
-#[test]
-fn cancel_and_schedule_fills_holes() {
-	let max: u32 = <Test as Config>::MaxScheduledPerBlock::get();
-	assert!(
-		max > 3,
-		"This test only makes sense for MaxScheduledPerBlock > 3"
-	);
-
-	new_test_ext().execute_with(|| {
-		let call = RuntimeCall::Logger(LoggerCall::log {
-			i: 42,
-			weight: Weight::from_ref_time(10),
-		});
-		let call = <ScheduledCall<Test>>::new(call).unwrap();
-		let mut addrs = Vec::<_>::default();
-
-		// Schedule the maximal number allowed per block.
-		for _ in 0..max {
-			addrs.push(
-				Scheduler::do_schedule(DispatchTime::At(4), None, 127, root(), call.clone())
-					.unwrap(),
-			);
-		}
-		// Cancel three of them.
-		for addr in addrs.into_iter().take(3) {
-			Scheduler::do_cancel(None, addr).unwrap();
-		}
-		// Schedule three new ones.
-		for i in 0..3 {
-			let (_block, index) =
-				Scheduler::do_schedule(DispatchTime::At(4), None, 127, root(), call.clone())
-					.unwrap();
-			assert_eq!(i, index);
-		}
-
-		run_to_block(4);
-		// Maximum number of calls are executed.
-		assert_eq!(logger::log().len() as u32, max);
-	});
-}
-
-#[test]
-fn cannot_schedule_too_big_tasks() {
-	new_test_ext().execute_with(|| {
-		let call = Box::new(<<Test as Config>::RuntimeCall>::from(SystemCall::remark {
-			remark: vec![0; EncodedCall::bound() - 4],
-		}));
-
-		assert_ok!(Scheduler::schedule(
-			RuntimeOrigin::root(),
-			4,
-			None,
-			Some(127),
-			call
-		));
-
-		let call = Box::new(<<Test as Config>::RuntimeCall>::from(SystemCall::remark {
-			remark: vec![0; EncodedCall::bound() - 3],
-		}));
-
-		assert_err!(
-			Scheduler::schedule(RuntimeOrigin::root(), 4, None, Some(127), call),
-			<Error<Test>>::TooBigScheduledCall
-		);
-	});
-}
deletedpallets/scheduler-v2/src/weights.rsdiffbeforeafterboth
--- a/pallets/scheduler-v2/src/weights.rs
+++ /dev/null
@@ -1,234 +0,0 @@
-// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs
-
-//! Autogenerated weights for pallet_unique_scheduler_v2
-//!
-//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2022-10-28, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
-//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
-
-// Executed Command:
-// target/release/unique-collator
-// benchmark
-// pallet
-// --pallet
-// pallet-unique-scheduler-v2
-// --wasm-execution
-// compiled
-// --extrinsic
-// *
-// --template
-// .maintain/frame-weight-template.hbs
-// --steps=50
-// --repeat=80
-// --heap-pages=4096
-// --output=./pallets/scheduler-v2/src/weights.rs
-
-#![cfg_attr(rustfmt, rustfmt_skip)]
-#![allow(unused_parens)]
-#![allow(unused_imports)]
-#![allow(missing_docs)]
-#![allow(clippy::unnecessary_cast)]
-
-use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
-use sp_std::marker::PhantomData;
-
-/// Weight functions needed for pallet_unique_scheduler_v2.
-pub trait WeightInfo {
-	fn service_agendas_base() -> Weight;
-	fn service_agenda_base(s: u32, ) -> Weight;
-	fn service_task_base() -> Weight;
-	fn service_task_named() -> Weight;
-	fn service_task_periodic() -> Weight;
-	fn execute_dispatch_signed() -> Weight;
-	fn execute_dispatch_unsigned() -> Weight;
-	fn schedule(s: u32, ) -> Weight;
-	fn cancel(s: u32, ) -> Weight;
-	fn schedule_named(s: u32, ) -> Weight;
-	fn cancel_named(s: u32, ) -> Weight;
-	fn change_named_priority(s: u32, ) -> Weight;
-}
-
-/// Weights for pallet_unique_scheduler_v2 using the Substrate node and recommended hardware.
-pub struct SubstrateWeight<T>(PhantomData<T>);
-impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
-	// Storage: Scheduler IncompleteSince (r:1 w:1)
-	fn service_agendas_base() -> Weight {
-		Weight::from_ref_time(5_253_000 as u64)
-			.saturating_add(T::DbWeight::get().reads(1 as u64))
-			.saturating_add(T::DbWeight::get().writes(1 as u64))
-	}
-	// Storage: Scheduler Agenda (r:1 w:1)
-	fn service_agenda_base(s: u32, ) -> Weight {
-		Weight::from_ref_time(3_858_000 as u64)
-			// Standard Error: 2_617
-			.saturating_add(Weight::from_ref_time(579_704 as u64).saturating_mul(s as u64))
-			.saturating_add(T::DbWeight::get().reads(1 as u64))
-			.saturating_add(T::DbWeight::get().writes(1 as u64))
-	}
-	// Storage: System LastRuntimeUpgrade (r:1 w:0)
-	fn service_task_base() -> Weight {
-		Weight::from_ref_time(10_536_000 as u64)
-			.saturating_add(T::DbWeight::get().reads(1 as u64))
-	}
-	// Storage: System LastRuntimeUpgrade (r:1 w:0)
-	// Storage: Scheduler Lookup (r:0 w:1)
-	fn service_task_named() -> Weight {
-		Weight::from_ref_time(12_018_000 as u64)
-			.saturating_add(T::DbWeight::get().reads(1 as u64))
-			.saturating_add(T::DbWeight::get().writes(1 as u64))
-	}
-	// Storage: System LastRuntimeUpgrade (r:1 w:0)
-	fn service_task_periodic() -> Weight {
-		Weight::from_ref_time(10_669_000 as u64)
-			.saturating_add(T::DbWeight::get().reads(1 as u64))
-	}
-	// Storage: System Account (r:1 w:1)
-	// Storage: System AllExtrinsicsLen (r:1 w:1)
-	// Storage: System BlockWeight (r:1 w:1)
-	// Storage: Configuration WeightToFeeCoefficientOverride (r:1 w:0)
-	// Storage: TransactionPayment NextFeeMultiplier (r:1 w:0)
-	fn execute_dispatch_signed() -> Weight {
-		Weight::from_ref_time(36_083_000 as u64)
-			.saturating_add(T::DbWeight::get().reads(5 as u64))
-			.saturating_add(T::DbWeight::get().writes(3 as u64))
-	}
-	fn execute_dispatch_unsigned() -> Weight {
-		Weight::from_ref_time(4_386_000 as u64)
-	}
-	// Storage: Scheduler Agenda (r:1 w:1)
-	fn schedule(s: u32, ) -> Weight {
-		Weight::from_ref_time(17_257_000 as u64)
-			// Standard Error: 2_791
-			.saturating_add(Weight::from_ref_time(574_832 as u64).saturating_mul(s as u64))
-			.saturating_add(T::DbWeight::get().reads(1 as u64))
-			.saturating_add(T::DbWeight::get().writes(1 as u64))
-	}
-	// Storage: Scheduler Agenda (r:1 w:1)
-	// Storage: Scheduler Lookup (r:0 w:1)
-	fn cancel(s: u32, ) -> Weight {
-		Weight::from_ref_time(19_803_000 as u64)
-			// Standard Error: 1_177
-			.saturating_add(Weight::from_ref_time(475_027 as u64).saturating_mul(s as u64))
-			.saturating_add(T::DbWeight::get().reads(1 as u64))
-			.saturating_add(T::DbWeight::get().writes(2 as u64))
-	}
-	// Storage: Scheduler Lookup (r:1 w:1)
-	// Storage: Scheduler Agenda (r:1 w:1)
-	fn schedule_named(s: u32, ) -> Weight {
-		Weight::from_ref_time(18_746_000 as u64)
-			// Standard Error: 2_997
-			.saturating_add(Weight::from_ref_time(635_697 as u64).saturating_mul(s as u64))
-			.saturating_add(T::DbWeight::get().reads(2 as u64))
-			.saturating_add(T::DbWeight::get().writes(2 as u64))
-	}
-	// Storage: Scheduler Lookup (r:1 w:1)
-	// Storage: Scheduler Agenda (r:1 w:1)
-	fn cancel_named(s: u32, ) -> Weight {
-		Weight::from_ref_time(20_983_000 as u64)
-			// Standard Error: 1_850
-			.saturating_add(Weight::from_ref_time(518_812 as u64).saturating_mul(s as u64))
-			.saturating_add(T::DbWeight::get().reads(2 as u64))
-			.saturating_add(T::DbWeight::get().writes(2 as u64))
-	}
-	// Storage: Scheduler Lookup (r:1 w:0)
-	// Storage: Scheduler Agenda (r:1 w:1)
-	fn change_named_priority(s: u32, ) -> Weight {
-		Weight::from_ref_time(21_591_000 as u64)
-			// Standard Error: 4_187
-			.saturating_add(Weight::from_ref_time(531_231 as u64).saturating_mul(s as u64))
-			.saturating_add(T::DbWeight::get().reads(2 as u64))
-			.saturating_add(T::DbWeight::get().writes(1 as u64))
-	}
-}
-
-// For backwards compatibility and tests
-impl WeightInfo for () {
-	// Storage: Scheduler IncompleteSince (r:1 w:1)
-	fn service_agendas_base() -> Weight {
-		Weight::from_ref_time(5_253_000 as u64)
-			.saturating_add(RocksDbWeight::get().reads(1 as u64))
-			.saturating_add(RocksDbWeight::get().writes(1 as u64))
-	}
-	// Storage: Scheduler Agenda (r:1 w:1)
-	fn service_agenda_base(s: u32, ) -> Weight {
-		Weight::from_ref_time(3_858_000 as u64)
-			// Standard Error: 2_617
-			.saturating_add(Weight::from_ref_time(579_704 as u64).saturating_mul(s as u64))
-			.saturating_add(RocksDbWeight::get().reads(1 as u64))
-			.saturating_add(RocksDbWeight::get().writes(1 as u64))
-	}
-	// Storage: System LastRuntimeUpgrade (r:1 w:0)
-	fn service_task_base() -> Weight {
-		Weight::from_ref_time(10_536_000 as u64)
-			.saturating_add(RocksDbWeight::get().reads(1 as u64))
-	}
-	// Storage: System LastRuntimeUpgrade (r:1 w:0)
-	// Storage: Scheduler Lookup (r:0 w:1)
-	fn service_task_named() -> Weight {
-		Weight::from_ref_time(12_018_000 as u64)
-			.saturating_add(RocksDbWeight::get().reads(1 as u64))
-			.saturating_add(RocksDbWeight::get().writes(1 as u64))
-	}
-	// Storage: System LastRuntimeUpgrade (r:1 w:0)
-	fn service_task_periodic() -> Weight {
-		Weight::from_ref_time(10_669_000 as u64)
-			.saturating_add(RocksDbWeight::get().reads(1 as u64))
-	}
-	// Storage: System Account (r:1 w:1)
-	// Storage: System AllExtrinsicsLen (r:1 w:1)
-	// Storage: System BlockWeight (r:1 w:1)
-	// Storage: Configuration WeightToFeeCoefficientOverride (r:1 w:0)
-	// Storage: TransactionPayment NextFeeMultiplier (r:1 w:0)
-	fn execute_dispatch_signed() -> Weight {
-		Weight::from_ref_time(36_083_000 as u64)
-			.saturating_add(RocksDbWeight::get().reads(5 as u64))
-			.saturating_add(RocksDbWeight::get().writes(3 as u64))
-	}
-	fn execute_dispatch_unsigned() -> Weight {
-		Weight::from_ref_time(4_386_000 as u64)
-	}
-	// Storage: Scheduler Agenda (r:1 w:1)
-	fn schedule(s: u32, ) -> Weight {
-		Weight::from_ref_time(17_257_000 as u64)
-			// Standard Error: 2_791
-			.saturating_add(Weight::from_ref_time(574_832 as u64).saturating_mul(s as u64))
-			.saturating_add(RocksDbWeight::get().reads(1 as u64))
-			.saturating_add(RocksDbWeight::get().writes(1 as u64))
-	}
-	// Storage: Scheduler Agenda (r:1 w:1)
-	// Storage: Scheduler Lookup (r:0 w:1)
-	fn cancel(s: u32, ) -> Weight {
-		Weight::from_ref_time(19_803_000 as u64)
-			// Standard Error: 1_177
-			.saturating_add(Weight::from_ref_time(475_027 as u64).saturating_mul(s as u64))
-			.saturating_add(RocksDbWeight::get().reads(1 as u64))
-			.saturating_add(RocksDbWeight::get().writes(2 as u64))
-	}
-	// Storage: Scheduler Lookup (r:1 w:1)
-	// Storage: Scheduler Agenda (r:1 w:1)
-	fn schedule_named(s: u32, ) -> Weight {
-		Weight::from_ref_time(18_746_000 as u64)
-			// Standard Error: 2_997
-			.saturating_add(Weight::from_ref_time(635_697 as u64).saturating_mul(s as u64))
-			.saturating_add(RocksDbWeight::get().reads(2 as u64))
-			.saturating_add(RocksDbWeight::get().writes(2 as u64))
-	}
-	// Storage: Scheduler Lookup (r:1 w:1)
-	// Storage: Scheduler Agenda (r:1 w:1)
-	fn cancel_named(s: u32, ) -> Weight {
-		Weight::from_ref_time(20_983_000 as u64)
-			// Standard Error: 1_850
-			.saturating_add(Weight::from_ref_time(518_812 as u64).saturating_mul(s as u64))
-			.saturating_add(RocksDbWeight::get().reads(2 as u64))
-			.saturating_add(RocksDbWeight::get().writes(2 as u64))
-	}
-	// Storage: Scheduler Lookup (r:1 w:0)
-	// Storage: Scheduler Agenda (r:1 w:1)
-	fn change_named_priority(s: u32, ) -> Weight {
-		Weight::from_ref_time(21_591_000 as u64)
-			// Standard Error: 4_187
-			.saturating_add(Weight::from_ref_time(531_231 as u64).saturating_mul(s as u64))
-			.saturating_add(RocksDbWeight::get().reads(2 as u64))
-			.saturating_add(RocksDbWeight::get().writes(1 as u64))
-	}
-}
modifiedpallets/structure/Cargo.tomldiffbeforeafterboth
--- a/pallets/structure/Cargo.toml
+++ b/pallets/structure/Cargo.toml
@@ -4,9 +4,7 @@
 version = "0.1.2"
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
 
 frame-benchmarking = { workspace = true, optional = true }
@@ -15,6 +13,7 @@
 log = { workspace = true }
 pallet-common = { workspace = true }
 pallet-evm = { workspace = true }
+sp-runtime = { workspace = true }
 sp-std = { workspace = true }
 up-data-structs = { workspace = true }
 
@@ -27,8 +26,9 @@
 	"frame-system/std",
 	"pallet-common/std",
 	"pallet-evm/std",
-	"codec/std",
+	"parity-scale-codec/std",
 	"scale-info/std",
+	"sp-runtime/std",
 	"sp-std/std",
 	"up-data-structs/std",
 ]
modifiedpallets/structure/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/structure/src/benchmarking.rs
+++ b/pallets/structure/src/benchmarking.rs
@@ -14,16 +14,16 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use super::*;
-
-use frame_benchmarking::{benchmarks, account};
-use frame_support::traits::{fungible::Balanced, Get, tokens::Precision};
+use frame_benchmarking::{account, benchmarks};
+use frame_support::traits::{fungible::Balanced, tokens::Precision, Get};
+use pallet_common::Config as CommonConfig;
+use pallet_evm::account::CrossAccountId;
 use up_data_structs::{
-	CreateCollectionData, CollectionMode, CreateItemData, CreateNftData, budget::Unlimited,
+	budget::Unlimited, CollectionMode, CreateCollectionData, CreateItemData, CreateNftData,
 };
-use pallet_common::Config as CommonConfig;
-use pallet_evm::account::CrossAccountId;
 
+use super::*;
+
 const SEED: u32 = 1;
 
 benchmarks! {
modifiedpallets/structure/src/lib.rsdiffbeforeafterboth
--- a/pallets/structure/src/lib.rs
+++ b/pallets/structure/src/lib.rs
@@ -53,29 +53,31 @@
 
 #![cfg_attr(not(feature = "std"), no_std)]
 
-use pallet_common::CommonCollectionOperations;
-use pallet_common::{erc::CrossAccountId, eth::is_collection};
+use frame_support::{
+	dispatch::{DispatchResult, DispatchResultWithPostInfo},
+	fail,
+	pallet_prelude::*,
+};
+use pallet_common::{
+	dispatch::CollectionDispatch, erc::CrossAccountId, eth::is_collection,
+	CommonCollectionOperations,
+};
 use sp_std::collections::btree_set::BTreeSet;
-
-use frame_support::dispatch::{DispatchError, DispatchResult, DispatchResultWithPostInfo};
-use frame_support::fail;
-pub use pallet::*;
-use pallet_common::{dispatch::CollectionDispatch};
 use up_data_structs::{
-	CollectionId, TokenId, mapping::TokenAddressMapping, budget::Budget, TokenOwnerError,
+	budget::Budget, mapping::TokenAddressMapping, CollectionId, TokenId, TokenOwnerError,
 };
 
 #[cfg(feature = "runtime-benchmarks")]
 pub mod benchmarking;
 pub mod weights;
 
+pub use pallet::*;
+
 pub type SelfWeightOf<T> = <T as crate::Config>::WeightInfo;
 
 #[frame_support::pallet]
 pub mod pallet {
-	use frame_support::Parameter;
-	use frame_support::dispatch::{GetDispatchInfo, UnfilteredDispatchable};
-	use frame_support::pallet_prelude::*;
+	use frame_support::{dispatch::GetDispatchInfo, traits::UnfilteredDispatchable, Parameter};
 
 	use super::*;
 
modifiedpallets/unique/Cargo.tomldiffbeforeafterboth
--- a/pallets/unique/Cargo.toml
+++ b/pallets/unique/Cargo.toml
@@ -19,7 +19,6 @@
 limit-testing = ["up-data-structs/limit-testing"]
 runtime-benchmarks = ['frame-benchmarking', 'pallet-common/runtime-benchmarks']
 std = [
-	'codec/std',
 	'evm-coder/std',
 	'frame-benchmarking/std',
 	'frame-support/std',
@@ -29,6 +28,7 @@
 	'pallet-evm-coder-substrate/std',
 	'pallet-evm/std',
 	'pallet-nonfungible/std',
+	'parity-scale-codec/std',
 	'sp-runtime/std',
 	'sp-std/std',
 	'up-data-structs/std',
@@ -39,8 +39,7 @@
 ################################################################################
 # Local Dependencies
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
+parity-scale-codec = { workspace = true }
 
 ethereum = { workspace = true }
 evm-coder = { workspace = true }
modifiedpallets/unique/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/unique/src/benchmarking.rs
+++ b/pallets/unique/src/benchmarking.rs
@@ -16,22 +16,23 @@
 
 #![cfg(feature = "runtime-benchmarks")]
 
-use super::*;
-use crate::Pallet;
+use frame_benchmarking::{account, benchmarks};
+use frame_support::traits::{fungible::Balanced, tokens::Precision, Get};
 use frame_system::RawOrigin;
-use frame_support::traits::{fungible::Balanced, Get, tokens::Precision};
-use frame_benchmarking::{benchmarks, account};
-use sp_runtime::DispatchError;
 use pallet_common::{
-	Config as CommonConfig,
 	benchmarking::{create_data, create_u16_data},
+	erc::CrossAccountId,
+	Config as CommonConfig,
 };
+use sp_runtime::DispatchError;
 use up_data_structs::{
-	CollectionId, CollectionMode, MAX_COLLECTION_NAME_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
-	MAX_COLLECTION_DESCRIPTION_LENGTH, CollectionLimits,
+	CollectionId, CollectionLimits, CollectionMode, MAX_COLLECTION_DESCRIPTION_LENGTH,
+	MAX_COLLECTION_NAME_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
 };
-use pallet_common::erc::CrossAccountId;
 
+use super::*;
+use crate::Pallet;
+
 const SEED: u32 = 1;
 
 fn create_collection_helper<T: Config>(
modifiedpallets/unique/src/eth/mod.rsdiffbeforeafterboth
--- a/pallets/unique/src/eth/mod.rs
+++ b/pallets/unique/src/eth/mod.rs
@@ -16,32 +16,31 @@
 
 //! Implementation of CollectionHelpers contract.
 //!
+use alloc::{collections::BTreeSet, format};
 use core::marker::PhantomData;
+
 use ethereum as _;
 use evm_coder::{abi::AbiType, generate_stubgen, solidity_interface, types::*};
-use frame_support::{BoundedVec, traits::Get};
+use frame_support::{traits::Get, BoundedVec};
 use pallet_common::{
-	CollectionById,
 	dispatch::CollectionDispatch,
-	erc::{CollectionHelpersEvents, static_property::key},
-	eth::{self, map_eth_to_id, collection_id_to_address},
-	Pallet as PalletCommon, CollectionHandle,
+	erc::{static_property::key, CollectionHelpersEvents},
+	eth::{self, collection_id_to_address, map_eth_to_id},
+	CollectionById, CollectionHandle, Pallet as PalletCommon,
 };
 use pallet_evm::{account::CrossAccountId, OnMethodCall, PrecompileHandle, PrecompileResult};
 use pallet_evm_coder_substrate::{
-	dispatch_to_evm, SubstrateRecorder, WithRecorder,
-	execution::{PreDispatch, Result, Error},
-	frontier_contract,
+	dispatch_to_evm,
+	execution::{Error, PreDispatch, Result},
+	frontier_contract, SubstrateRecorder, WithRecorder,
 };
+use sp_std::vec::Vec;
 use up_data_structs::{
 	CollectionDescription, CollectionMode, CollectionName, CollectionPermissions,
 	CollectionTokenPrefix, CreateCollectionData, NestingPermissions,
 };
 
 use crate::{weights::WeightInfo, Config, Pallet, SelfWeightOf};
-
-use alloc::{format, collections::BTreeSet};
-use sp_std::vec::Vec;
 
 frontier_contract! {
 	macro_rules! EvmCollectionHelpers_result {...}
modifiedpallets/unique/src/lib.rsdiffbeforeafterboth
--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -73,9 +73,9 @@
 
 extern crate alloc;
 
-pub use pallet::*;
 use frame_support::pallet_prelude::*;
 use frame_system::pallet_prelude::*;
+pub use pallet::*;
 pub mod eth;
 
 #[cfg(feature = "runtime-benchmarks")]
@@ -84,27 +84,27 @@
 
 #[frame_support::pallet]
 pub mod pallet {
-	use super::*;
-
-	use frame_support::{dispatch::DispatchResult, ensure, fail, BoundedVec, storage::Key};
+	use frame_support::{dispatch::DispatchResult, ensure, fail, storage::Key, BoundedVec};
+	use frame_system::{ensure_root, ensure_signed};
+	use pallet_common::{
+		dispatch::{dispatch_tx, CollectionDispatch},
+		CollectionHandle, CommonWeightInfo, Pallet as PalletCommon, RefungibleExtensionsWeightInfo,
+	};
+	use pallet_evm::account::CrossAccountId;
 	use scale_info::TypeInfo;
-	use frame_system::{ensure_signed, ensure_root};
 	use sp_std::{vec, vec::Vec};
 	use up_data_structs::{
-		MAX_COLLECTION_NAME_LENGTH, MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
-		MAX_PROPERTIES_PER_ITEM, MAX_PROPERTY_KEY_LENGTH, MAX_PROPERTY_VALUE_LENGTH,
-		MAX_COLLECTION_PROPERTIES_SIZE, COLLECTION_ADMINS_LIMIT, MAX_TOKEN_PROPERTIES_SIZE,
-		CreateItemData, CollectionLimits, CollectionPermissions, CollectionId, CollectionMode,
-		TokenId, CreateCollectionData, CreateItemExData, budget, Property, PropertyKey,
-		PropertyKeyPermission,
-	};
-	use pallet_evm::account::CrossAccountId;
-	use pallet_common::{
-		CollectionHandle, Pallet as PalletCommon, CommonWeightInfo, dispatch::dispatch_tx,
-		dispatch::CollectionDispatch, RefungibleExtensionsWeightInfo,
+		budget, CollectionId, CollectionLimits, CollectionMode, CollectionPermissions,
+		CreateCollectionData, CreateItemData, CreateItemExData, Property, PropertyKey,
+		PropertyKeyPermission, TokenId, COLLECTION_ADMINS_LIMIT, MAX_COLLECTION_DESCRIPTION_LENGTH,
+		MAX_COLLECTION_NAME_LENGTH, MAX_COLLECTION_PROPERTIES_SIZE, MAX_PROPERTIES_PER_ITEM,
+		MAX_PROPERTY_KEY_LENGTH, MAX_PROPERTY_VALUE_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
+		MAX_TOKEN_PROPERTIES_SIZE,
 	};
 	use weights::WeightInfo;
 
+	use super::*;
+
 	/// A maximum number of levels of depth in the token nesting tree.
 	pub const NESTING_BUDGET: u32 = 5;
 
@@ -174,7 +174,7 @@
 	pub type CreateItemBasket<T: Config> = StorageMap<
 		Hasher = Blake2_128Concat,
 		Key = (CollectionId, T::AccountId),
-		Value = T::BlockNumber,
+		Value = BlockNumberFor<T>,
 		QueryKind = OptionQuery,
 	>;
 	/// Collection id (controlled?2), token id (controlled?2)
@@ -185,7 +185,7 @@
 		Key1 = CollectionId,
 		Hasher2 = Blake2_128Concat,
 		Key2 = TokenId,
-		Value = T::BlockNumber,
+		Value = BlockNumberFor<T>,
 		QueryKind = OptionQuery,
 	>;
 	/// Collection id (controlled?2), owning user (real)
@@ -196,7 +196,7 @@
 		Key1 = CollectionId,
 		Hasher2 = Twox64Concat,
 		Key2 = T::AccountId,
-		Value = T::BlockNumber,
+		Value = BlockNumberFor<T>,
 		QueryKind = OptionQuery,
 	>;
 	/// Collection id (controlled?2), token id (controlled?2)
@@ -208,7 +208,7 @@
 			Key<Blake2_128Concat, TokenId>,
 			Key<Twox64Concat, T::AccountId>,
 		),
-		Value = T::BlockNumber,
+		Value = BlockNumberFor<T>,
 		QueryKind = OptionQuery,
 	>;
 	//#endregion
@@ -221,7 +221,7 @@
 		Key1 = CollectionId,
 		Hasher2 = Blake2_128Concat,
 		Key2 = TokenId,
-		Value = T::BlockNumber,
+		Value = BlockNumberFor<T>,
 		QueryKind = OptionQuery,
 	>;
 
@@ -233,7 +233,7 @@
 		Key1 = CollectionId,
 		Hasher2 = Blake2_128Concat,
 		Key2 = TokenId,
-		Value = T::BlockNumber,
+		Value = BlockNumberFor<T>,
 		QueryKind = OptionQuery,
 	>;
 	/// Last sponsoring of fungible tokens approval in a collection
@@ -244,7 +244,7 @@
 		Key1 = CollectionId,
 		Hasher2 = Twox64Concat,
 		Key2 = T::AccountId,
-		Value = T::BlockNumber,
+		Value = BlockNumberFor<T>,
 		QueryKind = OptionQuery,
 	>;
 	/// Last sponsoring of RFT approval in a collection
@@ -256,7 +256,7 @@
 			Key<Blake2_128Concat, TokenId>,
 			Key<Twox64Concat, T::AccountId>,
 		),
-		Value = T::BlockNumber,
+		Value = BlockNumberFor<T>,
 		QueryKind = OptionQuery,
 	>;
 
modifiedprimitives/app_promotion_rpc/Cargo.tomldiffbeforeafterboth
--- a/primitives/app_promotion_rpc/Cargo.toml
+++ b/primitives/app_promotion_rpc/Cargo.toml
@@ -5,12 +5,12 @@
 version = "0.1.0"
 
 [dependencies]
-codec = { workspace = true }
 pallet-evm = { workspace = true }
+parity-scale-codec = { workspace = true }
 sp-api = { workspace = true }
 sp-runtime = { workspace = true }
 sp-std = { workspace = true }
 
 [features]
 default = ["std"]
-std = ["codec/std", "sp-api/std", "sp-runtime/std", "sp-std/std"]
+std = ["parity-scale-codec/std", "sp-api/std", "sp-runtime/std", "sp-std/std"]
modifiedprimitives/app_promotion_rpc/src/lib.rsdiffbeforeafterboth
--- a/primitives/app_promotion_rpc/src/lib.rs
+++ b/primitives/app_promotion_rpc/src/lib.rs
@@ -16,12 +16,12 @@
 
 #![cfg_attr(not(feature = "std"), no_std)]
 
-use sp_std::vec::Vec;
-use codec::Decode;
+use parity_scale_codec::Decode;
 use sp_runtime::{
+	traits::{AtLeast32BitUnsigned, Member},
 	DispatchError,
-	traits::{AtLeast32BitUnsigned, Member},
 };
+use sp_std::vec::Vec;
 
 type Result<T> = core::result::Result<T, DispatchError>;
 
modifiedprimitives/common/Cargo.tomldiffbeforeafterboth
--- a/primitives/common/Cargo.toml
+++ b/primitives/common/Cargo.toml
@@ -13,6 +13,7 @@
 std = [
 	'cumulus-primitives-core/std',
 	'fp-rpc/std',
+	'fp-self-contained/std',
 	'frame-support/std',
 	'pallet-evm/std',
 	'sp-consensus-aura/std',
@@ -24,6 +25,7 @@
 [dependencies]
 cumulus-primitives-core = { workspace = true }
 fp-rpc = { workspace = true }
+fp-self-contained = { workspace = true }
 frame-support = { workspace = true }
 pallet-evm = { workspace = true }
 sp-consensus-aura = { workspace = true }
modifiedprimitives/common/src/constants.rsdiffbeforeafterboth
--- a/primitives/common/src/constants.rs
+++ b/primitives/common/src/constants.rs
@@ -14,13 +14,14 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use sp_runtime::Perbill;
+use cumulus_primitives_core::relay_chain::MAX_POV_SIZE;
 use frame_support::{
 	parameter_types,
-	weights::{Weight, constants::WEIGHT_REF_TIME_PER_SECOND},
+	weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
 };
-use cumulus_primitives_core::relay_chain::MAX_POV_SIZE;
-use crate::types::{BlockNumber, Balance};
+use sp_runtime::Perbill;
+
+use crate::types::{Balance, BlockNumber};
 
 pub const MILLISECS_PER_BLOCK: u64 = 12000;
 pub const MILLISECS_PER_RELAY_BLOCK: u64 = 6000;
@@ -28,14 +29,14 @@
 pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;
 
 // These time units are defined in number of blocks.
-pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber);
-pub const HOURS: BlockNumber = MINUTES * 60;
-pub const DAYS: BlockNumber = HOURS * 24;
+pub const MINUTES: u32 = 60_000 / (MILLISECS_PER_BLOCK as u32);
+pub const HOURS: u32 = MINUTES * 60;
+pub const DAYS: u32 = HOURS * 24;
 
 // These time units are defined in number of relay blocks.
-pub const RELAY_MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_RELAY_BLOCK as BlockNumber);
-pub const RELAY_HOURS: BlockNumber = RELAY_MINUTES * 60;
-pub const RELAY_DAYS: BlockNumber = RELAY_HOURS * 24;
+pub const RELAY_MINUTES: u32 = 60_000 / (MILLISECS_PER_RELAY_BLOCK as u32);
+pub const RELAY_HOURS: u32 = RELAY_MINUTES * 60;
+pub const RELAY_DAYS: u32 = RELAY_HOURS * 24;
 
 pub const MICROUNIQUE: Balance = 1_000_000_000_000;
 pub const MILLIUNIQUE: Balance = 1_000 * MICROUNIQUE;
modifiedprimitives/common/src/types.rsdiffbeforeafterboth
--- a/primitives/common/src/types.rs
+++ b/primitives/common/src/types.rs
@@ -16,7 +16,7 @@
 
 use sp_runtime::{
 	generic,
-	traits::{Verify, IdentifyAccount},
+	traits::{IdentifyAccount, Verify},
 	MultiSignature,
 };
 
@@ -27,7 +27,7 @@
 pub mod opaque {
 	pub use sp_runtime::{generic, traits::BlakeTwo256, OpaqueExtrinsic as UncheckedExtrinsic};
 
-	pub use super::{BlockNumber, Signature, AccountId, Balance, Index, Hash, AuraId};
+	pub use super::{AccountId, AuraId, Balance, BlockNumber, Hash, Signature};
 
 	#[derive(Debug, Clone)]
 	pub enum RuntimeId {
@@ -37,10 +37,8 @@
 		Unknown(sp_std::vec::Vec<u8>),
 	}
 
-	/// Opaque block header type.
 	pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
 
-	/// Opaque block type.
 	pub type Block = generic::Block<Header, UncheckedExtrinsic>;
 
 	pub trait RuntimeInstance {
@@ -71,7 +69,7 @@
 pub type Balance = u128;
 
 /// Index of a transaction in the chain.
-pub type Index = u32;
+pub type Nonce = u32;
 
 /// A hash of some data used by the chain.
 pub type Hash = sp_core::H256;
modifiedprimitives/data-structs/Cargo.tomldiffbeforeafterboth
--- a/primitives/data-structs/Cargo.toml
+++ b/primitives/data-structs/Cargo.toml
@@ -9,20 +9,18 @@
 version = "0.2.2"
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
+bondrewd = { version = "0.1.14", features = ["derive"], default-features = false }
 derivative = { workspace = true }
+evm-coder = { workspace = true }
 frame-support = { workspace = true }
 pallet-evm = { workspace = true }
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
-serde = { workspace = true, optional = true }
+serde = { workspace = true }
 sp-core = { workspace = true }
 sp-runtime = { workspace = true }
 sp-std = { workspace = true }
-bondrewd = { version = "0.1.14", features = ["derive"], default-features = false }
 struct-versioning = { workspace = true }
-evm-coder = { workspace = true }
 
 [features]
 default = ["std"]
@@ -30,9 +28,9 @@
 runtime-benchmarks = []
 serde1 = ["serde/alloc"]
 std = [
-	"codec/std",
 	"frame-support/std",
 	"pallet-evm/std",
+	"parity-scale-codec/std",
 	"serde/std",
 	"serde1",
 	"sp-core/std",
modifiedprimitives/data-structs/src/bondrewd_codec.rsdiffbeforeafterboth
--- a/primitives/data-structs/src/bondrewd_codec.rs
+++ b/primitives/data-structs/src/bondrewd_codec.rs
@@ -5,12 +5,14 @@
 macro_rules! bondrewd_codec {
 	($T:ty) => {
 		impl Encode for $T {
-			fn encode_to<O: codec::Output + ?Sized>(&self, dest: &mut O) {
+			fn encode_to<O: parity_scale_codec::Output + ?Sized>(&self, dest: &mut O) {
 				dest.write(&self.into_bytes())
 			}
 		}
-		impl codec::Decode for $T {
-			fn decode<I: codec::Input + ?Sized>(from: &mut I) -> Result<Self, codec::Error> {
+		impl parity_scale_codec::Decode for $T {
+			fn decode<I: parity_scale_codec::Input + ?Sized>(
+				from: &mut I,
+			) -> Result<Self, parity_scale_codec::Error> {
 				let mut bytes = [0; Self::BYTE_SIZE];
 				from.read(&mut bytes)?;
 				Ok(Self::from_bytes(bytes))
modifiedprimitives/data-structs/src/bounded.rsdiffbeforeafterboth
--- a/primitives/data-structs/src/bounded.rs
+++ b/primitives/data-structs/src/bounded.rs
@@ -17,22 +17,24 @@
 //! This module contins implementations for support bounded structures ([`BoundedVec`], [`BoundedBTreeMap`], [`BoundedBTreeSet`]) in [`serde`].
 
 use core::fmt;
-use sp_std::collections::{btree_map::BTreeMap, btree_set::BTreeSet};
-use sp_std::vec::Vec;
 
 use frame_support::{
+	storage::{bounded_btree_map::BoundedBTreeMap, bounded_btree_set::BoundedBTreeSet},
 	BoundedVec,
-	storage::{bounded_btree_map::BoundedBTreeMap, bounded_btree_set::BoundedBTreeSet},
 };
+use sp_std::{
+	collections::{btree_map::BTreeMap, btree_set::BTreeSet},
+	vec::Vec,
+};
 
 /// [`serde`] implementations for [`BoundedVec`].
-#[cfg(feature = "serde1")]
 pub mod vec_serde {
 	use core::convert::TryFrom;
-	use frame_support::{BoundedVec, traits::Get};
+
+	use frame_support::{traits::Get, BoundedVec};
 	use serde::{
+		de::{self, Deserialize, Error},
 		ser::{self, Serialize},
-		de::{self, Deserialize, Error},
 	};
 	use sp_std::vec::Vec;
 
@@ -66,17 +68,17 @@
 	(v as &Vec<V>).fmt(f)
 }
 
-#[cfg(feature = "serde1")]
 #[allow(dead_code)]
 /// [`serde`] implementations for [`BoundedBTreeMap`].
 pub mod map_serde {
 	use core::convert::TryFrom;
-	use sp_std::collections::btree_map::BTreeMap;
-	use frame_support::{traits::Get, storage::bounded_btree_map::BoundedBTreeMap};
+
+	use frame_support::{storage::bounded_btree_map::BoundedBTreeMap, traits::Get};
 	use serde::{
+		de::{self, Deserialize, Error},
 		ser::{self, Serialize},
-		de::{self, Deserialize, Error},
 	};
+	use sp_std::collections::btree_map::BTreeMap;
 	pub fn serialize<D, K, V, S>(
 		value: &BoundedBTreeMap<K, V, S>,
 		serializer: D,
@@ -117,17 +119,17 @@
 	(v as &BTreeMap<K, V>).fmt(f)
 }
 
-#[cfg(feature = "serde1")]
 #[allow(dead_code)]
 /// [`serde`] implementations for [`BoundedBTreeSet`].
 pub mod set_serde {
 	use core::convert::TryFrom;
-	use sp_std::collections::btree_set::BTreeSet;
-	use frame_support::{traits::Get, storage::bounded_btree_set::BoundedBTreeSet};
+
+	use frame_support::{storage::bounded_btree_set::BoundedBTreeSet, traits::Get};
 	use serde::{
+		de::{self, Deserialize, Error},
 		ser::{self, Serialize},
-		de::{self, Deserialize, Error},
 	};
+	use sp_std::collections::btree_set::BTreeSet;
 	pub fn serialize<D, K, S>(
 		value: &BoundedBTreeSet<K, S>,
 		serializer: D,
modifiedprimitives/data-structs/src/lib.rsdiffbeforeafterboth
--- a/primitives/data-structs/src/lib.rs
+++ b/primitives/data-structs/src/lib.rs
@@ -25,20 +25,21 @@
 	fmt,
 	ops::Deref,
 };
-use frame_support::storage::{bounded_btree_map::BoundedBTreeMap, bounded_btree_set::BoundedBTreeSet};
 
-#[cfg(feature = "serde")]
-use serde::{Serialize, Deserialize};
-
+use bondrewd::Bitfields;
+use derivative::Derivative;
+use evm_coder::AbiCoderFlags;
+use frame_support::{
+	storage::{bounded_btree_map::BoundedBTreeMap, bounded_btree_set::BoundedBTreeSet},
+	traits::ConstU32,
+	BoundedVec,
+};
+use parity_scale_codec::{Decode, Encode, EncodeLike, MaxEncodedLen};
+use scale_info::TypeInfo;
+use serde::{Deserialize, Serialize};
 use sp_core::U256;
-use sp_runtime::{ArithmeticError, sp_std::prelude::Vec};
+use sp_runtime::{sp_std::prelude::Vec, ArithmeticError};
 use sp_std::collections::btree_set::BTreeSet;
-use codec::{Decode, Encode, EncodeLike, MaxEncodedLen};
-use frame_support::{BoundedVec, traits::ConstU32};
-use derivative::Derivative;
-use scale_info::TypeInfo;
-use evm_coder::AbiCoderFlags;
-use bondrewd::Bitfields;
 
 mod bondrewd_codec;
 mod bounded;
@@ -153,8 +154,9 @@
 	Default,
 	TypeInfo,
 	MaxEncodedLen,
+	Serialize,
+	Deserialize,
 )]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
 pub struct CollectionId(pub u32);
 impl EncodeLike<u32> for CollectionId {}
 impl EncodeLike<CollectionId> for u32 {}
@@ -187,8 +189,9 @@
 	Default,
 	TypeInfo,
 	MaxEncodedLen,
+	Serialize,
+	Deserialize,
 )]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
 pub struct TokenId(pub u32);
 impl EncodeLike<u32> for TokenId {}
 impl EncodeLike<TokenId> for u32 {}
@@ -221,8 +224,7 @@
 
 /// Token data.
 #[struct_versioning::versioned(version = 2, upper)]
-#[derive(Encode, Decode, Clone, PartialEq, TypeInfo)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, Serialize, Deserialize)]
 pub struct TokenData<CrossAccountId> {
 	/// Properties of token.
 	pub properties: Vec<Property>,
@@ -251,8 +253,9 @@
 /// Collection can represent various types of tokens.
 /// Each collection can contain only one type of tokens at a time.
 /// This type helps to understand which tokens the collection contains.
-#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode, Decode, Eq, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen, Serialize, Deserialize,
+)]
 pub enum CollectionMode {
 	/// Non fungible tokens.
 	NFT,
@@ -279,8 +282,19 @@
 }
 
 /// Access mode for some token operations.
-#[derive(Encode, Decode, Eq, Debug, Clone, Copy, PartialEq, TypeInfo, MaxEncodedLen)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode,
+	Decode,
+	Eq,
+	Debug,
+	Clone,
+	Copy,
+	PartialEq,
+	TypeInfo,
+	MaxEncodedLen,
+	Serialize,
+	Deserialize,
+)]
 pub enum AccessMode {
 	/// Access grant for owner and admins. Used as default.
 	Normal,
@@ -294,8 +308,9 @@
 }
 
 // TODO: remove in future.
-#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode, Decode, Eq, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen, Serialize, Deserialize,
+)]
 pub enum SchemaVersion {
 	ImageURL,
 	Unique,
@@ -307,16 +322,16 @@
 }
 
 // TODO: unused type
-#[derive(Encode, Decode, Default, Debug, Clone, PartialEq, TypeInfo)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(Encode, Decode, Default, Debug, Clone, PartialEq, TypeInfo, Serialize, Deserialize)]
 pub struct Ownership<AccountId> {
 	pub owner: AccountId,
 	pub fraction: u128,
 }
 
 /// The state of collection sponsorship.
-#[derive(Encode, Decode, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode, Decode, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen, Serialize, Deserialize,
+)]
 pub enum SponsorshipState<AccountId> {
 	/// The fees are applied to the transaction sender.
 	Disabled,
@@ -444,8 +459,7 @@
 	pub meta_update_permission: MetaUpdatePermission,
 }
 
-#[derive(Debug, Encode, Decode, Clone, PartialEq, TypeInfo)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(Debug, Encode, Decode, Clone, PartialEq, TypeInfo, Serialize, Deserialize)]
 pub struct RpcCollectionFlags {
 	/// Is collection is foreign.
 	pub foreign: bool,
@@ -455,8 +469,7 @@
 
 /// Collection parameters, used in RPC calls (see [`Collection`] for the storage version).
 #[struct_versioning::versioned(version = 2, upper)]
-#[derive(Debug, Encode, Decode, Clone, PartialEq, TypeInfo)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(Debug, Encode, Decode, Clone, PartialEq, TypeInfo, Serialize, Deserialize)]
 pub struct RpcCollection<AccountId> {
 	/// Collection owner account.
 	pub owner: AccountId,
@@ -538,8 +551,10 @@
 
 pub struct RawEncoded(Vec<u8>);
 
-impl codec::Decode for RawEncoded {
-	fn decode<I: codec::Input>(input: &mut I) -> Result<Self, codec::Error> {
+impl parity_scale_codec::Decode for RawEncoded {
+	fn decode<I: parity_scale_codec::Input>(
+		input: &mut I,
+	) -> Result<Self, parity_scale_codec::Error> {
 		let mut out = Vec::new();
 		while let Ok(v) = input.read_byte() {
 			out.push(v);
@@ -612,8 +627,18 @@
 ///
 /// Update with `pallet_common::Pallet::clamp_limits`.
 // IMPORTANT: When adding/removing fields from this struct - don't forget to also
-#[derive(Encode, Decode, Debug, Default, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode,
+	Decode,
+	Debug,
+	Default,
+	Clone,
+	PartialEq,
+	TypeInfo,
+	MaxEncodedLen,
+	Serialize,
+	Deserialize,
+)]
 // When adding/removing fields from this struct - don't forget to also update with `pallet_common::Pallet::clamp_limits`.
 // TODO: move `pallet_common::Pallet::clamp_limits` into `impl CollectionLimits`.
 // TODO: may be remove [`Option`] and **pub** from fields and create struct with default values.
@@ -769,8 +794,18 @@
 /// Some fields are wrapped in [`Option`], where `None` means chain default.
 ///
 /// Update with `pallet_common::Pallet::clamp_permissions`.
-#[derive(Encode, Decode, Debug, Default, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode,
+	Decode,
+	Debug,
+	Default,
+	Clone,
+	PartialEq,
+	TypeInfo,
+	MaxEncodedLen,
+	Serialize,
+	Deserialize,
+)]
 // When adding/removing fields from this struct - don't forget to also update `pallet_common::Pallet::clamp_permissions`.
 // TODO: move `pallet_common::Pallet::clamp_permissions` into `impl CollectionPermissions`.
 pub struct CollectionPermissions {
@@ -821,11 +856,12 @@
 type OwnerRestrictedSetInner = BoundedBTreeSet<CollectionId, ConstU32<16>>;
 
 /// Wraper for collections set allowing nest.
-#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen, Derivative)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen, Derivative, Serialize, Deserialize,
+)]
 #[derivative(Debug)]
 pub struct OwnerRestrictedSet(
-	#[cfg_attr(feature = "serde1", serde(with = "bounded::set_serde"))]
+	#[serde(with = "bounded::set_serde")]
 	#[derivative(Debug(format_with = "bounded::set_debug"))]
 	pub OwnerRestrictedSetInner,
 );
@@ -862,8 +898,9 @@
 }
 
 /// Part of collection permissions, if set, defines who is able to nest tokens into other tokens.
-#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen, Derivative)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen, Derivative, Serialize, Deserialize,
+)]
 #[derivative(Debug)]
 pub struct NestingPermissions {
 	/// Owner of token can nest tokens under it.
@@ -881,8 +918,9 @@
 /// Enum denominating how often can sponsoring occur if it is enabled.
 ///
 /// Used for [`collection limits`](CollectionLimits).
-#[derive(Encode, Decode, Debug, Clone, Copy, PartialEq, TypeInfo, MaxEncodedLen)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode, Decode, Debug, Clone, Copy, PartialEq, TypeInfo, MaxEncodedLen, Serialize, Deserialize,
+)]
 pub enum SponsoringRateLimit {
 	/// Sponsoring is disabled, and the collection sponsor will not pay for transactions
 	SponsoringDisabled,
@@ -891,42 +929,73 @@
 }
 
 /// Data used to describe an NFT at creation.
-#[derive(Encode, Decode, MaxEncodedLen, Default, PartialEq, Clone, Derivative, TypeInfo)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode,
+	Decode,
+	MaxEncodedLen,
+	Default,
+	PartialEq,
+	Clone,
+	Derivative,
+	TypeInfo,
+	Serialize,
+	Deserialize,
+)]
 #[derivative(Debug)]
 pub struct CreateNftData {
 	/// Key-value pairs used to describe the token as metadata
-	#[cfg_attr(feature = "serde1", serde(with = "bounded::vec_serde"))]
+	#[serde(with = "bounded::vec_serde")]
 	#[derivative(Debug(format_with = "bounded::vec_debug"))]
 	/// Properties that wil be assignet to created item.
 	pub properties: CollectionPropertiesVec,
 }
 
 /// Data used to describe a Fungible token at creation.
-#[derive(Encode, Decode, MaxEncodedLen, Default, Debug, Clone, PartialEq, TypeInfo)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode,
+	Decode,
+	MaxEncodedLen,
+	Default,
+	Debug,
+	Clone,
+	PartialEq,
+	TypeInfo,
+	Serialize,
+	Deserialize,
+)]
 pub struct CreateFungibleData {
 	/// Number of fungible coins minted
 	pub value: u128,
 }
 
 /// Data used to describe a Refungible token at creation.
-#[derive(Encode, Decode, MaxEncodedLen, Default, PartialEq, Clone, Derivative, TypeInfo)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode,
+	Decode,
+	MaxEncodedLen,
+	Default,
+	PartialEq,
+	Clone,
+	Derivative,
+	TypeInfo,
+	Serialize,
+	Deserialize,
+)]
 #[derivative(Debug)]
 pub struct CreateReFungibleData {
 	/// Number of pieces the RFT is split into
 	pub pieces: u128,
 
 	/// Key-value pairs used to describe the token as metadata
-	#[cfg_attr(feature = "serde1", serde(with = "bounded::vec_serde"))]
+	#[serde(with = "bounded::vec_serde")]
 	#[derivative(Debug(format_with = "bounded::vec_debug"))]
 	pub properties: CollectionPropertiesVec,
 }
 
 // TODO: remove this.
-#[derive(Encode, Decode, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode, Decode, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen, Serialize, Deserialize,
+)]
 pub enum MetaUpdatePermission {
 	ItemOwner,
 	Admin,
@@ -935,8 +1004,9 @@
 
 /// Enum holding data used for creation of all three item types.
 /// Unified data for create item.
-#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug, TypeInfo)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug, TypeInfo, Serialize, Deserialize,
+)]
 pub enum CreateItemData {
 	/// Data for create NFT.
 	NFT(CreateNftData),
@@ -1025,8 +1095,9 @@
 }
 
 /// Token's address, dictated by its collection and token IDs.
-#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug, TypeInfo)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug, TypeInfo, Serialize, Deserialize,
+)]
 // todo possibly rename to be used generally as an address pair
 pub struct TokenChild {
 	/// Token id.
@@ -1037,8 +1108,9 @@
 }
 
 /// Collection statistics.
-#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug, TypeInfo)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug, TypeInfo, Serialize, Deserialize,
+)]
 pub struct CollectionStats {
 	/// Number of created items.
 	pub created: u32,
@@ -1060,10 +1132,9 @@
 
 	fn type_info() -> scale_info::Type {
 		use scale_info::{
-			Type, Path,
 			build::{FieldsBuilder, UnnamedFields},
 			form::MetaForm,
-			type_params,
+			type_params, Path, Type,
 		};
 		Type::builder()
 			.path(Path::new("up_data_structs", "PhantomType"))
@@ -1092,8 +1163,18 @@
 pub type PropertyValue = BoundedBytes<ConstU32<MAX_PROPERTY_VALUE_LENGTH>>;
 
 /// Property permission.
-#[derive(Encode, Decode, TypeInfo, Debug, MaxEncodedLen, PartialEq, Clone, Default)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode,
+	Decode,
+	TypeInfo,
+	Debug,
+	MaxEncodedLen,
+	PartialEq,
+	Clone,
+	Default,
+	Serialize,
+	Deserialize,
+)]
 pub struct PropertyPermission {
 	/// Permission to change the property and property permission.
 	///
@@ -1119,15 +1200,16 @@
 }
 
 /// Property is simpl key-value record.
-#[derive(Encode, Decode, Debug, TypeInfo, Clone, PartialEq, MaxEncodedLen)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode, Decode, Debug, TypeInfo, Clone, PartialEq, MaxEncodedLen, Serialize, Deserialize,
+)]
 pub struct Property {
 	/// Property key.
-	#[cfg_attr(feature = "serde1", serde(with = "bounded::vec_serde"))]
+	#[serde(with = "bounded::vec_serde")]
 	pub key: PropertyKey,
 
 	/// Property value.
-	#[cfg_attr(feature = "serde1", serde(with = "bounded::vec_serde"))]
+	#[serde(with = "bounded::vec_serde")]
 	pub value: PropertyValue,
 }
 
@@ -1138,8 +1220,9 @@
 }
 
 /// Record for proprty key permission.
-#[derive(Encode, Decode, TypeInfo, Debug, MaxEncodedLen, PartialEq, Clone)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derive(
+	Encode, Decode, TypeInfo, Debug, MaxEncodedLen, PartialEq, Clone, Serialize, Deserialize,
+)]
 pub struct PropertyKeyPermission {
 	/// Key.
 	#[cfg_attr(feature = "serde1", serde(with = "bounded::vec_serde"))]
@@ -1362,7 +1445,7 @@
 	scoped_slice_size(PropertyScope::None, data)
 }
 fn scoped_slice_size(scope: PropertyScope, data: &[u8]) -> u32 {
-	use codec::Compact;
+	use parity_scale_codec::Compact;
 	let prefix = scope.prefix();
 	<Compact<u32>>::encoded_size(&Compact(data.len() as u32 + prefix.len() as u32)) as u32
 		+ data.len() as u32
modifiedprimitives/data-structs/src/mapping.rsdiffbeforeafterboth
--- a/primitives/data-structs/src/mapping.rs
+++ b/primitives/data-structs/src/mapping.rs
@@ -18,10 +18,10 @@
 
 use core::marker::PhantomData;
 
+use pallet_evm::account::CrossAccountId;
 use sp_core::H160;
 
 use crate::{CollectionId, TokenId};
-use pallet_evm::account::CrossAccountId;
 
 /// Trait for mapping between token id and some `Address`.
 pub trait TokenAddressMapping<Address> {
modifiedprimitives/data-structs/src/migration.rsdiffbeforeafterboth
--- a/primitives/data-structs/src/migration.rs
+++ b/primitives/data-structs/src/migration.rs
@@ -17,8 +17,9 @@
 /// Storage migration is not required for this change, as SponsoringRateLimit has same encoding as Option<u32>
 #[test]
 fn sponsoring_rate_limit_has_same_encoding_as_option_u32() {
+	use parity_scale_codec::Encode;
+
 	use crate::SponsoringRateLimit;
-	use codec::Encode;
 
 	fn limit_to_option(limit: SponsoringRateLimit) -> Option<u32> {
 		match limit {
@@ -41,8 +42,9 @@
 
 #[test]
 fn collection_flags_have_same_encoding_as_bool() {
+	use parity_scale_codec::Encode;
+
 	use crate::CollectionFlags;
-	use codec::Encode;
 
 	assert_eq!(
 		true.encode(),
modifiedprimitives/pov-estimate-rpc/Cargo.tomldiffbeforeafterboth
--- a/primitives/pov-estimate-rpc/Cargo.toml
+++ b/primitives/pov-estimate-rpc/Cargo.toml
@@ -5,7 +5,7 @@
 version = "0.1.0"
 
 [dependencies]
-codec = { workspace = true }
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
 serde = { workspace = true, optional = true }
 sp-api = { workspace = true }
@@ -15,4 +15,12 @@
 
 [features]
 default = ["std"]
-std = ["codec/std", "scale-info/std", "serde/std", "sp-api/std", "sp-core/std", "sp-runtime/std", "sp-std/std"]
+std = [
+	"parity-scale-codec/std",
+	"scale-info/std",
+	"serde/std",
+	"sp-api/std",
+	"sp-core/std",
+	"sp-runtime/std",
+	"sp-std/std",
+]
modifiedprimitives/pov-estimate-rpc/src/lib.rsdiffbeforeafterboth
--- a/primitives/pov-estimate-rpc/src/lib.rs
+++ b/primitives/pov-estimate-rpc/src/lib.rs
@@ -17,12 +17,10 @@
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use scale_info::TypeInfo;
-use sp_std::vec::Vec;
-
 #[cfg(feature = "std")]
 use serde::Serialize;
-
 use sp_runtime::ApplyExtrinsicResult;
+use sp_std::vec::Vec;
 
 #[cfg_attr(feature = "std", derive(Serialize))]
 #[derive(Debug, TypeInfo)]
modifiedprimitives/rpc/Cargo.tomldiffbeforeafterboth
--- a/primitives/rpc/Cargo.toml
+++ b/primitives/rpc/Cargo.toml
@@ -5,9 +5,9 @@
 version = "0.1.3"
 
 [dependencies]
-codec = { workspace = true }
 pallet-common = { workspace = true }
 pallet-evm = { workspace = true }
+parity-scale-codec = { workspace = true }
 sp-api = { workspace = true }
 sp-core = { workspace = true }
 sp-runtime = { workspace = true }
@@ -17,8 +17,8 @@
 [features]
 default = ["std"]
 std = [
-	"codec/std",
 	"pallet-common/std",
+	"parity-scale-codec/std",
 	"sp-api/std",
 	"sp-core/std",
 	"sp-runtime/std",
modifiedprimitives/rpc/src/lib.rsdiffbeforeafterboth
--- a/primitives/rpc/src/lib.rs
+++ b/primitives/rpc/src/lib.rs
@@ -18,15 +18,14 @@
 
 extern crate alloc;
 
+use parity_scale_codec::Decode;
+use sp_runtime::DispatchError;
+use sp_std::vec::Vec;
 use up_data_structs::{
-	CollectionId, TokenId, RawEncoded, RpcCollection, CollectionStats, CollectionLimits, Property,
-	PropertyKeyPermission, TokenData, TokenChild, TokenDataVersion1,
+	CollectionId, CollectionLimits, CollectionStats, Property, PropertyKeyPermission,
+	RpcCollection, TokenChild, TokenData, TokenId,
 };
 
-use sp_std::vec::Vec;
-use codec::Decode;
-use sp_runtime::DispatchError;
-
 type Result<T> = core::result::Result<T, DispatchError>;
 
 sp_api::decl_runtime_apis! {
@@ -82,7 +81,7 @@
 			collection: CollectionId,
 			token_id: TokenId,
 			keys: Option<Vec<Vec<u8>>>
-		) -> Result<TokenDataVersion1<CrossAccountId>>;
+		) -> Result<up_data_structs::TokenDataVersion1<CrossAccountId>>;
 
 		/// Total number of tokens in collection.
 		fn total_supply(collection: CollectionId) -> Result<u32>;
@@ -117,7 +116,7 @@
 		fn collection_by_id(collection: CollectionId) -> Result<Option<RpcCollection<AccountId>>>;
 
 		#[changed_in(3)]
-		fn collection_by_id(collection: CollectionId) -> Result<Option<RawEncoded>>;
+		fn collection_by_id(collection: CollectionId) -> Result<Option<up_data_structs::RawEncoded>>;
 
 		/// Get collection stats.
 		fn collection_stats() -> Result<CollectionStats>;
modifiedruntime/common/config/ethereum.rsdiffbeforeafterboth
--- a/runtime/common/config/ethereum.rs
+++ b/runtime/common/config/ethereum.rs
@@ -1,22 +1,24 @@
-use sp_core::{U256, H160};
 use frame_support::{
-	weights::{Weight, constants::WEIGHT_REF_TIME_PER_SECOND},
-	traits::{FindAuthor},
-	parameter_types, ConsensusEngineId,
+	parameter_types,
+	traits::FindAuthor,
+	weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
+	ConsensusEngineId,
 };
-use sp_runtime::{RuntimeAppPublic, Perbill, traits::ConstU32};
+use pallet_ethereum::PostLogContent;
+use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping};
+use sp_core::{H160, U256};
+use sp_runtime::{traits::ConstU32, Perbill, RuntimeAppPublic};
+use up_common::constants::*;
+
 use crate::{
 	runtime_common::{
 		config::sponsoring::DefaultSponsoringRateLimit,
-		DealWithFees,
 		dispatch::CollectionDispatchT,
 		ethereum::{precompiles::UniquePrecompiles, sponsoring::EvmSponsorshipHandler},
+		DealWithFees,
 	},
-	Runtime, Aura, Balances, RuntimeEvent, ChainId,
+	Aura, Balances, ChainId, Runtime, RuntimeEvent,
 };
-use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping};
-use pallet_ethereum::PostLogContent;
-use up_common::constants::*;
 
 pub type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Runtime>;
 
@@ -87,12 +89,13 @@
 	type OnCreate = pallet_evm_contract_helpers::HelpersOnCreate<Self>;
 	type ChainId = ChainId;
 	type Runner = pallet_evm::runner::stack::Runner<Self>;
-	type OnChargeTransaction = pallet_evm::EVMCurrencyAdapter<Balances, DealWithFees>;
-	type TransactionValidityHack = pallet_evm_transaction_payment::TransactionValidityHack<Self>;
+	type OnChargeTransaction =
+		pallet_evm_transaction_payment::WrappedEVMCurrencyAdapter<Balances, DealWithFees>;
 	type FindAuthor = EthereumFindAuthor<Aura>;
 	type Timestamp = crate::Timestamp;
 	type WeightInfo = pallet_evm::weights::SubstrateWeight<Self>;
 	type GasLimitPovSizeRatio = ProofSizePerGas;
+	type OnCheckEvmTransaction = pallet_evm_transaction_payment::TransactionValidity<Self>;
 }
 
 impl pallet_evm_migration::Config for Runtime {
modifiedruntime/common/config/governance/fellowship.rsdiffbeforeafterboth
--- a/runtime/common/config/governance/fellowship.rs
+++ b/runtime/common/config/governance/fellowship.rs
@@ -1,8 +1,11 @@
-use crate::{Preimage, Treasury, RuntimeCall, RuntimeEvent, Scheduler, FellowshipReferenda, Runtime};
-use super::*;
 use pallet_gov_origins::Origin as GovOrigins;
 use pallet_ranked_collective::{Config as RankedConfig, Rank, TallyOf};
 
+use super::*;
+use crate::{
+	FellowshipReferenda, Preimage, Runtime, RuntimeCall, RuntimeEvent, Scheduler, Treasury,
+};
+
 pub const FELLOWSHIP_MODULE_ID: PalletId = PalletId(*b"flowship");
 pub const DEMOCRACY_TRACK_ID: u16 = 10;
 
modifiedruntime/common/config/governance/mod.rsdiffbeforeafterboth
--- a/runtime/common/config/governance/mod.rs
+++ b/runtime/common/config/governance/mod.rs
@@ -15,29 +15,31 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use frame_support::{
-	PalletId, parameter_types,
+	pallet_prelude::*,
+	parameter_types,
 	traits::{
-		EnsureOrigin, EqualPrivilegeOnly, EitherOfDiverse, EitherOf, MapSuccess, ConstU16, Polling,
+		ConstU16, EitherOf, EitherOfDiverse, EnsureOrigin, EqualPrivilegeOnly, MapSuccess, Polling,
 	},
 	weights::Weight,
-	pallet_prelude::*,
+	PalletId,
 };
-use frame_system::{EnsureRoot, EnsureNever};
+use frame_system::{EnsureNever, EnsureRoot};
+use pallet_collective::EnsureProportionAtLeast;
 use sp_runtime::{
+	morph_types,
+	traits::{AccountIdConversion, CheckedSub, ConstU32, Convert, Replace},
 	Perbill,
-	traits::{AccountIdConversion, ConstU32, Replace, CheckedSub, Convert},
-	morph_types,
 };
-use crate::{
-	Runtime, RuntimeOrigin, RuntimeEvent, RuntimeCall, OriginCaller, Preimage, Balances, Treasury,
-	Scheduler, Council, TechnicalCommittee,
-};
 pub use up_common::{
-	constants::{UNIQUE, DAYS, HOURS, MINUTES, CENTIUNIQUE},
+	constants::{CENTIUNIQUE, DAYS, HOURS, MINUTES, UNIQUE},
 	types::{AccountId, Balance, BlockNumber},
 };
-use pallet_collective::EnsureProportionAtLeast;
 
+use crate::{
+	Balances, Council, OriginCaller, Preimage, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin,
+	Scheduler, TechnicalCommittee, Treasury,
+};
+
 pub mod council;
 pub use council::*;
 
modifiedruntime/common/config/orml.rsdiffbeforeafterboth
--- a/runtime/common/config/orml.rs
+++ b/runtime/common/config/orml.rs
@@ -20,26 +20,26 @@
 };
 use frame_system::EnsureSigned;
 use orml_traits::{location::AbsoluteReserveProvider, parameter_type_with_key};
+use pallet_foreign_assets::{CurrencyId, NativeCurrency};
 use sp_runtime::traits::Convert;
-use xcm::latest::{Weight, Junction::*, Junctions::*, MultiLocation};
-use xcm_executor::XcmExecutor;
 use sp_std::{vec, vec::Vec};
-use pallet_foreign_assets::{CurrencyId, NativeCurrency};
+use staging_xcm::latest::{Junction::*, Junctions::*, MultiLocation, Weight};
+use staging_xcm_executor::XcmExecutor;
+use up_common::{
+	constants::*,
+	types::{AccountId, Balance},
+};
+
 use crate::{
-	Runtime, RuntimeEvent, RelayChainBlockNumberProvider,
 	runtime_common::config::{
+		pallets::TreasuryAccountId,
+		substrate::{MaxLocks, MaxReserves},
 		xcm::{
-			SelfLocation, Weigher, XcmExecutorConfig, UniversalLocation,
-			xcm_assets::{CurrencyIdConvert},
+			xcm_assets::CurrencyIdConvert, SelfLocation, UniversalLocation, Weigher,
+			XcmExecutorConfig,
 		},
-		pallets::TreasuryAccountId,
-		substrate::{MaxLocks, MaxReserves},
 	},
-};
-
-use up_common::{
-	types::{AccountId, Balance},
-	constants::*,
+	RelayChainBlockNumberProvider, Runtime, RuntimeEvent,
 };
 
 // Signed version of balance
modifiedruntime/common/config/pallets/app_promotion.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/app_promotion.rs
+++ b/runtime/common/config/pallets/app_promotion.rs
@@ -14,18 +14,18 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use crate::{
-	runtime_common::config::pallets::{TreasuryAccountId, RelayChainBlockNumberProvider},
-	Runtime, Balances, BlockNumber, Unique, RuntimeEvent, EvmContractHelpers, Maintenance,
-};
-
 use frame_support::{parameter_types, PalletId};
 use sp_arithmetic::Perbill;
 use up_common::{
-	constants::{UNIQUE, DAYS, RELAY_DAYS},
+	constants::{DAYS, RELAY_DAYS, UNIQUE},
 	types::Balance,
 };
 
+use crate::{
+	runtime_common::config::pallets::{RelayChainBlockNumberProvider, TreasuryAccountId},
+	Balances, BlockNumber, EvmContractHelpers, Maintenance, Runtime, RuntimeEvent, Unique,
+};
+
 parameter_types! {
 	pub const AppPromotionId: PalletId = PalletId(*b"appstake");
 	pub const RecalculationInterval: BlockNumber = RELAY_DAYS;
modifiedruntime/common/config/pallets/collator_selection.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/collator_selection.rs
+++ b/runtime/common/config/pallets/collator_selection.rs
@@ -15,23 +15,21 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use frame_support::{parameter_types, PalletId};
-use crate::{
-	Balance, Balances, BlockNumber, Runtime, RuntimeEvent, Aura, Session, SessionKeys,
-	CollatorSelection, Treasury,
-	config::pallets::{MaxCollators, SessionPeriod, TreasuryAccountId},
+#[cfg(not(feature = "governance"))]
+use frame_system::EnsureRoot;
+use pallet_configuration::{
+	CollatorSelectionDesiredCollatorsOverride, CollatorSelectionKickThresholdOverride,
+	CollatorSelectionLicenseBondOverride,
 };
+use sp_runtime::Perbill;
+use up_common::constants::{MILLIUNIQUE, UNIQUE};
 
 #[cfg(feature = "governance")]
 use crate::config::governance;
-
-#[cfg(not(feature = "governance"))]
-use frame_system::EnsureRoot;
-
-use sp_runtime::Perbill;
-use up_common::constants::{UNIQUE, MILLIUNIQUE};
-use pallet_configuration::{
-	CollatorSelectionKickThresholdOverride, CollatorSelectionLicenseBondOverride,
-	CollatorSelectionDesiredCollatorsOverride,
+use crate::{
+	config::pallets::{MaxCollators, SessionPeriod, TreasuryAccountId},
+	Aura, Balance, Balances, BlockNumber, CollatorSelection, Runtime, RuntimeEvent,
+	RuntimeHoldReason, Session, SessionKeys, Treasury,
 };
 parameter_types! {
 	pub const SessionOffset: BlockNumber = 0;
@@ -107,6 +105,7 @@
 
 impl pallet_collator_selection::Config for Runtime {
 	type RuntimeEvent = RuntimeEvent;
+	type RuntimeHoldReason = RuntimeHoldReason;
 	type Currency = Balances;
 	// We allow root only to execute privileged collator selection operations.
 
@@ -128,7 +127,6 @@
 	type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
 	type ValidatorRegistration = Session;
 	type WeightInfo = pallet_collator_selection::weights::SubstrateWeight<Runtime>;
-	type LicenceBondIdentifier = LicenceBondIdentifier;
 	type DesiredCollators = DesiredCollators;
 	type LicenseBond = LicenseBond;
 	type KickThreshold = KickThreshold;
modifiedruntime/common/config/pallets/foreign_asset.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/foreign_asset.rs
+++ b/runtime/common/config/pallets/foreign_asset.rs
@@ -1,6 +1,7 @@
-use crate::{Runtime, RuntimeEvent, Balances};
 use up_common::types::AccountId;
 
+use crate::{Balances, Runtime, RuntimeEvent};
+
 impl pallet_foreign_assets::Config for Runtime {
 	type RuntimeEvent = RuntimeEvent;
 	type Currency = Balances;
modifiedruntime/common/config/pallets/mod.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -15,32 +15,30 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use alloc::string::{String, ToString};
-use frame_support::parameter_types;
+
+use frame_support::{
+	parameter_types,
+	traits::{ConstU32, ConstU64, Currency},
+};
+use sp_arithmetic::Perbill;
 use sp_runtime::traits::AccountIdConversion;
+use up_common::{
+	constants::*,
+	types::{AccountId, Balance, BlockNumber},
+};
+use up_data_structs::mapping::{CrossTokenAddressMapping, EvmTokenAddressMapping};
+
+#[cfg(feature = "governance")]
+use crate::runtime_common::config::governance;
 use crate::{
 	runtime_common::{
+		config::{ethereum::EvmCollectionHelpersAddress, substrate::TreasuryModuleId},
 		dispatch::CollectionDispatchT,
-		config::{substrate::TreasuryModuleId, ethereum::EvmCollectionHelpersAddress},
 		weights::CommonWeights,
 		RelayChainBlockNumberProvider,
 	},
-	Runtime, RuntimeEvent, RuntimeCall, VERSION, TOKEN_SYMBOL, DECIMALS, Balances,
-};
-use frame_support::traits::{ConstU32, ConstU64, Currency};
-use up_common::{
-	types::{AccountId, Balance, BlockNumber},
-	constants::*,
-};
-use up_data_structs::{
-	mapping::{EvmTokenAddressMapping, CrossTokenAddressMapping},
+	Balances, Runtime, RuntimeCall, RuntimeEvent, DECIMALS, TOKEN_SYMBOL, VERSION,
 };
-use sp_arithmetic::Perbill;
-
-#[cfg(feature = "governance")]
-use crate::runtime_common::config::governance;
-
-#[cfg(feature = "unique-scheduler")]
-pub mod scheduler;
 
 #[cfg(feature = "foreign-assets")]
 pub mod foreign_asset;
modifiedruntime/common/config/pallets/preimage.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/preimage.rs
+++ b/runtime/common/config/pallets/preimage.rs
@@ -16,9 +16,10 @@
 
 use frame_support::parameter_types;
 use frame_system::EnsureRoot;
-use crate::{AccountId, Balance, Balances, Runtime, RuntimeEvent};
 use up_common::constants::*;
 
+use crate::{AccountId, Balance, Balances, Runtime, RuntimeEvent};
+
 parameter_types! {
 	pub PreimageBaseDeposit: Balance = 1000 * UNIQUE;
 }
deletedruntime/common/config/pallets/scheduler.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/scheduler.rs
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-use frame_support::{
-	traits::{PrivilegeCmp, EnsureOrigin},
-	weights::Weight,
-	parameter_types,
-};
-use frame_system::{EnsureRoot, RawOrigin};
-use sp_runtime::Perbill;
-use core::cmp::Ordering;
-use codec::Decode;
-use crate::{
-	runtime_common::{scheduler::SchedulerPaymentExecutor, config::substrate::RuntimeBlockWeights},
-	Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, OriginCaller,
-};
-use pallet_unique_scheduler_v2::ScheduledEnsureOriginSuccess;
-use up_common::types::AccountId;
-
-parameter_types! {
-	pub MaximumSchedulerWeight: Weight = Perbill::from_percent(50) *
-		RuntimeBlockWeights::get().max_block;
-	pub const MaxScheduledPerBlock: u32 = 50;
-
-	pub const NoPreimagePostponement: Option<u32> = Some(10);
-	pub const Preimage: Option<u32> = Some(10);
-}
-
-pub struct EnsureSignedOrRoot<AccountId>(sp_std::marker::PhantomData<AccountId>);
-impl<O: Into<Result<RawOrigin<AccountId>, O>> + From<RawOrigin<AccountId>>, AccountId: Decode>
-	EnsureOrigin<O> for EnsureSignedOrRoot<AccountId>
-{
-	type Success = ScheduledEnsureOriginSuccess<AccountId>;
-	fn try_origin(o: O) -> Result<Self::Success, O> {
-		o.into().and_then(|o| match o {
-			RawOrigin::Root => Ok(ScheduledEnsureOriginSuccess::Root),
-			RawOrigin::Signed(who) => Ok(ScheduledEnsureOriginSuccess::Signed(who)),
-			r => Err(O::from(r)),
-		})
-	}
-}
-
-pub struct EqualOrRootOnly;
-impl PrivilegeCmp<OriginCaller> for EqualOrRootOnly {
-	fn cmp_privilege(left: &OriginCaller, right: &OriginCaller) -> Option<Ordering> {
-		use RawOrigin::*;
-
-		let left = left.clone().try_into().ok()?;
-		let right = right.clone().try_into().ok()?;
-
-		match (left, right) {
-			(Root, Root) => Some(Ordering::Equal),
-			(Root, _) => Some(Ordering::Greater),
-			(_, Root) => Some(Ordering::Less),
-			lr @ _ => (lr.0 == lr.1).then(|| Ordering::Equal),
-		}
-	}
-}
-
-impl pallet_unique_scheduler_v2::Config for Runtime {
-	type RuntimeEvent = RuntimeEvent;
-	type RuntimeOrigin = RuntimeOrigin;
-	type PalletsOrigin = OriginCaller;
-	type RuntimeCall = RuntimeCall;
-	type MaximumWeight = MaximumSchedulerWeight;
-	type ScheduleOrigin = EnsureSignedOrRoot<AccountId>;
-	type OriginPrivilegeCmp = EqualOrRootOnly;
-	type MaxScheduledPerBlock = MaxScheduledPerBlock;
-	type WeightInfo = ();
-	type Preimages = ();
-	type CallExecutor = SchedulerPaymentExecutor;
-	type PrioritySetOrigin = EnsureRoot<AccountId>;
-}
modifiedruntime/common/config/parachain.rsdiffbeforeafterboth
--- a/runtime/common/config/parachain.rs
+++ b/runtime/common/config/parachain.rs
@@ -14,10 +14,11 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use frame_support::{weights::Weight, parameter_types};
-use crate::{Runtime, RuntimeEvent, XcmpQueue, DmpQueue};
+use frame_support::{parameter_types, weights::Weight};
 use up_common::constants::*;
 
+use crate::{DmpQueue, Runtime, RuntimeEvent, XcmpQueue};
+
 parameter_types! {
 	pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4);
 	pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4);
modifiedruntime/common/config/sponsoring.rsdiffbeforeafterboth
--- a/runtime/common/config/sponsoring.rs
+++ b/runtime/common/config/sponsoring.rs
@@ -14,14 +14,12 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use crate::{
-	runtime_common::{sponsoring::UniqueSponsorshipHandler},
-	Runtime,
-};
 use frame_support::parameter_types;
 use sp_core::U256;
 use up_common::{constants::*, types::BlockNumber};
 
+use crate::{runtime_common::sponsoring::UniqueSponsorshipHandler, Runtime};
+
 parameter_types! {
 	pub const DefaultSponsoringRateLimit: BlockNumber = 1 * DAYS;
 	pub const DefaultSponsoringFeeLimit: U256 = U256::MAX;
modifiedruntime/common/config/substrate.rsdiffbeforeafterboth
--- a/runtime/common/config/substrate.rs
+++ b/runtime/common/config/substrate.rs
@@ -15,31 +15,32 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use frame_support::{
-	traits::{Everything, ConstU32, NeverEnsureOrigin},
+	dispatch::DispatchClass,
+	ord_parameter_types, parameter_types,
+	traits::{ConstBool, ConstU32, Everything, NeverEnsureOrigin},
 	weights::{
 		constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight},
 		ConstantMultiplier,
 	},
-	dispatch::DispatchClass,
-	parameter_types, ord_parameter_types, PalletId,
-};
-use sp_runtime::{
-	generic,
-	traits::{BlakeTwo256, AccountIdLookup},
-	Perbill, Permill, Percent,
+	PalletId,
 };
-use sp_arithmetic::traits::One;
 use frame_system::{
 	limits::{BlockLength, BlockWeights},
 	EnsureRoot, EnsureSignedBy,
 };
-use pallet_transaction_payment::{Multiplier, ConstFeeMultiplier};
+use pallet_transaction_payment::{ConstFeeMultiplier, Multiplier};
+use sp_arithmetic::traits::One;
+use sp_runtime::{
+	traits::{AccountIdLookup, BlakeTwo256},
+	Perbill, Percent, Permill,
+};
+use sp_std::vec;
+use up_common::{constants::*, types::*};
+
 use crate::{
-	runtime_common::DealWithFees, Runtime, RuntimeEvent, RuntimeCall, RuntimeOrigin, OriginCaller,
-	PalletInfo, System, Balances, SS58Prefix, Version,
+	runtime_common::DealWithFees, Balances, Block, OriginCaller, PalletInfo, Runtime, RuntimeCall,
+	RuntimeEvent, RuntimeHoldReason, RuntimeOrigin, SS58Prefix, System, Version,
 };
-use up_common::{types::*, constants::*};
-use sp_std::vec;
 
 parameter_types! {
 	pub const BlockHashCount: BlockNumber = 2400;
@@ -76,10 +77,10 @@
 	type BaseCallFilter = Everything;
 	/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
 	type BlockHashCount = BlockHashCount;
+	/// The block type.
+	type Block = Block;
 	/// The maximum length of a block (in bytes).
 	type BlockLength = RuntimeBlockLength;
-	/// The index type for blocks.
-	type BlockNumber = BlockNumber;
 	/// The weight of the overhead invoked on the block import process, independent of the extrinsics included in that block.
 	type BlockWeights = RuntimeBlockWeights;
 	/// The aggregated dispatch type that is available for extrinsics.
@@ -92,10 +93,8 @@
 	type Hash = Hash;
 	/// The hashing algorithm used.
 	type Hashing = BlakeTwo256;
-	/// The header type.
-	type Header = generic::Header<BlockNumber, BlakeTwo256>;
 	/// The index type for storing how many extrinsics an account has signed.
-	type Index = Index;
+	type Nonce = Nonce;
 	/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
 	type Lookup = AccountIdLookup<AccountId, ()>;
 	/// What to do if an account is fully reaped from the system.
@@ -171,7 +170,7 @@
 	type ExistentialDeposit = ExistentialDeposit;
 	type AccountStore = System;
 	type WeightInfo = pallet_balances::weights::SubstrateWeight<Self>;
-	type HoldIdentifier = [u8; 16];
+	type RuntimeHoldReason = RuntimeHoldReason;
 	type FreezeIdentifier = [u8; 16];
 	type MaxHolds = MaxHolds;
 	type MaxFreezes = MaxFreezes;
@@ -247,6 +246,7 @@
 	type AuthorityId = AuraId;
 	type DisabledValidators = ();
 	type MaxAuthorities = MaxAuthorities;
+	type AllowMultipleBlocksPerSlot = ConstBool<true>;
 }
 
 impl pallet_utility::Config for Runtime {
modifiedruntime/common/config/test_pallets.rsdiffbeforeafterboth
--- a/runtime/common/config/test_pallets.rs
+++ b/runtime/common/config/test_pallets.rs
@@ -14,7 +14,7 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use crate::{Runtime, RuntimeEvent, RuntimeCall};
+use crate::{Runtime, RuntimeCall, RuntimeEvent};
 
 impl pallet_test_utils::Config for Runtime {
 	type RuntimeEvent = RuntimeEvent;
modifiedruntime/common/config/xcm/foreignassets.rsdiffbeforeafterboth
--- a/runtime/common/config/xcm/foreignassets.rs
+++ b/runtime/common/config/xcm/foreignassets.rs
@@ -14,39 +14,32 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use frame_support::{traits::Get, parameter_types};
-use sp_runtime::traits::Convert;
-use xcm::latest::{prelude::*, MultiAsset, MultiLocation};
-use xcm_builder::{FungiblesAdapter, NoChecking, ConvertedConcreteId};
-use xcm_executor::traits::{TransactAsset, Convert as ConvertXcm, JustTry};
-use pallet_foreign_assets::{
-	AssetIds, AssetIdMapping, XcmForeignAssetIdMapping, NativeCurrency, FreeForAll, TryAsForeign,
-	ForeignAssetId, CurrencyId,
-};
-use sp_std::{borrow::Borrow, marker::PhantomData};
+use frame_support::{parameter_types, traits::Get};
 use orml_traits::location::AbsoluteReserveProvider;
 use orml_xcm_support::MultiNativeAsset;
-use crate::{Runtime, Balances, ParachainInfo, PolkadotXcm, ForeignAssets};
+use pallet_foreign_assets::{
+	AssetId, AssetIdMapping, CurrencyId, ForeignAssetId, FreeForAll, NativeCurrency, TryAsForeign,
+	XcmForeignAssetIdMapping,
+};
+use sp_runtime::traits::{Convert, MaybeEquivalence};
+use sp_std::marker::PhantomData;
+use staging_xcm::latest::{prelude::*, MultiAsset, MultiLocation};
+use staging_xcm_builder::{ConvertedConcreteId, FungiblesAdapter, NoChecking};
+use staging_xcm_executor::traits::{JustTry, TransactAsset};
+use up_common::types::{AccountId, Balance};
 
 use super::{LocationToAccountId, RelayLocation};
+use crate::{Balances, ForeignAssets, ParachainInfo, PolkadotXcm, Runtime};
 
-use up_common::types::{AccountId, Balance};
-
 parameter_types! {
 	pub CheckingAccount: AccountId = PolkadotXcm::check_account();
 }
 
-pub struct AsInnerId<AssetId, ConvertAssetId>(PhantomData<(AssetId, ConvertAssetId)>);
-impl<AssetId: Clone + PartialEq, ConvertAssetId: ConvertXcm<AssetId, AssetId>>
-	ConvertXcm<MultiLocation, AssetId> for AsInnerId<AssetId, ConvertAssetId>
-where
-	AssetId: Borrow<AssetId>,
-	AssetId: TryAsForeign<AssetId, ForeignAssetId>,
-	AssetIds: Borrow<AssetId>,
+pub struct AsInnerId<ConvertAssetId>(PhantomData<(AssetId, ConvertAssetId)>);
+impl<ConvertAssetId: MaybeEquivalence<AssetId, AssetId>> MaybeEquivalence<MultiLocation, AssetId>
+	for AsInnerId<ConvertAssetId>
 {
-	fn convert_ref(id: impl Borrow<MultiLocation>) -> Result<AssetId, ()> {
-		let id = id.borrow();
-
+	fn convert(id: &MultiLocation) -> Option<AssetId> {
 		log::trace!(
 			target: "xcm::AsInnerId::Convert",
 			"AsInnerId {:?}",
@@ -58,52 +51,46 @@
 		let self_location = MultiLocation::new(1, X1(Parachain(ParachainInfo::get().into())));
 
 		if *id == parent {
-			return ConvertAssetId::convert_ref(AssetIds::NativeAssetId(NativeCurrency::Parent));
+			return ConvertAssetId::convert(&AssetId::NativeAssetId(NativeCurrency::Parent));
 		}
 
 		if *id == here || *id == self_location {
-			return ConvertAssetId::convert_ref(AssetIds::NativeAssetId(NativeCurrency::Here));
+			return ConvertAssetId::convert(&AssetId::NativeAssetId(NativeCurrency::Here));
 		}
 
 		match XcmForeignAssetIdMapping::<Runtime>::get_currency_id(*id) {
-			Some(AssetIds::ForeignAssetId(foreign_asset_id)) => {
-				ConvertAssetId::convert_ref(AssetIds::ForeignAssetId(foreign_asset_id))
+			Some(AssetId::ForeignAssetId(foreign_asset_id)) => {
+				ConvertAssetId::convert(&AssetId::ForeignAssetId(foreign_asset_id))
 			}
-			_ => Err(()),
+			_ => None,
 		}
 	}
 
-	fn reverse_ref(what: impl Borrow<AssetId>) -> Result<MultiLocation, ()> {
+	fn convert_back(asset_id: &AssetId) -> Option<MultiLocation> {
 		log::trace!(
 			target: "xcm::AsInnerId::Reverse",
 			"AsInnerId",
 		);
-
-		let asset_id = what.borrow();
 
 		let parent_id =
-			ConvertAssetId::convert_ref(AssetIds::NativeAssetId(NativeCurrency::Parent)).unwrap();
+			ConvertAssetId::convert(&AssetId::NativeAssetId(NativeCurrency::Parent)).unwrap();
 		let here_id =
-			ConvertAssetId::convert_ref(AssetIds::NativeAssetId(NativeCurrency::Here)).unwrap();
+			ConvertAssetId::convert(&AssetId::NativeAssetId(NativeCurrency::Here)).unwrap();
 
 		if asset_id.clone() == parent_id {
-			return Ok(MultiLocation::parent());
+			return Some(MultiLocation::parent());
 		}
 
 		if asset_id.clone() == here_id {
-			return Ok(MultiLocation::new(
+			return Some(MultiLocation::new(
 				1,
 				X1(Parachain(ParachainInfo::get().into())),
 			));
 		}
 
-		match <AssetId as TryAsForeign<AssetId, ForeignAssetId>>::try_as_foreign(asset_id.clone()) {
-			Some(fid) => match XcmForeignAssetIdMapping::<Runtime>::get_multi_location(fid) {
-				Some(location) => Ok(location),
-				None => Err(()),
-			},
-			None => Err(()),
-		}
+		let fid =
+			<AssetId as TryAsForeign<AssetId, ForeignAssetId>>::try_as_foreign(asset_id.clone())?;
+		XcmForeignAssetIdMapping::<Runtime>::get_multi_location(fid)
 	}
 }
 
@@ -112,7 +99,7 @@
 	// Use this fungibles implementation:
 	ForeignAssets,
 	// Use this currency when it is a fungible asset matching the given location or name:
-	ConvertedConcreteId<AssetIds, Balance, AsInnerId<AssetIds, JustTry>, JustTry>,
+	ConvertedConcreteId<AssetId, Balance, AsInnerId<JustTry>, JustTry>,
 	// Convert an XCM MultiLocation into a local account id:
 	LocationToAccountId,
 	// Our chain's account ID type (we can't get away without mentioning it explicitly):
@@ -154,7 +141,7 @@
 		what: &MultiAsset,
 		who: &MultiLocation,
 		maybe_context: Option<&XcmContext>,
-	) -> Result<xcm_executor::Assets, XcmError> {
+	) -> Result<staging_xcm_executor::Assets, XcmError> {
 		FungiblesTransactor::withdraw_asset(what, who, maybe_context)
 	}
 
@@ -163,7 +150,7 @@
 		from: &MultiLocation,
 		to: &MultiLocation,
 		context: &XcmContext,
-	) -> Result<xcm_executor::Assets, XcmError> {
+	) -> Result<staging_xcm_executor::Assets, XcmError> {
 		FungiblesTransactor::internal_transfer_asset(what, from, to, context)
 	}
 }
@@ -179,15 +166,15 @@
 >;
 
 pub struct CurrencyIdConvert;
-impl Convert<AssetIds, Option<MultiLocation>> for CurrencyIdConvert {
-	fn convert(id: AssetIds) -> Option<MultiLocation> {
+impl Convert<AssetId, Option<MultiLocation>> for CurrencyIdConvert {
+	fn convert(id: AssetId) -> Option<MultiLocation> {
 		match id {
-			AssetIds::NativeAssetId(NativeCurrency::Here) => Some(MultiLocation::new(
+			AssetId::NativeAssetId(NativeCurrency::Here) => Some(MultiLocation::new(
 				1,
 				X1(Parachain(ParachainInfo::get().into())),
 			)),
-			AssetIds::NativeAssetId(NativeCurrency::Parent) => Some(MultiLocation::parent()),
-			AssetIds::ForeignAssetId(foreign_asset_id) => {
+			AssetId::NativeAssetId(NativeCurrency::Parent) => Some(MultiLocation::parent()),
+			AssetId::ForeignAssetId(foreign_asset_id) => {
 				XcmForeignAssetIdMapping::<Runtime>::get_multi_location(foreign_asset_id)
 			}
 		}
@@ -199,11 +186,11 @@
 		if location == MultiLocation::here()
 			|| location == MultiLocation::new(1, X1(Parachain(ParachainInfo::get().into())))
 		{
-			return Some(AssetIds::NativeAssetId(NativeCurrency::Here));
+			return Some(AssetId::NativeAssetId(NativeCurrency::Here));
 		}
 
 		if location == MultiLocation::parent() {
-			return Some(AssetIds::NativeAssetId(NativeCurrency::Parent));
+			return Some(AssetId::NativeAssetId(NativeCurrency::Parent));
 		}
 
 		if let Some(currency_id) = XcmForeignAssetIdMapping::<Runtime>::get_currency_id(location) {
modifiedruntime/common/config/xcm/mod.rsdiffbeforeafterboth
--- a/runtime/common/config/xcm/mod.rs
+++ b/runtime/common/config/xcm/mod.rs
@@ -15,27 +15,32 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use frame_support::{
-	traits::{Everything, Nothing, Get, ConstU32, ProcessMessageError, Contains},
 	parameter_types,
+	traits::{ConstU32, Contains, Everything, Get, Nothing, ProcessMessageError},
 };
 use frame_system::EnsureRoot;
 use pallet_xcm::XcmPassthrough;
-use polkadot_parachain::primitives::Sibling;
-use xcm::latest::{prelude::*, Weight, MultiLocation};
-use xcm::v3::Instruction;
-use xcm_builder::{
-	AccountId32Aliases, EnsureXcmOrigin, FixedWeightBounds, ParentAsSuperuser, RelayChainAsNative,
-	SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
-	SignedToAccountId32, SovereignSignedViaLocation, ParentIsPreset,
+use polkadot_parachain_primitives::primitives::Sibling;
+use sp_std::marker::PhantomData;
+use staging_xcm::{
+	latest::{prelude::*, MultiLocation, Weight},
+	v3::Instruction,
+};
+use staging_xcm_builder::{
+	AccountId32Aliases, EnsureXcmOrigin, FixedWeightBounds, ParentAsSuperuser, ParentIsPreset,
+	RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
+	SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation,
+};
+use staging_xcm_executor::{
+	traits::{Properties, ShouldExecute},
+	XcmExecutor,
 };
-use xcm_executor::{XcmExecutor, traits::ShouldExecute};
-use sp_std::marker::PhantomData;
+use up_common::types::AccountId;
+
 use crate::{
-	Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, ParachainInfo, ParachainSystem, PolkadotXcm,
-	XcmpQueue, xcm_barrier::Barrier, RelayNetwork, AllPalletsWithSystem, Balances,
+	xcm_barrier::Barrier, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem,
+	PolkadotXcm, RelayNetwork, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, XcmpQueue,
 };
-
-use up_common::types::AccountId;
 
 #[cfg(feature = "foreign-assets")]
 pub mod foreignassets;
@@ -45,14 +50,12 @@
 
 #[cfg(feature = "foreign-assets")]
 pub use foreignassets as xcm_assets;
-
 #[cfg(not(feature = "foreign-assets"))]
 pub use nativeassets as xcm_assets;
+use xcm_assets::{AssetTransactor, IsReserve, Trader};
 
 #[cfg(feature = "governance")]
 use crate::runtime_common::config::governance;
-
-use xcm_assets::{AssetTransactor, IsReserve, Trader};
 
 parameter_types! {
 	pub const RelayLocation: MultiLocation = MultiLocation::parent();
@@ -153,10 +156,10 @@
 		origin: &MultiLocation,
 		message: &mut [Instruction<Call>],
 		max_weight: Weight,
-		weight_credit: &mut Weight,
+		properties: &mut Properties,
 	) -> Result<(), ProcessMessageError> {
 		Deny::try_pass(origin, message)?;
-		Allow::should_execute(origin, message, max_weight, weight_credit)
+		Allow::should_execute(origin, message, max_weight, properties)
 	}
 }
 
@@ -211,7 +214,7 @@
 }
 
 pub struct XcmExecutorConfig<T>(PhantomData<T>);
-impl<T> xcm_executor::Config for XcmExecutorConfig<T>
+impl<T> staging_xcm_executor::Config for XcmExecutorConfig<T>
 where
 	T: pallet_configuration::Config,
 {
@@ -240,6 +243,7 @@
 	type UniversalAliases = Nothing;
 	type CallDispatcher = RuntimeCall;
 	type SafeCallFilter = XcmCallFilter;
+	type Aliasers = Nothing;
 }
 
 #[cfg(feature = "runtime-benchmarks")]
modifiedruntime/common/config/xcm/nativeassets.rsdiffbeforeafterboth
--- a/runtime/common/config/xcm/nativeassets.rs
+++ b/runtime/common/config/xcm/nativeassets.rs
@@ -14,31 +14,28 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
+use cumulus_primitives_core::XcmContext;
 use frame_support::{
-	traits::{tokens::currency::Currency as CurrencyT, OnUnbalanced as OnUnbalancedT, Get},
+	traits::{tokens::currency::Currency as CurrencyT, Get, OnUnbalanced as OnUnbalancedT},
 	weights::WeightToFeePolynomial,
 };
-use sp_runtime::traits::{CheckedConversion, Zero, Convert};
-use xcm::latest::{
-	AssetId::{Concrete},
-	Fungibility::Fungible as XcmFungible,
-	MultiAsset, Error as XcmError, Weight,
-	Junction::*,
-	MultiLocation,
-	Junctions::*,
+use pallet_foreign_assets::{AssetIds, NativeCurrency};
+use sp_runtime::traits::{CheckedConversion, Convert, Zero};
+use sp_std::marker::PhantomData;
+use staging_xcm::latest::{
+	AssetId::Concrete, Error as XcmError, Fungibility::Fungible as XcmFungible, Junction::*,
+	Junctions::*, MultiAsset, MultiLocation, Weight,
 };
-use xcm_builder::{CurrencyAdapter, NativeAsset};
-use xcm_executor::{
-	Assets,
+use staging_xcm_builder::{CurrencyAdapter, NativeAsset};
+use staging_xcm_executor::{
 	traits::{MatchesFungible, WeightTrader},
+	Assets,
 };
-use pallet_foreign_assets::{AssetIds, NativeCurrency};
-use sp_std::marker::PhantomData;
-use crate::{Balances, ParachainInfo};
-use super::{LocationToAccountId, RelayLocation};
-
 use up_common::types::{AccountId, Balance};
 
+use super::{LocationToAccountId, RelayLocation};
+use crate::{Balances, ParachainInfo};
+
 pub struct OnlySelfCurrency;
 impl<B: TryFrom<u128>> MatchesFungible<B> for OnlySelfCurrency {
 	fn matches_fungible(a: &MultiAsset) -> Option<B> {
@@ -106,7 +103,12 @@
 		Self(Weight::from_parts(0, 0), Zero::zero(), PhantomData)
 	}
 
-	fn buy_weight(&mut self, _weight: Weight, payment: Assets) -> Result<Assets, XcmError> {
+	fn buy_weight(
+		&mut self,
+		_weight: Weight,
+		payment: Assets,
+		_xcm: &XcmContext,
+	) -> Result<Assets, XcmError> {
 		Ok(payment)
 	}
 }
modifiedruntime/common/construct_runtime.rsdiffbeforeafterboth
--- a/runtime/common/construct_runtime.rs
+++ b/runtime/common/construct_runtime.rs
@@ -19,11 +19,7 @@
 	() => {
 		frame_support::construct_runtime! {
 
-			pub enum Runtime where
-				Block = Block,
-				NodeBlock = opaque::Block,
-				UncheckedExtrinsic = UncheckedExtrinsic
-			{
+			pub enum Runtime {
 				System: frame_system = 0,
 				StateTrieMigration: pallet_state_trie_migration = 1,
 
modifiedruntime/common/dispatch.rsdiffbeforeafterboth
--- a/runtime/common/dispatch.rs
+++ b/runtime/common/dispatch.rs
@@ -15,28 +15,27 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use frame_support::{dispatch::DispatchResult, ensure, fail};
-use pallet_evm::{PrecompileHandle, PrecompileResult};
-use sp_core::H160;
-use sp_runtime::DispatchError;
-use sp_std::{borrow::ToOwned, vec::Vec};
+use pallet_balances_adapter::NativeFungibleHandle;
+pub use pallet_common::dispatch::CollectionDispatch;
+#[cfg(not(feature = "refungible"))]
+use pallet_common::unsupported;
 use pallet_common::{
-	CollectionById, CollectionHandle, CommonCollectionOperations, erc::CommonEvmHandler,
-	eth::map_eth_to_id,
+	erc::CommonEvmHandler, eth::map_eth_to_id, CollectionById, CollectionHandle,
+	CommonCollectionOperations,
 };
-pub use pallet_common::dispatch::CollectionDispatch;
-use pallet_fungible::{Pallet as PalletFungible, FungibleHandle};
-use pallet_balances_adapter::NativeFungibleHandle;
-use pallet_nonfungible::{Pallet as PalletNonfungible, NonfungibleHandle};
+use pallet_evm::{PrecompileHandle, PrecompileResult};
+use pallet_fungible::{FungibleHandle, Pallet as PalletFungible};
+use pallet_nonfungible::{NonfungibleHandle, Pallet as PalletNonfungible};
 use pallet_refungible::{
-	Pallet as PalletRefungible, RefungibleHandle, erc_token::RefungibleTokenHandle,
+	erc_token::RefungibleTokenHandle, Pallet as PalletRefungible, RefungibleHandle,
 };
+use sp_core::H160;
+use sp_runtime::DispatchError;
+use sp_std::{borrow::ToOwned, vec::Vec};
 use up_data_structs::{
-	CollectionMode, CreateCollectionData, MAX_DECIMAL_POINTS, mapping::TokenAddressMapping,
-	CollectionId,
+	mapping::TokenAddressMapping, CollectionId, CollectionMode, CreateCollectionData,
+	MAX_DECIMAL_POINTS,
 };
-
-#[cfg(not(feature = "refungible"))]
-use pallet_common::unsupported;
 
 pub enum CollectionDispatchT<T>
 where
modifiedruntime/common/ethereum/precompiles/mod.rsdiffbeforeafterboth
--- a/runtime/common/ethereum/precompiles/mod.rs
+++ b/runtime/common/ethereum/precompiles/mod.rs
@@ -14,11 +14,12 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use pallet_evm::{Precompile, PrecompileHandle, PrecompileResult, PrecompileSet, IsPrecompileResult};
+use pallet_evm::{
+	IsPrecompileResult, Precompile, PrecompileHandle, PrecompileResult, PrecompileSet,
+};
+use pallet_evm_precompile_simple::ECRecover;
 use sp_core::H160;
 use sp_std::marker::PhantomData;
-
-use pallet_evm_precompile_simple::{ECRecover};
 use sr25519::Sr25519Precompile;
 
 mod sr25519;
modifiedruntime/common/ethereum/precompiles/sr25519.rsdiffbeforeafterboth
--- a/runtime/common/ethereum/precompiles/sr25519.rs
+++ b/runtime/common/ethereum/precompiles/sr25519.rs
@@ -17,8 +17,7 @@
 use fp_evm::{Context, ExitSucceed, PrecompileHandle, PrecompileOutput};
 use pallet_evm::Precompile;
 use sp_core::{crypto::UncheckedFrom, sr25519, H256};
-use sp_std::marker::PhantomData;
-use sp_std::prelude::*;
+use sp_std::{marker::PhantomData, prelude::*};
 
 use super::utils::{Bytes, EvmDataReader, EvmDataWriter, EvmResult, FunctionModifier, Gasometer};
 
modifiedruntime/common/ethereum/precompiles/utils/data.rsdiffbeforeafterboth
--- a/runtime/common/ethereum/precompiles/utils/data.rs
+++ b/runtime/common/ethereum/precompiles/utils/data.rs
@@ -16,12 +16,12 @@
 // You should have received a copy of the GNU General Public License
 // along with Utils.  If not, see <http://www.gnu.org/licenses/>.
 
-use super::{EvmResult, Gasometer};
+use core::{any::type_name, ops::Range};
 
-use sp_std::borrow::ToOwned;
-use core::{any::type_name, ops::Range};
 use sp_core::{H160, H256, U256};
-use sp_std::{convert::TryInto, vec, vec::Vec};
+use sp_std::{borrow::ToOwned, convert::TryInto, vec, vec::Vec};
+
+use super::{EvmResult, Gasometer};
 
 /// The `address` type of Solidity.
 /// H160 could represent 2 types of data (bytes20 and address) that are not encoded the same way.
modifiedruntime/common/ethereum/precompiles/utils/macro/Cargo.tomldiffbeforeafterboth
--- a/runtime/common/ethereum/precompiles/utils/macro/Cargo.toml
+++ b/runtime/common/ethereum/precompiles/utils/macro/Cargo.toml
@@ -9,7 +9,7 @@
 proc-macro = true
 
 [dependencies]
-num_enum = { version = "0.5.3", default-features = false }
+num_enum = { version = "0.7.0", default-features = false }
 proc-macro2 = "1.0"
 quote = "1.0"
 sha3 = "0.8"
modifiedruntime/common/ethereum/precompiles/utils/macro/src/lib.rsdiffbeforeafterboth
--- a/runtime/common/ethereum/precompiles/utils/macro/src/lib.rs
+++ b/runtime/common/ethereum/precompiles/utils/macro/src/lib.rs
@@ -19,11 +19,12 @@
 #![crate_type = "proc-macro"]
 extern crate proc_macro;
 
+use std::convert::TryInto;
+
 use proc_macro::TokenStream;
 use proc_macro2::Literal;
 use quote::{quote, quote_spanned};
 use sha3::{Digest, Keccak256};
-use std::convert::TryInto;
 use syn::{parse_macro_input, spanned::Spanned, Expr, ExprLit, Ident, ItemEnum, Lit};
 
 /// This macro allows to associate to each variant of an enumeration a discriminant (of type u32
modifiedruntime/common/ethereum/precompiles/utils/mod.rsdiffbeforeafterboth
--- a/runtime/common/ethereum/precompiles/utils/mod.rs
+++ b/runtime/common/ethereum/precompiles/utils/mod.rs
@@ -16,10 +16,9 @@
 // You should have received a copy of the GNU General Public License
 // along with Utils.  If not, see <http://www.gnu.org/licenses/>.
 
-use sp_std::borrow::ToOwned;
 use fp_evm::{Context, ExitRevert, PrecompileFailure};
 use sp_core::U256;
-use sp_std::marker::PhantomData;
+use sp_std::{borrow::ToOwned, marker::PhantomData};
 
 mod data;
 
modifiedruntime/common/ethereum/self_contained_call.rsdiffbeforeafterboth
--- a/runtime/common/ethereum/self_contained_call.rs
+++ b/runtime/common/ethereum/self_contained_call.rs
@@ -16,11 +16,12 @@
 
 use sp_core::H160;
 use sp_runtime::{
-	traits::{Dispatchable, DispatchInfoOf, PostDispatchInfoOf},
-	transaction_validity::{TransactionValidityError, TransactionValidity, InvalidTransaction},
+	traits::{DispatchInfoOf, Dispatchable, PostDispatchInfoOf},
+	transaction_validity::{InvalidTransaction, TransactionValidity, TransactionValidityError},
 };
-use crate::{RuntimeOrigin, RuntimeCall, Maintenance};
 
+use crate::{Maintenance, RuntimeCall, RuntimeOrigin};
+
 impl fp_self_contained::SelfContainedCall for RuntimeCall {
 	type SignedInfo = H160;
 
modifiedruntime/common/ethereum/sponsoring.rsdiffbeforeafterboth
--- a/runtime/common/ethereum/sponsoring.rs
+++ b/runtime/common/ethereum/sponsoring.rs
@@ -17,35 +17,36 @@
 //! Implements EVM sponsoring logic via TransactionValidityHack
 
 use core::{convert::TryInto, marker::PhantomData};
-use evm_coder::{Call};
-use pallet_common::{CollectionHandle, eth::map_eth_to_id};
+
+use evm_coder::Call;
+use pallet_common::{eth::map_eth_to_id, CollectionHandle};
 use pallet_evm::account::CrossAccountId;
 use pallet_evm_transaction_payment::CallContext;
+use pallet_fungible::{
+	erc::{ERC20Call, UniqueFungibleCall},
+	Config as FungibleConfig,
+};
 use pallet_nonfungible::{
-	Config as NonfungibleConfig, Pallet as NonfungiblePallet, NonfungibleHandle,
 	erc::{
-		UniqueNFTCall, ERC721UniqueExtensionsCall, ERC721UniqueMintableCall, ERC721Call,
-		TokenPropertiesCall,
+		ERC721Call, ERC721UniqueExtensionsCall, ERC721UniqueMintableCall, TokenPropertiesCall,
+		UniqueNFTCall,
 	},
-};
-use pallet_fungible::{
-	Config as FungibleConfig,
-	erc::{UniqueFungibleCall, ERC20Call},
+	Config as NonfungibleConfig, NonfungibleHandle, Pallet as NonfungiblePallet,
 };
 use pallet_refungible::{
-	Config as RefungibleConfig,
 	erc::UniqueRefungibleCall,
 	erc_token::{RefungibleTokenHandle, UniqueRefungibleTokenCall},
-	RefungibleHandle,
+	Config as RefungibleConfig, RefungibleHandle,
 };
 use pallet_unique::Config as UniqueConfig;
 use sp_std::prelude::*;
 use up_data_structs::{
-	CollectionMode, CreateItemData, CreateNftData, mapping::TokenAddressMapping, TokenId,
+	mapping::TokenAddressMapping, CollectionMode, CreateItemData, CreateNftData, TokenId,
 };
 use up_sponsorship::SponsorshipHandler;
-use crate::{Runtime, runtime_common::sponsoring::*};
 
+use crate::{runtime_common::sponsoring::*, Runtime};
+
 mod refungible;
 
 pub type EvmSponsorshipHandler = (
@@ -206,9 +207,9 @@
 }
 
 mod common {
-	use super::*;
+	use pallet_common::erc::CollectionCall;
 
-	use pallet_common::erc::{CollectionCall};
+	use super::*;
 
 	pub fn collection_call_sponsor<T>(
 		call: CollectionCall<T>,
modifiedruntime/common/ethereum/sponsoring/refungible.rsdiffbeforeafterboth
--- a/runtime/common/ethereum/sponsoring/refungible.rs
+++ b/runtime/common/ethereum/sponsoring/refungible.rs
@@ -19,14 +19,7 @@
 use pallet_common::CollectionHandle;
 use pallet_evm::account::CrossAccountId;
 use pallet_fungible::Config as FungibleConfig;
-use pallet_refungible::Config as RefungibleConfig;
 use pallet_nonfungible::Config as NonfungibleConfig;
-use pallet_unique::Config as UniqueConfig;
-use up_data_structs::{CreateItemData, CreateNftData, TokenId};
-
-use super::common;
-use crate::runtime_common::sponsoring::*;
-
 use pallet_refungible::{
 	erc::{
 		ERC721BurnableCall, ERC721Call, ERC721EnumerableCall, ERC721MetadataCall,
@@ -37,7 +30,13 @@
 		ERC1633Call, ERC20Call, ERC20UniqueExtensionsCall, RefungibleTokenHandle,
 		UniqueRefungibleTokenCall,
 	},
+	Config as RefungibleConfig,
 };
+use pallet_unique::Config as UniqueConfig;
+use up_data_structs::{CreateItemData, CreateNftData, TokenId};
+
+use super::common;
+use crate::runtime_common::sponsoring::*;
 
 pub fn call_sponsor<T>(
 	call: UniqueRefungibleCall<T>,
modifiedruntime/common/identity.rsdiffbeforeafterboth
--- a/runtime/common/identity.rs
+++ b/runtime/common/identity.rs
@@ -14,18 +14,17 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
+use parity_scale_codec::{Decode, Encode};
 use scale_info::TypeInfo;
-use codec::{Encode, Decode};
-use up_common::types::AccountId;
-use crate::RuntimeCall;
-
+#[cfg(feature = "collator-selection")]
+use sp_runtime::transaction_validity::InvalidTransaction;
 use sp_runtime::{
 	traits::{DispatchInfoOf, SignedExtension},
-	transaction_validity::{TransactionValidity, ValidTransaction, TransactionValidityError},
+	transaction_validity::{TransactionValidity, TransactionValidityError, ValidTransaction},
 };
+use up_common::types::AccountId;
 
-#[cfg(feature = "collator-selection")]
-use sp_runtime::transaction_validity::InvalidTransaction;
+use crate::RuntimeCall;
 
 #[derive(Debug, Encode, Decode, PartialEq, Eq, Clone, TypeInfo)]
 pub struct DisableIdentityCalls;
modifiedruntime/common/instance.rsdiffbeforeafterboth
--- a/runtime/common/instance.rs
+++ b/runtime/common/instance.rs
@@ -1,9 +1,7 @@
-use crate::{
-	runtime_common::{config::ethereum::CrossAccountId},
-	Runtime,
-};
 use up_common::types::opaque::RuntimeInstance;
 
+use crate::{runtime_common::config::ethereum::CrossAccountId, Runtime};
+
 impl RuntimeInstance for Runtime {
 	type CrossAccountId = CrossAccountId;
 }
modifiedruntime/common/maintenance.rsdiffbeforeafterboth
--- a/runtime/common/maintenance.rs
+++ b/runtime/common/maintenance.rs
@@ -14,17 +14,17 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
+use parity_scale_codec::{Decode, Encode};
 use scale_info::TypeInfo;
-use codec::{Encode, Decode};
-use up_common::types::AccountId;
-use crate::{RuntimeCall, Maintenance};
-
 use sp_runtime::{
 	traits::{DispatchInfoOf, SignedExtension},
 	transaction_validity::{
-		TransactionValidity, ValidTransaction, InvalidTransaction, TransactionValidityError,
+		InvalidTransaction, TransactionValidity, TransactionValidityError, ValidTransaction,
 	},
 };
+use up_common::types::AccountId;
+
+use crate::{Maintenance, RuntimeCall};
 
 #[derive(Debug, Encode, Decode, PartialEq, Eq, Clone, TypeInfo)]
 pub struct CheckMaintenance;
@@ -66,9 +66,6 @@
 				| RuntimeCall::Inflation(_)
 				| RuntimeCall::Structure(_)
 				| RuntimeCall::Unique(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
-
-				#[cfg(feature = "unique-scheduler")]
-				RuntimeCall::Scheduler(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
 
 				#[cfg(feature = "app-promotion")]
 				RuntimeCall::AppPromotion(_) => {
modifiedruntime/common/mod.rsdiffbeforeafterboth
--- a/runtime/common/mod.rs
+++ b/runtime/common/mod.rs
@@ -23,9 +23,6 @@
 pub mod maintenance;
 pub mod runtime_apis;
 
-#[cfg(feature = "unique-scheduler")]
-pub mod scheduler;
-
 pub mod sponsoring;
 #[allow(missing_docs)]
 pub mod weights;
@@ -33,26 +30,23 @@
 #[cfg(test)]
 pub mod tests;
 
-use sp_core::H160;
 use frame_support::{
-	traits::{Currency, OnUnbalanced, Imbalance},
+	traits::{Currency, Imbalance, OnUnbalanced},
 	weights::Weight,
 };
 use sp_runtime::{
-	generic,
+	generic, impl_opaque_keys,
 	traits::{BlakeTwo256, BlockNumberProvider},
-	impl_opaque_keys,
 };
 use sp_std::vec::Vec;
-
 #[cfg(feature = "std")]
 use sp_version::NativeVersion;
+use up_common::types::{AccountId, BlockNumber};
 
 use crate::{
-	Runtime, RuntimeCall, Balances, Treasury, Aura, Signature, AllPalletsWithSystem,
-	InherentDataExt,
+	AllPalletsWithSystem, Aura, Balances, InherentDataExt, Runtime, RuntimeCall, Signature,
+	Treasury,
 };
-use up_common::types::{AccountId, BlockNumber};
 
 #[macro_export]
 macro_rules! unsupported {
@@ -63,12 +57,15 @@
 
 /// The address format for describing accounts.
 pub type Address = sp_runtime::MultiAddress<AccountId, ()>;
-/// Block header type as expected by this runtime.
+/// A Block signed with a Justification
+pub type SignedBlock = generic::SignedBlock<Block>;
+/// Frontier wrapped extrinsic
+pub type UncheckedExtrinsic =
+	fp_self_contained::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
+/// Header type.
 pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
-/// Block type as expected by this runtime.
+/// Block type.
 pub type Block = generic::Block<Header, UncheckedExtrinsic>;
-/// A Block signed with a Justification
-pub type SignedBlock = generic::SignedBlock<Block>;
 /// BlockId type as expected by this runtime.
 pub type BlockId = generic::BlockId<Block>;
 
@@ -103,14 +100,6 @@
 	pallet_ethereum::FakeTransactionFinalizer<Runtime>,
 );
 
-/// Unchecked extrinsic type as expected by this runtime.
-pub type UncheckedExtrinsic =
-	fp_self_contained::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
-
-/// Extrinsic type that has already been checked.
-pub type CheckedExtrinsic =
-	fp_self_contained::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra, H160>;
-
 /// Executive: handles dispatch to the various modules.
 pub type Executive = frame_executive::Executive<
 	Runtime,
@@ -180,7 +169,7 @@
 	}
 }
 
-#[derive(codec::Encode, codec::Decode)]
+#[derive(parity_scale_codec::Encode, parity_scale_codec::Decode)]
 pub enum XCMPMessage<XAccountId, XBalance> {
 	/// Transfer tokens to the given account from the Parachain account.
 	TransferToken(XAccountId, XBalance),
@@ -191,9 +180,10 @@
 	fn on_runtime_upgrade() -> Weight {
 		#[cfg(feature = "collator-selection")]
 		{
-			use frame_support::{BoundedVec, storage::migration};
-			use sp_runtime::{traits::OpaqueKeys, RuntimeAppPublic};
+			use frame_support::{storage::migration, BoundedVec};
 			use pallet_session::SessionManager;
+			use sp_runtime::{traits::OpaqueKeys, RuntimeAppPublic};
+
 			use crate::config::pallets::MaxCollators;
 
 			let mut weight = <Runtime as frame_system::Config>::DbWeight::get().reads(1);
modifiedruntime/common/runtime_apis.rsdiffbeforeafterboth
--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -26,713 +26,669 @@
 
 #[macro_export]
 macro_rules! impl_common_runtime_apis {
-    (
-        $(
-            #![custom_apis]
+	(
+		$(
+			#![custom_apis]
 
-            $($custom_apis:tt)+
-        )?
-    ) => {
-        use sp_std::prelude::*;
-        use sp_api::impl_runtime_apis;
-        use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H256, U256, H160};
-        use sp_runtime::{
-            Permill,
-            traits::{Block as BlockT},
-            transaction_validity::{TransactionSource, TransactionValidity},
-            ApplyExtrinsicResult, DispatchError,
-        };
-        use frame_support::{
-            pallet_prelude::Weight,
-            traits::OnFinalize,
-        };
-        use fp_rpc::TransactionStatus;
-        use pallet_transaction_payment::{
-            FeeDetails, RuntimeDispatchInfo,
-        };
-        use pallet_evm::{
-            Runner, account::CrossAccountId as _,
-            Account as EVMAccount, FeeCalculator,
-        };
-        use runtime_common::{
-            sponsoring::{SponsorshipPredict, UniqueSponsorshipPredict},
-            dispatch::CollectionDispatch,
-            config::ethereum::CrossAccountId,
-        };
-        use up_data_structs::*;
+			$($custom_apis:tt)+
+		)?
+	) => {
+		use sp_std::prelude::*;
+		use sp_api::impl_runtime_apis;
+		use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H256, U256, H160};
+		use sp_runtime::{
+			Permill,
+			traits::{Block as BlockT},
+			transaction_validity::{TransactionSource, TransactionValidity},
+			ApplyExtrinsicResult, DispatchError,
+		};
+		use frame_support::{
+			pallet_prelude::Weight,
+			traits::OnFinalize,
+		};
+		use fp_rpc::TransactionStatus;
+		use pallet_transaction_payment::{
+			FeeDetails, RuntimeDispatchInfo,
+		};
+		use pallet_evm::{
+			Runner, account::CrossAccountId as _,
+			Account as EVMAccount, FeeCalculator,
+		};
+		use runtime_common::{
+			sponsoring::{SponsorshipPredict, UniqueSponsorshipPredict},
+			dispatch::CollectionDispatch,
+			config::ethereum::CrossAccountId,
+		};
+		use up_data_structs::*;
 
+		impl_runtime_apis! {
+			$($($custom_apis)+)?
 
-        impl_runtime_apis! {
-            $($($custom_apis)+)?
+			impl up_rpc::UniqueApi<Block, CrossAccountId, AccountId> for Runtime {
+				fn account_tokens(collection: CollectionId, account: CrossAccountId) -> Result<Vec<TokenId>, DispatchError> {
+					dispatch_unique_runtime!(collection.account_tokens(account))
+				}
+				fn collection_tokens(collection: CollectionId) -> Result<Vec<TokenId>, DispatchError> {
+					dispatch_unique_runtime!(collection.collection_tokens())
+				}
+				fn token_exists(collection: CollectionId, token: TokenId) -> Result<bool, DispatchError> {
+					dispatch_unique_runtime!(collection.token_exists(token))
+				}
 
-            impl up_rpc::UniqueApi<Block, CrossAccountId, AccountId> for Runtime {
-                fn account_tokens(collection: CollectionId, account: CrossAccountId) -> Result<Vec<TokenId>, DispatchError> {
-                    dispatch_unique_runtime!(collection.account_tokens(account))
-                }
-                fn collection_tokens(collection: CollectionId) -> Result<Vec<TokenId>, DispatchError> {
-                    dispatch_unique_runtime!(collection.collection_tokens())
-                }
-                fn token_exists(collection: CollectionId, token: TokenId) -> Result<bool, DispatchError> {
-                    dispatch_unique_runtime!(collection.token_exists(token))
-                }
+				fn token_owner(collection: CollectionId, token: TokenId) -> Result<Option<CrossAccountId>, DispatchError> {
+					dispatch_unique_runtime!(collection.token_owner(token).ok())
+				}
 
-                fn token_owner(collection: CollectionId, token: TokenId) -> Result<Option<CrossAccountId>, DispatchError> {
-                    dispatch_unique_runtime!(collection.token_owner(token).ok())
-                }
+				fn token_owners(collection: CollectionId, token: TokenId) -> Result<Vec::<CrossAccountId>, DispatchError>  {
+					dispatch_unique_runtime!(collection.token_owners(token))
+				}
 
-                fn token_owners(collection: CollectionId, token: TokenId) -> Result<Vec::<CrossAccountId>, DispatchError>  {
-                   dispatch_unique_runtime!(collection.token_owners(token))
-                }
+				fn topmost_token_owner(collection: CollectionId, token: TokenId) -> Result<Option<CrossAccountId>, DispatchError> {
+					let budget = up_data_structs::budget::Value::new(10);
 
-                fn topmost_token_owner(collection: CollectionId, token: TokenId) -> Result<Option<CrossAccountId>, DispatchError> {
-                    let budget = up_data_structs::budget::Value::new(10);
+					<pallet_structure::Pallet<Runtime>>::find_topmost_owner(collection, token, &budget)
+				}
+				fn token_children(collection: CollectionId, token: TokenId) -> Result<Vec<TokenChild>, DispatchError> {
+					Ok(<pallet_nonfungible::Pallet<Runtime>>::token_children_ids(collection, token))
+				}
+				fn collection_properties(
+					collection: CollectionId,
+					keys: Option<Vec<Vec<u8>>>
+				) -> Result<Vec<Property>, DispatchError> {
+					let keys = keys.map(
+						|keys| Common::bytes_keys_to_property_keys(keys)
+					).transpose()?;
 
-                    <pallet_structure::Pallet<Runtime>>::find_topmost_owner(collection, token, &budget)
-                }
-                fn token_children(collection: CollectionId, token: TokenId) -> Result<Vec<TokenChild>, DispatchError> {
-                    Ok(<pallet_nonfungible::Pallet<Runtime>>::token_children_ids(collection, token))
-                }
-                fn collection_properties(
-                    collection: CollectionId,
-                    keys: Option<Vec<Vec<u8>>>
-                ) -> Result<Vec<Property>, DispatchError> {
-                    let keys = keys.map(
-                        |keys| Common::bytes_keys_to_property_keys(keys)
-                    ).transpose()?;
+					Common::filter_collection_properties(collection, keys)
+				}
 
-                    Common::filter_collection_properties(collection, keys)
-                }
+				fn token_properties(
+					collection: CollectionId,
+					token_id: TokenId,
+					keys: Option<Vec<Vec<u8>>>
+				) -> Result<Vec<Property>, DispatchError> {
+					let keys = keys.map(
+						|keys| Common::bytes_keys_to_property_keys(keys)
+					).transpose()?;
 
-                fn token_properties(
-                    collection: CollectionId,
-                    token_id: TokenId,
-                    keys: Option<Vec<Vec<u8>>>
-                ) -> Result<Vec<Property>, DispatchError> {
-                    let keys = keys.map(
-                        |keys| Common::bytes_keys_to_property_keys(keys)
-                    ).transpose()?;
+					dispatch_unique_runtime!(collection.token_properties(token_id, keys))
+				}
 
-                    dispatch_unique_runtime!(collection.token_properties(token_id, keys))
-                }
+				fn property_permissions(
+					collection: CollectionId,
+					keys: Option<Vec<Vec<u8>>>
+				) -> Result<Vec<PropertyKeyPermission>, DispatchError> {
+					let keys = keys.map(
+						|keys| Common::bytes_keys_to_property_keys(keys)
+					).transpose()?;
 
-                fn property_permissions(
-                    collection: CollectionId,
-                    keys: Option<Vec<Vec<u8>>>
-                ) -> Result<Vec<PropertyKeyPermission>, DispatchError> {
-                    let keys = keys.map(
-                        |keys| Common::bytes_keys_to_property_keys(keys)
-                    ).transpose()?;
+					Common::filter_property_permissions(collection, keys)
+				}
 
-                    Common::filter_property_permissions(collection, keys)
-                }
+				fn token_data(
+					collection: CollectionId,
+					token_id: TokenId,
+					keys: Option<Vec<Vec<u8>>>
+				) -> Result<TokenData<CrossAccountId>, DispatchError> {
+					let token_data = TokenData {
+						properties: Self::token_properties(collection, token_id, keys)?,
+						owner: Self::token_owner(collection, token_id)?,
+						pieces: Self::total_pieces(collection, token_id)?.unwrap_or(0),
+					};
 
-                fn token_data(
-                    collection: CollectionId,
-                    token_id: TokenId,
-                    keys: Option<Vec<Vec<u8>>>
-                ) -> Result<TokenData<CrossAccountId>, DispatchError> {
-                    let token_data = TokenData {
-                        properties: Self::token_properties(collection, token_id, keys)?,
-                        owner: Self::token_owner(collection, token_id)?,
-                        pieces: Self::total_pieces(collection, token_id)?.unwrap_or(0),
-                    };
+					Ok(token_data)
+				}
 
-                    Ok(token_data)
-                }
+				fn total_supply(collection: CollectionId) -> Result<u32, DispatchError> {
+					dispatch_unique_runtime!(collection.total_supply())
+				}
+				fn account_balance(collection: CollectionId, account: CrossAccountId) -> Result<u32, DispatchError> {
+					dispatch_unique_runtime!(collection.account_balance(account))
+				}
+				fn balance(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Result<u128, DispatchError> {
+					dispatch_unique_runtime!(collection.balance(account, token))
+				}
+				fn allowance(
+					collection: CollectionId,
+					sender: CrossAccountId,
+					spender: CrossAccountId,
+					token: TokenId,
+				) -> Result<u128, DispatchError> {
+					dispatch_unique_runtime!(collection.allowance(sender, spender, token))
+				}
 
-                fn total_supply(collection: CollectionId) -> Result<u32, DispatchError> {
-                    dispatch_unique_runtime!(collection.total_supply())
-                }
-                fn account_balance(collection: CollectionId, account: CrossAccountId) -> Result<u32, DispatchError> {
-                    dispatch_unique_runtime!(collection.account_balance(account))
-                }
-                fn balance(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Result<u128, DispatchError> {
-                    dispatch_unique_runtime!(collection.balance(account, token))
-                }
-                fn allowance(
-                    collection: CollectionId,
-                    sender: CrossAccountId,
-                    spender: CrossAccountId,
-                    token: TokenId,
-                ) -> Result<u128, DispatchError> {
-                    dispatch_unique_runtime!(collection.allowance(sender, spender, token))
-                }
+				fn adminlist(collection: CollectionId) -> Result<Vec<CrossAccountId>, DispatchError> {
+					Ok(<pallet_common::Pallet<Runtime>>::adminlist(collection))
+				}
+				fn allowlist(collection: CollectionId) -> Result<Vec<CrossAccountId>, DispatchError> {
+					Ok(<pallet_common::Pallet<Runtime>>::allowlist(collection))
+				}
+				fn allowed(collection: CollectionId, user: CrossAccountId) -> Result<bool, DispatchError> {
+					Ok(<pallet_common::Pallet<Runtime>>::allowed(collection, user))
+				}
+				fn last_token_id(collection: CollectionId) -> Result<TokenId, DispatchError> {
+					dispatch_unique_runtime!(collection.last_token_id())
+				}
+				fn collection_by_id(collection: CollectionId) -> Result<Option<RpcCollection<AccountId>>, DispatchError> {
+					Ok(<pallet_common::Pallet<Runtime>>::rpc_collection(collection))
+				}
+				fn collection_stats() -> Result<CollectionStats, DispatchError> {
+					Ok(<pallet_common::Pallet<Runtime>>::collection_stats())
+				}
+				fn next_sponsored(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Result<Option<u64>, DispatchError> {
+					Ok(<UniqueSponsorshipPredict<Runtime> as SponsorshipPredict<Runtime>>::predict(
+						collection,
+						account,
+						token
+					))
+				}
 
-                fn adminlist(collection: CollectionId) -> Result<Vec<CrossAccountId>, DispatchError> {
-                    Ok(<pallet_common::Pallet<Runtime>>::adminlist(collection))
-                }
-                fn allowlist(collection: CollectionId) -> Result<Vec<CrossAccountId>, DispatchError> {
-                    Ok(<pallet_common::Pallet<Runtime>>::allowlist(collection))
-                }
-                fn allowed(collection: CollectionId, user: CrossAccountId) -> Result<bool, DispatchError> {
-                    Ok(<pallet_common::Pallet<Runtime>>::allowed(collection, user))
-                }
-                fn last_token_id(collection: CollectionId) -> Result<TokenId, DispatchError> {
-                    dispatch_unique_runtime!(collection.last_token_id())
-                }
-                fn collection_by_id(collection: CollectionId) -> Result<Option<RpcCollection<AccountId>>, DispatchError> {
-                    Ok(<pallet_common::Pallet<Runtime>>::rpc_collection(collection))
-                }
-                fn collection_stats() -> Result<CollectionStats, DispatchError> {
-                    Ok(<pallet_common::Pallet<Runtime>>::collection_stats())
-                }
-                fn next_sponsored(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Result<Option<u64>, DispatchError> {
-                    Ok(<UniqueSponsorshipPredict<Runtime> as SponsorshipPredict<Runtime>>::predict(
-                        collection,
-                        account,
-                        token
-                    ))
-                }
+				fn effective_collection_limits(collection: CollectionId) -> Result<Option<CollectionLimits>, DispatchError> {
+					Ok(<pallet_common::Pallet<Runtime>>::effective_collection_limits(collection))
+				}
 
-                fn effective_collection_limits(collection: CollectionId) -> Result<Option<CollectionLimits>, DispatchError> {
-                    Ok(<pallet_common::Pallet<Runtime>>::effective_collection_limits(collection))
-                }
+				fn total_pieces(collection: CollectionId, token_id: TokenId) -> Result<Option<u128>, DispatchError> {
+					dispatch_unique_runtime!(collection.total_pieces(token_id))
+				}
 
-                fn total_pieces(collection: CollectionId, token_id: TokenId) -> Result<Option<u128>, DispatchError> {
-                    dispatch_unique_runtime!(collection.total_pieces(token_id))
-                }
+				fn allowance_for_all(collection: CollectionId, owner: CrossAccountId, operator: CrossAccountId) -> Result<bool, DispatchError> {
+					dispatch_unique_runtime!(collection.allowance_for_all(owner, operator))
+				}
+			}
 
-		        fn allowance_for_all(collection: CollectionId, owner: CrossAccountId, operator: CrossAccountId) -> Result<bool, DispatchError> {
-                    dispatch_unique_runtime!(collection.allowance_for_all(owner, operator))
-                }
-            }
+			impl app_promotion_rpc::AppPromotionApi<Block, BlockNumber, CrossAccountId, AccountId> for Runtime {
+				#[allow(unused_variables)]
+				fn total_staked(staker: Option<CrossAccountId>) -> Result<u128, DispatchError> {
+					#[cfg(not(feature = "app-promotion"))]
+					return unsupported!();
 
-            impl app_promotion_rpc::AppPromotionApi<Block, BlockNumber, CrossAccountId, AccountId> for Runtime {
-                #[allow(unused_variables)]
-                fn total_staked(staker: Option<CrossAccountId>) -> Result<u128, DispatchError> {
-                    #[cfg(not(feature = "app-promotion"))]
-                    return unsupported!();
+					#[cfg(feature = "app-promotion")]
+					return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_total_staked(staker).unwrap_or_default());
+				}
 
-                    #[cfg(feature = "app-promotion")]
-                    return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_total_staked(staker).unwrap_or_default());
-                }
+				#[allow(unused_variables)]
+				fn total_staked_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>, DispatchError> {
+					#[cfg(not(feature = "app-promotion"))]
+					return unsupported!();
 
-                #[allow(unused_variables)]
-                fn total_staked_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>, DispatchError> {
-                    #[cfg(not(feature = "app-promotion"))]
-                    return unsupported!();
+					#[cfg(feature = "app-promotion")]
+					return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_total_staked_per_block(staker));
+				}
 
-                    #[cfg(feature = "app-promotion")]
-                    return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_total_staked_per_block(staker));
-                }
+				#[allow(unused_variables)]
+				fn pending_unstake(staker: Option<CrossAccountId>) -> Result<u128, DispatchError> {
+					#[cfg(not(feature = "app-promotion"))]
+					return unsupported!();
 
-                #[allow(unused_variables)]
-                fn pending_unstake(staker: Option<CrossAccountId>) -> Result<u128, DispatchError> {
-                    #[cfg(not(feature = "app-promotion"))]
-                    return unsupported!();
+					#[cfg(feature = "app-promotion")]
+					return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_pending_unstake(staker));
+				}
 
-                    #[cfg(feature = "app-promotion")]
-                    return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_pending_unstake(staker));
-                }
+				#[allow(unused_variables)]
+				fn pending_unstake_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>, DispatchError> {
+					#[cfg(not(feature = "app-promotion"))]
+					return unsupported!();
 
-                #[allow(unused_variables)]
-                fn pending_unstake_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>, DispatchError> {
-                    #[cfg(not(feature = "app-promotion"))]
-                    return unsupported!();
+					#[cfg(feature = "app-promotion")]
+					return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_pending_unstake_per_block(staker))
+				}
+			}
 
-                    #[cfg(feature = "app-promotion")]
-                    return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_pending_unstake_per_block(staker))
-                }
-            }
+			impl sp_api::Core<Block> for Runtime {
+				fn version() -> RuntimeVersion {
+					VERSION
+				}
 
-            impl sp_api::Core<Block> for Runtime {
-                fn version() -> RuntimeVersion {
-                    VERSION
-                }
+				fn execute_block(block: Block) {
+					Executive::execute_block(block)
+				}
 
-                fn execute_block(block: Block) {
-                    Executive::execute_block(block)
-                }
+				fn initialize_block(header: &<Block as BlockT>::Header) {
+					Executive::initialize_block(header)
+				}
+			}
 
-                fn initialize_block(header: &<Block as BlockT>::Header) {
-                    Executive::initialize_block(header)
-                }
-            }
+			impl sp_api::Metadata<Block> for Runtime {
+				fn metadata() -> OpaqueMetadata {
+					OpaqueMetadata::new(Runtime::metadata().into())
+				}
 
-            impl sp_api::Metadata<Block> for Runtime {
-                fn metadata() -> OpaqueMetadata {
-                    OpaqueMetadata::new(Runtime::metadata().into())
-                }
+				fn metadata_at_version(version: u32) -> Option<OpaqueMetadata> {
+					Runtime::metadata_at_version(version)
+				}
 
-                fn metadata_at_version(version: u32) -> Option<OpaqueMetadata> {
-                    Runtime::metadata_at_version(version)
-                }
+				fn metadata_versions() -> sp_std::vec::Vec<u32> {
+					Runtime::metadata_versions()
+				}
+			}
 
-                fn metadata_versions() -> sp_std::vec::Vec<u32> {
-                    Runtime::metadata_versions()
-                }
-            }
+			impl sp_block_builder::BlockBuilder<Block> for Runtime {
+				fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
+					Executive::apply_extrinsic(extrinsic)
+				}
 
-            impl sp_block_builder::BlockBuilder<Block> for Runtime {
-                fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
-                    Executive::apply_extrinsic(extrinsic)
-                }
+				fn finalize_block() -> <Block as BlockT>::Header {
+					Executive::finalize_block()
+				}
 
-                fn finalize_block() -> <Block as BlockT>::Header {
-                    Executive::finalize_block()
-                }
+				fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {
+					data.create_extrinsics()
+				}
 
-                fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {
-                    data.create_extrinsics()
-                }
+				fn check_inherents(
+					block: Block,
+					data: sp_inherents::InherentData,
+				) -> sp_inherents::CheckInherentsResult {
+					data.check_extrinsics(&block)
+				}
 
-                fn check_inherents(
-                    block: Block,
-                    data: sp_inherents::InherentData,
-                ) -> sp_inherents::CheckInherentsResult {
-                    data.check_extrinsics(&block)
-                }
+				// fn random_seed() -> <Block as BlockT>::Hash {
+				//	   RandomnessCollectiveFlip::random_seed().0
+				// }
+			}
 
-                // fn random_seed() -> <Block as BlockT>::Hash {
-                //     RandomnessCollectiveFlip::random_seed().0
-                // }
-            }
+			impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
+				fn validate_transaction(
+					source: TransactionSource,
+					tx: <Block as BlockT>::Extrinsic,
+					hash: <Block as BlockT>::Hash,
+				) -> TransactionValidity {
+					Executive::validate_transaction(source, tx, hash)
+				}
+			}
 
-            impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
-                fn validate_transaction(
-                    source: TransactionSource,
-                    tx: <Block as BlockT>::Extrinsic,
-                    hash: <Block as BlockT>::Hash,
-                ) -> TransactionValidity {
-                    Executive::validate_transaction(source, tx, hash)
-                }
-            }
+			impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
+				fn offchain_worker(header: &<Block as BlockT>::Header) {
+					Executive::offchain_worker(header)
+				}
+			}
 
-            impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
-                fn offchain_worker(header: &<Block as BlockT>::Header) {
-                    Executive::offchain_worker(header)
-                }
-            }
+			impl fp_rpc::EthereumRuntimeRPCApi<Block> for Runtime {
+				fn chain_id() -> u64 {
+					<Runtime as pallet_evm::Config>::ChainId::get()
+				}
 
-            impl fp_rpc::EthereumRuntimeRPCApi<Block> for Runtime {
-                fn chain_id() -> u64 {
-                    <Runtime as pallet_evm::Config>::ChainId::get()
-                }
+				fn account_basic(address: H160) -> EVMAccount {
+					let (account, _) = EVM::account_basic(&address);
+					account
+				}
 
-                fn account_basic(address: H160) -> EVMAccount {
-                    let (account, _) = EVM::account_basic(&address);
-                    account
-                }
+				fn gas_price() -> U256 {
+					let (price, _) = <Runtime as pallet_evm::Config>::FeeCalculator::min_gas_price();
+					price
+				}
 
-                fn gas_price() -> U256 {
-                    let (price, _) = <Runtime as pallet_evm::Config>::FeeCalculator::min_gas_price();
-                    price
-                }
+				fn account_code_at(address: H160) -> Vec<u8> {
+					use pallet_evm::OnMethodCall;
+					<Runtime as pallet_evm::Config>::OnMethodCall::get_code(&address)
+						.unwrap_or_else(|| pallet_evm::AccountCodes::<Runtime>::get(address))
+				}
 
-                fn account_code_at(address: H160) -> Vec<u8> {
-                    use pallet_evm::OnMethodCall;
-                    <Runtime as pallet_evm::Config>::OnMethodCall::get_code(&address)
-                        .unwrap_or_else(|| pallet_evm::AccountCodes::<Runtime>::get(address))
-                }
+				fn author() -> H160 {
+					<pallet_evm::Pallet<Runtime>>::find_author()
+				}
 
-                fn author() -> H160 {
-                    <pallet_evm::Pallet<Runtime>>::find_author()
-                }
+				fn storage_at(address: H160, index: U256) -> H256 {
+					let mut tmp = [0u8; 32];
+					index.to_big_endian(&mut tmp);
+					pallet_evm::AccountStorages::<Runtime>::get(address, H256::from_slice(&tmp[..]))
+				}
 
-                fn storage_at(address: H160, index: U256) -> H256 {
-                    let mut tmp = [0u8; 32];
-                    index.to_big_endian(&mut tmp);
-                    pallet_evm::AccountStorages::<Runtime>::get(address, H256::from_slice(&tmp[..]))
-                }
+				#[allow(clippy::redundant_closure)]
+				fn call(
+					from: H160,
+					to: H160,
+					data: Vec<u8>,
+					value: U256,
+					gas_limit: U256,
+					max_fee_per_gas: Option<U256>,
+					max_priority_fee_per_gas: Option<U256>,
+					nonce: Option<U256>,
+					estimate: bool,
+					access_list: Option<Vec<(H160, Vec<H256>)>>,
+				) -> Result<pallet_evm::CallInfo, sp_runtime::DispatchError> {
+					let config = if estimate {
+						let mut config = <Runtime as pallet_evm::Config>::config().clone();
+						config.estimate = true;
+						Some(config)
+					} else {
+						None
+					};
 
-                #[allow(clippy::redundant_closure)]
-                fn call(
-                    from: H160,
-                    to: H160,
-                    data: Vec<u8>,
-                    value: U256,
-                    gas_limit: U256,
-                    max_fee_per_gas: Option<U256>,
-                    max_priority_fee_per_gas: Option<U256>,
-                    nonce: Option<U256>,
-                    estimate: bool,
-                    access_list: Option<Vec<(H160, Vec<H256>)>>,
-                ) -> Result<pallet_evm::CallInfo, sp_runtime::DispatchError> {
-                    let config = if estimate {
-                        let mut config = <Runtime as pallet_evm::Config>::config().clone();
-                        config.estimate = true;
-                        Some(config)
-                    } else {
-                        None
-                    };
+					let is_transactional = false;
+					let validate = false;
+					<Runtime as pallet_evm::Config>::Runner::call(
+						CrossAccountId::from_eth(from),
+						to,
+						data,
+						value,
+						gas_limit.low_u64(),
+						max_fee_per_gas,
+						max_priority_fee_per_gas,
+						nonce,
+						access_list.unwrap_or_default(),
+						is_transactional,
+						validate,
+						// TODO we probably want to support external cost recording in non-transactional calls
+						None,
+						None,
 
-                    let is_transactional = false;
-                    let validate = false;
-                    <Runtime as pallet_evm::Config>::Runner::call(
-                        CrossAccountId::from_eth(from),
-                        to,
-                        data,
-                        value,
-                        gas_limit.low_u64(),
-                        max_fee_per_gas,
-                        max_priority_fee_per_gas,
-                        nonce,
-                        access_list.unwrap_or_default(),
-                        is_transactional,
-                        validate,
-                        // TODO we probably want to support external cost recording in non-transactional calls
-                        None,
-                        None,
+						config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),
+					).map_err(|err| err.error.into())
+				}
 
-                        config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),
-                    ).map_err(|err| err.error.into())
-                }
+				#[allow(clippy::redundant_closure)]
+				fn create(
+					from: H160,
+					data: Vec<u8>,
+					value: U256,
+					gas_limit: U256,
+					max_fee_per_gas: Option<U256>,
+					max_priority_fee_per_gas: Option<U256>,
+					nonce: Option<U256>,
+					estimate: bool,
+					access_list: Option<Vec<(H160, Vec<H256>)>>,
+				) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {
+					let config = if estimate {
+						let mut config = <Runtime as pallet_evm::Config>::config().clone();
+						config.estimate = true;
+						Some(config)
+					} else {
+						None
+					};
 
-                #[allow(clippy::redundant_closure)]
-                fn create(
-                    from: H160,
-                    data: Vec<u8>,
-                    value: U256,
-                    gas_limit: U256,
-                    max_fee_per_gas: Option<U256>,
-                    max_priority_fee_per_gas: Option<U256>,
-                    nonce: Option<U256>,
-                    estimate: bool,
-                    access_list: Option<Vec<(H160, Vec<H256>)>>,
-                ) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {
-                    let config = if estimate {
-                        let mut config = <Runtime as pallet_evm::Config>::config().clone();
-                        config.estimate = true;
-                        Some(config)
-                    } else {
-                        None
-                    };
+					let is_transactional = false;
+					let validate = false;
+					<Runtime as pallet_evm::Config>::Runner::create(
+						CrossAccountId::from_eth(from),
+						data,
+						value,
+						gas_limit.low_u64(),
+						max_fee_per_gas,
+						max_priority_fee_per_gas,
+						nonce,
+						access_list.unwrap_or_default(),
+						is_transactional,
+						validate,
+						// TODO we probably want to support external cost recording in non-transactional calls
+						None,
+						None,
 
-                    let is_transactional = false;
-                    let validate = false;
-                    <Runtime as pallet_evm::Config>::Runner::create(
-                        CrossAccountId::from_eth(from),
-                        data,
-                        value,
-                        gas_limit.low_u64(),
-                        max_fee_per_gas,
-                        max_priority_fee_per_gas,
-                        nonce,
-                        access_list.unwrap_or_default(),
-                        is_transactional,
-                        validate,
-                        // TODO we probably want to support external cost recording in non-transactional calls
-                        None,
-                        None,
+						config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),
+					).map_err(|err| err.error.into())
+				}
 
-                        config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),
-                    ).map_err(|err| err.error.into())
-                }
+				fn current_transaction_statuses() -> Option<Vec<TransactionStatus>> {
+					pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
+				}
 
-                fn current_transaction_statuses() -> Option<Vec<TransactionStatus>> {
-                    pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
-                }
+				fn current_block() -> Option<pallet_ethereum::Block> {
+					pallet_ethereum::CurrentBlock::<Runtime>::get()
+				}
 
-                fn current_block() -> Option<pallet_ethereum::Block> {
-                    pallet_ethereum::CurrentBlock::<Runtime>::get()
-                }
+				fn current_receipts() -> Option<Vec<pallet_ethereum::Receipt>> {
+					pallet_ethereum::CurrentReceipts::<Runtime>::get()
+				}
 
-                fn current_receipts() -> Option<Vec<pallet_ethereum::Receipt>> {
-                    pallet_ethereum::CurrentReceipts::<Runtime>::get()
-                }
+				fn current_all() -> (
+					Option<pallet_ethereum::Block>,
+					Option<Vec<pallet_ethereum::Receipt>>,
+					Option<Vec<TransactionStatus>>
+				) {
+					(
+						pallet_ethereum::CurrentBlock::<Runtime>::get(),
+						pallet_ethereum::CurrentReceipts::<Runtime>::get(),
+						pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
+					)
+				}
 
-                fn current_all() -> (
-                    Option<pallet_ethereum::Block>,
-                    Option<Vec<pallet_ethereum::Receipt>>,
-                    Option<Vec<TransactionStatus>>
-                ) {
-                    (
-                        pallet_ethereum::CurrentBlock::<Runtime>::get(),
-                        pallet_ethereum::CurrentReceipts::<Runtime>::get(),
-                        pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
-                    )
-                }
+				fn extrinsic_filter(xts: Vec<<Block as sp_api::BlockT>::Extrinsic>) -> Vec<pallet_ethereum::Transaction> {
+					xts.into_iter().filter_map(|xt| match xt.0.function {
+						RuntimeCall::Ethereum(pallet_ethereum::Call::transact { transaction }) => Some(transaction),
+						_ => None
+					}).collect()
+				}
 
-                fn extrinsic_filter(xts: Vec<<Block as sp_api::BlockT>::Extrinsic>) -> Vec<pallet_ethereum::Transaction> {
-                    xts.into_iter().filter_map(|xt| match xt.0.function {
-                        RuntimeCall::Ethereum(pallet_ethereum::Call::transact { transaction }) => Some(transaction),
-                        _ => None
-                    }).collect()
-                }
+				fn elasticity() -> Option<Permill> {
+					None
+				}
 
-                fn elasticity() -> Option<Permill> {
-                    None
-                }
+				fn gas_limit_multiplier_support() {}
 
-                fn gas_limit_multiplier_support() {}
+				fn pending_block(
+					xts: Vec<<Block as BlockT>::Extrinsic>,
+				) -> (Option<pallet_ethereum::Block>, Option<Vec<TransactionStatus>>) {
+					for ext in xts.into_iter() {
+						let _ = Executive::apply_extrinsic(ext);
+					}
 
-                fn pending_block(
-                    xts: Vec<<Block as BlockT>::Extrinsic>,
-                ) -> (Option<pallet_ethereum::Block>, Option<Vec<TransactionStatus>>) {
-                    for ext in xts.into_iter() {
-                        let _ = Executive::apply_extrinsic(ext);
-                    }
+					Ethereum::on_finalize(System::block_number() + 1);
 
-                    Ethereum::on_finalize(System::block_number() + 1);
+					(
+						pallet_ethereum::CurrentBlock::<Runtime>::get(),
+						pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
+					)
+				}
+			}
 
-                    (
-                        pallet_ethereum::CurrentBlock::<Runtime>::get(),
-                        pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
-                    )
-                }
-            }
+			impl sp_session::SessionKeys<Block> for Runtime {
+				fn decode_session_keys(
+					encoded: Vec<u8>,
+				) -> Option<Vec<(Vec<u8>, KeyTypeId)>> {
+					SessionKeys::decode_into_raw_public_keys(&encoded)
+				}
 
-            impl fp_rpc::ConvertTransactionRuntimeApi<Block> for Runtime {
-                fn convert_transaction(transaction: pallet_ethereum::Transaction) -> <Block as BlockT>::Extrinsic  {
-                    UncheckedExtrinsic::new_unsigned(
-                        pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
-                    )
-                }
-            }
+				fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {
+					SessionKeys::generate(seed)
+				}
+			}
 
-            impl sp_session::SessionKeys<Block> for Runtime {
-                fn decode_session_keys(
-                    encoded: Vec<u8>,
-                ) -> Option<Vec<(Vec<u8>, KeyTypeId)>> {
-                    SessionKeys::decode_into_raw_public_keys(&encoded)
-                }
+			impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
+				fn slot_duration() -> sp_consensus_aura::SlotDuration {
+					sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration())
+				}
 
-                fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {
-                    SessionKeys::generate(seed)
-                }
-            }
+				fn authorities() -> Vec<AuraId> {
+					Aura::authorities().to_vec()
+				}
+			}
 
-            impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
-                fn slot_duration() -> sp_consensus_aura::SlotDuration {
-                    sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration())
-                }
+			impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {
+				fn collect_collation_info(header: &<Block as BlockT>::Header) -> cumulus_primitives_core::CollationInfo {
+					ParachainSystem::collect_collation_info(header)
+				}
+			}
 
-                fn authorities() -> Vec<AuraId> {
-                    Aura::authorities().to_vec()
-                }
-            }
+			impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
+				fn account_nonce(account: AccountId) -> Nonce {
+					System::account_nonce(account)
+				}
+			}
 
-            impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {
-                fn collect_collation_info(header: &<Block as BlockT>::Header) -> cumulus_primitives_core::CollationInfo {
-                    ParachainSystem::collect_collation_info(header)
-                }
-            }
+			impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {
+				fn query_info(uxt: <Block as BlockT>::Extrinsic, len: u32) -> RuntimeDispatchInfo<Balance> {
+					TransactionPayment::query_info(uxt, len)
+				}
+				fn query_fee_details(uxt: <Block as BlockT>::Extrinsic, len: u32) -> FeeDetails<Balance> {
+					TransactionPayment::query_fee_details(uxt, len)
+				}
+				fn query_weight_to_fee(weight: Weight) -> Balance {
+					TransactionPayment::weight_to_fee(weight)
+				}
+				fn query_length_to_fee(length: u32) -> Balance {
+					TransactionPayment::length_to_fee(length)
+				}
+			}
 
-            impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
-                fn account_nonce(account: AccountId) -> Index {
-                    System::account_nonce(account)
-                }
-            }
+			#[cfg(feature = "runtime-benchmarks")]
+			impl frame_benchmarking::Benchmark<Block> for Runtime {
+				fn benchmark_metadata(extra: bool) -> (
+					Vec<frame_benchmarking::BenchmarkList>,
+					Vec<frame_support::traits::StorageInfo>,
+				) {
+					use frame_benchmarking::{list_benchmark, Benchmarking, BenchmarkList};
+					use frame_support::traits::StorageInfoTrait;
 
-            impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {
-                fn query_info(uxt: <Block as BlockT>::Extrinsic, len: u32) -> RuntimeDispatchInfo<Balance> {
-                    TransactionPayment::query_info(uxt, len)
-                }
-                fn query_fee_details(uxt: <Block as BlockT>::Extrinsic, len: u32) -> FeeDetails<Balance> {
-                    TransactionPayment::query_fee_details(uxt, len)
-                }
-                fn query_weight_to_fee(weight: Weight) -> Balance {
-                    TransactionPayment::weight_to_fee(weight)
-                }
-                fn query_length_to_fee(length: u32) -> Balance {
-                    TransactionPayment::length_to_fee(length)
-                }
-            }
+					let mut list = Vec::<BenchmarkList>::new();
+					list_benchmark!(list, extra, pallet_xcm, PolkadotXcm);
 
-            /*
-            impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber, Hash>
-                for Runtime
-            {
-                fn call(
-                    origin: AccountId,
-                    dest: AccountId,
-                    value: Balance,
-                    gas_limit: u64,
-                    input_data: Vec<u8>,
-                ) -> pallet_contracts_primitives::ContractExecResult {
-                    Contracts::bare_call(origin, dest, value, gas_limit, input_data, false)
-                }
+					list_benchmark!(list, extra, pallet_evm_migration, EvmMigration);
+					list_benchmark!(list, extra, pallet_common, Common);
+					list_benchmark!(list, extra, pallet_unique, Unique);
+					list_benchmark!(list, extra, pallet_structure, Structure);
+					list_benchmark!(list, extra, pallet_inflation, Inflation);
+					list_benchmark!(list, extra, pallet_configuration, Configuration);
 
-                fn instantiate(
-                    origin: AccountId,
-                    endowment: Balance,
-                    gas_limit: u64,
-                    code: pallet_contracts_primitives::Code<Hash>,
-                    data: Vec<u8>,
-                    salt: Vec<u8>,
-                ) -> pallet_contracts_primitives::ContractInstantiateResult<AccountId, BlockNumber>
-                {
-                    Contracts::bare_instantiate(origin, endowment, gas_limit, code, data, salt, true, false)
-                }
+					#[cfg(feature = "app-promotion")]
+					list_benchmark!(list, extra, pallet_app_promotion, AppPromotion);
 
-                fn get_storage(
-                    address: AccountId,
-                    key: [u8; 32],
-                ) -> pallet_contracts_primitives::GetStorageResult {
-                    Contracts::get_storage(address, key)
-                }
+					list_benchmark!(list, extra, pallet_fungible, Fungible);
+					list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);
 
-                fn rent_projection(
-                    address: AccountId,
-                ) -> pallet_contracts_primitives::RentProjectionResult<BlockNumber> {
-                    Contracts::rent_projection(address)
-                }
-            }
-            */
+					#[cfg(feature = "refungible")]
+					list_benchmark!(list, extra, pallet_refungible, Refungible);
 
-            #[cfg(feature = "runtime-benchmarks")]
-            impl frame_benchmarking::Benchmark<Block> for Runtime {
-                fn benchmark_metadata(extra: bool) -> (
-                    Vec<frame_benchmarking::BenchmarkList>,
-                    Vec<frame_support::traits::StorageInfo>,
-                ) {
-                    use frame_benchmarking::{list_benchmark, Benchmarking, BenchmarkList};
-                    use frame_support::traits::StorageInfoTrait;
+					#[cfg(feature = "collator-selection")]
+					list_benchmark!(list, extra, pallet_collator_selection, CollatorSelection);
 
-                    let mut list = Vec::<BenchmarkList>::new();
-                    list_benchmark!(list, extra, pallet_xcm, PolkadotXcm);
+					#[cfg(feature = "collator-selection")]
+					list_benchmark!(list, extra, pallet_identity, Identity);
 
-                    list_benchmark!(list, extra, pallet_evm_migration, EvmMigration);
-                    list_benchmark!(list, extra, pallet_common, Common);
-                    list_benchmark!(list, extra, pallet_unique, Unique);
-                    list_benchmark!(list, extra, pallet_structure, Structure);
-                    list_benchmark!(list, extra, pallet_inflation, Inflation);
-                    list_benchmark!(list, extra, pallet_configuration, Configuration);
+					#[cfg(feature = "foreign-assets")]
+					list_benchmark!(list, extra, pallet_foreign_assets, ForeignAssets);
 
-                    #[cfg(feature = "app-promotion")]
-                    list_benchmark!(list, extra, pallet_app_promotion, AppPromotion);
+					list_benchmark!(list, extra, pallet_maintenance, Maintenance);
 
-                    list_benchmark!(list, extra, pallet_fungible, Fungible);
-                    list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);
+					// list_benchmark!(list, extra, pallet_evm_coder_substrate, EvmCoderSubstrate);
 
-                    #[cfg(feature = "refungible")]
-                    list_benchmark!(list, extra, pallet_refungible, Refungible);
+					let storage_info = AllPalletsWithSystem::storage_info();
 
-                    #[cfg(feature = "unique-scheduler")]
-                    list_benchmark!(list, extra, pallet_unique_scheduler_v2, Scheduler);
+					return (list, storage_info)
+				}
 
-                    #[cfg(feature = "collator-selection")]
-                    list_benchmark!(list, extra, pallet_collator_selection, CollatorSelection);
+				fn dispatch_benchmark(
+					config: frame_benchmarking::BenchmarkConfig
+				) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
+					use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
 
-                    #[cfg(feature = "collator-selection")]
-                    list_benchmark!(list, extra, pallet_identity, Identity);
+					let allowlist: Vec<TrackedStorageKey> = vec![
+						// Total Issuance
+						hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(),
 
-                    #[cfg(feature = "foreign-assets")]
-                    list_benchmark!(list, extra, pallet_foreign_assets, ForeignAssets);
+						// Block Number
+						hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),
+						// Execution Phase
+						hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),
+						// Event Count
+						hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),
+						// System Events
+						hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),
 
-                    list_benchmark!(list, extra, pallet_maintenance, Maintenance);
+						// Evm CurrentLogs
+						hex_literal::hex!("1da53b775b270400e7e61ed5cbc5a146547f210cec367e9af919603343b9cb56").to_vec().into(),
 
-                    // list_benchmark!(list, extra, pallet_evm_coder_substrate, EvmCoderSubstrate);
+						// Transactional depth
+						hex_literal::hex!("3a7472616e73616374696f6e5f6c6576656c3a").to_vec().into(),
+					];
 
-                    let storage_info = AllPalletsWithSystem::storage_info();
+					let mut batches = Vec::<BenchmarkBatch>::new();
+					let params = (&config, &allowlist);
+					add_benchmark!(params, batches, pallet_xcm, PolkadotXcm);
 
-                    return (list, storage_info)
-                }
+					add_benchmark!(params, batches, pallet_evm_migration, EvmMigration);
+					add_benchmark!(params, batches, pallet_common, Common);
+					add_benchmark!(params, batches, pallet_unique, Unique);
+					add_benchmark!(params, batches, pallet_structure, Structure);
+					add_benchmark!(params, batches, pallet_inflation, Inflation);
+					add_benchmark!(params, batches, pallet_configuration, Configuration);
 
-                fn dispatch_benchmark(
-                    config: frame_benchmarking::BenchmarkConfig
-                ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
-                    use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
+					#[cfg(feature = "app-promotion")]
+					add_benchmark!(params, batches, pallet_app_promotion, AppPromotion);
 
-                    let allowlist: Vec<TrackedStorageKey> = vec![
-                        // Total Issuance
-                        hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(),
+					add_benchmark!(params, batches, pallet_fungible, Fungible);
+					add_benchmark!(params, batches, pallet_nonfungible, Nonfungible);
 
-                        // Block Number
-                        hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),
-                        // Execution Phase
-                        hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),
-                        // Event Count
-                        hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),
-                        // System Events
-                        hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),
+					#[cfg(feature = "refungible")]
+					add_benchmark!(params, batches, pallet_refungible, Refungible);
 
-                        // Evm CurrentLogs
-                        hex_literal::hex!("1da53b775b270400e7e61ed5cbc5a146547f210cec367e9af919603343b9cb56").to_vec().into(),
+					#[cfg(feature = "collator-selection")]
+					add_benchmark!(params, batches, pallet_collator_selection, CollatorSelection);
 
-                        // Transactional depth
-                        hex_literal::hex!("3a7472616e73616374696f6e5f6c6576656c3a").to_vec().into(),
-                    ];
-
-                    let mut batches = Vec::<BenchmarkBatch>::new();
-                    let params = (&config, &allowlist);
-                    add_benchmark!(params, batches, pallet_xcm, PolkadotXcm);
-
-                    add_benchmark!(params, batches, pallet_evm_migration, EvmMigration);
-                    add_benchmark!(params, batches, pallet_common, Common);
-                    add_benchmark!(params, batches, pallet_unique, Unique);
-                    add_benchmark!(params, batches, pallet_structure, Structure);
-                    add_benchmark!(params, batches, pallet_inflation, Inflation);
-                    add_benchmark!(params, batches, pallet_configuration, Configuration);
-
-                    #[cfg(feature = "app-promotion")]
-                    add_benchmark!(params, batches, pallet_app_promotion, AppPromotion);
-
-                    add_benchmark!(params, batches, pallet_fungible, Fungible);
-                    add_benchmark!(params, batches, pallet_nonfungible, Nonfungible);
+					#[cfg(feature = "collator-selection")]
+					add_benchmark!(params, batches, pallet_identity, Identity);
 
-                    #[cfg(feature = "refungible")]
-                    add_benchmark!(params, batches, pallet_refungible, Refungible);
+					#[cfg(feature = "foreign-assets")]
+					add_benchmark!(params, batches, pallet_foreign_assets, ForeignAssets);
 
-                    #[cfg(feature = "unique-scheduler")]
-                    add_benchmark!(params, batches, pallet_unique_scheduler_v2, Scheduler);
-
-                    #[cfg(feature = "collator-selection")]
-                    add_benchmark!(params, batches, pallet_collator_selection, CollatorSelection);
-
-                    #[cfg(feature = "collator-selection")]
-                    add_benchmark!(params, batches, pallet_identity, Identity);
-
-                    #[cfg(feature = "foreign-assets")]
-                    add_benchmark!(params, batches, pallet_foreign_assets, ForeignAssets);
+					add_benchmark!(params, batches, pallet_maintenance, Maintenance);
 
-                    add_benchmark!(params, batches, pallet_maintenance, Maintenance);
+					// add_benchmark!(params, batches, pallet_evm_coder_substrate, EvmCoderSubstrate);
 
-                    // add_benchmark!(params, batches, pallet_evm_coder_substrate, EvmCoderSubstrate);
+					if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
+					Ok(batches)
+				}
+			}
 
-                    if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
-                    Ok(batches)
-                }
-            }
+			impl up_pov_estimate_rpc::PovEstimateApi<Block> for Runtime {
+				#[allow(unused_variables)]
+				fn pov_estimate(uxt: Vec<u8>) -> ApplyExtrinsicResult {
+					#[cfg(feature = "pov-estimate")]
+					{
+						use parity_scale_codec::Decode;
 
-            impl up_pov_estimate_rpc::PovEstimateApi<Block> for Runtime {
-                #[allow(unused_variables)]
-                fn pov_estimate(uxt: Vec<u8>) -> ApplyExtrinsicResult {
-                    #[cfg(feature = "pov-estimate")]
-                    {
-                        use codec::Decode;
+						let uxt_decode = <<Block as BlockT>::Extrinsic as Decode>::decode(&mut &*uxt)
+							.map_err(|_| DispatchError::Other("failed to decode the extrinsic"));
 
-                        let uxt_decode = <<Block as BlockT>::Extrinsic as Decode>::decode(&mut &*uxt)
-                            .map_err(|_| DispatchError::Other("failed to decode the extrinsic"));
+						let uxt = match uxt_decode {
+							Ok(uxt) => uxt,
+							Err(err) => return Ok(err.into()),
+						};
 
-                        let uxt = match uxt_decode {
-                            Ok(uxt) => uxt,
-                            Err(err) => return Ok(err.into()),
-                        };
+						Executive::apply_extrinsic(uxt)
+					}
 
-                        Executive::apply_extrinsic(uxt)
-                    }
+					#[cfg(not(feature = "pov-estimate"))]
+					return Ok(unsupported!());
+				}
+			}
 
-                    #[cfg(not(feature = "pov-estimate"))]
-                    return Ok(unsupported!());
-                }
-            }
+			#[cfg(feature = "try-runtime")]
+			impl frame_try_runtime::TryRuntime<Block> for Runtime {
+				fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
+					log::info!("try-runtime::on_runtime_upgrade unique-chain.");
+					let weight = Executive::try_runtime_upgrade(checks).unwrap();
+					(weight, $crate::config::substrate::RuntimeBlockWeights::get().max_block)
+				}
 
-            #[cfg(feature = "try-runtime")]
-            impl frame_try_runtime::TryRuntime<Block> for Runtime {
-                fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
-                    log::info!("try-runtime::on_runtime_upgrade unique-chain.");
-                    let weight = Executive::try_runtime_upgrade(checks).unwrap();
-                    (weight, $crate::config::substrate::RuntimeBlockWeights::get().max_block)
-                }
+				fn execute_block(
+					block: Block,
+					state_root_check: bool,
+					signature_check: bool,
+					select: frame_try_runtime::TryStateSelect
+				) -> Weight {
+					log::info!(
+						target: "node-runtime",
+						"try-runtime: executing block {:?} / root checks: {:?} / try-state-select: {:?}",
+						block.header.hash(),
+						state_root_check,
+						select,
+					);
 
-                fn execute_block(
-                    block: Block,
-                    state_root_check: bool,
-                    signature_check: bool,
-                    select: frame_try_runtime::TryStateSelect
-                ) -> Weight {
-                    log::info!(
-                        target: "node-runtime",
-                        "try-runtime: executing block {:?} / root checks: {:?} / try-state-select: {:?}",
-                        block.header.hash(),
-                        state_root_check,
-                        select,
-                    );
+					Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap()
+				}
+			}
 
-                    Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap()
-                }
-            }
-        }
-    }
+			/// Should never be used, yet still required because of https://github.com/paritytech/polkadot-sdk/issues/27
+			/// Not allowed to panic, because rpc may be called using native runtime, thus causing thread panic.
+			impl fp_rpc::ConvertTransactionRuntimeApi<Block> for Runtime {
+				fn convert_transaction(
+					transaction: pallet_ethereum::Transaction
+				) -> <Block as BlockT>::Extrinsic {
+					UncheckedExtrinsic::new_unsigned(
+						pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
+					)
+				}
+			}
+		}
+	}
 }
modifiedruntime/common/scheduler.rsdiffbeforeafterboth
--- a/runtime/common/scheduler.rs
+++ b/runtime/common/scheduler.rs
@@ -14,21 +14,20 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use frame_support::{
-	dispatch::{GetDispatchInfo, PostDispatchInfo, DispatchInfo},
-};
+use fp_self_contained::SelfContainedCall;
+use frame_support::dispatch::{DispatchInfo, GetDispatchInfo, PostDispatchInfo};
+use pallet_transaction_payment::ChargeTransactionPayment;
+use pallet_unique_scheduler_v2::DispatchCall;
+use parity_scale_codec::Encode;
 use sp_runtime::{
-	traits::{Dispatchable, Applyable, Member},
+	traits::{Applyable, Dispatchable, Member},
 	transaction_validity::TransactionValidityError,
 	DispatchErrorWithPostInfo,
 };
-use codec::Encode;
-use crate::{Runtime, RuntimeCall, RuntimeOrigin, maintenance};
 use up_common::types::AccountId;
-use fp_self_contained::SelfContainedCall;
-use pallet_unique_scheduler_v2::DispatchCall;
-use pallet_transaction_payment::ChargeTransactionPayment;
 
+use crate::{maintenance, Runtime, RuntimeCall, RuntimeOrigin};
+
 /// The SignedExtension to the basic transaction logic.
 pub type SignedExtraScheduler = (
 	frame_system::CheckWeight<Runtime>,
modifiedruntime/common/sponsoring.rsdiffbeforeafterboth
--- a/runtime/common/sponsoring.rs
+++ b/runtime/common/sponsoring.rs
@@ -15,25 +15,25 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use core::marker::PhantomData;
-use up_sponsorship::SponsorshipHandler;
-use frame_support::{
-	traits::{IsSubType},
-};
-use up_data_structs::{
-	CollectionId, FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, NFT_SPONSOR_TRANSFER_TIMEOUT,
-	REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, TokenId, CollectionMode, CreateItemData,
-};
-use sp_runtime::traits::Saturating;
-use pallet_common::{CollectionHandle};
+
+use frame_support::traits::IsSubType;
+use frame_system::pallet_prelude::*;
+use pallet_common::CollectionHandle;
 use pallet_evm::account::CrossAccountId;
-use pallet_unique::{
-	Call as UniqueCall, Config as UniqueConfig, FungibleApproveBasket, RefungibleApproveBasket,
-	NftApproveBasket, CreateItemBasket, ReFungibleTransferBasket, FungibleTransferBasket,
-	NftTransferBasket, TokenPropertyBasket,
-};
 use pallet_fungible::Config as FungibleConfig;
 use pallet_nonfungible::Config as NonfungibleConfig;
 use pallet_refungible::Config as RefungibleConfig;
+use pallet_unique::{
+	Call as UniqueCall, Config as UniqueConfig, CreateItemBasket, FungibleApproveBasket,
+	FungibleTransferBasket, NftApproveBasket, NftTransferBasket, ReFungibleTransferBasket,
+	RefungibleApproveBasket, TokenPropertyBasket,
+};
+use sp_runtime::traits::Saturating;
+use up_data_structs::{
+	CollectionId, CollectionMode, CreateItemData, TokenId, FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
+	NFT_SPONSOR_TRANSFER_TIMEOUT, REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
+};
+use up_sponsorship::SponsorshipHandler;
 
 pub trait Config: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig {}
 impl<T> Config for T where T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig {}
@@ -79,7 +79,7 @@
 		return None;
 	}
 
-	let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;
+	let block_number = <frame_system::Pallet<T>>::block_number() as BlockNumberFor<T>;
 	let limit = collection.limits.sponsored_data_rate_limit()?;
 
 	if let Some(last_tx_block) = TokenPropertyBasket::<T>::get(collection.id, item_id) {
@@ -123,7 +123,7 @@
 	}
 
 	// sponsor timeout
-	let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;
+	let block_number = <frame_system::Pallet<T>>::block_number() as BlockNumberFor<T>;
 	let limit = collection
 		.limits
 		.sponsor_transfer_timeout(match collection.mode {
@@ -169,7 +169,7 @@
 	properties: &CreateItemData,
 ) -> Option<()> {
 	// sponsor timeout
-	let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;
+	let block_number = <frame_system::Pallet<T>>::block_number() as BlockNumberFor<T>;
 	let limit = collection
 		.limits
 		.sponsor_transfer_timeout(match properties {
@@ -195,7 +195,7 @@
 	item_id: &TokenId,
 ) -> Option<()> {
 	// sponsor timeout
-	let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;
+	let block_number = <frame_system::Pallet<T>>::block_number() as BlockNumberFor<T>;
 	let limit = collection.limits.sponsor_approve_timeout();
 
 	let last_tx_block = match collection.mode {
@@ -307,7 +307,7 @@
 pub trait SponsorshipPredict<T: Config> {
 	fn predict(collection: CollectionId, account: T::CrossAccountId, token: TokenId) -> Option<u64>
 	where
-		u64: From<<T as frame_system::Config>::BlockNumber>;
+		u64: From<BlockNumberFor<T>>;
 }
 
 pub struct UniqueSponsorshipPredict<T>(PhantomData<T>);
@@ -315,13 +315,13 @@
 impl<T: Config> SponsorshipPredict<T> for UniqueSponsorshipPredict<T> {
 	fn predict(collection_id: CollectionId, who: T::CrossAccountId, token: TokenId) -> Option<u64>
 	where
-		u64: From<<T as frame_system::Config>::BlockNumber>,
+		u64: From<BlockNumberFor<T>>,
 	{
 		let collection = <CollectionHandle<T>>::try_get(collection_id).ok()?;
 		let _ = collection.sponsorship.sponsor()?;
 
 		// sponsor timeout
-		let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;
+		let block_number = <frame_system::Pallet<T>>::block_number() as BlockNumberFor<T>;
 		let limit = collection
 			.limits
 			.sponsor_transfer_timeout(match collection.mode {
modifiedruntime/common/tests/mod.rsdiffbeforeafterboth
--- a/runtime/common/tests/mod.rs
+++ b/runtime/common/tests/mod.rs
@@ -14,12 +14,12 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
+use sp_core::{Pair, Public};
+pub use sp_runtime::AccountId32 as AccountId;
 use sp_runtime::{BuildStorage, Storage};
-use sp_core::{Public, Pair};
 use up_common::types::AuraId;
-use crate::{Runtime, GenesisConfig, ParachainInfoConfig, RuntimeEvent, System};
 
-pub use sp_runtime::AccountId32 as AccountId;
+use crate::{ParachainInfoConfig, Runtime, RuntimeEvent, RuntimeGenesisConfig, System};
 pub type Balance = u128;
 
 pub mod xcm;
@@ -62,10 +62,11 @@
 
 #[cfg(feature = "collator-selection")]
 fn make_basic_storage() -> Storage {
-	use sp_core::{sr25519};
+	use sp_core::sr25519;
 	use sp_runtime::traits::{IdentifyAccount, Verify};
-	use crate::{AccountId, Signature, SessionKeys, CollatorSelectionConfig, SessionConfig};
 
+	use crate::{AccountId, CollatorSelectionConfig, SessionConfig, SessionKeys, Signature};
+
 	type AccountPublic = <Signature as Verify>::Signer;
 
 	fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId
@@ -94,13 +95,14 @@
 		.map(|acc| get_account_id_from_seed::<sr25519::Public>(acc))
 		.collect::<Vec<_>>();
 
-	let cfg = GenesisConfig {
+	let cfg = RuntimeGenesisConfig {
 		collator_selection: CollatorSelectionConfig { invulnerables },
 		session: SessionConfig { keys },
 		parachain_info: ParachainInfoConfig {
 			parachain_id: PARA_ID.into(),
+			..Default::default()
 		},
-		..GenesisConfig::default()
+		..Default::default()
 	};
 
 	cfg.build_storage().unwrap()
@@ -110,7 +112,7 @@
 fn make_basic_storage() -> Storage {
 	use crate::AuraConfig;
 
-	let cfg = GenesisConfig {
+	let cfg = RuntimeGenesisConfig {
 		aura: AuraConfig {
 			authorities: vec![
 				get_from_seed::<AuraId>("Alice"),
@@ -119,8 +121,9 @@
 		},
 		parachain_info: ParachainInfoConfig {
 			parachain_id: PARA_ID.into(),
+			..Default::default()
 		},
-		..GenesisConfig::default()
+		..Default::default()
 	};
 
 	cfg.build_storage().unwrap().into()
modifiedruntime/common/tests/xcm.rsdiffbeforeafterboth
--- a/runtime/common/tests/xcm.rs
+++ b/runtime/common/tests/xcm.rs
@@ -14,15 +14,16 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use xcm::{
+use frame_support::pallet_prelude::Weight;
+use parity_scale_codec::Encode;
+use staging_xcm::{
+	latest::{prelude::*, Error},
 	VersionedXcm,
-	latest::{prelude::*, Error},
 };
-use codec::Encode;
-use crate::{Runtime, RuntimeCall, RuntimeOrigin, RuntimeEvent, PolkadotXcm};
-use super::{new_test_ext, last_events, AccountId};
-use frame_support::{pallet_prelude::Weight};
 
+use super::{last_events, new_test_ext, AccountId};
+use crate::{PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin};
+
 const ALICE: AccountId = AccountId::new([0u8; 32]);
 const BOB: AccountId = AccountId::new([1u8; 32]);
 
@@ -51,9 +52,9 @@
 
 		let xcm_event = &last_events(1)[0];
 		match xcm_event {
-			RuntimeEvent::PolkadotXcm(pallet_xcm::Event::<Runtime>::Attempted(
-				Outcome::Incomplete(_weight, Error::NoPermission),
-			)) => { /* Pass */ }
+			RuntimeEvent::PolkadotXcm(pallet_xcm::Event::<Runtime>::Attempted {
+				outcome: Outcome::Incomplete(_weight, Error::NoPermission),
+			}) => { /* Pass */ }
 			_ => panic!(
 				"Expected PolkadotXcm.Attempted(Incomplete(_weight, NoPermission)),\
 				found: {xcm_event:#?}"
modifiedruntime/common/weights/mod.rsdiffbeforeafterboth
--- a/runtime/common/weights/mod.rs
+++ b/runtime/common/weights/mod.rs
@@ -15,20 +15,21 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use core::marker::PhantomData;
-use frame_support::{weights::Weight};
-use pallet_common::{CommonWeightInfo, dispatch::dispatch_weight, RefungibleExtensionsWeightInfo};
 
+use frame_support::weights::Weight;
 use pallet_balances_adapter::{
-	Config as NativeFungibleConfig, common::CommonWeights as NativeFungibleWeights,
+	common::CommonWeights as NativeFungibleWeights, Config as NativeFungibleConfig,
 };
-use pallet_fungible::{Config as FungibleConfig, common::CommonWeights as FungibleWeights};
-use pallet_nonfungible::{Config as NonfungibleConfig, common::CommonWeights as NonfungibleWeights};
-
+use pallet_common::{dispatch::dispatch_weight, CommonWeightInfo, RefungibleExtensionsWeightInfo};
+use pallet_fungible::{common::CommonWeights as FungibleWeights, Config as FungibleConfig};
+use pallet_nonfungible::{
+	common::CommonWeights as NonfungibleWeights, Config as NonfungibleConfig,
+};
 #[cfg(feature = "refungible")]
 use pallet_refungible::{
-	Config as RefungibleConfig, weights::WeightInfo, common::CommonWeights as RefungibleWeights,
+	common::CommonWeights as RefungibleWeights, weights::WeightInfo, Config as RefungibleConfig,
 };
-use up_data_structs::{CreateItemExData, CreateItemData};
+use up_data_structs::{CreateItemData, CreateItemExData};
 
 pub mod xcm;
 
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -38,8 +38,10 @@
 	'pallet-app-promotion/runtime-benchmarks',
 	'pallet-balances/runtime-benchmarks',
 	'pallet-collator-selection/runtime-benchmarks',
+	'pallet-collective/runtime-benchmarks',
 	'pallet-common/runtime-benchmarks',
 	'pallet-configuration/runtime-benchmarks',
+	'pallet-democracy/runtime-benchmarks',
 	'pallet-ethereum/runtime-benchmarks',
 	'pallet-evm-coder-substrate/runtime-benchmarks',
 	'pallet-evm-migration/runtime-benchmarks',
@@ -48,25 +50,21 @@
 	'pallet-identity/runtime-benchmarks',
 	'pallet-inflation/runtime-benchmarks',
 	'pallet-maintenance/runtime-benchmarks',
+	'pallet-membership/runtime-benchmarks',
 	'pallet-nonfungible/runtime-benchmarks',
-	'pallet-democracy/runtime-benchmarks',
-	'pallet-collective/runtime-benchmarks',
 	'pallet-ranked-collective/runtime-benchmarks',
-	'pallet-membership/runtime-benchmarks',
 	'pallet-referenda/runtime-benchmarks',
+	'pallet-refungible/runtime-benchmarks',
 	'pallet-scheduler/runtime-benchmarks',
-	'pallet-refungible/runtime-benchmarks',
 	'pallet-structure/runtime-benchmarks',
 	'pallet-timestamp/runtime-benchmarks',
+	'pallet-unique/runtime-benchmarks',
 	'pallet-utility/runtime-benchmarks',
-	'pallet-unique-scheduler-v2/runtime-benchmarks',
-	'pallet-unique/runtime-benchmarks',
 	'pallet-xcm/runtime-benchmarks',
 	'sp-runtime/runtime-benchmarks',
-	'xcm-builder/runtime-benchmarks',
+	'staging-xcm-builder/runtime-benchmarks',
 ]
 std = [
-	'codec/std',
 	'cumulus-pallet-aura-ext/std',
 	'cumulus-pallet-parachain-system/std',
 	'cumulus-pallet-xcm/std',
@@ -80,13 +78,14 @@
 	'frame-try-runtime/std',
 	'pallet-aura/std',
 	'pallet-balances/std',
+	'pallet-collective/std',
 	'pallet-democracy/std',
-	'pallet-collective/std',
+	'pallet-gov-origins/std',
+	'pallet-membership/std',
 	'pallet-ranked-collective/std',
-	'pallet-membership/std',
 	'pallet-referenda/std',
-	'pallet-gov-origins/std',
 	'pallet-scheduler/std',
+	'parity-scale-codec/std',
 	# 'pallet-contracts/std',
 	# 'pallet-contracts-primitives/std',
 	# 'pallet-contracts-rpc-runtime-api/std',
@@ -121,12 +120,11 @@
 	'pallet-structure/std',
 	'pallet-sudo/std',
 	'pallet-timestamp/std',
-	'pallet-utility/std',
 	'pallet-transaction-payment-rpc-runtime-api/std',
 	'pallet-transaction-payment/std',
 	'pallet-treasury/std',
-	'pallet-unique-scheduler-v2/std',
 	'pallet-unique/std',
+	'pallet-utility/std',
 	'parachain-info/std',
 	'serde',
 	'sp-api/std',
@@ -140,14 +138,14 @@
 	'sp-std/std',
 	'sp-transaction-pool/std',
 	'sp-version/std',
+	'staging-xcm-builder/std',
+	'staging-xcm-executor/std',
+	'staging-xcm/std',
 	'up-common/std',
 	'up-data-structs/std',
 	'up-pov-estimate-rpc/std',
 	'up-rpc/std',
 	'up-sponsorship/std',
-	'xcm-builder/std',
-	'xcm-executor/std',
-	'xcm/std',
 
 	"orml-tokens/std",
 	"orml-traits/std",
@@ -187,9 +185,11 @@
 	'pallet-base-fee/try-runtime',
 	'pallet-charge-transaction/try-runtime',
 	'pallet-collective/try-runtime',
+	'pallet-collective/try-runtime',
 	'pallet-common/try-runtime',
 	'pallet-configuration/try-runtime',
 	'pallet-democracy/try-runtime',
+	'pallet-democracy/try-runtime',
 	'pallet-ethereum/try-runtime',
 	'pallet-evm-coder-substrate/try-runtime',
 	'pallet-evm-contract-helpers/try-runtime',
@@ -198,28 +198,25 @@
 	'pallet-evm/try-runtime',
 	'pallet-foreign-assets/try-runtime',
 	'pallet-fungible/try-runtime',
+	'pallet-gov-origins/try-runtime',
 	'pallet-inflation/try-runtime',
 	'pallet-maintenance/try-runtime',
 	'pallet-membership/try-runtime',
+	'pallet-membership/try-runtime',
 	'pallet-nonfungible/try-runtime',
-	'pallet-democracy/try-runtime',
-	'pallet-collective/try-runtime',
 	'pallet-ranked-collective/try-runtime',
-	'pallet-membership/try-runtime',
 	'pallet-referenda/try-runtime',
-	'pallet-gov-origins/try-runtime',
-	'pallet-scheduler/try-runtime',
 	'pallet-refungible/try-runtime',
 	'pallet-scheduler/try-runtime',
+	'pallet-scheduler/try-runtime',
 	'pallet-structure/try-runtime',
 	'pallet-sudo/try-runtime',
 	'pallet-test-utils?/try-runtime',
 	'pallet-timestamp/try-runtime',
-	'pallet-utility/try-runtime',
 	'pallet-transaction-payment/try-runtime',
 	'pallet-treasury/try-runtime',
-	'pallet-unique-scheduler-v2/try-runtime',
 	'pallet-unique/try-runtime',
+	'pallet-utility/try-runtime',
 	'pallet-xcm/try-runtime',
 	'parachain-info/try-runtime',
 ]
@@ -227,20 +224,16 @@
 app-promotion = []
 collator-selection = []
 foreign-assets = []
+gov-test-timings = []
 governance = []
-gov-test-timings = []
 preimage = []
 refungible = []
-unique-scheduler = []
 session-test-timings = []
 
 ################################################################################
 # local dependencies
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
 cumulus-pallet-aura-ext = { workspace = true }
 cumulus-pallet-dmp-queue = { workspace = true }
 cumulus-pallet-parachain-system = { workspace = true }
@@ -266,13 +259,14 @@
 pallet-state-trie-migration = { workspace = true }
 pallet-sudo = { workspace = true }
 pallet-timestamp = { workspace = true }
-pallet-utility = { workspace = true }
 pallet-transaction-payment = { workspace = true }
 pallet-transaction-payment-rpc-runtime-api = { workspace = true }
 pallet-treasury = { workspace = true }
+pallet-utility = { workspace = true }
 pallet-xcm = { workspace = true }
 parachain-info = { workspace = true }
-polkadot-parachain = { workspace = true }
+parity-scale-codec = { workspace = true }
+polkadot-parachain-primitives = { workspace = true }
 smallvec = { workspace = true }
 sp-api = { workspace = true }
 sp-arithmetic = { workspace = true }
@@ -287,9 +281,9 @@
 sp-std = { workspace = true }
 sp-transaction-pool = { workspace = true }
 sp-version = { workspace = true }
-xcm = { workspace = true }
-xcm-builder = { workspace = true }
-xcm-executor = { workspace = true }
+staging-xcm = { workspace = true }
+staging-xcm-builder = { workspace = true }
+staging-xcm-executor = { workspace = true }
 
 app-promotion-rpc = { workspace = true }
 derivative = { workspace = true }
@@ -304,8 +298,10 @@
 pallet-base-fee = { workspace = true }
 pallet-charge-transaction = { workspace = true }
 pallet-collator-selection = { workspace = true }
+pallet-collective = { workspace = true }
 pallet-common = { workspace = true }
 pallet-configuration = { workspace = true }
+pallet-democracy = { workspace = true }
 pallet-ethereum = { workspace = true }
 pallet-evm = { workspace = true }
 pallet-evm-coder-substrate = { workspace = true }
@@ -315,21 +311,18 @@
 pallet-evm-transaction-payment = { workspace = true }
 pallet-foreign-assets = { workspace = true }
 pallet-fungible = { workspace = true }
+pallet-gov-origins = { workspace = true }
 pallet-identity = { workspace = true }
 pallet-inflation = { workspace = true }
 pallet-maintenance = { workspace = true }
+pallet-membership = { workspace = true }
 pallet-nonfungible = { workspace = true }
-pallet-democracy = { workspace = true }
-pallet-collective = { workspace = true }
 pallet-ranked-collective = { workspace = true }
-pallet-membership = { workspace = true }
 pallet-referenda = { workspace = true }
-pallet-gov-origins = { workspace = true }
+pallet-refungible = { workspace = true }
 pallet-scheduler = { workspace = true }
-pallet-refungible = { workspace = true }
 pallet-structure = { workspace = true }
 pallet-unique = { workspace = true }
-pallet-unique-scheduler-v2 = { workspace = true }
 precompile-utils-macro = { workspace = true }
 scale-info = { workspace = true }
 up-common = { workspace = true }
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -27,15 +27,12 @@
 
 extern crate alloc;
 
+use ::staging_xcm::latest::NetworkId;
 use frame_support::parameter_types;
-
-use sp_version::RuntimeVersion;
 use sp_runtime::create_runtime_str;
-
+use sp_version::RuntimeVersion;
 use up_common::types::*;
 
-use ::xcm::latest::NetworkId;
-
 mod runtime_common;
 
 pub mod governance_timings;
@@ -52,7 +49,7 @@
 	spec_name: create_runtime_str!("opal"),
 	impl_name: create_runtime_str!("opal"),
 	authoring_version: 1,
-	spec_version: 943061,
+	spec_version: 10010062,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 3,
modifiedruntime/opal/src/xcm_barrier.rsdiffbeforeafterboth
--- a/runtime/opal/src/xcm_barrier.rs
+++ b/runtime/opal/src/xcm_barrier.rs
@@ -15,8 +15,10 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use frame_support::{match_types, traits::Everything};
-use xcm::latest::{Junctions::*, MultiLocation};
-use xcm_builder::{AllowTopLevelPaidExecutionFrom, TakeWeightCredit, AllowExplicitUnpaidExecutionFrom};
+use staging_xcm::latest::{Junctions::*, MultiLocation};
+use staging_xcm_builder::{
+	AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom, TakeWeightCredit,
+};
 
 match_types! {
 	pub type ParentOnly: impl Contains<MultiLocation> = {
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -32,9 +32,11 @@
 	'pallet-balances/runtime-benchmarks',
 	'pallet-collator-selection/runtime-benchmarks',
 	'pallet-collective/runtime-benchmarks',
+	'pallet-collective/runtime-benchmarks',
 	'pallet-common/runtime-benchmarks',
 	'pallet-configuration/runtime-benchmarks',
 	'pallet-democracy/runtime-benchmarks',
+	'pallet-democracy/runtime-benchmarks',
 	'pallet-ethereum/runtime-benchmarks',
 	'pallet-evm-coder-substrate/runtime-benchmarks',
 	'pallet-evm-migration/runtime-benchmarks',
@@ -44,25 +46,22 @@
 	'pallet-inflation/runtime-benchmarks',
 	'pallet-maintenance/runtime-benchmarks',
 	'pallet-membership/runtime-benchmarks',
+	'pallet-membership/runtime-benchmarks',
 	'pallet-nonfungible/runtime-benchmarks',
-	'pallet-democracy/runtime-benchmarks',
-	'pallet-collective/runtime-benchmarks',
 	'pallet-ranked-collective/runtime-benchmarks',
-	'pallet-membership/runtime-benchmarks',
 	'pallet-referenda/runtime-benchmarks',
-	'pallet-scheduler/runtime-benchmarks',
 	'pallet-refungible/runtime-benchmarks',
 	'pallet-scheduler/runtime-benchmarks',
+	'pallet-scheduler/runtime-benchmarks',
 	'pallet-structure/runtime-benchmarks',
 	'pallet-timestamp/runtime-benchmarks',
+	'pallet-unique/runtime-benchmarks',
 	'pallet-utility/runtime-benchmarks',
-	'pallet-unique/runtime-benchmarks',
 	'pallet-xcm/runtime-benchmarks',
 	'sp-runtime/runtime-benchmarks',
-	'xcm-builder/runtime-benchmarks',
+	'staging-xcm-builder/runtime-benchmarks',
 ]
 std = [
-	'codec/std',
 	'cumulus-pallet-aura-ext/std',
 	'cumulus-pallet-parachain-system/std',
 	'cumulus-pallet-xcm/std',
@@ -81,6 +80,7 @@
 	'pallet-democracy/std',
 	'pallet-membership/std',
 	'pallet-scheduler/std',
+	'parity-scale-codec/std',
 	# 'pallet-contracts/std',
 	# 'pallet-contracts-primitives/std',
 	# 'pallet-contracts-rpc-runtime-api/std',
@@ -99,8 +99,10 @@
 	'pallet-base-fee/std',
 	'pallet-charge-transaction/std',
 	'pallet-collator-selection/std',
+	'pallet-collective/std',
 	'pallet-common/std',
 	'pallet-configuration/std',
+	'pallet-democracy/std',
 	'pallet-ethereum/std',
 	'pallet-evm-coder-substrate/std',
 	'pallet-evm-contract-helpers/std',
@@ -108,24 +110,22 @@
 	'pallet-evm-transaction-payment/std',
 	'pallet-evm/std',
 	'pallet-fungible/std',
+	'pallet-gov-origins/std',
 	'pallet-inflation/std',
+	'pallet-membership/std',
 	'pallet-nonfungible/std',
-	'pallet-democracy/std',
-	'pallet-collective/std',
 	'pallet-ranked-collective/std',
-	'pallet-membership/std',
 	'pallet-referenda/std',
-	'pallet-gov-origins/std',
+	'pallet-refungible/std',
 	'pallet-scheduler/std',
-	'pallet-refungible/std',
 	'pallet-structure/std',
 	'pallet-sudo/std',
 	'pallet-timestamp/std',
-	'pallet-utility/std',
 	'pallet-transaction-payment-rpc-runtime-api/std',
 	'pallet-transaction-payment/std',
 	'pallet-treasury/std',
 	'pallet-unique/std',
+	'pallet-utility/std',
 	'parachain-info/std',
 	'serde',
 	'sp-api/std',
@@ -139,14 +139,14 @@
 	'sp-std/std',
 	'sp-transaction-pool/std',
 	'sp-version/std',
+	'staging-xcm-builder/std',
+	'staging-xcm-executor/std',
+	'staging-xcm/std',
 	'up-common/std',
 	'up-data-structs/std',
 	'up-pov-estimate-rpc/std',
 	'up-rpc/std',
 	'up-sponsorship/std',
-	'xcm-builder/std',
-	'xcm-executor/std',
-	'xcm/std',
 
 	"orml-tokens/std",
 	"orml-traits/std",
@@ -181,8 +181,10 @@
 	'pallet-balances-adapter/try-runtime',
 	'pallet-balances/try-runtime',
 	'pallet-charge-transaction/try-runtime',
+	'pallet-collective/try-runtime',
 	'pallet-common/try-runtime',
 	'pallet-configuration/try-runtime',
+	'pallet-democracy/try-runtime',
 	'pallet-ethereum/try-runtime',
 	'pallet-evm-coder-substrate/try-runtime',
 	'pallet-evm-contract-helpers/try-runtime',
@@ -191,24 +193,22 @@
 	'pallet-evm/try-runtime',
 	'pallet-foreign-assets/try-runtime',
 	'pallet-fungible/try-runtime',
+	'pallet-gov-origins/try-runtime',
 	'pallet-inflation/try-runtime',
 	'pallet-maintenance/try-runtime',
+	'pallet-membership/try-runtime',
 	'pallet-nonfungible/try-runtime',
-	'pallet-democracy/try-runtime',
-	'pallet-collective/try-runtime',
 	'pallet-ranked-collective/try-runtime',
-	'pallet-membership/try-runtime',
 	'pallet-referenda/try-runtime',
-	'pallet-gov-origins/try-runtime',
+	'pallet-refungible/try-runtime',
 	'pallet-scheduler/try-runtime',
-	'pallet-refungible/try-runtime',
 	'pallet-structure/try-runtime',
 	'pallet-sudo/try-runtime',
 	'pallet-timestamp/try-runtime',
-	'pallet-utility/try-runtime',
 	'pallet-transaction-payment/try-runtime',
 	'pallet-treasury/try-runtime',
 	'pallet-unique/try-runtime',
+	'pallet-utility/try-runtime',
 	'pallet-xcm/try-runtime',
 	'parachain-info/try-runtime',
 ]
@@ -216,20 +216,16 @@
 app-promotion = []
 collator-selection = []
 foreign-assets = []
+gov-test-timings = []
 governance = []
 preimage = []
 refungible = []
-unique-scheduler = []
-gov-test-timings = []
 session-test-timings = []
 
 ################################################################################
 # local dependencies
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
 cumulus-pallet-aura-ext = { workspace = true }
 cumulus-pallet-dmp-queue = { workspace = true }
 cumulus-pallet-parachain-system = { workspace = true }
@@ -255,13 +251,14 @@
 pallet-state-trie-migration = { workspace = true }
 pallet-sudo = { workspace = true }
 pallet-timestamp = { workspace = true }
-pallet-utility = { workspace = true }
 pallet-transaction-payment = { workspace = true }
 pallet-transaction-payment-rpc-runtime-api = { workspace = true }
 pallet-treasury = { workspace = true }
+pallet-utility = { workspace = true }
 pallet-xcm = { workspace = true }
 parachain-info = { workspace = true }
-polkadot-parachain = { workspace = true }
+parity-scale-codec = { workspace = true }
+polkadot-parachain-primitives = { workspace = true }
 smallvec = { workspace = true }
 sp-api = { workspace = true }
 sp-arithmetic = { workspace = true }
@@ -276,9 +273,9 @@
 sp-std = { workspace = true }
 sp-transaction-pool = { workspace = true }
 sp-version = { workspace = true }
-xcm = { workspace = true }
-xcm-builder = { workspace = true }
-xcm-executor = { workspace = true }
+staging-xcm = { workspace = true }
+staging-xcm-builder = { workspace = true }
+staging-xcm-executor = { workspace = true }
 
 app-promotion-rpc = { workspace = true }
 derivative = { workspace = true }
@@ -287,20 +284,20 @@
 pallet-app-promotion = { workspace = true }
 pallet-balances-adapter = { workspace = true }
 pallet-collator-selection = { workspace = true }
+pallet-collective = { workspace = true }
 pallet-common = { workspace = true }
 pallet-configuration = { workspace = true }
+pallet-democracy = { workspace = true }
 pallet-fungible = { workspace = true }
+pallet-gov-origins = { workspace = true }
 pallet-identity = { workspace = true }
 pallet-inflation = { workspace = true }
+pallet-membership = { workspace = true }
 pallet-nonfungible = { workspace = true }
-pallet-democracy = { workspace = true }
-pallet-collective = { workspace = true }
 pallet-ranked-collective = { workspace = true }
-pallet-membership = { workspace = true }
 pallet-referenda = { workspace = true }
-pallet-gov-origins = { workspace = true }
+pallet-refungible = { workspace = true }
 pallet-scheduler = { workspace = true }
-pallet-refungible = { workspace = true }
 pallet-structure = { workspace = true }
 pallet-unique = { workspace = true }
 scale-info = { workspace = true }
@@ -312,7 +309,7 @@
 evm-coder = { workspace = true }
 fp-rpc = { workspace = true }
 fp-self-contained = { workspace = true }
-num_enum = { version = "0.5.3", default-features = false }
+num_enum = { version = "0.7.0", default-features = false }
 pallet-base-fee = { workspace = true }
 pallet-charge-transaction = { workspace = true }
 pallet-ethereum = { workspace = true }
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -27,15 +27,12 @@
 
 extern crate alloc;
 
+use ::staging_xcm::latest::NetworkId;
 use frame_support::parameter_types;
-
+use sp_runtime::create_runtime_str;
 use sp_version::RuntimeVersion;
-use sp_runtime::create_runtime_str;
-
 use up_common::types::*;
 
-use ::xcm::latest::NetworkId;
-
 mod runtime_common;
 
 pub mod governance_timings;
@@ -54,7 +51,7 @@
 	impl_name: create_runtime_str!("quartz"),
 
 	authoring_version: 1,
-	spec_version: 943061,
+	spec_version: 10010062,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 3,
@@ -67,7 +64,7 @@
 	impl_name: create_runtime_str!("sapphire"),
 
 	authoring_version: 1,
-	spec_version: 943061,
+	spec_version: 10010062,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 3,
modifiedruntime/quartz/src/xcm_barrier.rsdiffbeforeafterboth
--- a/runtime/quartz/src/xcm_barrier.rs
+++ b/runtime/quartz/src/xcm_barrier.rs
@@ -15,10 +15,10 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use frame_support::{match_types, traits::Everything};
-use xcm::latest::{Junctions::*, MultiLocation};
-use xcm_builder::{
-	AllowKnownQueryResponses, AllowSubscriptionsFrom, TakeWeightCredit,
-	AllowTopLevelPaidExecutionFrom, AllowExplicitUnpaidExecutionFrom,
+use staging_xcm::latest::{Junctions::*, MultiLocation};
+use staging_xcm_builder::{
+	AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom,
+	AllowTopLevelPaidExecutionFrom, TakeWeightCredit,
 };
 
 use crate::PolkadotXcm;
modifiedruntime/tests/Cargo.tomldiffbeforeafterboth
--- a/runtime/tests/Cargo.toml
+++ b/runtime/tests/Cargo.toml
@@ -37,12 +37,12 @@
 
 pallet-evm-coder-substrate = { workspace = true }
 
-codec = { workspace = true, package = "parity-scale-codec" }
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
 
 evm-coder = { workspace = true }
+staging-xcm = { workspace = true }
 up-sponsorship = { workspace = true }
-xcm = { workspace = true }
 
 [dev-dependencies]
 pallet-common = { workspace = true, features = ["tests"] }
addedruntime/tests/src/dispatch.rsdiffbeforeafterboth
--- /dev/null
+++ b/runtime/tests/src/dispatch.rs
@@ -0,0 +1 @@
+../../common/dispatch.rs
\ No newline at end of file
modifiedruntime/tests/src/lib.rsdiffbeforeafterboth
--- a/runtime/tests/src/lib.rs
+++ b/runtime/tests/src/lib.rs
@@ -16,87 +16,78 @@
 
 #![allow(clippy::from_over_into)]
 
-use sp_core::{H160, H256, U256};
 use frame_support::{
+	pallet_prelude::Weight,
 	parameter_types,
-	traits::{Everything, ConstU32, ConstU64, fungible::Inspect},
+	traits::{fungible::Inspect, ConstU32, ConstU64, Everything},
 	weights::IdentityFee,
-	pallet_prelude::Weight,
-};
-use sp_runtime::{
-	traits::{BlakeTwo256, IdentityLookup},
-	testing::Header,
 };
-use pallet_transaction_payment::CurrencyAdapter;
 use frame_system as system;
+use pallet_ethereum::PostLogContent;
 use pallet_evm::{
-	AddressMapping, account::CrossAccountId, EnsureAddressNever, SubstrateBlockHashMapping,
-	BackwardsAddressMapping,
+	account::CrossAccountId, AddressMapping, BackwardsAddressMapping, EnsureAddressNever,
+	SubstrateBlockHashMapping,
 };
-use pallet_ethereum::PostLogContent;
-use codec::{Encode, Decode, MaxEncodedLen};
+use pallet_transaction_payment::CurrencyAdapter;
+use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
 use scale_info::TypeInfo;
-
+use sp_core::{H160, H256, U256};
+use sp_runtime::{
+	traits::{BlakeTwo256, IdentityLookup},
+	BuildStorage,
+};
 use up_data_structs::mapping::{CrossTokenAddressMapping, EvmTokenAddressMapping};
 
-#[path = "../../common/dispatch.rs"]
 mod dispatch;
 
 use dispatch::CollectionDispatchT;
 
-#[path = "../../common/weights/mod.rs"]
 mod weights;
 
 use weights::CommonWeights;
 
-type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
-type Block = frame_system::mocking::MockBlock<Test>;
+type Block = frame_system::mocking::MockBlockU32<Test>;
 
 #[cfg(test)]
 mod tests;
 
 // Configure a mock runtime to test the pallet.
 frame_support::construct_runtime!(
-	pub enum Test where
-		Block = Block,
-		NodeBlock = Block,
-		UncheckedExtrinsic = UncheckedExtrinsic,
-	{
+	pub enum Test {
 		System: frame_system,
 		Timestamp: pallet_timestamp,
-		Unique: pallet_unique::{Pallet, Call, Storage},
-		Balances: pallet_balances::{Pallet, Call, Storage, Event<T>},
-		Common: pallet_common::{Pallet, Storage, Event<T>},
-		Fungible: pallet_fungible::{Pallet, Storage},
-		Refungible: pallet_refungible::{Pallet, Storage},
-		Nonfungible: pallet_nonfungible::{Pallet, Storage},
-		Structure: pallet_structure::{Pallet, Storage, Event<T>},
-		TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},
-		Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin},
-		EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>},
+		Unique: pallet_unique,
+		Balances: pallet_balances,
+		Common: pallet_common,
+		Fungible: pallet_fungible,
+		Refungible: pallet_refungible,
+		Nonfungible: pallet_nonfungible,
+		Structure: pallet_structure,
+		TransactionPayment: pallet_transaction_payment,
+		Ethereum: pallet_ethereum,
+		EVM: pallet_evm,
 	}
 );
 
 parameter_types! {
-	pub const BlockHashCount: u64 = 250;
+	pub const BlockHashCount: u32 = 250;
 	pub const SS58Prefix: u8 = 42;
 }
 
 impl system::Config for Test {
 	type RuntimeEvent = RuntimeEvent;
 	type BaseCallFilter = Everything;
+	type Block = Block;
 	type BlockWeights = ();
 	type BlockLength = ();
 	type DbWeight = ();
 	type RuntimeOrigin = RuntimeOrigin;
 	type RuntimeCall = RuntimeCall;
-	type Index = u64;
-	type BlockNumber = u64;
+	type Nonce = u64;
 	type Hash = H256;
 	type Hashing = BlakeTwo256;
 	type AccountId = u64;
 	type Lookup = IdentityLookup<Self::AccountId>;
-	type Header = Header;
 	type BlockHashCount = BlockHashCount;
 	type Version = ();
 	type PalletInfo = PalletInfo;
@@ -127,7 +118,7 @@
 	type MaxFreezes = MaxLocks;
 	type FreezeIdentifier = [u8; 8];
 	type MaxHolds = MaxLocks;
-	type HoldIdentifier = [u8; 8];
+	type RuntimeHoldReason = RuntimeHoldReason;
 }
 
 parameter_types! {
@@ -240,9 +231,9 @@
 	type OnMethodCall = ();
 	type OnCreate = ();
 	type OnChargeTransaction = ();
+	type OnCheckEvmTransaction = ();
 	type FindAuthor = ();
 	type BlockHashMapping = SubstrateBlockHashMapping<Self>;
-	type TransactionValidityHack = ();
 	type Timestamp = Timestamp;
 	type GasLimitPovSizeRatio = ConstU64<0>;
 }
@@ -305,8 +296,8 @@
 
 // Build genesis storage according to the mock runtime.
 pub fn new_test_ext() -> sp_io::TestExternalities {
-	system::GenesisConfig::default()
-		.build_storage::<Test>()
+	<system::GenesisConfig<Test>>::default()
+		.build_storage()
 		.unwrap()
 		.into()
 }
modifiedruntime/tests/src/tests.rsdiffbeforeafterboth
--- a/runtime/tests/src/tests.rs
+++ b/runtime/tests/src/tests.rs
@@ -15,19 +15,22 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 // Tests to be written here
-use crate::{Test, TestCrossAccountId, CollectionCreationPrice, RuntimeOrigin, Unique, new_test_ext};
+use frame_support::{assert_err, assert_noop, assert_ok};
+use pallet_common::Error as CommonError;
+use pallet_evm::account::CrossAccountId;
+use pallet_unique::Error as UniqueError;
+use sp_std::convert::TryInto;
 use up_data_structs::{
-	COLLECTION_NUMBER_LIMIT, CollectionId, CreateItemData, CreateFungibleData, CreateNftData,
-	CreateReFungibleData, MAX_DECIMAL_POINTS, COLLECTION_ADMINS_LIMIT, TokenId,
-	MAX_TOKEN_OWNERSHIP, CreateCollectionData, CollectionMode, AccessMode, CollectionPermissions,
-	PropertyKeyPermission, PropertyPermission, Property, CollectionPropertiesVec,
-	CollectionPropertiesPermissionsVec,
+	AccessMode, CollectionId, CollectionMode, CollectionPermissions,
+	CollectionPropertiesPermissionsVec, CollectionPropertiesVec, CreateCollectionData,
+	CreateFungibleData, CreateItemData, CreateNftData, CreateReFungibleData, Property,
+	PropertyKeyPermission, PropertyPermission, TokenId, COLLECTION_ADMINS_LIMIT,
+	COLLECTION_NUMBER_LIMIT, MAX_DECIMAL_POINTS, MAX_TOKEN_OWNERSHIP,
+};
+
+use crate::{
+	new_test_ext, CollectionCreationPrice, RuntimeOrigin, Test, TestCrossAccountId, Unique,
 };
-use frame_support::{assert_noop, assert_ok, assert_err};
-use sp_std::convert::TryInto;
-use pallet_evm::account::CrossAccountId;
-use pallet_common::Error as CommonError;
-use pallet_unique::Error as UniqueError;
 
 fn add_balance(user: u64, value: u64) {
 	const DONOR_USER: u64 = 999;
@@ -2617,9 +2620,10 @@
 }
 
 mod check_token_permissions {
-	use super::*;
 	use pallet_common::LazyValue;
 
+	use super::*;
+
 	fn test<FTE: FnOnce() -> bool>(
 		i: usize,
 		test_case: &pallet_common::tests::TestCase,
addedruntime/tests/src/weightsdiffbeforeafterboth
--- /dev/null
+++ b/runtime/tests/src/weights
@@ -0,0 +1 @@
+../../common/weights
\ No newline at end of file
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -29,9 +29,11 @@
 	'pallet-balances/runtime-benchmarks',
 	'pallet-collator-selection/runtime-benchmarks',
 	'pallet-collective/runtime-benchmarks',
+	'pallet-collective/runtime-benchmarks',
 	'pallet-common/runtime-benchmarks',
 	'pallet-configuration/runtime-benchmarks',
 	'pallet-democracy/runtime-benchmarks',
+	'pallet-democracy/runtime-benchmarks',
 	'pallet-ethereum/runtime-benchmarks',
 	'pallet-evm-coder-substrate/runtime-benchmarks',
 	'pallet-evm-migration/runtime-benchmarks',
@@ -41,26 +43,23 @@
 	'pallet-inflation/runtime-benchmarks',
 	'pallet-maintenance/runtime-benchmarks',
 	'pallet-membership/runtime-benchmarks',
+	'pallet-membership/runtime-benchmarks',
 	'pallet-nonfungible/runtime-benchmarks',
-	'pallet-democracy/runtime-benchmarks',
-	'pallet-collective/runtime-benchmarks',
 	'pallet-ranked-collective/runtime-benchmarks',
-	'pallet-membership/runtime-benchmarks',
 	'pallet-referenda/runtime-benchmarks',
+	'pallet-refungible/runtime-benchmarks',
 	'pallet-scheduler/runtime-benchmarks',
-	'pallet-refungible/runtime-benchmarks',
 	'pallet-scheduler/runtime-benchmarks',
 	'pallet-structure/runtime-benchmarks',
 	'pallet-timestamp/runtime-benchmarks',
+	'pallet-unique/runtime-benchmarks',
 	'pallet-utility/runtime-benchmarks',
-	'pallet-unique/runtime-benchmarks',
 	'pallet-xcm/runtime-benchmarks',
 	'sp-runtime/runtime-benchmarks',
+	'staging-xcm-builder/runtime-benchmarks',
 	'up-data-structs/runtime-benchmarks',
-	'xcm-builder/runtime-benchmarks',
 ]
 std = [
-	'codec/std',
 	'cumulus-pallet-aura-ext/std',
 	'cumulus-pallet-parachain-system/std',
 	'cumulus-pallet-xcm/std',
@@ -78,6 +77,7 @@
 	'pallet-democracy/std',
 	'pallet-membership/std',
 	'pallet-scheduler/std',
+	'parity-scale-codec/std',
 	# 'pallet-contracts/std',
 	# 'pallet-contracts-primitives/std',
 	# 'pallet-contracts-rpc-runtime-api/std',
@@ -97,8 +97,10 @@
 	'pallet-base-fee/std',
 	'pallet-charge-transaction/std',
 	'pallet-collator-selection/std',
+	'pallet-collective/std',
 	'pallet-common/std',
 	'pallet-configuration/std',
+	'pallet-democracy/std',
 	'pallet-ethereum/std',
 	'pallet-evm-coder-substrate/std',
 	'pallet-evm-contract-helpers/std',
@@ -106,24 +108,22 @@
 	'pallet-evm-transaction-payment/std',
 	'pallet-evm/std',
 	'pallet-fungible/std',
+	'pallet-gov-origins/std',
 	'pallet-inflation/std',
+	'pallet-membership/std',
 	'pallet-nonfungible/std',
-	'pallet-democracy/std',
-	'pallet-collective/std',
 	'pallet-ranked-collective/std',
-	'pallet-membership/std',
 	'pallet-referenda/std',
-	'pallet-gov-origins/std',
-	'pallet-scheduler/std',
 	'pallet-refungible/std',
+	'pallet-scheduler/std',
 	'pallet-structure/std',
 	'pallet-sudo/std',
 	'pallet-timestamp/std',
-	'pallet-utility/std',
 	'pallet-transaction-payment-rpc-runtime-api/std',
 	'pallet-transaction-payment/std',
 	'pallet-treasury/std',
 	'pallet-unique/std',
+	'pallet-utility/std',
 	'parachain-info/std',
 	'sp-api/std',
 	'sp-block-builder/std',
@@ -136,14 +136,14 @@
 	'sp-std/std',
 	'sp-transaction-pool/std',
 	'sp-version/std',
+	'staging-xcm-builder/std',
+	'staging-xcm-executor/std',
+	'staging-xcm/std',
 	'up-common/std',
 	'up-data-structs/std',
 	'up-pov-estimate-rpc/std',
 	'up-rpc/std',
 	'up-sponsorship/std',
-	'xcm-builder/std',
-	'xcm-executor/std',
-	'xcm/std',
 
 	"orml-tokens/std",
 	"orml-traits/std",
@@ -180,9 +180,11 @@
 	'pallet-balances/try-runtime',
 	'pallet-charge-transaction/try-runtime',
 	'pallet-collective/try-runtime',
+	'pallet-collective/try-runtime',
 	'pallet-common/try-runtime',
 	'pallet-configuration/try-runtime',
 	'pallet-democracy/try-runtime',
+	'pallet-democracy/try-runtime',
 	'pallet-ethereum/try-runtime',
 	'pallet-evm-coder-substrate/try-runtime',
 	'pallet-evm-contract-helpers/try-runtime',
@@ -191,26 +193,24 @@
 	'pallet-evm/try-runtime',
 	'pallet-foreign-assets/try-runtime',
 	'pallet-fungible/try-runtime',
+	'pallet-gov-origins/try-runtime',
 	'pallet-inflation/try-runtime',
 	'pallet-maintenance/try-runtime',
 	'pallet-membership/try-runtime',
+	'pallet-membership/try-runtime',
 	'pallet-nonfungible/try-runtime',
-	'pallet-democracy/try-runtime',
-	'pallet-collective/try-runtime',
 	'pallet-ranked-collective/try-runtime',
-	'pallet-membership/try-runtime',
 	'pallet-referenda/try-runtime',
-	'pallet-gov-origins/try-runtime',
-	'pallet-scheduler/try-runtime',
 	'pallet-refungible/try-runtime',
 	'pallet-scheduler/try-runtime',
+	'pallet-scheduler/try-runtime',
 	'pallet-structure/try-runtime',
 	'pallet-sudo/try-runtime',
 	'pallet-timestamp/try-runtime',
-	'pallet-utility/try-runtime',
 	'pallet-transaction-payment/try-runtime',
 	'pallet-treasury/try-runtime',
 	'pallet-unique/try-runtime',
+	'pallet-utility/try-runtime',
 	'pallet-xcm/try-runtime',
 	'parachain-info/try-runtime',
 ]
@@ -219,20 +219,16 @@
 app-promotion = []
 collator-selection = []
 foreign-assets = []
+gov-test-timings = []
 governance = []
 preimage = []
 refungible = []
-unique-scheduler = []
-gov-test-timings = []
 session-test-timings = []
 
 ################################################################################
 # local dependencies
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
 cumulus-pallet-aura-ext = { workspace = true }
 cumulus-pallet-dmp-queue = { workspace = true }
 cumulus-pallet-parachain-system = { workspace = true }
@@ -258,13 +254,14 @@
 pallet-state-trie-migration = { workspace = true }
 pallet-sudo = { workspace = true }
 pallet-timestamp = { workspace = true }
-pallet-utility = { workspace = true }
 pallet-transaction-payment = { workspace = true }
 pallet-transaction-payment-rpc-runtime-api = { workspace = true }
 pallet-treasury = { workspace = true }
+pallet-utility = { workspace = true }
 pallet-xcm = { workspace = true }
 parachain-info = { workspace = true }
-polkadot-parachain = { workspace = true }
+parity-scale-codec = { workspace = true }
+polkadot-parachain-primitives = { workspace = true }
 smallvec = { workspace = true }
 sp-api = { workspace = true }
 sp-arithmetic = { workspace = true }
@@ -279,9 +276,9 @@
 sp-std = { workspace = true }
 sp-transaction-pool = { workspace = true }
 sp-version = { workspace = true }
-xcm = { workspace = true }
-xcm-builder = { workspace = true }
-xcm-executor = { workspace = true }
+staging-xcm = { workspace = true }
+staging-xcm-builder = { workspace = true }
+staging-xcm-executor = { workspace = true }
 
 app-promotion-rpc = { workspace = true }
 derivative = { workspace = true }
@@ -289,20 +286,20 @@
 pallet-app-promotion = { workspace = true }
 pallet-balances-adapter = { workspace = true }
 pallet-collator-selection = { workspace = true }
+pallet-collective = { workspace = true }
 pallet-common = { workspace = true }
 pallet-configuration = { workspace = true }
+pallet-democracy = { workspace = true }
 pallet-fungible = { workspace = true }
+pallet-gov-origins = { workspace = true }
 pallet-identity = { workspace = true }
 pallet-inflation = { workspace = true }
+pallet-membership = { workspace = true }
 pallet-nonfungible = { workspace = true }
-pallet-democracy = { workspace = true }
-pallet-collective = { workspace = true }
 pallet-ranked-collective = { workspace = true }
-pallet-membership = { workspace = true }
 pallet-referenda = { workspace = true }
-pallet-gov-origins = { workspace = true }
+pallet-refungible = { workspace = true }
 pallet-scheduler = { workspace = true }
-pallet-refungible = { workspace = true }
 pallet-structure = { workspace = true }
 pallet-unique = { workspace = true }
 scale-info = { workspace = true }
modifiedruntime/unique/src/lib.rsdiffbeforeafterboth
--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -27,15 +27,12 @@
 
 extern crate alloc;
 
+use ::staging_xcm::latest::NetworkId;
 use frame_support::parameter_types;
-
-use sp_version::RuntimeVersion;
 use sp_runtime::create_runtime_str;
-
+use sp_version::RuntimeVersion;
 use up_common::types::*;
 
-use ::xcm::latest::NetworkId;
-
 mod runtime_common;
 
 pub mod governance_timings;
@@ -52,7 +49,7 @@
 	spec_name: create_runtime_str!("unique"),
 	impl_name: create_runtime_str!("unique"),
 	authoring_version: 1,
-	spec_version: 943061,
+	spec_version: 10010062,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 3,
modifiedruntime/unique/src/xcm_barrier.rsdiffbeforeafterboth
--- a/runtime/unique/src/xcm_barrier.rs
+++ b/runtime/unique/src/xcm_barrier.rs
@@ -15,10 +15,10 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use frame_support::{match_types, traits::Everything};
-use xcm::latest::{Junctions::*, MultiLocation};
-use xcm_builder::{
-	AllowKnownQueryResponses, AllowSubscriptionsFrom, TakeWeightCredit,
-	AllowTopLevelPaidExecutionFrom, AllowExplicitUnpaidExecutionFrom,
+use staging_xcm::latest::{Junctions::*, MultiLocation};
+use staging_xcm_builder::{
+	AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom,
+	AllowTopLevelPaidExecutionFrom, TakeWeightCredit,
 };
 
 use crate::PolkadotXcm;
modifiedtest-pallets/utils/Cargo.tomldiffbeforeafterboth
--- a/test-pallets/utils/Cargo.toml
+++ b/test-pallets/utils/Cargo.toml
@@ -6,24 +6,21 @@
 version = "0.1.0"
 
 [dependencies]
-# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
-codec = { workspace = true, package = "parity-scale-codec" }
-
 frame-support = { workspace = true }
 frame-system = { workspace = true }
+parity-scale-codec = { workspace = true }
 scale-info = { workspace = true }
-# pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }
-pallet-unique-scheduler-v2 = { workspace = true }
+sp-runtime = { workspace = true }
 sp-std = { workspace = true }
 
 [features]
 default = ["std"]
 std = [
-	"codec/std",
 	"frame-support/std",
 	"frame-system/std",
-	"pallet-unique-scheduler-v2/std",
+	"parity-scale-codec/std",
 	"scale-info/std",
+	"sp-runtime/std",
 	"sp-std/std",
 ]
-try-runtime = ["frame-support/try-runtime", "pallet-unique-scheduler-v2/try-runtime"]
+try-runtime = ["frame-support/try-runtime"]
modifiedtest-pallets/utils/src/lib.rsdiffbeforeafterboth
--- a/test-pallets/utils/src/lib.rs
+++ b/test-pallets/utils/src/lib.rs
@@ -16,20 +16,20 @@
 
 #![cfg_attr(not(feature = "std"), no_std)]
 
-pub use pallet::*;
 use frame_support::pallet_prelude::*;
 use frame_system::pallet_prelude::*;
+pub use pallet::*;
 
 #[frame_support::pallet(dev_mode)]
 pub mod pallet {
 	use frame_support::{
+		dispatch::{GetDispatchInfo, PostDispatchInfo},
 		pallet_prelude::*,
-		dispatch::{Dispatchable, GetDispatchInfo, PostDispatchInfo},
-		traits::{UnfilteredDispatchable, IsSubType, OriginTrait},
+		traits::{IsSubType, OriginTrait, UnfilteredDispatchable},
 	};
 	use frame_system::pallet_prelude::*;
+	use sp_runtime::traits::Dispatchable;
 	use sp_std::vec::Vec;
-	// use pallet_unique_scheduler_v2::{TaskName, Pallet as SchedulerPallet};
 
 	#[pallet::config]
 	pub trait Config: frame_system::Config /*+ pallet_unique_scheduler_v2::Config*/ {
deletedtests/src/util/frankenstein.tsdiffbeforeafterboth
--- a/tests/src/util/frankenstein.ts
+++ /dev/null
@@ -1,382 +0,0 @@
-// Copyright 2019-2023 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-import {ApiPromise} from '@polkadot/api';
-import {blake2AsHex, cryptoWaitReady} from '@polkadot/util-crypto';
-import zombie from '@zombienet/orchestrator/dist';
-import {readNetworkConfig} from '@zombienet/utils/dist';
-import {resolve} from 'path';
-import {usingPlaygrounds} from '.';
-import {migrations} from './frankensteinMigrate';
-import fs from 'fs';
-
-const ZOMBIENET_CREDENTIALS = process.env.ZOMBIENET_CREDENTIALS || '../.env';
-const NETWORK_CONFIG_FILE = process.argv[2] ?? '../launch-zombienet.toml';
-const PARA_DIR = process.env.PARA_DIR || '../';
-const RELAY_DIR = process.env.RELAY_DIR || '../../polkadot/';
-const REPLICA_FROM = process.env.REPLICA_FROM || 'wss://ws-opal.unique.network:443';
-const NEW_RELAY_BIN = process.env.NEW_RELAY_BIN;
-const NEW_RELAY_WASM = process.env.NEW_RELAY_WASM;
-const NEW_PARA_BIN = process.env.NEW_PARA_BIN;
-const NEW_PARA_WASM = process.env.NEW_PARA_WASM;
-const DESTINATION_SPEC_VERSION = process.env.DESTINATION_SPEC_VERSION!;
-const PARACHAIN_BLOCK_TIME = 12_000;
-const SUPERUSER_KEY = '//Alice';
-
-let network: zombie.Network | undefined;
-
-// Stop the network if it is running
-const stop = async () => {
-  await network?.stop();
-};
-
-// Promise of a timeout
-function delay(ms: number) {
-  return new Promise(resolve => setTimeout(resolve, ms));
-}
-
-// Countdown with time left on display
-async function waitWithTimer(time: number) {
-  const secondsTotal = Math.ceil(time / 1000);
-  for(let i = secondsTotal; i > 0; i--) {
-    // could also introduce hours, but wth
-    const seconds = i % 60;
-    const text = `Time left: ${Math.floor(i / 60)}:${seconds < 10 ? '0' + seconds : seconds}`;
-    if(process.stdout.isTTY)
-      process.stdout.write(text);
-    else if(seconds % 10 == 0)
-      console.log(text);
-    await delay(1000);
-    if(process.stdout.isTTY) {
-      process.stdout.clearLine(0);
-      process.stdout.cursorTo(0);
-    }
-  }
-}
-
-// Get the runtime's current version
-function getSpecVersion(api: ApiPromise): number {
-  return (api.consts.system.version as any).specVersion.toNumber();
-}
-
-// Get the required information on the relay chain
-function getRelayInfo(api: ApiPromise): {specVersion: number, epochBlockLength: number, blockTime: number, epochTime: number} {
-  const info = {
-    specVersion: getSpecVersion(api),
-    epochBlockLength: (api.consts.babe.epochDuration as any).toNumber(),
-    blockTime: (api.consts.babe.expectedBlockTime as any).toNumber(),
-    epochTime: 0,
-  };
-  info.epochTime = info.epochBlockLength * info.blockTime;
-  return info;
-}
-
-// Enable or disable maintenance mode if present on the chain
-async function toggleMaintenanceMode(value: boolean, wsUri: string, retries = 5) {
-  try {
-    await usingPlaygrounds(async (helper, privateKey) => {
-      const superuser = await privateKey(SUPERUSER_KEY);
-      try {
-        const toggle = value ? 'enable' : 'disable';
-        await helper.getSudo().executeExtrinsic(superuser, `api.tx.maintenance.${toggle}`, []);
-        console.log(`Maintenance mode ${value ? 'engaged' : 'disengaged'}.`);
-      } catch (e) {
-        console.error('Couldn\'t set maintenance mode. The maintenance pallet probably does not exist. Log:', e);
-      }
-    }, wsUri);
-  } catch (error) {
-    console.error(error);
-    console.log('Trying for retry toggle maintanence mode');
-    await delay(12_000);
-    await toggleMaintenanceMode(value, wsUri, retries - 1);
-  }
-}
-
-async function skipIfAlreadyUpgraded() {
-  await usingPlaygrounds(async (helper) => {
-    const specVersion = await getSpecVersion(helper.getApi());
-    if(`v${specVersion}` === DESTINATION_SPEC_VERSION) {
-      console.log('\n🛸 Current version equal DESTINATION_SPEC_VERSION 🛸');
-      console.log("\n🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸");
-    }
-  }, REPLICA_FROM);
-}
-
-const raiseZombienet = async (): Promise<void> => {
-  await skipIfAlreadyUpgraded();
-  const isUpgradeTesting = !!NEW_RELAY_BIN || !!NEW_RELAY_WASM || !!NEW_PARA_BIN || !!NEW_PARA_WASM;
-  /*
-  // If there is nothing to upgrade, what is the point
-  if (!isUpgradeTesting) {
-    console.warn('\nNeither the relay nor the parachain were selected for an upgrade! ' +
-      'Please pass environment vars `NEW_RELAY_BIN`, `NEW_RELAY_WASM`, `NEW_PARA_BIN`, `NEW_PARA_WASM`.');
-    process.exit(1);
-  }
-  */
-
-  // an unsavory practice, but very convenient, mwahahah
-  process.env.PARA_DIR = PARA_DIR;
-  process.env.RELAY_DIR = RELAY_DIR;
-  process.env.REPLICA_FROM = REPLICA_FROM;
-
-  const configPath = resolve(NETWORK_CONFIG_FILE);
-  const networkConfig = readNetworkConfig(configPath);
-  // console.log(networkConfig);
-  if(networkConfig.settings.provider !== 'native') {
-    throw new Error(`Oh no! Expected native network, got ${networkConfig.settings.provider}.`);
-  }
-
-  await cryptoWaitReady();
-
-  // Launch Zombienet!
-  network = await zombie.start(ZOMBIENET_CREDENTIALS, networkConfig, {silent: false});
-
-  // Get the relay chain info like the epoch length and spec version
-  // Then restart each parachain's binaries
-  // // Stop and restart each node
-  // // Send specified keys to parachain nodes in case the parachain requires it
-  // If it is not needed to upgrade runtimes themselves, the job is done!
-
-  // Record some required information regarding the relay chain
-  await network.relay[0].connectApi();
-  let relayInfo = getRelayInfo((network.relay[0] as any).apiInstance!);
-  await network.relay[0].apiInstance!.disconnect();
-  if(isUpgradeTesting) {
-    console.log('Relay stats:', relayInfo);
-  }
-
-  // non-exported functionality of NativeClient
-  const networkClient = (network.client as any);
-
-  if(NEW_RELAY_BIN) {
-    console.log('\n🧶 Restarting relay nodes');
-
-    for(const [index, node] of network.relay.entries()) {
-      await node.apiInstance?.disconnect();
-
-      console.log(`\n🚦 Starting timeout for the epoch change (node ${index + 1}/${network.relay.length})...`);
-      await waitWithTimer(relayInfo.epochTime);
-
-      // Replace the node-starting command with the new binary
-      const cmd = networkClient.processMap[node.name].cmd[0].split(' ')[0];
-      networkClient.processMap[node.name].cmd = networkClient.processMap[node.name].cmd.map((arg: string) => arg.replace(cmd, NEW_RELAY_BIN));
-
-      await node.restart();
-    }
-
-    console.log('\n🌒 All relay nodes restarted with the new binaries.');
-  }
-
-  if(NEW_PARA_BIN) {
-    for(const paraId in network.paras) {
-      const para = network.paras[paraId];
-      console.log(`\n🧶 Restarting collator nodes of parachain ${paraId}`);
-
-      for(const [_index, node] of para.nodes.entries()) {
-        await node.apiInstance?.disconnect();
-
-        // Replace the node-starting command with the new binary
-        const cmd = networkClient.processMap[node.name].cmd[0].split(' ')[0];
-        networkClient.processMap[node.name].cmd = networkClient.processMap[node.name].cmd.map((arg: string) => arg.replace(cmd, NEW_PARA_BIN));
-
-        await node.restart();
-        // applyaurakey?
-        // Zombienet handles it on first-time node creation
-      }
-    }
-
-    console.log('\n🌗 All parachain collators restarted with the new binaries.');
-  }
-
-  // Re-establish connection to the relay node and get the runtime upgrade validation delay for parachains
-  // For the relay, connect and set the new runtime code
-  // For each parachain, connect, authorize and upgrade its runtime
-  // Ping the the chains for the runtime upgrade after the minimal time and then every few blocks
-  // // For each parachain, re-connect and verify that the runtime upgrade is successful
-
-  let relayUpgradeCompleted = false, paraUpgradeCompleted = false;
-
-  if(NEW_RELAY_WASM) {
-    const relayOldVersion = relayInfo.specVersion;
-    console.log('\n🚦 Starting timeout for the next epoch before upgrading the relay runtime code...');
-    await waitWithTimer(relayInfo.epochTime);
-
-    console.log('--- Upgrading the relay chain runtime \t---');
-
-    // Read the new WASM code and set it as the relay's new code
-    const code = fs.readFileSync(NEW_RELAY_WASM).toString('hex');
-    await usingPlaygrounds(async (helper, privateKey) => {
-      const superuser = await privateKey(SUPERUSER_KEY);
-
-      const result = await helper.executeExtrinsic(
-        superuser,
-        'api.tx.sudo.sudoUncheckedWeight',
-        [helper.constructApiCall('api.tx.system.setCode', [`0x${code}`]), {}],
-      );
-
-      if(result.status == 'Fail') {
-        console.error('Failed to upgrade the runtime:', result);
-      }
-
-      // Get the updated information from the relay's new runtime
-      relayInfo = getRelayInfo(helper.getApi());
-    }, network.relay[0].wsUri);
-
-    if(relayOldVersion != relayInfo.specVersion) {
-      // eslint-disable-next-line no-useless-escape
-      console.log(`\n\🛰️ The relay has successfully upgraded from version ${relayOldVersion} to ${relayInfo.specVersion}!`);
-      relayUpgradeCompleted = true;
-    } else {
-      console.error(`\nThe relay did not upgrade from version ${relayOldVersion}!`);
-    }
-  } else {
-    // If the relay did not need to be upgraded, it's already technically completed
-    relayUpgradeCompleted = true;
-  }
-
-  if(NEW_PARA_WASM) {
-    let codeValidationDelayBlocks = 0;
-    const upgradingParas: {[id: string]: {version: number, upgraded: boolean}} = {};
-    // Calculate the code validation delay of the relay chain,
-    // so that we know how much to wait before the parachains can be upgraded after the extrinsic
-    await usingPlaygrounds(async (helper) => {
-      const {validationUpgradeDelay, minimumValidationUpgradeDelay} =
-        (await helper.callRpc('api.query.configuration.activeConfig', [])).toJSON() as any;
-
-      codeValidationDelayBlocks = Math.max(validationUpgradeDelay ?? 0, minimumValidationUpgradeDelay ?? 0);
-    }, network.relay[0].wsUri);
-
-    // Wait for the next epoch so that the parachains will start cooperating with the relay
-    if(relayUpgradeCompleted && NEW_RELAY_WASM) {
-      console.log('\n🚥 Starting timeout for the next epoch before upgrading the parachains code...');
-      await waitWithTimer(relayInfo.epochTime);
-    }
-
-    const migration = migrations[DESTINATION_SPEC_VERSION];
-    console.log('⭐️⭐️⭐️ DESTINATION_SPEC_VERSION ⭐️⭐️⭐️', DESTINATION_SPEC_VERSION);
-    for(const paraId in network.paras) {
-      console.log(`\n--- Upgrading the runtime of parachain ${paraId} \t---`);
-      const para = network.paras[paraId];
-
-      // Enable maintenance mode if present
-      await toggleMaintenanceMode(true, para.nodes[0].wsUri);
-      if(migration) {
-        console.log('⭐️⭐️⭐️ Running pre-upgrade scripts... ⭐️⭐️⭐️');
-        await migration.before();
-      }
-
-      // Read the WASM code and authorize the upgrade with its hash and set it as the new runtime
-      const code = fs.readFileSync(NEW_PARA_WASM);
-      const codeHash = blake2AsHex(code);
-      await usingPlaygrounds(async (helper, privateKey) => {
-        const superuser = await privateKey(SUPERUSER_KEY);
-
-        upgradingParas[paraId] = {version: getSpecVersion(helper.getApi()), upgraded: false};
-
-        console.log('--- Authorizing the parachain runtime upgrade \t---');
-        let result = await helper.executeExtrinsic(
-          superuser,
-          'api.tx.sudo.sudoUncheckedWeight',
-          [helper.constructApiCall('api.tx.parachainSystem.authorizeUpgrade', [codeHash, false]), {}],
-        );
-
-        if(result.status == 'Fail') {
-          console.error('Failed to authorize the upgrade:', result);
-          return;
-        }
-
-        console.log('--- Enacting the parachain runtime upgrade \t---');
-        result = await helper.executeExtrinsic(
-          superuser,
-          'api.tx.sudo.sudoUncheckedWeight',
-          [helper.constructApiCall('api.tx.parachainSystem.enactAuthorizedUpgrade', [`0x${code.toString('hex')}`]), {}],
-        );
-
-        if(result.status == 'Fail') {
-          console.error('Failed to upgrade the runtime:', result);
-        }
-      }, para.nodes[0].wsUri);
-    }
-
-    // Check the upgrades of the parachains, first after the minimum code validation delay, and then after some block time increments
-    let firstPass = true;
-    for(let attempt = 0; attempt < 3 && !paraUpgradeCompleted; attempt++) {
-      if(firstPass) {
-        console.log('\nCode validation delay:', codeValidationDelayBlocks, 'blocks');
-        console.log('🚥 Waiting for the minimum code validation delay before the parachain can upgrade...');
-        await waitWithTimer(relayInfo.blockTime * codeValidationDelayBlocks);
-        firstPass = false;
-      } else {
-        console.log('\n🚥 Waiting for a few blocks more to verify that the parachain upgrades are successful...');
-        await waitWithTimer(PARACHAIN_BLOCK_TIME * 3);
-      }
-
-      // Ping the parachains' nodes for new runtime versions
-      let upgradeFailed = false;
-      for(const paraId in network.paras) {
-        if(upgradingParas[paraId].upgraded) continue;
-
-        const para = network.paras[paraId];
-        // eslint-disable-next-line require-await
-        await usingPlaygrounds(async (helper) => {
-          const specVersion = getSpecVersion(helper.getApi());
-
-          if(specVersion != upgradingParas[paraId].version) {
-            // eslint-disable-next-line no-useless-escape
-            console.log(`\n\🛰️  Parachain ${paraId} has successfully upgraded from version ${upgradingParas[paraId].version} to ${specVersion}!`);
-            upgradingParas[paraId].upgraded = true;
-          } else {
-            console.error(`\nParachain ${paraId} failed to upgrade from version ${upgradingParas[paraId].version}!`);
-            upgradeFailed = true;
-          }
-        }, para.nodes[0].wsUri);
-
-        paraUpgradeCompleted = !upgradeFailed;
-      }
-    }
-
-    // Disable maintenance mode if present
-    for(const paraId in network.paras) {
-      // TODO only if our parachain
-      if(migration) {
-        console.log('⭐️⭐️⭐️ Running post-upgrade scripts... ⭐️⭐️⭐️');
-        await migration.after();
-      }
-      await toggleMaintenanceMode(false, network.paras[paraId].nodes[0].wsUri);
-    }
-  } else {
-    // If the relay did not need to be upgraded, it's already technically completed
-    paraUpgradeCompleted = true;
-  }
-
-  // await network.stop();
-
-  if(isUpgradeTesting) {
-    if(paraUpgradeCompleted && relayUpgradeCompleted) {
-      console.log("\n🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸");
-    } else {
-      console.error("\n🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧");
-    }
-  } else {
-    console.log('🚀 ZOMBIENET RAISED 🚀');
-  }
-};
-
-raiseZombienet()/*.then(async () => await stop())*/.catch(async (e) => {
-  console.error(e);
-  await stop();
-  process.exit(1);
-});
modifiedtests/src/util/playgrounds/unique.xcm.tsdiffbeforeafterboth
--- a/tests/src/util/playgrounds/unique.xcm.ts
+++ b/tests/src/util/playgrounds/unique.xcm.ts
@@ -244,6 +244,10 @@
     await this.helper.executeExtrinsic(signer, 'api.tx.assets.create', [assetId, admin, minimalBalance], true);
   }
 
+  async forceCreate(signer: TSigner, assetId: number | bigint, admin: string, minimalBalance: bigint, isSufficient = true) {
+    await this.helper.executeExtrinsic(signer, 'api.tx.assets.forceCreate', [assetId, admin, isSufficient, minimalBalance], true);
+  }
+
   async setMetadata(signer: TSigner, assetId: number | bigint, name: string, symbol: string, decimals: number) {
     await this.helper.executeExtrinsic(signer, 'api.tx.assets.setMetadata', [assetId, name, symbol, decimals], true);
   }
modifiedtests/src/xcm/lowLevelXcmQuartz.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/lowLevelXcmQuartz.test.ts
+++ b/tests/src/xcm/lowLevelXcmQuartz.test.ts
@@ -243,7 +243,7 @@
     await usingShidenPlaygrounds(shidenUrl, async (helper) => {
       if(!(await helper.callRpc('api.query.assets.asset', [QTZ_ASSET_ID_ON_SHIDEN])).toJSON()) {
         console.log('1. Create foreign asset and metadata');
-        await helper.assets.create(
+        await helper.getSudo().assets.forceCreate(
           alice,
           QTZ_ASSET_ID_ON_SHIDEN,
           alice.address,
modifiedtests/src/xcm/lowLevelXcmUnique.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/lowLevelXcmUnique.test.ts
+++ b/tests/src/xcm/lowLevelXcmUnique.test.ts
@@ -309,7 +309,7 @@
     await usingAstarPlaygrounds(astarUrl, async (helper) => {
       if(!(await helper.callRpc('api.query.assets.asset', [UNQ_ASSET_ID_ON_ASTAR])).toJSON()) {
         console.log('1. Create foreign asset and metadata');
-        await helper.assets.create(
+        await helper.getSudo().assets.forceCreate(
           alice,
           UNQ_ASSET_ID_ON_ASTAR,
           alice.address,
modifiedtests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/xcmQuartz.test.ts
+++ b/tests/src/xcm/xcmQuartz.test.ts
@@ -1290,11 +1290,11 @@
   const shidenInitialBalance = 1n * (10n ** SHIDEN_DECIMALS); // 1 SHD, existential deposit required to actually create the account on Shiden
   const unitsPerSecond = 500_451_000_000_000_000_000n; // The value is taken from the live Shiden
   const qtzToShidenTransferred = 10n * (10n ** QTZ_DECIMALS); // 10 QTZ
-  const qtzToShidenArrived = 9_999_999_999_088_000_000n; // 9.999 ... QTZ, Shiden takes a commision in foreign tokens
+  const qtzToShidenArrived = 7_998_196_000_000_000_000n; // 7.99 ... QTZ, Shiden takes a commision in foreign tokens
 
   // Shiden -> Quartz
   const qtzFromShidenTransfered = 5n * (10n ** QTZ_DECIMALS); // 5 QTZ
-  const qtzOnShidenLeft = qtzToShidenArrived - qtzFromShidenTransfered; // 4.999_999_999_088_000_000n QTZ
+  const qtzOnShidenLeft = qtzToShidenArrived - qtzFromShidenTransfered; // 2.99 ... QTZ
 
   let balanceAfterQuartzToShidenXCM: bigint;
 
@@ -1311,7 +1311,7 @@
     await usingShidenPlaygrounds(shidenUrl, async (helper) => {
       if(!(await helper.callRpc('api.query.assets.asset', [QTZ_ASSET_ID_ON_SHIDEN])).toJSON()) {
         console.log('1. Create foreign asset and metadata');
-        await helper.assets.create(
+        await helper.getSudo().assets.forceCreate(
           alice,
           QTZ_ASSET_ID_ON_SHIDEN,
           alice.address,
modifiedtests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/xcmUnique.test.ts
+++ b/tests/src/xcm/xcmUnique.test.ts
@@ -1518,11 +1518,11 @@
   const astarInitialBalance = 1n * (10n ** ASTAR_DECIMALS); // 1 ASTR, existential deposit required to actually create the account on Astar.
   const unitsPerSecond = 9_451_000_000_000_000_000n; // The value is taken from the live Astar
   const unqToAstarTransferred = 10n * (10n ** UNQ_DECIMALS); // 10 UNQ
-  const unqToAstarArrived = 9_999_999_999_088_000_000n; // 9.999 ... UNQ, Astar takes a commision in foreign tokens
+  const unqToAstarArrived = 9_962_196_000_000_000_000n; // 9.962 ... UNQ, Astar takes a commision in foreign tokens
 
   // Astar -> Unique
   const unqFromAstarTransfered = 5n * (10n ** UNQ_DECIMALS); // 5 UNQ
-  const unqOnAstarLeft = unqToAstarArrived - unqFromAstarTransfered; // 4.999_999_999_088_000_000n UNQ
+  const unqOnAstarLeft = unqToAstarArrived - unqFromAstarTransfered; // 4.962_219_600_000_000_000n UNQ
 
   let balanceAfterUniqueToAstarXCM: bigint;
 
@@ -1539,7 +1539,7 @@
     await usingAstarPlaygrounds(astarUrl, async (helper) => {
       if(!(await helper.callRpc('api.query.assets.asset', [UNQ_ASSET_ID_ON_ASTAR])).toJSON()) {
         console.log('1. Create foreign asset and metadata');
-        await helper.assets.create(
+        await helper.getSudo().assets.forceCreate(
           alice,
           UNQ_ASSET_ID_ON_ASTAR,
           alice.address,