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

difftreelog

Merge branch 'develop' into feature/CORE-269

Igor Kozyrev2022-02-17parents: #49d1d66 #886d2a8.patch.diff
in: master

86 files changed

modified.envdiffbeforeafterboth
--- a/.env
+++ b/.env
@@ -1,6 +1,6 @@
 RUST_TOOLCHAIN=nightly-2021-11-11
 RUST_C=1.58.0-nightly
-POLKA_VERSION=release-v0.9.14
+POLKA_VERSION=release-v0.9.16
 UNIQUE_BRANCH=develop
 USER=***
 PASS=***
modifiedCargo.lockdiffbeforeafterboth
before · Cargo.lock
931 packageslockfile v3
modifiedDockerfile-parachaindiffbeforeafterboth
--- a/Dockerfile-parachain
+++ b/Dockerfile-parachain
@@ -4,7 +4,7 @@
 
 ARG RUST_TOOLCHAIN=nightly-2021-11-11
 #ARG RUST_C=1.58.0-nightly
-ARG POLKA_VERSION=release-v0.9.14
+ARG POLKA_VERSION=release-v0.9.16
 ARG UNIQUE_BRANCH=develop
 
 #ARG USER=***
@@ -90,7 +90,7 @@
       nvm install v15.5.0 && \
       nvm use v15.5.0
 
-RUN git clone https://github.com/PureStake/polkadot-launch -b jlm-use-para-id-in-specs
+RUN git clone https://github.com/paritytech/polkadot-launch
 
 RUN export NVM_DIR="$HOME/.nvm" && \
     [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
modifiedREADME.mddiffbeforeafterboth
--- a/README.md
+++ b/README.md
@@ -29,26 +29,11 @@
 
 Please see our [walk-thorugh instructions](doc/hackusama_walk_through.md) to try everything out!
 
-## Hackusama Update
-
-During the Kusama Hackaphon the following changes were made:
-
--   Enabled Smart Contracts Pallet
--   Enabled integration between Smart Contracts and Unique Pallet (required special edition of RC4 Substrate version)
--   Fixed misc. bugs in Unique Pallet
--   Deployed Unique TestNet. Public node available at wss://unique.usetech.com, custom UI types - see below in this README.
--   New Features:
-    -   Re-Fungible Token Mode
-    -   Off-Chain Schema to store token image URLs
-    -   Alternative economic model
-    -   Allow Lists and Public Mint Permission
--   Use example: [SubstraPunks Game](https://github.com/usetech-llc/substrapunks), fully hosted on IPFS and Unique Testnet
-    Blockchain.
-
 ## Application Development
 
 If you are building an application that operates NFT tokens, use [this document](doc/application_development.md).
 
+
 ## Building
 
 Building Unique chain requires special versions of Rust and toolchain. We don't use the most recent versions of everything
@@ -57,8 +42,8 @@
 1. Install Rust:
 
 ```bash
+sudo apt-get install git curl libssl-dev llvm pkg-config libclang-dev clang
 curl https://sh.rustup.rs -sSf | sh
-sudo apt-get install libssl-dev pkg-config libclang-dev clang
 ```
 
 2. Remove all installed toolchains with `rustup toolchain list` and `rustup toolchain uninstall <toolchain>`.
@@ -86,111 +71,52 @@
 cargo build --release
 ```
 
-## Run
-
-You can start a development chain with:
-
-```bash
-cargo run -- --dev
-```
-
-Detailed logs may be shown by running the node with the following environment variables set:
-`RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev`.
+## Building as Parachain locally
 
-If you want to see the multi-node consensus algorithm in action locally, then you can create a local testnet with two
-validator nodes for Alice and Bob, who are the initial authorities of the genesis chain that have been endowed with
-testnet units. Give each node a name and expose them so they are listed on the Polkadot
-[telemetry site](https://telemetry.polkadot.io/#/Local%20Testnet). You'll need two terminal windows open.
+Note: checkout this project and all related projects (see below) in the sibling folders (both under the same folder)
 
-We'll start Alice's substrate node first on default TCP port 30333 with her chain database stored locally at
-`/tmp/alice`. The bootnode ID of her node is `QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN`, which is generated from
-the `--node-key` value that we specify below:
+### Polkadot launch utility
 
-```bash
-cargo run -- \
-  --base-path /tmp/alice \
-  --chain=local \
-  --alice \
-  --node-key 0000000000000000000000000000000000000000000000000000000000000001 \
-  --telemetry-url ws://telemetry.polkadot.io:1024 \
-  --validator
 ```
-
-In the second terminal, we'll start Bob's substrate node on a different TCP port of 30334, and with his chain database
-stored locally at `/tmp/bob`. We'll specify a value for the `--bootnodes` option that will connect his node to Alice's
-bootnode ID on TCP port 30333:
-
-```bash
-cargo run -- \
-  --base-path /tmp/bob \
-  --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN \
-  --chain=local \
-  --bob \
-  --port 30334 \
-  --telemetry-url ws://telemetry.polkadot.io:1024 \
-  --validator
+git clone https://github.com/paritytech/polkadot-launch
 ```
-
-Additional CLI usage options are available and may be shown by running `cargo run -- --help`.
-
-## Building and Running as Parachain locally
-
-Rust toolchain: nightly-2021-11-11
-Note: checkout this project and polkadot project (see below) in the sibling folders (both under the same folder)
 
 ### Build relay
 
 ```
 git clone https://github.com/paritytech/polkadot.git
 cd polkadot
-git checkout release-v0.9.9
+git checkout release-v0.9.16
 cargo build --release
 ```
 
-### Build parachain
+### Build Unique parachain
 
 Run in the root of this project:
 ```
-cargo --build
+cargo build --release
 ```
 
-### Run 4-node Relay
-
-1. Download `rococo-custom-4.json` chain spec here: https://substrate.dev/cumulus-workshop/shared/chainspecs/rococo-custom-4.json
-2. Use these instructions to launch 4 nodes: https://substrate.dev/cumulus-workshop/#/en/2-relay-chain/1-launch
+### Build Acala parachain (optional, full config only)
 
-Example (Run in polkadot folder. Replace `12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on` with output from Alice node):
 ```
-./target/release/polkadot --alice --validator --base-path ./cumulus_relay0 --chain rococo-custom-4.json --port 50555 --ws-port 9944
-./target/release/polkadot --bob --validator --base-path ./cumulus_relay1 --chain rococo-custom-4.json --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on --port 50556 --ws-port 9945
-./target/release/polkadot --charlie --validator --base-path ./cumulus_relay1 --chain rococo-custom-4.json --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on --port 50557 --ws-port 9946
-./target/release/polkadot --dave --validator --base-path ./cumulus_relay1 --chain rococo-custom-4.json --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on --port 50558 --ws-port 9947
-
+git clone https://github.com/AcalaNetwork/Acala
+cd Acala
+git checkout 54db3acd409a0b787f116f20e163a3b24101ce38
+make build-release
 ```
 
-3. Export genesis state and runtime wasm from Unique parachain:
+## Running as Parachain locally
 
-Run from this project root:
 ```
-./target/release/unique-collator export-genesis-state --parachain-id 2000 > ./resources/para-2000-genesis
-./target/release/unique-collator export-genesis-wasm > ./resources/para-2000-wasm
+./launch-testnet.sh
 ```
 
-4. Run two parachain nodes:
-
-Replace `12D3KooWN1ah2bFQSysEFnwZqcmcVpDDR8UedXyo6xfzV1zDNMNg` with Alice or Bob relay ID
-
-Run from this project root:
+Optional, full setup with Acala and Statemint
 ```
-./target/release/unique-collator --alice --collator --force-authoring --base-path ./tmp/parachain-alice --parachain-id 2000 --port 40333 --ws-port 9844  -- --execution wasm --chain ../polkadot/rococo-custom-4.json --port 30343 --ws-port 9977
-./target/release/unique-collator --bob --collator --force-authoring --parachain-id 2000 --base-path ./tmp/parachain/bob --port 40334 --ws-port 9845 -- --execution wasm --chain ../polkadot/rococo-custom-4.json --port 30344 --ws-port 9978 --bootnodes /ip4/127.0.0.1/tcp/50556/p2p/12D3KooWN1ah2bFQSysEFnwZqcmcVpDDR8UedXyo6xfzV1zDNMNg
+./launch-testnet-full.sh
 ```
-
-4. Reserve parachain ID as described here: https://substrate.dev/cumulus-workshop/#/en/2-relay-chain/2-reserve
 
-5. Register parachain in relay as described here: https://substrate.dev/cumulus-workshop/#/en/3-parachains/2-register
-
-
 ## Run Integration Tests
 
 1. Install all needed dependecies
@@ -202,40 +128,11 @@
 2. Run tests
 ```
 yarn test
-```
-
-## Benchmarks
-
-First of all, add rust toolchain and make it default.
-```bash
-rustup target add wasm32-unknown-unknown --toolchain nightly-2021-11-11
-```
-
-Then in "/node/src" run build command below
-```bash
-cargo +nightly-2021-11-11 build --release --features runtime-benchmarks
-```
-
-Run benchmark
-```bash
-target/release/unique-collator benchmark --chain dev --pallet "pallet_unique" --extrinsic "*" --repeat 1
 ```
-
-## UI custom types
-
-Moved to [runtime_types.json](./runtime_types.json).
-
-## Running Integration Tests
 
-See [tests/README.md](./tests/README.md).
 
 ## Code Formatting
 
-### Get formatter and linter settings into your branch (if you forked before they were introduced)
-```bash
-git cherry-pick -n 8ff77c21b0d30b2a4648fa35dbf61dfa9d3948a7
-```
-
 ### Apply formatting and clippy fixes
 ```bash
 cargo clippy
@@ -252,84 +149,57 @@
 cd tests && yarn eslint --ext .ts,.js src/
 ```
 
-## Re-Enabling Ink! Contracts
 
-Uncomment following lies:
-1. In node/rpc/Cargo.toml
-```
-# pallet-contracts-rpc = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
-```
+## Karura token transfer
 
-2. In node/rpc/src/lib.rs
-```
-// C::Api: pallet_contracts_rpc::ContractsRuntimeApi<Block, AccountId, Balance, BlockNumber, Hash>,
-...
-// use pallet_contracts_rpc::{Contracts, ContractsApi};
-...
-// io.extend_with(ContractsApi::to_delegate(Contracts::new(client.clone())));
+To get started, you need to open inbound and outbound hrmp channels.
 
+### Next, we need to register our asset at Karura.
 ```
+assetRegistry -> registerForeignAsset(location, metadata)
+location:
+	V0(X2(Parent, Parachain(PARA_ID))) 
+metadata:
+	name         OPL
+	symbol       OPL
+	decimals     18
+minimalBalance	 1
+```
 
-3. In runtime/Cargo.toml
+### Next, we can send tokens from Opal to Karura:
 ```
-    # 'pallet-contracts/std',
-    # 'pallet-contracts-primitives/std',
-    # 'pallet-contracts-rpc-runtime-api/std',
-    # 'pallet-contract-helpers/std',
-...
-    # [dependencies.pallet-contracts]
-    # git = 'https://github.com/paritytech/substrate.git'
-    # default-features = false
-    # branch = 'polkadot-v0.9.9'
-    # version = '3.0.0'
+polkadotXcm -> reserveTransferAssets
+dest:
+	V0(X2(Parent, Parachain(<KARURA_PARA_ID>))) 
+beneficiary:
+	X1(AccountId(Any, <ACCOUNT>))
+assets:
+	V1(Concrete(0,Here), Fungible(<AMOUNT>))
+feeAssetItem: 
+	0	
+weightLimit:
+	<LIMIT>
+```	
 
-    # [dependencies.pallet-contracts-primitives]
-    # git = 'https://github.com/paritytech/substrate.git'
-    # default-features = false
-    # branch = 'polkadot-v0.9.9'
-    # version = '3.0.0'
+The result will be displayed in ChainState   
+tokens -> accounts	
 
-    # [dependencies.pallet-contracts-rpc-runtime-api]
-    # git = 'https://github.com/paritytech/substrate.git'
-    # default-features = false
-    # branch = 'polkadot-v0.9.9'
-    # version = '3.0.0'
-...
-    # pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }
+### To send tokens from Karura to Opal:
 ```
+xtokens -> transfer
 
-4. runtime/src/lib.rs
-```
-// use pallet_contracts::weights::WeightInfo;
-...
-// pub use pallet_timestamp::Call as TimestampCall;
-...
-// mod chain_extension;
-// use crate::chain_extension::{NFTExtension, Imbalance};
-...
-/*
-parameter_types! {
-	pub TombstoneDeposit: Balance = deposit(
-  ...
-}
-*/
-...
-//pallet_contract_helpers::ContractSponsorshipHandler<Runtime>,
-...
-// impl pallet_contract_helpers::Config for Runtime {}
-...
-// Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>},
-...
-// ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage},
-...
-//pallet_contract_helpers::ContractHelpersExtension<Runtime>,
-...
-/*
-	impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber, Hash>
-		for Runtime
-	{
-    ...
-	}
-*/
+currencyId:
+	ForeingAsset
+		<TOKEN_ID>
 
-```
+amount:
+		<AMOUNT>
+dest:
+	V1
+	(
+		Parents:1, 
+		X2(Parachain(<KARURA_PARA_ID>), AccountId(Any, <ACCOUNT>)
+	)
+destWeight:
+	<WEIGHT>
+```
\ No newline at end of file
modifiedclient/rpc/Cargo.tomldiffbeforeafterboth
--- a/client/rpc/Cargo.toml
+++ b/client/rpc/Cargo.toml
@@ -12,8 +12,8 @@
 jsonrpc-core-client = "18.0.0"
 jsonrpc-derive = "18.0.0"
 
-sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.14" }
-sp-blockchain = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.14" }
-sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.14" }
-sp-rpc = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.14" }
-sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.14" }
+sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" }
+sp-blockchain = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" }
+sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" }
+sp-rpc = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" }
+sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" }
modifiedclient/rpc/src/lib.rsdiffbeforeafterboth
--- a/client/rpc/src/lib.rs
+++ b/client/rpc/src/lib.rs
@@ -4,7 +4,7 @@
 use jsonrpc_core::{Error as RpcError, ErrorCode, Result};
 use jsonrpc_derive::rpc;
 use up_data_structs::{Collection, CollectionId, CollectionStats, TokenId};
-use sp_api::{BlockId, BlockT, ProvideRuntimeApi};
+use sp_api::{BlockId, BlockT, ProvideRuntimeApi, ApiExt};
 use sp_blockchain::HeaderBackend;
 use up_rpc::UniqueApi as UniqueRuntimeApi;
 
@@ -31,7 +31,7 @@
 		collection: CollectionId,
 		token: TokenId,
 		at: Option<BlockHash>,
-	) -> Result<CrossAccountId>;
+	) -> Result<Option<CrossAccountId>>;
 	#[rpc(name = "unique_constMetadata")]
 	fn const_metadata(
 		&self,
@@ -132,7 +132,10 @@
 }
 
 macro_rules! pass_method {
-	($method_name:ident($($name:ident: $ty:ty),* $(,)?) -> $result:ty $(=> $mapper:expr)?) => {
+	(
+		$method_name:ident($($name:ident: $ty:ty),* $(,)?) -> $result:ty $(=> $mapper:expr)?
+		$(; changed_in $ver:expr, $changed_method_name:ident ($($changed_name:expr), * $(,)?) => $fixer:expr)*
+	) => {
 		fn $method_name(
 			&self,
 			$(
@@ -142,8 +145,25 @@
 		) -> Result<$result> {
 			let api = self.client.runtime_api();
 			let at = BlockId::hash(at.unwrap_or_else(|| self.client.info().best_hash));
+			let _api_version = if let Ok(Some(api_version)) =
+				api.api_version::<dyn UniqueRuntimeApi<Block, CrossAccountId, AccountId>>(&at)
+			{
+				api_version
+			} else {
+				// unreachable for our runtime
+				return Err(RpcError {
+					code: ErrorCode::InvalidParams,
+					message: "Api is not available".into(),
+					data: None,
+				})
+			};
+
+			let result = $(if _api_version < $ver {
+				api.$changed_method_name(&at, $($changed_name),*).map(|r| r.map($fixer))
+			} else)*
+			{ api.$method_name(&at, $($name),*) };
 
-			let result = api.$method_name(&at, $($name),*).map_err(|e| RpcError {
+			let result = result.map_err(|e| RpcError {
 				code: ErrorCode::ServerError(Error::RuntimeError.into()),
 				message: "Unable to query".into(),
 				data: Some(format!("{:?}", e).into()),
@@ -168,7 +188,10 @@
 {
 	pass_method!(account_tokens(collection: CollectionId, account: CrossAccountId) -> Vec<TokenId>);
 	pass_method!(token_exists(collection: CollectionId, token: TokenId) -> bool);
-	pass_method!(token_owner(collection: CollectionId, token: TokenId) -> CrossAccountId);
+	pass_method!(
+		token_owner(collection: CollectionId, token: TokenId) -> Option<CrossAccountId>;
+		changed_in 2, token_owner_before_version_2(collection, token) => |u| Some(u)
+	);
 	pass_method!(const_metadata(collection: CollectionId, token: TokenId) -> Vec<u8>);
 	pass_method!(variable_metadata(collection: CollectionId, token: TokenId) -> Vec<u8>);
 	pass_method!(collection_tokens(collection: CollectionId) -> u32);
modifiedcrates/evm-coder/Cargo.tomldiffbeforeafterboth
--- a/crates/evm-coder/Cargo.toml
+++ b/crates/evm-coder/Cargo.toml
@@ -7,8 +7,8 @@
 evm-coder-macros = { path = "../evm-coder-macros" }
 primitive-types = { version = "0.10.1", default-features = false }
 hex-literal = "0.3.3"
-ethereum = { version = "0.10.0", default-features = false }
-evm-core = { default-features = false, git = "https://github.com/uniquenetwork/evm.git", branch = "unique-weights" }
+ethereum = { version = "0.11.1", default-features = false }
+evm-core = { default-features = false, git = "https://github.com/uniquenetwork/evm.git", branch = "unique-polkadot-v0.9.16" }
 impl-trait-for-tuples = "0.2.1"
 
 [dev-dependencies]
modifiedcrates/evm-coder/src/abi.rsdiffbeforeafterboth
--- a/crates/evm-coder/src/abi.rs
+++ b/crates/evm-coder/src/abi.rs
@@ -95,6 +95,10 @@
 		string::from_utf8(self.bytes()?).map_err(|_| Error::Error(ExitError::InvalidRange))
 	}
 
+	pub fn uint8(&mut self) -> Result<u8> {
+		Ok(self.read_padleft::<1>()?[0])
+	}
+
 	pub fn uint32(&mut self) -> Result<u32> {
 		Ok(u32::from_be_bytes(self.read_padleft()?))
 	}
@@ -243,6 +247,7 @@
 	};
 }
 
+impl_abi_readable!(u8, uint8);
 impl_abi_readable!(u32, uint32);
 impl_abi_readable!(u64, uint64);
 impl_abi_readable!(u128, uint128);
addeddoc/hackusama_update.mddiffbeforeafterboth
--- /dev/null
+++ b/doc/hackusama_update.md
@@ -0,0 +1,15 @@
+## Hackusama Update
+
+During the Kusama Hackaphon the following changes were made:
+
+-   Enabled Smart Contracts Pallet
+-   Enabled integration between Smart Contracts and Unique Pallet (required special edition of RC4 Substrate version)
+-   Fixed misc. bugs in Unique Pallet
+-   Deployed Unique TestNet. Public node available at wss://unique.usetech.com, custom UI types - see below in this README.
+-   New Features:
+    -   Re-Fungible Token Mode
+    -   Off-Chain Schema to store token image URLs
+    -   Alternative economic model
+    -   Allow Lists and Public Mint Permission
+-   Use example: [SubstraPunks Game](https://github.com/usetech-llc/substrapunks), fully hosted on IPFS and Unique Testnet
+    Blockchain.
\ No newline at end of file
addeddoc/re-enable_ink_contracts.mddiffbeforeafterboth
--- /dev/null
+++ b/doc/re-enable_ink_contracts.md
@@ -0,0 +1,81 @@
+## Re-Enabling Ink! Contracts
+
+Uncomment following lies:
+1. In node/rpc/Cargo.toml
+```
+# pallet-contracts-rpc = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
+```
+
+2. In node/rpc/src/lib.rs
+```
+// C::Api: pallet_contracts_rpc::ContractsRuntimeApi<Block, AccountId, Balance, BlockNumber, Hash>,
+...
+// use pallet_contracts_rpc::{Contracts, ContractsApi};
+...
+// io.extend_with(ContractsApi::to_delegate(Contracts::new(client.clone())));
+
+```
+
+3. In runtime/Cargo.toml
+```
+    # 'pallet-contracts/std',
+    # 'pallet-contracts-primitives/std',
+    # 'pallet-contracts-rpc-runtime-api/std',
+    # 'pallet-contract-helpers/std',
+...
+    # [dependencies.pallet-contracts]
+    # git = 'https://github.com/paritytech/substrate.git'
+    # default-features = false
+    # branch = 'polkadot-v0.9.9'
+    # version = '3.0.0'
+
+    # [dependencies.pallet-contracts-primitives]
+    # git = 'https://github.com/paritytech/substrate.git'
+    # default-features = false
+    # branch = 'polkadot-v0.9.9'
+    # version = '3.0.0'
+
+    # [dependencies.pallet-contracts-rpc-runtime-api]
+    # git = 'https://github.com/paritytech/substrate.git'
+    # default-features = false
+    # branch = 'polkadot-v0.9.9'
+    # version = '3.0.0'
+...
+    # pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }
+```
+
+4. runtime/src/lib.rs
+```
+// use pallet_contracts::weights::WeightInfo;
+...
+// pub use pallet_timestamp::Call as TimestampCall;
+...
+// mod chain_extension;
+// use crate::chain_extension::{NFTExtension, Imbalance};
+...
+/*
+parameter_types! {
+	pub TombstoneDeposit: Balance = deposit(
+  ...
+}
+*/
+...
+//pallet_contract_helpers::ContractSponsorshipHandler<Runtime>,
+...
+// impl pallet_contract_helpers::Config for Runtime {}
+...
+// Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>},
+...
+// ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage},
+...
+//pallet_contract_helpers::ContractHelpersExtension<Runtime>,
+...
+/*
+	impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber, Hash>
+		for Runtime
+	{
+    ...
+	}
+*/
+
+```
\ No newline at end of file
addedlaunch-config-full.jsondiffbeforeafterboth
--- /dev/null
+++ b/launch-config-full.json
@@ -0,0 +1,135 @@
+{
+    "relaychain": {
+        "bin": "../polkadot/target/release/polkadot",
+        "chain": "rococo-local",
+        "nodes": [
+            {
+                "name": "alice",
+                "wsPort": 9844,
+                "rpcPort": 9843,
+                "port": 30444,
+                "flags": [
+                    "-lparachain::candidate_validation=debug",
+                    "-lxcm=trace"
+                ]
+            },
+            {
+                "name": "bob",
+                "wsPort": 9855,
+                "rpcPort": 9854,
+                "port": 30555,
+                "flags": [
+                    "-lparachain::candidate_validation=debug",
+                    "-lxcm=trace"
+                ]
+            },
+            {
+                "name": "charlie",
+                "wsPort": 9866,
+                "rpcPort": 9865,
+                "port": 30666,
+                "flags": [
+                    "-lparachain::candidate_validation=debug"
+                ]
+            },
+            {
+                "name": "dave",
+                "wsPort": 9877,
+                "rpcPort": 9876,
+                "port": 30777,
+                "flags": [
+                    "-lparachain::candidate_validation=debug"
+                ]
+            },
+            {
+                "name": "eve",
+                "wsPort": 9888,
+                "rpcPort": 9887,
+                "port": 30888,
+                "flags": [
+                    "-lparachain::candidate_validation=debug"
+                ]
+            }
+        ],
+        "genesis": {
+            "runtime": {
+                "runtime_genesis_config": {
+                    "parachainsConfiguration": {
+                        "config": {
+                            "validation_upgrade_frequency": 1,
+                            "validation_upgrade_delay": 1
+                        }
+                    }
+                }
+            }
+        }
+    },
+    "parachains": [
+        {
+            "bin": "../unique-chain/target/release/unique-collator",
+            "id": "1000",
+            "balance": "1000000000000000000000000",
+            "nodes": [
+                {
+                    "port": 31200,
+                    "wsPort": 9944,
+                    "rpcPort": 9933,
+                    "name": "alice",
+                    "flags": [
+                        "--rpc-cors=all",
+                        "--unsafe-rpc-external",
+                        "--unsafe-ws-external",
+                        "-lxcm=trace"
+                    ]
+                },
+                {
+                    "port": 31201,
+                    "wsPort": 9945,
+                    "rpcPort": 9934,
+                    "name": "bob",
+                    "flags": [
+                        "--rpc-cors=all",
+                        "--unsafe-rpc-external",
+                        "--unsafe-ws-external",
+                        "-lxcm=trace"
+                    ]
+                }
+            ]
+        },
+        {
+            "bin": "../Acala/target/release/acala",
+            "id": "2000",
+            "chain":  "karura-dev",
+			"balance": "1000000000000000000000",
+			"nodes": [
+				{
+					"wsPort": 9946,
+					"port": 31202,
+					"name": "alice",
+                    "flags": [
+                        "--rpc-cors=all",
+                        "--unsafe-rpc-external",
+                        "--unsafe-ws-external",
+                        "-lxcm=trace"
+                    ]
+				}
+			]
+		}
+    ],
+    "simpleParachains": [],
+    "hrmpChannels": [
+        {
+            "sender": 2000,
+            "recipient": 1000,
+            "maxCapacity": 8,
+            "maxMessageSize": 512
+        },
+        {
+            "sender": 1000,
+            "recipient": 2000,
+            "maxCapacity": 8,
+            "maxMessageSize": 512
+        }
+    ],
+    "finalization": false
+}
deletedlaunch-config-westend.jsondiffbeforeafterboth
--- a/launch-config-westend.json
+++ /dev/null
@@ -1,141 +0,0 @@
-{
-    "relaychain": {
-        "bin": "../polkadot/target/release/polkadot",
-        "chain": "westend-local",
-        "nodes": [
-            {
-                "name": "alice",
-                "wsPort": 9844,
-                "rpcPort": 9843,
-                "port": 30444,
-                "flags": [
-                    "-lparachain::candidate_validation=debug"
-                ]
-            },
-            {
-                "name": "bob",
-                "wsPort": 9855,
-                "rpcPort": 9854,
-                "port": 30555,
-                "flags": [
-                    "-lparachain::candidate_validation=debug"
-                ]
-            },
-            {
-                "name": "charlie",
-                "wsPort": 9866,
-                "rpcPort": 9865,
-                "port": 30666,
-                "flags": [
-                    "-lparachain::candidate_validation=debug"
-                ]
-            },
-            {
-                "name": "dave",
-                "wsPort": 9877,
-                "rpcPort": 9876,
-                "port": 30777,
-                "flags": [
-                    "-lparachain::candidate_validation=debug"
-                ]
-            },
-            {
-                "name": "eve",
-                "wsPort": 9888,
-                "rpcPort": 9886,
-                "port": 30888,
-                "flags": [
-                    "-lparachain::candidate_validation=debug"
-                ]
-            },
-            {
-                "name": "ferdie",
-                "wsPort": 9897,
-                "rpcPort": 9896,
-                "port": 30999,
-                "flags": [
-                    "-lparachain::candidate_validation=debug"
-                ]
-            }
-        ],
-        "genesis": {
-            "runtime": {
-                "runtime_genesis_config": {
-                    "parachainsConfiguration": {
-                        "config": {
-                            "validation_upgrade_frequency": 1,
-                            "validation_upgrade_delay": 1
-                        }
-                    }
-                }
-            }
-        }
-    },
-    "parachains": [
-        {
-            "bin": "../unique-chain/target/release/unique-collator",
-            "chain": "westend-local",
-            "balance": "1000000000000000000000000",
-            "nodes": [
-                {
-                    "port": 31200,
-                    "wsPort": 9944,
-                    "rpcPort": 9933,
-                    "name": "alice",
-                    "flags": [
-                        "--rpc-cors=all",
-                        "--unsafe-rpc-external",
-                        "--unsafe-ws-external"
-                    ]
-                },
-                {
-                    "port": 31201,
-                    "wsPort": 9945,
-                    "rpcPort": 9934,
-                    "name": "bob",
-                    "flags": [
-                        "--rpc-cors=all",
-                        "--unsafe-rpc-external",
-                        "--unsafe-ws-external"
-                    ]
-                },
-                {
-                    "port": 31202,
-                    "wsPort": 9946,
-                    "rpcPort": 9935,
-                    "name": "charlie",
-                    "flags": [
-                        "--rpc-cors=all",
-                        "--unsafe-rpc-external",
-                        "--unsafe-ws-external"
-                    ]
-                },
-                {
-                    "port": 31203,
-                    "wsPort": 9947,
-                    "rpcPort": 9936,
-                    "name": "dave",
-                    "flags": [
-                        "--rpc-cors=all",
-                        "--unsafe-rpc-external",
-                        "--unsafe-ws-external"
-                    ]
-                },
-                {
-                    "port": 31204,
-                    "wsPort": 9948,
-                    "rpcPort": 9937,
-                    "name": "eve",
-                    "flags": [
-                        "--rpc-cors=all",
-                        "--unsafe-rpc-external",
-                        "--unsafe-ws-external"
-                    ]
-                }
-            ]
-        }
-    ],
-    "simpleParachains": [],
-    "hrmpChannels": [],
-    "finalization": false
-}
modifiedlaunch-config.jsondiffbeforeafterboth
--- a/launch-config.json
+++ b/launch-config.json
@@ -9,7 +9,8 @@
                 "rpcPort": 9843,
                 "port": 30444,
                 "flags": [
-                    "-lparachain::candidate_validation=debug"
+                    "-lparachain::candidate_validation=debug",
+                    "-lxcm=trace"
                 ]
             },
             {
@@ -18,7 +19,8 @@
                 "rpcPort": 9854,
                 "port": 30555,
                 "flags": [
-                    "-lparachain::candidate_validation=debug"
+                    "-lparachain::candidate_validation=debug",
+                    "-lxcm=trace"
                 ]
             },
             {
@@ -38,6 +40,15 @@
                 "flags": [
                     "-lparachain::candidate_validation=debug"
                 ]
+            },
+            {
+                "name": "eve",
+                "wsPort": 9888,
+                "rpcPort": 9887,
+                "port": 30888,
+                "flags": [
+                    "-lparachain::candidate_validation=debug"
+                ]
             }
         ],
         "genesis": {
@@ -67,7 +78,8 @@
                     "flags": [
                         "--rpc-cors=all",
                         "--unsafe-rpc-external",
-                        "--unsafe-ws-external"
+                        "--unsafe-ws-external",
+                        "-lxcm=trace"
                     ]
                 },
                 {
@@ -78,7 +90,8 @@
                     "flags": [
                         "--rpc-cors=all",
                         "--unsafe-rpc-external",
-                        "--unsafe-ws-external"
+                        "--unsafe-ws-external",
+                        "-lxcm=trace"
                     ]
                 }
             ]
deletedlaunch-test-env.shdiffbeforeafterboth
--- a/launch-test-env.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-cp launch-config.json ../polkadot-launch/launch-config.json
-
-cd ../polkadot-launch
-yarn install
-yarn build
-yarn start launch-config.json
addedlaunch-testnet-full.shdiffbeforeafterboth
--- /dev/null
+++ b/launch-testnet-full.sh
@@ -0,0 +1,6 @@
+cp launch-config-full.json ../polkadot-launch/launch-config-full.json
+
+cd ../polkadot-launch
+yarn install
+yarn build
+yarn start launch-config-full.json
addedlaunch-testnet.shdiffbeforeafterboth
--- /dev/null
+++ b/launch-testnet.sh
@@ -0,0 +1,6 @@
+cp launch-config.json ../polkadot-launch/launch-config.json
+
+cd ../polkadot-launch
+yarn install
+yarn build
+yarn start launch-config.json
modifiednode/cli/Cargo.tomldiffbeforeafterboth
--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -3,7 +3,7 @@
 
 [build-dependencies.substrate-build-script-utils]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 ################################################################################
 # Substrate Dependecies
@@ -16,150 +16,150 @@
 
 [dependencies.frame-benchmarking]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.frame-benchmarking-cli]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.pallet-transaction-payment-rpc]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.substrate-prometheus-endpoint]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sc-basic-authorship]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sc-chain-spec]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sc-cli]
 features = ['wasmtime']
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sc-client-api]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sc-consensus]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sc-consensus-aura]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sc-executor]
 features = ['wasmtime']
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sc-finality-grandpa]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sc-keystore]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sc-rpc]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sc-rpc-api]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sc-service]
 features = ['wasmtime']
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sc-telemetry]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sc-transaction-pool]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sc-tracing]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-block-builder]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-api]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-blockchain]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-consensus]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-consensus-aura]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-core]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-finality-grandpa]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-inherents]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-keystore]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-offchain]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-runtime]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-session]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-timestamp]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-transaction-pool]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-trie]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.substrate-frame-rpc-system]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sc-network]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.serde]
 features = ['derive']
@@ -173,59 +173,66 @@
 # Cumulus dependencies
 
 [dependencies.cumulus-client-consensus-aura]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.cumulus-client-consensus-common]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.cumulus-client-collator]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.cumulus-client-cli]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.cumulus-client-network]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.cumulus-primitives-core]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.cumulus-primitives-parachain-inherent]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.cumulus-client-service]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 
+[dependencies.cumulus-relay-chain-interface]
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 
+[dependencies.cumulus-relay-chain-local]
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
+
 ################################################################################
 # Polkadot dependencies
 [dependencies.polkadot-primitives]
 git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
 
 [dependencies.polkadot-service]
 git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
 
 [dependencies.polkadot-cli]
 git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
 
 [dependencies.polkadot-test-service]
 git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
 
 [dependencies.polkadot-parachain]
 git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
 
 
 ################################################################################
@@ -250,7 +257,7 @@
 license = 'All Rights Reserved'
 name = 'unique-node'
 repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.9.14'
+version = '0.9.16'
 
 [[bin]]
 name = 'unique-collator'
@@ -268,13 +275,13 @@
 jsonrpc-core = '18.0.0'
 jsonrpc-pubsub = "18.0.0"
 
-fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fc-consensus = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fc-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fc-db = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fp-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
+fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fc-consensus = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fc-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fc-db = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fp-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
 
 unique-rpc = { path = "../rpc" }
 
modifiednode/cli/src/chain_spec.rsdiffbeforeafterboth
--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -85,6 +85,7 @@
 		None,
 		// Protocol ID
 		None,
+		None,
 		// Properties
 		Some(properties),
 		// Extensions
@@ -134,6 +135,7 @@
 		None,
 		// Protocol ID
 		None,
+		None,
 		// Properties
 		None,
 		// Extensions
@@ -186,6 +188,7 @@
 		None,
 		// Protocol ID
 		None,
+		None,
 		// Properties
 		None,
 		// Extensions
@@ -217,7 +220,9 @@
 				.collect(),
 		},
 		treasury: Default::default(),
-		sudo: SudoConfig { key: root_key },
+		sudo: SudoConfig {
+			key: Some(root_key),
+		},
 		vesting: VestingConfig { vesting: vec![] },
 		parachain_info: unique_runtime::ParachainInfoConfig { parachain_id: id },
 		parachain_system: Default::default(),
modifiednode/cli/src/command.rsdiffbeforeafterboth
--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -40,6 +40,7 @@
 fn load_spec(id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
 	Ok(match id {
 		"westend-local" => Box::new(chain_spec::local_testnet_westend_config()),
+		"rococo-local" => Box::new(chain_spec::local_testnet_rococo_config()),
 		"dev" => Box::new(chain_spec::development_config()),
 		"" | "local" => Box::new(chain_spec::local_testnet_rococo_config()),
 		path => Box::new(chain_spec::ChainSpec::from_json_file(
@@ -213,8 +214,9 @@
 			builder.with_profiling(sc_tracing::TracingReceiver::Log, "");
 			let _ = builder.init();
 
-			let block: Block =
-				generate_genesis_block(&load_spec(&params.chain.clone().unwrap_or_default())?)?;
+			let spec = load_spec(&params.chain.clone().unwrap_or_default())?;
+			let state_version = Cli::native_runtime_version(&spec).state_version();
+			let block: Block = generate_genesis_block(&spec, state_version)?;
 			let raw_header = block.header().encode();
 			let output_buf = if params.raw {
 				raw_header
@@ -282,9 +284,12 @@
 				let parachain_account =
 					AccountIdConversion::<polkadot_primitives::v0::AccountId>::into_account(&id);
 
-				let block: Block =
-					generate_genesis_block(&config.chain_spec).map_err(|e| format!("{:?}", e))?;
+				let state_version =
+					RelayChainCli::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,
@@ -296,6 +301,7 @@
 				info!("Parachain id: {:?}", id);
 				info!("Parachain Account: {}", parachain_account);
 				info!("Parachain genesis state: {}", genesis_state);
+				info!("Parachain genesis hash: {}", genesis_hash);
 				info!(
 					"Is collating: {}",
 					if config.role.is_authority() {
@@ -368,11 +374,23 @@
 		self.base.base.rpc_ws(default_listen_port)
 	}
 
-	fn prometheus_config(&self, default_listen_port: u16) -> Result<Option<PrometheusConfig>> {
-		self.base.base.prometheus_config(default_listen_port)
+	fn prometheus_config(
+		&self,
+		default_listen_port: u16,
+		chain_spec: &Box<dyn ChainSpec>,
+	) -> Result<Option<PrometheusConfig>> {
+		self.base
+			.base
+			.prometheus_config(default_listen_port, chain_spec)
 	}
 
-	fn init<C: SubstrateCli>(&self) -> Result<()> {
+	fn init<F>(
+		&self,
+		_support_url: &String,
+		_impl_version: &String,
+		_logger_hook: F,
+		_config: &sc_service::Configuration,
+	) -> Result<()> {
 		unreachable!("PolkadotCli is never initialized; qed");
 	}
 
modifiednode/cli/src/service.rsdiffbeforeafterboth
--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -10,19 +10,23 @@
 use std::sync::Mutex;
 use std::collections::BTreeMap;
 use std::time::Duration;
+use fc_rpc_core::types::FeeHistoryCache;
 use futures::StreamExt;
 
+use unique_rpc::overrides_handle;
 // Local Runtime Types
 use unique_runtime::RuntimeApi;
 
 // Cumulus Imports
-use cumulus_client_consensus_aura::{build_aura_consensus, BuildAuraConsensusParams, SlotProportion};
+use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, SlotProportion};
 use cumulus_client_consensus_common::ParachainConsensus;
-use cumulus_client_network::build_block_announce_validator;
 use cumulus_client_service::{
 	prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams,
 };
+use cumulus_client_network::BlockAnnounceValidator;
 use cumulus_primitives_core::ParaId;
+use cumulus_relay_chain_interface::RelayChainInterface;
+use cumulus_relay_chain_local::build_relay_chain_interface;
 
 // Substrate Imports
 use sc_client_api::ExecutorProvider;
@@ -109,6 +113,7 @@
 			Option<FilterPool>,
 			Arc<fc_db::Backend<Block>>,
 			Option<TelemetryWorkerHandle>,
+			FeeHistoryCache,
 		),
 	>,
 	sc_service::Error,
@@ -149,6 +154,7 @@
 		config.wasm_method,
 		config.default_heap_pages,
 		config.max_runtime_instances,
+		config.runtime_cache_size,
 	);
 
 	let (client, backend, keystore_container, task_manager) =
@@ -188,6 +194,7 @@
 		telemetry.as_ref().map(|telemetry| telemetry.handle()),
 		&task_manager,
 	)?;
+	let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new()));
 
 	let params = PartialComponents {
 		backend,
@@ -202,6 +209,7 @@
 			filter_pool,
 			frontier_backend,
 			telemetry_worker_handle,
+			fee_history_cache,
 		),
 	};
 
@@ -233,7 +241,7 @@
 		Option<&Registry>,
 		Option<TelemetryHandle>,
 		&TaskManager,
-		&polkadot_service::NewFull<polkadot_service::Client>,
+		Arc<dyn RelayChainInterface>,
 		Arc<sc_transaction_pool::FullPool<Block, FullClient>>,
 		Arc<NetworkService<Block, Hash>>,
 		SyncCryptoStorePtr,
@@ -247,29 +255,26 @@
 	let parachain_config = prepare_node_config(parachain_config);
 
 	let params = new_partial::<BIQ>(&parachain_config, build_import_queue)?;
-	let (mut telemetry, filter_pool, frontier_backend, telemetry_worker_handle) = params.other;
+	let (mut telemetry, filter_pool, frontier_backend, telemetry_worker_handle, fee_history_cache) =
+		params.other;
+
+	let client = params.client.clone();
+	let backend = params.backend.clone();
+	let mut task_manager = params.task_manager;
 
-	let relay_chain_full_node =
-		cumulus_client_service::build_polkadot_full_node(polkadot_config, telemetry_worker_handle)
+	let (relay_chain_interface, collator_key) =
+		build_relay_chain_interface(polkadot_config, telemetry_worker_handle, &mut task_manager)
 			.map_err(|e| match e {
 				polkadot_service::Error::Sub(x) => x,
 				s => format!("{}", s).into(),
 			})?;
 
-	let client = params.client.clone();
-	let backend = params.backend.clone();
-	let block_announce_validator = build_block_announce_validator(
-		relay_chain_full_node.client.clone(),
-		id,
-		Box::new(relay_chain_full_node.network.clone()),
-		relay_chain_full_node.backend.clone(),
-	);
+	let block_announce_validator = BlockAnnounceValidator::new(relay_chain_interface.clone(), 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();
-	let mut task_manager = params.task_manager;
 	let import_queue = cumulus_client_service::SharedImportQueue::new(params.import_queue);
 
 	let (network, system_rpc_tx, start_network) =
@@ -279,7 +284,9 @@
 			transaction_pool: transaction_pool.clone(),
 			spawn_handle: task_manager.spawn_handle(),
 			import_queue: import_queue.clone(),
-			block_announce_validator_builder: Some(Box::new(|_| block_announce_validator)),
+			block_announce_validator_builder: Some(Box::new(|_| {
+				Box::new(block_announce_validator)
+			})),
 			warp_sync: None,
 		})?;
 
@@ -287,10 +294,17 @@
 	let rpc_client = client.clone();
 	let rpc_pool = transaction_pool.clone();
 	let select_chain = params.select_chain.clone();
-	let is_authority = parachain_config.role.clone().is_authority();
 	let rpc_network = network.clone();
 
 	let rpc_frontier_backend = frontier_backend.clone();
+
+	let block_data_cache = Arc::new(fc_rpc::EthBlockDataCache::new(
+		task_manager.spawn_handle(),
+		overrides_handle(client.clone()),
+		50,
+		50,
+	));
+
 	let rpc_extensions_builder = Box::new(move |deny_unsafe, _| {
 		let full_deps = unique_rpc::FullDeps {
 			backend: rpc_frontier_backend.clone(),
@@ -303,9 +317,13 @@
 			filter_pool: filter_pool.clone(),
 			network: rpc_network.clone(),
 			select_chain: select_chain.clone(),
-			is_authority,
+			is_authority: validator,
 			// TODO: Unhardcode
 			max_past_logs: 10000,
+			block_data_cache: block_data_cache.clone(),
+			fee_history_cache: fee_history_cache.clone(),
+			// TODO: Unhardcode
+			fee_history_limit: 2048,
 		};
 
 		Ok(unique_rpc::create_full::<_, _, _, _, RuntimeApi, _>(
@@ -346,13 +364,15 @@
 		Arc::new(move |hash, data| network.announce_block(hash, data))
 	};
 
+	let relay_chain_slot_duration = Duration::from_secs(6);
+
 	if validator {
 		let parachain_consensus = build_consensus(
 			client.clone(),
 			prometheus_registry.as_ref(),
 			telemetry.as_ref().map(|t| t.handle()),
 			&task_manager,
-			&relay_chain_full_node,
+			relay_chain_interface.clone(),
 			transaction_pool,
 			network,
 			params.keystore_container.sync_keystore(),
@@ -367,10 +387,12 @@
 			announce_block,
 			client: client.clone(),
 			task_manager: &mut task_manager,
-			relay_chain_full_node,
 			spawner,
 			parachain_consensus,
 			import_queue,
+			collator_key,
+			relay_chain_interface,
+			relay_chain_slot_duration,
 		};
 
 		start_collator(params).await?;
@@ -380,7 +402,9 @@
 			announce_block,
 			task_manager: &mut task_manager,
 			para_id: id,
-			relay_chain_full_node,
+			import_queue,
+			relay_chain_interface,
+			relay_chain_slot_duration,
 		};
 
 		start_full_node(params)?;
@@ -445,7 +469,7 @@
 		 prometheus_registry,
 		 telemetry,
 		 task_manager,
-		 relay_chain_node,
+		 relay_chain_interface,
 		 transaction_pool,
 		 sync_oracle,
 		 keystore,
@@ -460,31 +484,27 @@
 				telemetry.clone(),
 			);
 
-			let relay_chain_backend = relay_chain_node.backend.clone();
-			let relay_chain_client = relay_chain_node.client.clone();
-			Ok(build_aura_consensus::<
+			Ok(AuraConsensus::build::<
 				sp_consensus_aura::sr25519::AuthorityPair,
-				_,
-				_,
 				_,
 				_,
 				_,
 				_,
 				_,
 				_,
-				_,
 			>(BuildAuraConsensusParams {
 				proposer_factory,
 				create_inherent_data_providers: move |_, (relay_parent, validation_data)| {
-					let parachain_inherent =
-					cumulus_primitives_parachain_inherent::ParachainInherentData::create_at_with_client(
-						relay_parent,
-						&relay_chain_client,
-						&*relay_chain_backend,
-						&validation_data,
-						id,
-					);
+					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 time = sp_timestamp::InherentDataProvider::from_system_time();
 
 						let slot =
@@ -502,8 +522,6 @@
 					}
 				},
 				block_import: client.clone(),
-				relay_chain_client: relay_chain_node.client.clone(),
-				relay_chain_backend: relay_chain_node.backend.clone(),
 				para_client: client,
 				backoff_authoring_blocks: Option::<()>::None,
 				sync_oracle,
modifiednode/rpc/Cargo.tomldiffbeforeafterboth
--- a/node/rpc/Cargo.toml
+++ b/node/rpc/Cargo.toml
@@ -13,40 +13,40 @@
 futures = { version = "0.3.17", features = ["compat"] }
 jsonrpc-core = "18.0.0"
 jsonrpc-pubsub = "18.0.0"
-# pallet-contracts-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-consensus-epochs = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-finality-grandpa-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-network = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-storage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+# pallet-contracts-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-consensus-epochs = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-finality-grandpa-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-network = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-storage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
 tokio = { version = "0.2.25", features = ["macros", "sync"] }
 
-pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fc-db = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fc-mapping-sync = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
+pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fc-db = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fc-mapping-sync = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
 
 pallet-unique = { path = "../../pallets/unique" }
 uc-rpc = { path = "../../client/rpc" }
modifiednode/rpc/src/lib.rsdiffbeforeafterboth
--- a/node/rpc/src/lib.rs
+++ b/node/rpc/src/lib.rs
@@ -1,13 +1,16 @@
+use sp_runtime::traits::BlakeTwo256;
 use unique_runtime::{Hash, AccountId, CrossAccountId, Index, opaque::Block, BlockNumber, Balance};
 use fc_rpc::{
-	EthBlockDataCache, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override, StorageOverride,
+	EthBlockDataCache, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override,
+	StorageOverride, SchemaV2Override, SchemaV3Override,
 };
-use fc_rpc_core::types::FilterPool;
+use fc_rpc_core::types::{FilterPool, FeeHistoryCache};
 use jsonrpc_pubsub::manager::SubscriptionManager;
 use pallet_ethereum::EthereumStorageSchema;
 use sc_client_api::{
 	backend::{AuxStore, StorageProvider},
 	client::BlockchainEvents,
+	StateBackend, Backend,
 };
 use sc_finality_grandpa::{
 	FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState,
@@ -19,7 +22,6 @@
 use sp_api::ProvideRuntimeApi;
 use sp_block_builder::BlockBuilder;
 use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
-use sp_consensus::SelectChain;
 use sc_service::TransactionPool;
 use std::{collections::BTreeMap, marker::PhantomData, sync::Arc};
 
@@ -64,6 +66,12 @@
 	pub backend: Arc<fc_db::Backend<Block>>,
 	/// 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,
+	/// Cache for Ethereum block data.
+	pub block_data_cache: Arc<EthBlockDataCache<Block>>,
 }
 
 struct AccountCodes<C, B> {
@@ -100,6 +108,41 @@
 	}
 }
 
+pub fn overrides_handle<C, BE>(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, CrossAccountId, AccountId>,
+	BE: Backend<Block> + 'static,
+	BE::State: StateBackend<BlakeTwo256>,
+{
+	let mut overrides_map = BTreeMap::new();
+	overrides_map.insert(
+		EthereumStorageSchema::V1,
+		Box::new(SchemaV1Override::new_with_code_provider(
+			client.clone(),
+			Arc::new(AccountCodes::<C, Block>::new(client.clone())),
+		)) as Box<dyn StorageOverride<_> + Send + Sync>,
+	);
+	overrides_map.insert(
+		EthereumStorageSchema::V2,
+		Box::new(SchemaV2Override::new(client.clone()))
+			as Box<dyn StorageOverride<_> + Send + Sync>,
+	);
+	overrides_map.insert(
+		EthereumStorageSchema::V3,
+		Box::new(SchemaV3Override::new(client.clone()))
+			as Box<dyn StorageOverride<_> + Send + Sync>,
+	);
+
+	Arc::new(OverrideHandle {
+		schemas: overrides_map,
+		fallback: Box::new(RuntimeApiStorageOverride::new(client)),
+	})
+}
+
 /// Instantiate all Full RPC extensions.
 pub fn create_full<C, P, SC, CA, A, B>(
 	deps: FullDeps<C, P, SC, CA>,
@@ -118,7 +161,6 @@
 	C::Api: up_rpc::UniqueApi<Block, CrossAccountId, AccountId>,
 	B: sc_client_api::Backend<Block> + Send + Sync + 'static,
 	B::State: sc_client_api::backend::StateBackend<sp_runtime::traits::HashFor<Block>>,
-	SC: SelectChain<Block> + 'static,
 	P: TransactionPool<Block = Block> + 'static,
 	CA: ChainApi<Block = Block> + 'static,
 {
@@ -138,6 +180,9 @@
 		pool,
 		graph,
 		select_chain: _,
+		fee_history_limit,
+		fee_history_cache,
+		block_data_cache,
 		enable_dev_signer,
 		is_authority,
 		network,
@@ -163,21 +208,8 @@
 	if enable_dev_signer {
 		signers.push(Box::new(EthDevSigner::new()) as Box<dyn EthSigner>);
 	}
-	let mut overrides_map = BTreeMap::new();
-	overrides_map.insert(
-		EthereumStorageSchema::V1,
-		Box::new(SchemaV1Override::new_with_code_provider(
-			client.clone(),
-			Arc::new(AccountCodes::<C, Block>::new(client.clone())),
-		)) as Box<dyn StorageOverride<_> + Send + Sync>,
-	);
 
-	let overrides = Arc::new(OverrideHandle {
-		schemas: overrides_map,
-		fallback: Box::new(RuntimeApiStorageOverride::new(client.clone())),
-	});
-
-	let block_data_cache = Arc::new(EthBlockDataCache::new(50, 50));
+	let overrides = overrides_handle(client.clone());
 
 	io.extend_with(EthApiServer::to_delegate(EthApi::new(
 		client.clone(),
@@ -191,6 +223,8 @@
 		is_authority,
 		max_past_logs,
 		block_data_cache.clone(),
+		fee_history_limit,
+		fee_history_cache,
 	)));
 	io.extend_with(UniqueApi::to_delegate(Unique::new(client.clone())));
 
@@ -200,7 +234,6 @@
 			backend,
 			filter_pool,
 			500_usize, // max stored filters
-			overrides.clone(),
 			max_past_logs,
 			block_data_cache,
 		)));
modifiedpallets/common/Cargo.tomldiffbeforeafterboth
--- a/pallets/common/Cargo.toml
+++ b/pallets/common/Cargo.toml
@@ -10,16 +10,16 @@
 version = '2.0.0'
 
 [dependencies]
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
 up-evm-mapping = { default-features = false, path = '../../primitives/evm-mapping' }
 up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
 pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }
 evm-coder = { default-features = false, path = '../../crates/evm-coder' }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
 serde = { version = "1.0.130", default-features = false }
 scale-info = { version = "1.0.0", default-features = false, features = [
     "derive",
modifiedpallets/common/src/account.rsdiffbeforeafterboth
--- a/pallets/common/src/account.rs
+++ b/pallets/common/src/account.rs
@@ -1,5 +1,5 @@
 use crate::Config;
-use codec::{Encode, EncodeLike, Decode};
+use codec::{Encode, EncodeLike, Decode, MaxEncodedLen};
 use sp_core::H160;
 use scale_info::{Type, TypeInfo};
 use core::cmp::Ordering;
@@ -10,7 +10,7 @@
 pub use up_evm_mapping::EvmBackwardsAddressMapping;
 
 pub trait CrossAccountId<AccountId>:
-	Encode + EncodeLike + Decode + TypeInfo + Clone + PartialEq + Ord + core::fmt::Debug + Default
+	Encode + EncodeLike + Decode + TypeInfo + MaxEncodedLen + Clone + PartialEq + Ord + core::fmt::Debug
 // +
 // Serialize + Deserialize<'static>
 {
@@ -23,7 +23,7 @@
 	fn conv_eq(&self, other: &Self) -> bool;
 }
 
-#[derive(Encode, Decode, Serialize, Deserialize, TypeInfo)]
+#[derive(Encode, Decode, Serialize, Deserialize, TypeInfo, MaxEncodedLen)]
 #[serde(rename_all = "camelCase")]
 enum BasicCrossAccountIdRepr<AccountId> {
 	Substrate(AccountId),
@@ -38,17 +38,17 @@
 	ethereum: H160,
 }
 
+impl<T: Config> MaxEncodedLen for BasicCrossAccountId<T> {
+	fn max_encoded_len() -> usize {
+		<BasicCrossAccountIdRepr<T::AccountId>>::max_encoded_len()
+	}
+}
+
 impl<T: Config> TypeInfo for BasicCrossAccountId<T> {
 	type Identity = Self;
 
 	fn type_info() -> Type {
 		<BasicCrossAccountIdRepr<T::AccountId>>::type_info()
-	}
-}
-
-impl<T: Config> Default for BasicCrossAccountId<T> {
-	fn default() -> Self {
-		Self::from_sub(T::AccountId::default())
 	}
 }
 
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -8,13 +8,16 @@
 	dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo},
 	ensure, fail,
 	traits::{Imbalance, Get, Currency},
+	BoundedVec,
 };
 use pallet_evm::GasWeightMapping;
 use up_data_structs::{
 	COLLECTION_NUMBER_LIMIT, Collection, CollectionId, CreateItemData, ExistenceRequirement,
-	MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_COLLECTION_NAME_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
-	COLLECTION_ADMINS_LIMIT, MetaUpdatePermission, Pays, PostDispatchInfo, TokenId, Weight,
-	WithdrawReasons, CollectionStats,
+	MAX_TOKEN_PREFIX_LENGTH, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission, Pays, PostDispatchInfo,
+	TokenId, Weight, WithdrawReasons, CollectionStats, MAX_TOKEN_OWNERSHIP, CollectionMode,
+	NFT_SPONSOR_TRANSFER_TIMEOUT, FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
+	REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MAX_SPONSOR_TIMEOUT, CUSTOM_DATA_LIMIT, CollectionLimits,
+	CustomDataLimit, CreateCollectionData, SponsorshipState,
 };
 pub use pallet::*;
 use sp_core::H160;
@@ -53,8 +56,11 @@
 	pub fn try_get(id: CollectionId) -> Result<Self, DispatchError> {
 		Ok(Self::new(id).ok_or(<Error<T>>::CollectionNotFound)?)
 	}
-	pub fn log(&self, log: impl evm_coder::ToLog) {
-		self.recorder.log(log)
+	pub fn log_mirrored(&self, log: impl evm_coder::ToLog) {
+		self.recorder.log_mirrored(log)
+	}
+	pub fn log_direct(&self, log: impl evm_coder::ToLog) {
+		self.recorder.log_direct(log)
 	}
 	pub fn consume_store_reads(&self, reads: u64) -> evm_coder::execution::Result<()> {
 		self.recorder
@@ -285,6 +291,10 @@
 		TokenVariableDataLimitExceeded,
 		/// Exceeded max admin count
 		CollectionAdminCountExceeded,
+		/// Collection limit bounds per collection exceeded
+		CollectionLimitBoundsExceeded,
+		/// Tried to enable permissions which are only permitted to be disabled
+		OwnerPermissionsCantBeReverted,
 
 		/// Collection settings not allowing items transferring
 		TransferNotAllowed,
@@ -300,7 +310,7 @@
 		/// Item balance not enough.
 		TokenValueTooLow,
 		/// Requested value more than approved.
-		TokenValueNotEnough,
+		ApprovedValueTooLow,
 		/// Tried to approve more than owned
 		CantApproveMoreThanOwned,
 
@@ -395,18 +405,13 @@
 }
 
 impl<T: Config> Pallet<T> {
-	pub fn init_collection(data: Collection<T::AccountId>) -> Result<CollectionId, DispatchError> {
+	pub fn init_collection(
+		owner: T::AccountId,
+		data: CreateCollectionData<T::AccountId>,
+	) -> Result<CollectionId, DispatchError> {
 		{
-			ensure!(
-				data.name.len() <= MAX_COLLECTION_NAME_LENGTH,
-				Error::<T>::CollectionNameLimitExceeded
-			);
 			ensure!(
-				data.description.len() <= MAX_COLLECTION_DESCRIPTION_LENGTH,
-				Error::<T>::CollectionDescriptionLimitExceeded
-			);
-			ensure!(
-				data.token_prefix.len() <= MAX_TOKEN_PREFIX_LENGTH,
+				data.token_prefix.len() <= MAX_TOKEN_PREFIX_LENGTH as usize,
 				Error::<T>::CollectionTokenPrefixLimitExceeded
 			);
 		}
@@ -426,6 +431,29 @@
 
 		// =========
 
+		let collection = Collection {
+			owner: owner.clone(),
+			name: data.name,
+			mode: data.mode.clone(),
+			mint_mode: false,
+			access: data.access.unwrap_or_default(),
+			description: data.description,
+			token_prefix: data.token_prefix,
+			offchain_schema: data.offchain_schema,
+			schema_version: data.schema_version.unwrap_or_default(),
+			sponsorship: data
+				.pending_sponsor
+				.map(SponsorshipState::Unconfirmed)
+				.unwrap_or_default(),
+			variable_on_chain_schema: data.variable_on_chain_schema,
+			const_on_chain_schema: data.const_on_chain_schema,
+			limits: data
+				.limits
+				.map(|limits| Self::clamp_limits(data.mode.clone(), &Default::default(), limits))
+				.unwrap_or_else(|| Ok(CollectionLimits::default()))?,
+			meta_update_permission: data.meta_update_permission.unwrap_or_default(),
+		};
+
 		// Take a (non-refundable) deposit of collection creation
 		{
 			let mut imbalance =
@@ -437,7 +465,7 @@
 				),
 			);
 			<T as Config>::Currency::settle(
-				&data.owner,
+				&owner,
 				imbalance,
 				WithdrawReasons::TRANSFER,
 				ExistenceRequirement::KeepAlive,
@@ -446,12 +474,8 @@
 		}
 
 		<CreatedCollectionCount<T>>::put(created_count);
-		<Pallet<T>>::deposit_event(Event::CollectionCreated(
-			id,
-			data.mode.id(),
-			data.owner.clone(),
-		));
-		<CollectionById<T>>::insert(id, data);
+		<Pallet<T>>::deposit_event(Event::CollectionCreated(id, data.mode.id(), owner.clone()));
+		<CollectionById<T>>::insert(id, collection);
 		Ok(id)
 	}
 
@@ -535,6 +559,61 @@
 
 		Ok(())
 	}
+
+	pub fn clamp_limits(
+		mode: CollectionMode,
+		old_limit: &CollectionLimits,
+		mut new_limit: CollectionLimits,
+	) -> Result<CollectionLimits, DispatchError> {
+		macro_rules! limit_default {
+				($old:ident, $new:ident, $($field:ident $(($arg:expr))? => $check:expr),* $(,)?) => {{
+					$(
+						if let Some($new) = $new.$field {
+							let $old = $old.$field($($arg)?);
+							let _ = $new;
+							let _ = $old;
+							$check
+						} else {
+							$new.$field = $old.$field
+						}
+					)*
+				}};
+			}
+
+		limit_default!(old_limit, new_limit,
+			account_token_ownership_limit => ensure!(
+				new_limit <= MAX_TOKEN_OWNERSHIP,
+				<Error<T>>::CollectionLimitBoundsExceeded,
+			),
+			sponsor_transfer_timeout(match mode {
+				CollectionMode::NFT => NFT_SPONSOR_TRANSFER_TIMEOUT,
+				CollectionMode::Fungible(_) => FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
+				CollectionMode::ReFungible => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
+			}) => ensure!(
+				new_limit <= MAX_SPONSOR_TIMEOUT,
+				<Error<T>>::CollectionLimitBoundsExceeded,
+			),
+			sponsored_data_size => ensure!(
+				new_limit <= CUSTOM_DATA_LIMIT,
+				<Error<T>>::CollectionLimitBoundsExceeded,
+			),
+			token_limit => ensure!(
+				old_limit >= new_limit && new_limit > 0,
+				<Error<T>>::CollectionTokenLimitExceeded
+			),
+			owner_can_transfer => ensure!(
+				old_limit || !new_limit,
+				<Error<T>>::OwnerPermissionsCantBeReverted,
+			),
+			owner_can_destroy => ensure!(
+				old_limit || !new_limit,
+				<Error<T>>::OwnerPermissionsCantBeReverted,
+			),
+			sponsored_data_rate_limit => {},
+			transfers_enabled => {},
+		);
+		Ok(new_limit)
+	}
 }
 
 #[macro_export]
@@ -610,14 +689,14 @@
 		&self,
 		sender: T::CrossAccountId,
 		token: TokenId,
-		data: Vec<u8>,
+		data: BoundedVec<u8, CustomDataLimit>,
 	) -> DispatchResultWithPostInfo;
 
 	fn account_tokens(&self, account: T::CrossAccountId) -> Vec<TokenId>;
 	fn token_exists(&self, token: TokenId) -> bool;
 	fn last_token_id(&self) -> TokenId;
 
-	fn token_owner(&self, token: TokenId) -> T::CrossAccountId;
+	fn token_owner(&self, token: TokenId) -> Option<T::CrossAccountId>;
 	fn const_metadata(&self, token: TokenId) -> Vec<u8>;
 	fn variable_metadata(&self, token: TokenId) -> Vec<u8>;
 
deletedpallets/contract-helpers/Cargo.tomldiffbeforeafterboth
--- a/pallets/contract-helpers/Cargo.toml
+++ /dev/null
@@ -1,29 +0,0 @@
-[package]
-name = "pallet-contract-helpers"
-version = "0.1.0"
-edition = "2021"
-
-[dependencies.codec]
-default-features = false
-features = ['derive']
-package = 'parity-scale-codec'
-version = '2.3.0'
-
-[dependencies]
-scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-pallet-contracts = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.14' }
-
-[features]
-default = ["std"]
-std = [
-    "frame-support/std",
-    "frame-system/std",
-    "pallet-contracts/std",
-    "sp-runtime/std",
-    "sp-std/std",
-]
deletedpallets/contract-helpers/src/lib.rsdiffbeforeafterboth
--- a/pallets/contract-helpers/src/lib.rs
+++ /dev/null
@@ -1,285 +0,0 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
-pub use pallet::*;
-
-#[frame_support::pallet]
-pub mod pallet {
-	use frame_support::sp_runtime::traits::StaticLookup;
-	use frame_support::{pallet_prelude::*, traits::IsSubType};
-	use frame_system::pallet_prelude::*;
-	use frame_system::Config as SysConfig;
-	use pallet_contracts::chain_extension::UncheckedFrom;
-	use sp_runtime::{
-		traits::{DispatchInfoOf, Hash, PostDispatchInfoOf, SignedExtension},
-		transaction_validity,
-	};
-	use sp_std::vec::Vec;
-	use up_sponsorship::SponsorshipHandler;
-
-	#[pallet::error]
-	pub enum Error<T> {
-		/// Should be contract owner
-		NoPermission,
-	}
-
-	#[pallet::config]
-	pub trait Config: frame_system::Config + pallet_contracts::Config {
-		type DefaultSponsoringRateLimit: Get<Self::BlockNumber>;
-	}
-
-	#[pallet::pallet]
-	#[pallet::generate_store(pub(super) trait Store)]
-	pub struct Pallet<T>(_);
-
-	#[pallet::storage]
-	pub(super) type Owner<T: Config> = StorageMap<
-		Hasher = Twox128,
-		Key = T::AccountId,
-		Value = T::AccountId,
-		QueryKind = ValueQuery,
-	>;
-
-	#[pallet::storage]
-	pub(super) type AllowlistEnabled<T: Config> =
-		StorageMap<Hasher = Twox128, Key = T::AccountId, Value = bool, QueryKind = ValueQuery>;
-
-	#[pallet::storage]
-	pub(super) type Allowlist<T: Config> = StorageDoubleMap<
-		Hasher1 = Twox128,
-		Key1 = T::AccountId,
-		Hasher2 = Twox64Concat,
-		Key2 = T::AccountId,
-		Value = bool,
-		QueryKind = ValueQuery,
-	>;
-
-	#[pallet::storage]
-	pub(super) type SelfSponsoring<T: Config> =
-		StorageMap<Hasher = Twox128, Key = T::AccountId, Value = bool, QueryKind = ValueQuery>;
-
-	#[pallet::storage]
-	pub(super) type SponsoringRateLimit<T: Config> = StorageMap<
-		Hasher = Twox128,
-		Key = T::AccountId,
-		Value = T::BlockNumber,
-		QueryKind = ValueQuery,
-		OnEmpty = T::DefaultSponsoringRateLimit,
-	>;
-
-	#[pallet::storage]
-	pub(super) type SponsorBasket<T: Config> = StorageDoubleMap<
-		Hasher1 = Twox128,
-		Key1 = T::AccountId,
-		Hasher2 = Twox128,
-		Key2 = T::AccountId,
-		Value = T::BlockNumber,
-		QueryKind = ValueQuery,
-	>;
-
-	impl<T: Config> Pallet<T> {
-		pub fn allowed(contract: T::AccountId, user: T::AccountId, default: bool) -> bool {
-			if !<AllowlistEnabled<T>>::get(&contract) {
-				return default;
-			}
-			<Allowlist<T>>::get(&contract, &user) || <Owner<T>>::get(contract) == user
-		}
-	}
-
-	#[pallet::call]
-	impl<T: Config> Pallet<T> {
-		#[pallet::weight(0)]
-		pub fn toggle_sponsoring(
-			origin: OriginFor<T>,
-			contract: T::AccountId,
-			sponsoring: bool,
-		) -> DispatchResult {
-			let sender = ensure_signed(origin)?;
-			ensure!(
-				<Owner<T>>::get(&contract) == sender,
-				<Error<T>>::NoPermission
-			);
-
-			if sponsoring {
-				<SelfSponsoring<T>>::insert(contract, true);
-			} else {
-				<SelfSponsoring<T>>::remove(contract);
-			}
-			Ok(())
-		}
-
-		#[pallet::weight(0)]
-		pub fn toggle_allowlist(
-			origin: OriginFor<T>,
-			contract: T::AccountId,
-			enabled: bool,
-		) -> DispatchResult {
-			let sender = ensure_signed(origin)?;
-			ensure!(
-				<Owner<T>>::get(&contract) == sender,
-				<Error<T>>::NoPermission
-			);
-
-			if enabled {
-				<AllowlistEnabled<T>>::insert(contract, true);
-			} else {
-				<AllowlistEnabled<T>>::remove(contract);
-			}
-			Ok(())
-		}
-
-		#[pallet::weight(0)]
-		pub fn toggle_allowed(
-			origin: OriginFor<T>,
-			contract: T::AccountId,
-			user: T::AccountId,
-			allowed: bool,
-		) -> DispatchResult {
-			let sender = ensure_signed(origin)?;
-			ensure!(
-				<Owner<T>>::get(&contract) == sender,
-				<Error<T>>::NoPermission
-			);
-
-			if allowed {
-				<Allowlist<T>>::insert(contract, user, true);
-			} else {
-				<Allowlist<T>>::remove(contract, user);
-			}
-			Ok(())
-		}
-
-		#[pallet::weight(0)]
-		pub fn set_sponsoring_rate_limit(
-			origin: OriginFor<T>,
-			contract: T::AccountId,
-			rate_limit: T::BlockNumber,
-		) -> DispatchResult {
-			let sender = ensure_signed(origin)?;
-			ensure!(
-				<Owner<T>>::get(&contract) == sender,
-				<Error<T>>::NoPermission
-			);
-
-			<SponsoringRateLimit<T>>::insert(contract, rate_limit);
-			Ok(())
-		}
-	}
-
-	#[derive(Encode, Decode, Clone, PartialEq, Eq, scale_info::TypeInfo)]
-	pub struct ContractHelpersExtension<T: scale_info::TypeInfo>(PhantomData<T>);
-	impl<T: scale_info::TypeInfo> core::fmt::Debug for ContractHelpersExtension<T> {
-		fn fmt(&self, fmt: &mut core::fmt::Formatter<'_>) -> Result<(), core::fmt::Error> {
-			fmt.debug_struct("ContractHelpersExtension").finish()
-		}
-	}
-
-	type CodeHash<T> = <T as frame_system::Config>::Hash;
-	impl<T: scale_info::TypeInfo> SignedExtension for ContractHelpersExtension<T>
-	where
-		T: Config + Send + Sync,
-		<T as SysConfig>::Call: sp_runtime::traits::Dispatchable,
-		<T as SysConfig>::Call: IsSubType<pallet_contracts::Call<T>>,
-		T::AccountId: UncheckedFrom<T::Hash>,
-		T::AccountId: AsRef<[u8]>,
-	{
-		const IDENTIFIER: &'static str = "ContractHelpers";
-		type AccountId = T::AccountId;
-		type Call = <T as SysConfig>::Call;
-		type AdditionalSigned = ();
-		type Pre = Option<(Self::AccountId, CodeHash<T>, Vec<u8>)>;
-
-		fn additional_signed(&self) -> Result<(), transaction_validity::TransactionValidityError> {
-			Ok(())
-		}
-
-		fn validate(
-			&self,
-			who: &T::AccountId,
-			call: &Self::Call,
-			_info: &DispatchInfoOf<Self::Call>,
-			_len: usize,
-		) -> transaction_validity::TransactionValidity {
-			if let Some(pallet_contracts::Call::call {
-				dest,
-				value: _value,
-				gas_limit: _gas_limit,
-				data: _data,
-			}) = IsSubType::<pallet_contracts::Call<T>>::is_sub_type(call)
-			{
-				let called_contract: T::AccountId =
-					T::Lookup::lookup((*dest).clone()).unwrap_or_default();
-				if !<Pallet<T>>::allowed(called_contract, who.clone(), true) {
-					return Err(transaction_validity::InvalidTransaction::Call.into());
-				}
-			}
-			Ok(transaction_validity::ValidTransaction::default())
-		}
-
-		fn pre_dispatch(
-			self,
-			who: &Self::AccountId,
-			call: &Self::Call,
-			_info: &DispatchInfoOf<Self::Call>,
-			_len: usize,
-		) -> Result<Self::Pre, TransactionValidityError> {
-			match IsSubType::<pallet_contracts::Call<T>>::is_sub_type(call) {
-				Some(pallet_contracts::Call::instantiate {
-					code_hash, salt, ..
-				}) => Ok(Some((who.clone(), *code_hash, salt.clone()))),
-				Some(pallet_contracts::Call::instantiate_with_code { code, salt, .. }) => {
-					let code_hash = &T::Hashing::hash(code);
-					Ok(Some((who.clone(), *code_hash, salt.clone())))
-				}
-				_ => Ok(None),
-			}
-		}
-
-		fn post_dispatch(
-			pre: Self::Pre,
-			_info: &DispatchInfoOf<Self::Call>,
-			_post_info: &PostDispatchInfoOf<Self::Call>,
-			_len: usize,
-			_result: &DispatchResult,
-		) -> Result<(), TransactionValidityError> {
-			if let Some((who, code_hash, salt)) = pre {
-				let new_contract_address =
-					<pallet_contracts::Pallet<T>>::contract_address(&who, &code_hash, &salt);
-				<Owner<T>>::insert(&new_contract_address, &who);
-			}
-
-			Ok(())
-		}
-	}
-
-	pub struct ContractSponsorshipHandler<T>(PhantomData<T>);
-	impl<T, C> SponsorshipHandler<T::AccountId, C> for ContractSponsorshipHandler<T>
-	where
-		T: Config,
-		C: IsSubType<pallet_contracts::Call<T>>,
-		T::AccountId: UncheckedFrom<T::Hash>,
-		T::AccountId: AsRef<[u8]>,
-	{
-		fn get_sponsor(who: &T::AccountId, call: &C) -> Option<T::AccountId> {
-			if let Some(pallet_contracts::Call::call { dest, .. }) =
-				IsSubType::<pallet_contracts::Call<T>>::is_sub_type(call)
-			{
-				let called_contract: T::AccountId =
-					T::Lookup::lookup((*dest).clone()).unwrap_or_default();
-				if <SelfSponsoring<T>>::get(&called_contract)
-					&& <Pallet<T>>::allowed(called_contract.clone(), who.clone(), false)
-				{
-					let last_tx_block = SponsorBasket::<T>::get(&called_contract, &who);
-					let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;
-					let rate_limit = SponsoringRateLimit::<T>::get(&called_contract);
-					let limit_time = last_tx_block + rate_limit;
-
-					if block_number >= limit_time {
-						SponsorBasket::<T>::insert(&called_contract, who, block_number);
-						return Some(called_contract);
-					}
-				}
-			}
-			None
-		}
-	}
-}
modifiedpallets/evm-coder-substrate/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-coder-substrate/Cargo.toml
+++ b/pallets/evm-coder-substrate/Cargo.toml
@@ -7,15 +7,15 @@
 scale-info = { version = "1.0.0", default-features = false, features = [
     "derive",
 ] }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-ethereum = { version = "0.10.0", default-features = false }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+ethereum = { version = "0.11.1", default-features = false }
 evm-coder = { default-features = false, path = "../../crates/evm-coder" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
 
 [dependencies.codec]
 default-features = false
modifiedpallets/evm-coder-substrate/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-coder-substrate/src/lib.rs
+++ b/pallets/evm-coder-substrate/src/lib.rs
@@ -21,7 +21,7 @@
 	use frame_support::{ensure};
 	use pallet_evm::{
 		ExitError, ExitRevert, ExitSucceed, GasWeightMapping, PrecompileFailure, PrecompileOutput,
-		PrecompileResult,
+		PrecompileResult, runner::stack::MaybeMirroredLog,
 	};
 	use frame_system::ensure_signed;
 	pub use frame_support::dispatch::DispatchResult;
@@ -29,7 +29,7 @@
 	use sp_std::cell::RefCell;
 	use sp_std::vec::Vec;
 	use sp_core::{H160, H256};
-	use ethereum::Log;
+	use ethereum::TransactionV2;
 	use frame_support::{pallet_prelude::*, traits::PalletInfo};
 	use frame_system::pallet_prelude::*;
 
@@ -66,9 +66,9 @@
 	pub const G_SLOAD_WORD: u64 = 800;
 	pub const G_SSTORE_WORD: u64 = 20000;
 
-	pub fn generate_transaction() -> ethereum::TransactionV0 {
+	pub fn generate_transaction() -> TransactionV2 {
 		use ethereum::{TransactionV0, TransactionAction, TransactionSignature};
-		TransactionV0 {
+		TransactionV2::Legacy(TransactionV0 {
 			nonce: 0.into(),
 			gas_price: 0.into(),
 			gas_limit: 0.into(),
@@ -78,13 +78,13 @@
 			input: Vec::from([0, 0, 0, 0]),
 			// if v is not 27 - then we need to pass some other validity checks
 			signature: TransactionSignature::new(27, H256([0x88; 32]), H256([0x88; 32])).unwrap(),
-		}
+		})
 	}
 
 	#[derive(Default)]
 	pub struct SubstrateRecorder<T: Config> {
 		contract: H160,
-		logs: RefCell<Vec<Log>>,
+		logs: RefCell<Vec<MaybeMirroredLog>>,
 		initial_gas: u64,
 		gas_limit: RefCell<u64>,
 		_phantom: PhantomData<*const T>,
@@ -104,13 +104,19 @@
 		pub fn is_empty(&self) -> bool {
 			self.logs.borrow().is_empty()
 		}
-		// TODO: Replace with real storage in pallet-ethereum,
-		// same way as it is done with frame_system's Events
-		/// Doesn't consumes any gas, should be used after consume_log_sub
-		pub fn log(&self, log: impl ToLog) {
-			self.logs.borrow_mut().push(log.to_log(self.contract));
+		// Logs emitted with log_direct appear as substrate evm.Log event
+		pub fn log_direct(&self, log: impl ToLog) {
+			self.logs
+				.borrow_mut()
+				.push(MaybeMirroredLog::direct(log.to_log(self.contract)))
+		}
+		/// If log already has substrate equivalent - then we don't need to emit evm.Log
+		pub fn log_mirrored(&self, log: impl ToLog) {
+			self.logs
+				.borrow_mut()
+				.push(MaybeMirroredLog::mirrored(log.to_log(self.contract)))
 		}
-		pub fn retrieve_logs(self) -> Vec<Log> {
+		pub fn retrieve_logs(self) -> Vec<MaybeMirroredLog> {
 			self.logs.into_inner()
 		}
 
@@ -165,7 +171,8 @@
 				Ok(Some(v)) => Ok(PrecompileOutput {
 					exit_status: ExitSucceed::Returned,
 					cost: self.initial_gas - self.gas_left(),
-					logs: self.retrieve_logs(),
+					// TODO: preserve mirroring status
+					logs: self.retrieve_logs().into_iter().map(|l| l.log).collect(),
 					output: v.finish(),
 				}),
 				Ok(None) => return None,
modifiedpallets/evm-contract-helpers/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-contract-helpers/Cargo.toml
+++ b/pallets/evm-contract-helpers/Cargo.toml
@@ -7,15 +7,15 @@
 scale-info = { version = "1.0.0", default-features = false, features = [
     "derive",
 ] }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
 evm-coder = { default-features = false, path = '../../crates/evm-coder' }
 pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.14' }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.16' }
 log = "0.4.14"
 
 [dependencies.codec]
deletedpallets/evm-contract-helpers/exp.rsdiffbeforeafterboth
--- a/pallets/evm-contract-helpers/exp.rs
+++ /dev/null
@@ -1,1474 +0,0 @@
-#![feature(prelude_import)]
-#[prelude_import]
-use std::prelude::rust_2018::*;
-#[macro_use]
-extern crate std;
-pub use pallet::*;
-pub use eth::*;
-pub mod eth {
-    use core::marker::PhantomData;
-    use evm_coder::{abi::AbiWriter, execution::Result, generate_stubgen, solidity_interface, types::*};
-    use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};
-    use pallet_evm::{ExitReason, ExitRevert, OnCreate, OnMethodCall, PrecompileOutput};
-    use sp_core::H160;
-    use crate::{
-        AllowlistEnabled, Config, Owner, Pallet, SelfSponsoring, SponsorBasket, SponsoringRateLimit,
-    };
-    use frame_support::traits::Get;
-    use up_sponsorship::SponsorshipHandler;
-    use sp_std::{convert::TryInto, vec::Vec};
-    struct ContractHelpers<T: Config>(SubstrateRecorder<T>);
-    impl<T: Config> WithRecorder<T> for ContractHelpers<T> {
-        fn recorder(&self) -> &SubstrateRecorder<T> {
-            &self.0
-        }
-        fn into_recorder(self) -> SubstrateRecorder<T> {
-            self.0
-        }
-    }
-    impl<T: Config> ContractHelpers<T> {
-        fn contract_owner(&self, contract_address: address) -> Result<address> {
-            Ok(<Owner<T>>::get(contract_address))
-        }
-        fn sponsoring_enabled(&self, contract_address: address) -> Result<bool> {
-            Ok(<SelfSponsoring<T>>::get(contract_address))
-        }
-        fn toggle_sponsoring(
-            &mut self,
-            caller: caller,
-            contract_address: address,
-            enabled: bool,
-        ) -> Result<void> {
-            <Pallet<T>>::ensure_owner(contract_address, caller)?;
-            <Pallet<T>>::toggle_sponsoring(contract_address, enabled);
-            Ok(())
-        }
-        fn set_sponsoring_rate_limit(
-            &mut self,
-            caller: caller,
-            contract_address: address,
-            rate_limit: uint32,
-        ) -> Result<void> {
-            <Pallet<T>>::ensure_owner(contract_address, caller)?;
-            <Pallet<T>>::set_sponsoring_rate_limit(contract_address, rate_limit.into());
-            Ok(())
-        }
-        fn get_sponsoring_rate_limit(&self, contract_address: address) -> Result<uint32> {
-            Ok(<SponsoringRateLimit<T>>::get(contract_address)
-                .try_into()
-                .map_err(|_| "rate limit > u32::MAX")?)
-        }
-        fn allowed(&self, contract_address: address, user: address) -> Result<bool> {
-            Ok(<Pallet<T>>::allowed(contract_address, user, true))
-        }
-        fn allowlist_enabled(&self, contract_address: address) -> Result<bool> {
-            Ok(<AllowlistEnabled<T>>::get(contract_address))
-        }
-        fn toggle_allowlist(
-            &mut self,
-            caller: caller,
-            contract_address: address,
-            enabled: bool,
-        ) -> Result<void> {
-            <Pallet<T>>::ensure_owner(contract_address, caller)?;
-            <Pallet<T>>::toggle_allowlist(contract_address, enabled);
-            Ok(())
-        }
-        fn toggle_allowed(
-            &mut self,
-            caller: caller,
-            contract_address: address,
-            user: address,
-            allowed: bool,
-        ) -> Result<void> {
-            <Pallet<T>>::ensure_owner(contract_address, caller)?;
-            <Pallet<T>>::toggle_allowed(contract_address, user, allowed);
-            Ok(())
-        }
-    }
-    pub enum ContractHelpersCall<T: Config> {
-        ERC165Call(::evm_coder::ERC165Call, PhantomData<(T)>),
-        ContractOwner {
-            contract_address: address,
-        },
-        SponsoringEnabled {
-            contract_address: address,
-        },
-        ToggleSponsoring {
-            contract_address: address,
-            enabled: bool,
-        },
-        SetSponsoringRateLimit {
-            contract_address: address,
-            rate_limit: uint32,
-        },
-        GetSponsoringRateLimit {
-            contract_address: address,
-        },
-        Allowed {
-            contract_address: address,
-            user: address,
-        },
-        AllowlistEnabled {
-            contract_address: address,
-        },
-        ToggleAllowlist {
-            contract_address: address,
-            enabled: bool,
-        },
-        ToggleAllowed {
-            contract_address: address,
-            user: address,
-            allowed: bool,
-        },
-    }
-    #[automatically_derived]
-    #[allow(unused_qualifications)]
-    impl<T: ::core::fmt::Debug + Config> ::core::fmt::Debug for ContractHelpersCall<T> {
-        fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
-            match (&*self,) {
-                (&ContractHelpersCall::ERC165Call(ref __self_0, ref __self_1),) => {
-                    let debug_trait_builder =
-                        &mut ::core::fmt::Formatter::debug_tuple(f, "ERC165Call");
-                    let _ = ::core::fmt::DebugTuple::field(debug_trait_builder, &&(*__self_0));
-                    let _ = ::core::fmt::DebugTuple::field(debug_trait_builder, &&(*__self_1));
-                    ::core::fmt::DebugTuple::finish(debug_trait_builder)
-                }
-                (&ContractHelpersCall::ContractOwner {
-                    contract_address: ref __self_0,
-                },) => {
-                    let debug_trait_builder =
-                        &mut ::core::fmt::Formatter::debug_struct(f, "ContractOwner");
-                    let _ = ::core::fmt::DebugStruct::field(
-                        debug_trait_builder,
-                        "contract_address",
-                        &&(*__self_0),
-                    );
-                    ::core::fmt::DebugStruct::finish(debug_trait_builder)
-                }
-                (&ContractHelpersCall::SponsoringEnabled {
-                    contract_address: ref __self_0,
-                },) => {
-                    let debug_trait_builder =
-                        &mut ::core::fmt::Formatter::debug_struct(f, "SponsoringEnabled");
-                    let _ = ::core::fmt::DebugStruct::field(
-                        debug_trait_builder,
-                        "contract_address",
-                        &&(*__self_0),
-                    );
-                    ::core::fmt::DebugStruct::finish(debug_trait_builder)
-                }
-                (&ContractHelpersCall::ToggleSponsoring {
-                    contract_address: ref __self_0,
-                    enabled: ref __self_1,
-                },) => {
-                    let debug_trait_builder =
-                        &mut ::core::fmt::Formatter::debug_struct(f, "ToggleSponsoring");
-                    let _ = ::core::fmt::DebugStruct::field(
-                        debug_trait_builder,
-                        "contract_address",
-                        &&(*__self_0),
-                    );
-                    let _ = ::core::fmt::DebugStruct::field(
-                        debug_trait_builder,
-                        "enabled",
-                        &&(*__self_1),
-                    );
-                    ::core::fmt::DebugStruct::finish(debug_trait_builder)
-                }
-                (&ContractHelpersCall::SetSponsoringRateLimit {
-                    contract_address: ref __self_0,
-                    rate_limit: ref __self_1,
-                },) => {
-                    let debug_trait_builder =
-                        &mut ::core::fmt::Formatter::debug_struct(f, "SetSponsoringRateLimit");
-                    let _ = ::core::fmt::DebugStruct::field(
-                        debug_trait_builder,
-                        "contract_address",
-                        &&(*__self_0),
-                    );
-                    let _ = ::core::fmt::DebugStruct::field(
-                        debug_trait_builder,
-                        "rate_limit",
-                        &&(*__self_1),
-                    );
-                    ::core::fmt::DebugStruct::finish(debug_trait_builder)
-                }
-                (&ContractHelpersCall::GetSponsoringRateLimit {
-                    contract_address: ref __self_0,
-                },) => {
-                    let debug_trait_builder =
-                        &mut ::core::fmt::Formatter::debug_struct(f, "GetSponsoringRateLimit");
-                    let _ = ::core::fmt::DebugStruct::field(
-                        debug_trait_builder,
-                        "contract_address",
-                        &&(*__self_0),
-                    );
-                    ::core::fmt::DebugStruct::finish(debug_trait_builder)
-                }
-                (&ContractHelpersCall::Allowed {
-                    contract_address: ref __self_0,
-                    user: ref __self_1,
-                },) => {
-                    let debug_trait_builder =
-                        &mut ::core::fmt::Formatter::debug_struct(f, "Allowed");
-                    let _ = ::core::fmt::DebugStruct::field(
-                        debug_trait_builder,
-                        "contract_address",
-                        &&(*__self_0),
-                    );
-                    let _ =
-                        ::core::fmt::DebugStruct::field(debug_trait_builder, "user", &&(*__self_1));
-                    ::core::fmt::DebugStruct::finish(debug_trait_builder)
-                }
-                (&ContractHelpersCall::AllowlistEnabled {
-                    contract_address: ref __self_0,
-                },) => {
-                    let debug_trait_builder =
-                        &mut ::core::fmt::Formatter::debug_struct(f, "AllowlistEnabled");
-                    let _ = ::core::fmt::DebugStruct::field(
-                        debug_trait_builder,
-                        "contract_address",
-                        &&(*__self_0),
-                    );
-                    ::core::fmt::DebugStruct::finish(debug_trait_builder)
-                }
-                (&ContractHelpersCall::ToggleAllowlist {
-                    contract_address: ref __self_0,
-                    enabled: ref __self_1,
-                },) => {
-                    let debug_trait_builder =
-                        &mut ::core::fmt::Formatter::debug_struct(f, "ToggleAllowlist");
-                    let _ = ::core::fmt::DebugStruct::field(
-                        debug_trait_builder,
-                        "contract_address",
-                        &&(*__self_0),
-                    );
-                    let _ = ::core::fmt::DebugStruct::field(
-                        debug_trait_builder,
-                        "enabled",
-                        &&(*__self_1),
-                    );
-                    ::core::fmt::DebugStruct::finish(debug_trait_builder)
-                }
-                (&ContractHelpersCall::ToggleAllowed {
-                    contract_address: ref __self_0,
-                    user: ref __self_1,
-                    allowed: ref __self_2,
-                },) => {
-                    let debug_trait_builder =
-                        &mut ::core::fmt::Formatter::debug_struct(f, "ToggleAllowed");
-                    let _ = ::core::fmt::DebugStruct::field(
-                        debug_trait_builder,
-                        "contract_address",
-                        &&(*__self_0),
-                    );
-                    let _ =
-                        ::core::fmt::DebugStruct::field(debug_trait_builder, "user", &&(*__self_1));
-                    let _ = ::core::fmt::DebugStruct::field(
-                        debug_trait_builder,
-                        "allowed",
-                        &&(*__self_2),
-                    );
-                    ::core::fmt::DebugStruct::finish(debug_trait_builder)
-                }
-            }
-        }
-    }
-    impl<T: Config> ContractHelpersCall<T> {
-        #[doc = "contractOwner(address)"]
-        const CONTRACT_OWNER: u32 = 1364373836u32;
-        #[doc = "sponsoringEnabled(address)"]
-        const SPONSORING_ENABLED: u32 = 1613225057u32;
-        #[doc = "toggleSponsoring(address,bool)"]
-        const TOGGLE_SPONSORING: u32 = 4239158662u32;
-        #[doc = "setSponsoringRateLimit(address,uint32)"]
-        const SET_SPONSORING_RATE_LIMIT: u32 = 2008467720u32;
-        #[doc = "getSponsoringRateLimit(address)"]
-        const GET_SPONSORING_RATE_LIMIT: u32 = 1628240573u32;
-        #[doc = "allowed(address,address)"]
-        const ALLOWED: u32 = 1550156133u32;
-        #[doc = "allowlistEnabled(address)"]
-        const ALLOWLIST_ENABLED: u32 = 3346198380u32;
-        #[doc = "toggleAllowlist(address,bool)"]
-        const TOGGLE_ALLOWLIST: u32 = 920527093u32;
-        #[doc = "toggleAllowed(address,address,bool)"]
-        const TOGGLE_ALLOWED: u32 = 1191627804u32;
-        pub const fn interface_id() -> u32 {
-            let mut interface_id = 0;
-            interface_id ^= Self::CONTRACT_OWNER;
-            interface_id ^= Self::SPONSORING_ENABLED;
-            interface_id ^= Self::TOGGLE_SPONSORING;
-            interface_id ^= Self::SET_SPONSORING_RATE_LIMIT;
-            interface_id ^= Self::GET_SPONSORING_RATE_LIMIT;
-            interface_id ^= Self::ALLOWED;
-            interface_id ^= Self::ALLOWLIST_ENABLED;
-            interface_id ^= Self::TOGGLE_ALLOWLIST;
-            interface_id ^= Self::TOGGLE_ALLOWED;
-            interface_id
-        }
-        pub fn supports_interface(interface_id: u32) -> bool {
-            interface_id != 0xffffff
-                && (interface_id == ::evm_coder::ERC165Call::INTERFACE_ID
-                    || interface_id == Self::interface_id())
-        }
-        pub fn generate_solidity_interface(tc: &evm_coder::solidity::TypeCollector, is_impl: bool) {
-            use evm_coder::solidity::*;
-            use core::fmt::Write;
-            let interface = SolidityInterface {
-                name: "ContractHelpers",
-                selector: Self::interface_id(),
-                is: &["Dummy", "ERC165"],
-                functions: (
-                    SolidityFunction {
-                        docs: &[],
-                        selector: "contractOwner(address) 5152b14c",
-                        name: "contractOwner",
-                        mutability: SolidityMutability::View,
-                        args: (<NamedArgument<address>>::new("contractAddress"),),
-                        result: <UnnamedArgument<address>>::default(),
-                    },
-                    SolidityFunction {
-                        docs: &[],
-                        selector: "sponsoringEnabled(address) 6027dc61",
-                        name: "sponsoringEnabled",
-                        mutability: SolidityMutability::View,
-                        args: (<NamedArgument<address>>::new("contractAddress"),),
-                        result: <UnnamedArgument<bool>>::default(),
-                    },
-                    SolidityFunction {
-                        docs: &[],
-                        selector: "toggleSponsoring(address,bool) fcac6d86",
-                        name: "toggleSponsoring",
-                        mutability: SolidityMutability::Mutable,
-                        args: (
-                            <NamedArgument<address>>::new("contractAddress"),
-                            <NamedArgument<bool>>::new("enabled"),
-                        ),
-                        result: <UnnamedArgument<void>>::default(),
-                    },
-                    SolidityFunction {
-                        docs: &[],
-                        selector: "setSponsoringRateLimit(address,uint32) 77b6c908",
-                        name: "setSponsoringRateLimit",
-                        mutability: SolidityMutability::Mutable,
-                        args: (
-                            <NamedArgument<address>>::new("contractAddress"),
-                            <NamedArgument<uint32>>::new("rateLimit"),
-                        ),
-                        result: <UnnamedArgument<void>>::default(),
-                    },
-                    SolidityFunction {
-                        docs: &[],
-                        selector: "getSponsoringRateLimit(address) 610cfabd",
-                        name: "getSponsoringRateLimit",
-                        mutability: SolidityMutability::View,
-                        args: (<NamedArgument<address>>::new("contractAddress"),),
-                        result: <UnnamedArgument<uint32>>::default(),
-                    },
-                    SolidityFunction {
-                        docs: &[],
-                        selector: "allowed(address,address) 5c658165",
-                        name: "allowed",
-                        mutability: SolidityMutability::View,
-                        args: (
-                            <NamedArgument<address>>::new("contractAddress"),
-                            <NamedArgument<address>>::new("user"),
-                        ),
-                        result: <UnnamedArgument<bool>>::default(),
-                    },
-                    SolidityFunction {
-                        docs: &[],
-                        selector: "allowlistEnabled(address) c772ef6c",
-                        name: "allowlistEnabled",
-                        mutability: SolidityMutability::View,
-                        args: (<NamedArgument<address>>::new("contractAddress"),),
-                        result: <UnnamedArgument<bool>>::default(),
-                    },
-                    SolidityFunction {
-                        docs: &[],
-                        selector: "toggleAllowlist(address,bool) 36de20f5",
-                        name: "toggleAllowlist",
-                        mutability: SolidityMutability::Mutable,
-                        args: (
-                            <NamedArgument<address>>::new("contractAddress"),
-                            <NamedArgument<bool>>::new("enabled"),
-                        ),
-                        result: <UnnamedArgument<void>>::default(),
-                    },
-                    SolidityFunction {
-                        docs: &[],
-                        selector: "toggleAllowed(address,address,bool) 4706cc1c",
-                        name: "toggleAllowed",
-                        mutability: SolidityMutability::Mutable,
-                        args: (
-                            <NamedArgument<address>>::new("contractAddress"),
-                            <NamedArgument<address>>::new("user"),
-                            <NamedArgument<bool>>::new("allowed"),
-                        ),
-                        result: <UnnamedArgument<void>>::default(),
-                    },
-                ),
-            };
-            if is_impl {
-                tc . collect ("// Common stubs holder\ncontract Dummy {\n\tuint8 dummy;\n\tstring stub_error = \"this contract is implemented in native\";\n}\ncontract ERC165 is Dummy {\n\tfunction supportsInterface(bytes4 interfaceID) external view returns (bool) {\n\t\trequire(false, stub_error);\n\t\tinterfaceID;\n\t\treturn true;\n\t}\n}\n" . into ()) ;
-            } else {
-                tc . collect ("// Common stubs holder\ninterface Dummy {\n}\ninterface ERC165 is Dummy {\n\tfunction supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" . into ()) ;
-            }
-            let mut out = string::new();
-            if "ContractHelpers".starts_with("Inline") {
-                out.push_str("// Inline\n");
-            }
-            let _ = interface.format(is_impl, &mut out, tc);
-            tc.collect(out);
-        }
-    }
-    impl<T: Config> ::evm_coder::Call for ContractHelpersCall<T> {
-        fn parse(
-            method_id: u32,
-            reader: &mut ::evm_coder::abi::AbiReader,
-        ) -> ::evm_coder::execution::Result<Option<Self>> {
-            use ::evm_coder::abi::AbiRead;
-            match method_id {
-                ::evm_coder::ERC165Call::INTERFACE_ID => {
-                    return Ok(
-                        ::evm_coder::ERC165Call::parse(method_id, reader)?.map(Self::ERC165Call)
-                    )
-                }
-                Self::CONTRACT_OWNER => {
-                    return Ok(Some(Self::ContractOwner {
-                        contract_address: reader.abi_read()?,
-                    }))
-                }
-                Self::SPONSORING_ENABLED => {
-                    return Ok(Some(Self::SponsoringEnabled {
-                        contract_address: reader.abi_read()?,
-                    }))
-                }
-                Self::TOGGLE_SPONSORING => {
-                    return Ok(Some(Self::ToggleSponsoring {
-                        contract_address: reader.abi_read()?,
-                        enabled: reader.abi_read()?,
-                    }))
-                }
-                Self::SET_SPONSORING_RATE_LIMIT => {
-                    return Ok(Some(Self::SetSponsoringRateLimit {
-                        contract_address: reader.abi_read()?,
-                        rate_limit: reader.abi_read()?,
-                    }))
-                }
-                Self::GET_SPONSORING_RATE_LIMIT => {
-                    return Ok(Some(Self::GetSponsoringRateLimit {
-                        contract_address: reader.abi_read()?,
-                    }))
-                }
-                Self::ALLOWED => {
-                    return Ok(Some(Self::Allowed {
-                        contract_address: reader.abi_read()?,
-                        user: reader.abi_read()?,
-                    }))
-                }
-                Self::ALLOWLIST_ENABLED => {
-                    return Ok(Some(Self::AllowlistEnabled {
-                        contract_address: reader.abi_read()?,
-                    }))
-                }
-                Self::TOGGLE_ALLOWLIST => {
-                    return Ok(Some(Self::ToggleAllowlist {
-                        contract_address: reader.abi_read()?,
-                        enabled: reader.abi_read()?,
-                    }))
-                }
-                Self::TOGGLE_ALLOWED => {
-                    return Ok(Some(Self::ToggleAllowed {
-                        contract_address: reader.abi_read()?,
-                        user: reader.abi_read()?,
-                        allowed: reader.abi_read()?,
-                    }))
-                }
-                _ => {}
-            }
-            return Ok(None);
-        }
-    }
-    impl<T: Config> ::evm_coder::Weighted for ContractHelpersCall<T> {
-        fn weight(&self) -> ::evm_coder::execution::DispatchInfo {
-            type InternalCall = ContractHelpersCall;
-            match self {
-                InternalCall::ERC165Call(::evm_coder::ERC165Call::SupportsInterface { .. }) => {
-                    100u64.into()
-                }
-                InternalCall::ContractOwner { .. } => ().into(),
-                InternalCall::SponsoringEnabled { .. } => ().into(),
-                InternalCall::ToggleSponsoring { .. } => ().into(),
-                InternalCall::SetSponsoringRateLimit { .. } => ().into(),
-                InternalCall::GetSponsoringRateLimit { .. } => ().into(),
-                InternalCall::Allowed { .. } => ().into(),
-                InternalCall::AllowlistEnabled { .. } => ().into(),
-                InternalCall::ToggleAllowlist { .. } => ().into(),
-                InternalCall::ToggleAllowed { .. } => ().into(),
-            }
-        }
-    }
-    impl<T: Config> ::evm_coder::Callable<ContractHelpersCall<T>> for ContractHelpers<T> {
-        #[allow(unreachable_code)]
-        fn call(
-            &mut self,
-            c: Msg<ContractHelpersCall>,
-        ) -> ::evm_coder::execution::ResultWithPostInfo<::evm_coder::abi::AbiWriter> {
-            use ::evm_coder::abi::AbiWrite;
-            type InternalCall = ContractHelpersCall;
-            match c.call {
-                InternalCall::ERC165Call(::evm_coder::ERC165Call::SupportsInterface {
-                    interface_id,
-                }) => {
-                    let mut writer = ::evm_coder::abi::AbiWriter::default();
-                    writer.bool(&InternalCall::supports_interface(interface_id));
-                    return Ok(writer.into());
-                }
-                _ => {}
-            }
-            let mut writer = ::evm_coder::abi::AbiWriter::default();
-            match c.call {
-                InternalCall::ContractOwner { contract_address } => {
-                    let result = self.contract_owner(contract_address)?;
-                    (&result).to_result()
-                }
-                InternalCall::SponsoringEnabled { contract_address } => {
-                    let result = self.sponsoring_enabled(contract_address)?;
-                    (&result).to_result()
-                }
-                InternalCall::ToggleSponsoring {
-                    contract_address,
-                    enabled,
-                } => {
-                    let result =
-                        self.toggle_sponsoring(c.caller.clone(), contract_address, enabled)?;
-                    (&result).to_result()
-                }
-                InternalCall::SetSponsoringRateLimit {
-                    contract_address,
-                    rate_limit,
-                } => {
-                    let result = self.set_sponsoring_rate_limit(
-                        c.caller.clone(),
-                        contract_address,
-                        rate_limit,
-                    )?;
-                    (&result).to_result()
-                }
-                InternalCall::GetSponsoringRateLimit { contract_address } => {
-                    let result = self.get_sponsoring_rate_limit(contract_address)?;
-                    (&result).to_result()
-                }
-                InternalCall::Allowed {
-                    contract_address,
-                    user,
-                } => {
-                    let result = self.allowed(contract_address, user)?;
-                    (&result).to_result()
-                }
-                InternalCall::AllowlistEnabled { contract_address } => {
-                    let result = self.allowlist_enabled(contract_address)?;
-                    (&result).to_result()
-                }
-                InternalCall::ToggleAllowlist {
-                    contract_address,
-                    enabled,
-                } => {
-                    let result =
-                        self.toggle_allowlist(c.caller.clone(), contract_address, enabled)?;
-                    (&result).to_result()
-                }
-                InternalCall::ToggleAllowed {
-                    contract_address,
-                    user,
-                    allowed,
-                } => {
-                    let result =
-                        self.toggle_allowed(c.caller.clone(), contract_address, user, allowed)?;
-                    (&result).to_result()
-                }
-                _ => ::core::panicking::panic("internal error: entered unreachable code"),
-            }
-        }
-    }
-    pub struct HelpersOnMethodCall<T: Config>(PhantomData<*const T>);
-    impl<T: Config> OnMethodCall<T> for HelpersOnMethodCall<T> {
-        fn is_reserved(contract: &sp_core::H160) -> bool {
-            contract == &T::ContractAddress::get()
-        }
-        fn is_used(contract: &sp_core::H160) -> bool {
-            contract == &T::ContractAddress::get()
-        }
-        fn call(
-            source: &sp_core::H160,
-            target: &sp_core::H160,
-            gas_left: u64,
-            input: &[u8],
-            value: sp_core::U256,
-        ) -> Option<PrecompileOutput> {
-            if !<Pallet<T>>::allowed(*target, *source, true) {
-                return Some(PrecompileOutput {
-                    exit_status: ExitReason::Revert(ExitRevert::Reverted),
-                    cost: 0,
-                    output: {
-                        let mut writer = AbiWriter::new_call(147028384u32);
-                        writer.string("Target contract is allowlisted");
-                        writer.finish()
-                    },
-                    logs: ::alloc::vec::Vec::new(),
-                });
-            }
-            if target != &T::ContractAddress::get() {
-                return None;
-            }
-            let helpers = ContractHelpers::<T>(SubstrateRecorder::<T>::new(*target, gas_left));
-            pallet_evm_coder_substrate::call(*source, helpers, value, input)
-        }
-        fn get_code(contract: &sp_core::H160) -> Option<Vec<u8>> {
-            (contract == & T :: ContractAddress :: get ()) . then (| | b"`\xe0`@R`&`\x80\x81\x81R\x90a\x04\xf4`\xa09\x80Qa\x00&\x91`\x01\x91` \x90\x91\x01\x90a\x009V[P4\x80\x15a\x003W`\x00\x80\xfd[Pa\x01\rV[\x82\x80Ta\x00E\x90a\x00\xd2V[\x90`\x00R` `\x00 \x90`\x1f\x01` \x90\x04\x81\x01\x92\x82a\x00gW`\x00\x85Ua\x00\xadV[\x82`\x1f\x10a\x00\x80W\x80Q`\xff\x19\x16\x83\x80\x01\x17\x85Ua\x00\xadV[\x82\x80\x01`\x01\x01\x85U\x82\x15a\x00\xadW\x91\x82\x01[\x82\x81\x11\x15a\x00\xadW\x82Q\x82U\x91` \x01\x91\x90`\x01\x01\x90a\x00\x92V[Pa\x00\xb9\x92\x91Pa\x00\xbdV[P\x90V[[\x80\x82\x11\x15a\x00\xb9W`\x00\x81U`\x01\x01a\x00\xbeV[`\x01\x81\x81\x1c\x90\x82\x16\x80a\x00\xe6W`\x7f\x82\x16\x91P[` \x82\x10\x81\x14\x15a\x01\x07WcNH{q`\xe0\x1b`\x00R`\"`\x04R`$`\x00\xfd[P\x91\x90PV[a\x03\xd8\x80a\x01\x1c`\x009`\x00\xf3\xfe`\x80`@R4\x80\x15a\x00\x10W`\x00\x80\xfd[P`\x046\x10a\x00\x9eW`\x005`\xe0\x1c\x80c`\'\xdca\x11a\x00fW\x80c`\'\xdca\x14a\x01\"W\x80ca\x0c\xfa\xbd\x14a\x010W\x80cw\xb6\xc9\x08\x14a\x01SW\x80c\xc7r\xefl\x14a\x01\"W\x80c\xfc\xacm\x86\x14a\x00\xcbW`\x00\x80\xfd[\x80c\x01\xff\xc9\xa7\x14a\x00\xa3W\x80c6\xde \xf5\x14a\x00\xcbW\x80cG\x06\xcc\x1c\x14a\x00\xe0W\x80cQR\xb1L\x14a\x00\xeeW\x80c\\e\x81e\x14a\x01\x14W[`\x00\x80\xfd[a\x00\xb6a\x00\xb16`\x04a\x01\xa2V[a\x01aV[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xf3[a\x00\xdea\x00\xd96`\x04a\x01\xffV[a\x01\x87V[\x00[a\x00\xdea\x00\xd96`\x04a\x022V[a\x00\xfca\x00\xb16`\x04a\x02uV[`@Q`\x01`\x01`\xa0\x1b\x03\x90\x91\x16\x81R` \x01a\x00\xc2V[a\x00\xb6a\x00\xb16`\x04a\x02\x90V[a\x00\xb6a\x00\xb16`\x04a\x02uV[a\x01>a\x00\xb16`\x04a\x02uV[`@Qc\xff\xff\xff\xff\x90\x91\x16\x81R` \x01a\x00\xc2V[a\x00\xdea\x00\xd96`\x04a\x02\xbaV[`\x00`\x01`@QbF\x1b\xcd`\xe5\x1b\x81R`\x04\x01a\x01~\x91\x90a\x02\xfaV[`@Q\x80\x91\x03\x90\xfd[`\x01`@QbF\x1b\xcd`\xe5\x1b\x81R`\x04\x01a\x01~\x91\x90a\x02\xfaV[`\x00` \x82\x84\x03\x12\x15a\x01\xb4W`\x00\x80\xfd[\x815`\x01`\x01`\xe0\x1b\x03\x19\x81\x16\x81\x14a\x01\xccW`\x00\x80\xfd[\x93\x92PPPV[\x805`\x01`\x01`\xa0\x1b\x03\x81\x16\x81\x14a\x01\xeaW`\x00\x80\xfd[\x91\x90PV[\x805\x80\x15\x15\x81\x14a\x01\xeaW`\x00\x80\xfd[`\x00\x80`@\x83\x85\x03\x12\x15a\x02\x12W`\x00\x80\xfd[a\x02\x1b\x83a\x01\xd3V[\x91Pa\x02)` \x84\x01a\x01\xefV[\x90P\x92P\x92\x90PV[`\x00\x80`\x00``\x84\x86\x03\x12\x15a\x02GW`\x00\x80\xfd[a\x02P\x84a\x01\xd3V[\x92Pa\x02^` \x85\x01a\x01\xd3V[\x91Pa\x02l`@\x85\x01a\x01\xefV[\x90P\x92P\x92P\x92V[`\x00` \x82\x84\x03\x12\x15a\x02\x87W`\x00\x80\xfd[a\x01\xcc\x82a\x01\xd3V[`\x00\x80`@\x83\x85\x03\x12\x15a\x02\xa3W`\x00\x80\xfd[a\x02\xac\x83a\x01\xd3V[\x91Pa\x02)` \x84\x01a\x01\xd3V[`\x00\x80`@\x83\x85\x03\x12\x15a\x02\xcdW`\x00\x80\xfd[a\x02\xd6\x83a\x01\xd3V[\x91P` \x83\x015c\xff\xff\xff\xff\x81\x16\x81\x14a\x02\xefW`\x00\x80\xfd[\x80\x91PP\x92P\x92\x90PV[`\x00` \x80\x83R`\x00\x84T\x81`\x01\x82\x81\x1c\x91P\x80\x83\x16\x80a\x03\x1cW`\x7f\x83\x16\x92P[\x85\x83\x10\x81\x14\x15a\x03:WcNH{q`\xe0\x1b\x85R`\"`\x04R`$\x85\xfd[\x87\x86\x01\x83\x81R` \x01\x81\x80\x15a\x03WW`\x01\x81\x14a\x03hWa\x03\x93V[`\xff\x19\x86\x16\x82R\x87\x82\x01\x96Pa\x03\x93V[`\x00\x8b\x81R` \x90 `\x00[\x86\x81\x10\x15a\x03\x8dW\x81T\x84\x82\x01R\x90\x85\x01\x90\x89\x01a\x03tV[\x83\x01\x97PP[P\x94\x99\x98PPPPPPPPPV\xfe\xa2dipfsX\"\x12 \xde\xe1\xb0gnP\xa0\xbb\xa7\xaf\xbek+\xe6S6\n\xcd?\x0c+\x81\xebEq\x8c\xe3\xab\xaaC6UdsolcC\x00\x08\t\x003this contract is implemented in native" . to_vec ())
-        }
-    }
-    pub struct HelpersOnCreate<T: Config>(PhantomData<*const T>);
-    impl<T: Config> OnCreate<T> for HelpersOnCreate<T> {
-        fn on_create(owner: H160, contract: H160) {
-            <Owner<T>>::insert(contract, owner);
-        }
-    }
-    pub struct HelpersContractSponsoring<T: Config>(PhantomData<*const T>);
-    impl<T: Config> SponsorshipHandler<H160, (H160, Vec<u8>)> for HelpersContractSponsoring<T> {
-        fn get_sponsor(who: &H160, call: &(H160, Vec<u8>)) -> Option<H160> {
-            if <SelfSponsoring<T>>::get(&call.0) && <Pallet<T>>::allowed(call.0, *who, false) {
-                let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;
-                if let Some(last_tx_block) = <SponsorBasket<T>>::get(&call.0, who) {
-                    let rate_limit = <SponsoringRateLimit<T>>::get(&call.0);
-                    let limit_time = last_tx_block + rate_limit;
-                    if block_number > limit_time {
-                        <SponsorBasket<T>>::insert(&call.0, who, block_number);
-                        return Some(call.0);
-                    }
-                } else {
-                    <SponsorBasket<T>>::insert(&call.0, who, block_number);
-                    return Some(call.0);
-                }
-            }
-            None
-        }
-    }
-}
-#[doc = r"
-			The module that hosts all the
-			[FRAME](https://docs.substrate.io/v3/runtime/frame)
-			types needed to add this pallet to a
-			runtime.
-			"]
-pub mod pallet {
-    use evm_coder::execution::Result;
-    use frame_support::pallet_prelude::*;
-    use sp_core::H160;
-    #[doc = r"
-			Configuration trait of this pallet.
-
-			Implement this type for a runtime in order to customize this pallet.
-			"]
-    pub trait Config: frame_system::Config + pallet_evm_coder_substrate::Config {
-        type ContractAddress: Get<H160>;
-        type DefaultSponsoringRateLimit: Get<Self::BlockNumber>;
-    }
-    #[scale_info(skip_type_params(T), capture_docs = "always")]
-    #[doc = r"
-			Custom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)
-			of this pallet.
-			"]
-    pub enum Error<T> {
-        #[doc(hidden)]
-        #[codec(skip)]
-        __Ignore(
-            frame_support::sp_std::marker::PhantomData<(T)>,
-            frame_support::Never,
-        ),
-        #[doc = " This method is only executable by owner"]
-        NoPermission,
-    }
-    #[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
-    const _: () = {
-        impl<T> ::scale_info::TypeInfo for Error<T>
-        where
-            frame_support::sp_std::marker::PhantomData<(T)>: ::scale_info::TypeInfo + 'static,
-            T: 'static,
-        {
-            type Identity = Self;
-            fn type_info() -> ::scale_info::Type {
-                :: scale_info :: Type :: builder () . path (:: scale_info :: Path :: new ("Error" , "pallet_evm_contract_helpers::pallet")) . type_params (< [_] > :: into_vec (box [:: scale_info :: TypeParameter :: new ("T" , :: core :: option :: Option :: None)])) . docs_always (& ["\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"]) . variant (:: scale_info :: build :: Variants :: new () . variant ("NoPermission" , | v | v . index (0usize as :: core :: primitive :: u8) . docs_always (& ["This method is only executable by owner"])))
-            }
-        };
-    };
-    #[doc = r"
-			The [pallet](https://docs.substrate.io/v3/runtime/frame#pallets) implementing
-			the on-chain logic.
-			"]
-    pub struct Pallet<T>(frame_support::sp_std::marker::PhantomData<(T)>);
-    const _: () = {
-        impl<T> core::clone::Clone for Pallet<T> {
-            fn clone(&self) -> Self {
-                Self(core::clone::Clone::clone(&self.0))
-            }
-        }
-    };
-    const _: () = {
-        impl<T> core::cmp::Eq for Pallet<T> {}
-    };
-    const _: () = {
-        impl<T> core::cmp::PartialEq for Pallet<T> {
-            fn eq(&self, other: &Self) -> bool {
-                true && self.0 == other.0
-            }
-        }
-    };
-    const _: () = {
-        impl<T> core::fmt::Debug for Pallet<T> {
-            fn fmt(&self, fmt: &mut core::fmt::Formatter) -> core::fmt::Result {
-                fmt.debug_tuple("Pallet").field(&self.0).finish()
-            }
-        }
-    };
-    #[allow(type_alias_bounds)]
-    pub(super) type Owner<T: Config> = StorageMap<
-        _GeneratedPrefixForStorageOwner<T>,
-        Twox128,
-        H160,
-        H160,
-        ValueQuery,
-        frame_support::traits::GetDefault,
-        frame_support::traits::GetDefault,
-    >;
-    #[allow(type_alias_bounds)]
-    pub(super) type SelfSponsoring<T: Config> = StorageMap<
-        _GeneratedPrefixForStorageSelfSponsoring<T>,
-        Twox128,
-        H160,
-        bool,
-        ValueQuery,
-        frame_support::traits::GetDefault,
-        frame_support::traits::GetDefault,
-    >;
-    #[allow(type_alias_bounds)]
-    pub(super) type SponsoringRateLimit<T: Config> = StorageMap<
-        _GeneratedPrefixForStorageSponsoringRateLimit<T>,
-        Twox128,
-        H160,
-        T::BlockNumber,
-        ValueQuery,
-        T::DefaultSponsoringRateLimit,
-        frame_support::traits::GetDefault,
-    >;
-    #[allow(type_alias_bounds)]
-    pub(super) type SponsorBasket<T: Config> = StorageDoubleMap<
-        _GeneratedPrefixForStorageSponsorBasket<T>,
-        Twox128,
-        H160,
-        Twox128,
-        H160,
-        T::BlockNumber,
-        OptionQuery,
-        frame_support::traits::GetDefault,
-        frame_support::traits::GetDefault,
-    >;
-    #[allow(type_alias_bounds)]
-    pub(super) type AllowlistEnabled<T: Config> = StorageMap<
-        _GeneratedPrefixForStorageAllowlistEnabled<T>,
-        Twox128,
-        H160,
-        bool,
-        ValueQuery,
-        frame_support::traits::GetDefault,
-        frame_support::traits::GetDefault,
-    >;
-    #[allow(type_alias_bounds)]
-    pub(super) type Allowlist<T: Config> = StorageDoubleMap<
-        _GeneratedPrefixForStorageAllowlist<T>,
-        Twox128,
-        H160,
-        Twox128,
-        H160,
-        bool,
-        ValueQuery,
-        frame_support::traits::GetDefault,
-        frame_support::traits::GetDefault,
-    >;
-    impl<T: Config> Pallet<T> {
-        pub fn toggle_sponsoring(contract: H160, enabled: bool) {
-            <SelfSponsoring<T>>::insert(contract, enabled);
-        }
-        pub fn set_sponsoring_rate_limit(contract: H160, rate_limit: T::BlockNumber) {
-            <SponsoringRateLimit<T>>::insert(contract, rate_limit);
-        }
-        #[doc = " Default is returned if allowlist is disabled"]
-        pub fn allowed(contract: H160, user: H160, default: bool) -> bool {
-            if !<AllowlistEnabled<T>>::get(contract) {
-                return default;
-            }
-            <Allowlist<T>>::get(&contract, &user) || <Owner<T>>::get(&contract) == user
-        }
-        pub fn toggle_allowlist(contract: H160, enabled: bool) {
-            <AllowlistEnabled<T>>::insert(contract, enabled)
-        }
-        pub fn toggle_allowed(contract: H160, user: H160, allowed: bool) {
-            <Allowlist<T>>::insert(contract, user, allowed);
-        }
-        pub fn ensure_owner(contract: H160, user: H160) -> Result<()> {
-            {
-                if !(<Owner<T>>::get(&contract) == user) {
-                    {
-                        return Err("no permission".into());
-                    };
-                }
-            };
-            Ok(())
-        }
-    }
-    impl<T: Config> Pallet<T> {
-        #[doc(hidden)]
-        pub fn pallet_constants_metadata(
-        ) -> frame_support::sp_std::vec::Vec<frame_support::metadata::PalletConstantMetadata>
-        {
-            ::alloc::vec::Vec::new()
-        }
-    }
-    impl<T: Config> Pallet<T> {
-        pub fn error_metadata() -> Option<frame_support::metadata::PalletErrorMetadata> {
-            Some(frame_support::metadata::PalletErrorMetadata {
-                ty: frame_support::scale_info::meta_type::<Error<T>>(),
-            })
-        }
-    }
-    #[doc = r" Type alias to `Pallet`, to be used by `construct_runtime`."]
-    #[doc = r""]
-    #[doc = r" Generated by `pallet` attribute macro."]
-    #[deprecated(note = "use `Pallet` instead")]
-    #[allow(dead_code)]
-    pub type Module<T> = Pallet<T>;
-    impl<T: Config> frame_support::traits::GetStorageVersion for Pallet<T> {
-        fn current_storage_version() -> frame_support::traits::StorageVersion {
-            frame_support::traits::StorageVersion::default()
-        }
-        fn on_chain_storage_version() -> frame_support::traits::StorageVersion {
-            frame_support::traits::StorageVersion::get::<Self>()
-        }
-    }
-    impl<T: Config> frame_support::traits::OnGenesis for Pallet<T> {
-        fn on_genesis() {
-            let storage_version = frame_support::traits::StorageVersion::default();
-            storage_version.put::<Self>();
-        }
-    }
-    impl<T: Config> frame_support::traits::PalletInfoAccess for Pallet<T> {
-        fn index() -> usize {
-            <<T as frame_system::Config>::PalletInfo as frame_support::traits::PalletInfo>::index::<
-                Self,
-            >()
-            .expect(
-                "Pallet is part of the runtime because pallet `Config` trait is \
-						implemented by the runtime",
-            )
-        }
-        fn name() -> &'static str {
-            <<T as frame_system::Config>::PalletInfo as frame_support::traits::PalletInfo>::name::<
-                Self,
-            >()
-            .expect(
-                "Pallet is part of the runtime because pallet `Config` trait is \
-						implemented by the runtime",
-            )
-        }
-        fn module_name() -> &'static str {
-            < < T as frame_system :: Config > :: PalletInfo as frame_support :: traits :: PalletInfo > :: module_name :: < Self > () . expect ("Pallet is part of the runtime because pallet `Config` trait is \
-						implemented by the runtime")
-        }
-        fn crate_version() -> frame_support::traits::CrateVersion {
-            frame_support::traits::CrateVersion {
-                major: 0u16,
-                minor: 1u8,
-                patch: 0u8,
-            }
-        }
-    }
-    impl<T: Config> frame_support::traits::StorageInfoTrait for Pallet<T> {
-        fn storage_info() -> frame_support::sp_std::vec::Vec<frame_support::traits::StorageInfo> {
-            #[allow(unused_mut)]
-            let mut res = ::alloc::vec::Vec::new();
-            {
-                let mut storage_info = < Owner < T > as frame_support :: traits :: PartialStorageInfoTrait > :: partial_storage_info () ;
-                res.append(&mut storage_info);
-            }
-            {
-                let mut storage_info = < SelfSponsoring < T > as frame_support :: traits :: PartialStorageInfoTrait > :: partial_storage_info () ;
-                res.append(&mut storage_info);
-            }
-            {
-                let mut storage_info = < SponsoringRateLimit < T > as frame_support :: traits :: PartialStorageInfoTrait > :: partial_storage_info () ;
-                res.append(&mut storage_info);
-            }
-            {
-                let mut storage_info = < SponsorBasket < T > as frame_support :: traits :: PartialStorageInfoTrait > :: partial_storage_info () ;
-                res.append(&mut storage_info);
-            }
-            {
-                let mut storage_info = < AllowlistEnabled < T > as frame_support :: traits :: PartialStorageInfoTrait > :: partial_storage_info () ;
-                res.append(&mut storage_info);
-            }
-            {
-                let mut storage_info = < Allowlist < T > as frame_support :: traits :: PartialStorageInfoTrait > :: partial_storage_info () ;
-                res.append(&mut storage_info);
-            }
-            res
-        }
-    }
-    #[doc(hidden)]
-    pub mod __substrate_call_check {
-        #[doc(hidden)]
-        pub use __is_call_part_defined_0 as is_call_part_defined;
-    }
-    #[doc = r"Contains one variant per dispatchable that can be called by an extrinsic."]
-    #[codec(encode_bound())]
-    #[codec(decode_bound())]
-    #[scale_info(skip_type_params(T), capture_docs = "always")]
-    #[allow(non_camel_case_types)]
-    pub enum Call<T: Config> {
-        #[doc(hidden)]
-        #[codec(skip)]
-        __Ignore(
-            frame_support::sp_std::marker::PhantomData<(T,)>,
-            frame_support::Never,
-        ),
-    }
-    const _: () = {
-        impl<T: Config> core::fmt::Debug for Call<T> {
-            fn fmt(&self, fmt: &mut core::fmt::Formatter) -> core::fmt::Result {
-                match *self {
-                    Self::__Ignore(ref _0, ref _1) => fmt
-                        .debug_tuple("Call::__Ignore")
-                        .field(&_0)
-                        .field(&_1)
-                        .finish(),
-                }
-            }
-        }
-    };
-    const _: () = {
-        impl<T: Config> core::clone::Clone for Call<T> {
-            fn clone(&self) -> Self {
-                match self {
-                    Self::__Ignore(ref _0, ref _1) => {
-                        Self::__Ignore(core::clone::Clone::clone(_0), core::clone::Clone::clone(_1))
-                    }
-                }
-            }
-        }
-    };
-    const _: () = {
-        impl<T: Config> core::cmp::Eq for Call<T> {}
-    };
-    const _: () = {
-        impl<T: Config> core::cmp::PartialEq for Call<T> {
-            fn eq(&self, other: &Self) -> bool {
-                match (self, other) {
-                    (Self::__Ignore(_0, _1), Self::__Ignore(_0_other, _1_other)) => {
-                        true && _0 == _0_other && _1 == _1_other
-                    }
-                }
-            }
-        }
-    };
-    const _: () = {
-        #[allow(non_camel_case_types)]
-        impl<T: Config> ::codec::Encode for Call<T> {}
-        impl<T: Config> ::codec::EncodeLike for Call<T> {}
-    };
-    const _: () = {
-        #[allow(non_camel_case_types)]
-        impl<T: Config> ::codec::Decode for Call<T> {
-            fn decode<__CodecInputEdqy: ::codec::Input>(
-                __codec_input_edqy: &mut __CodecInputEdqy,
-            ) -> ::core::result::Result<Self, ::codec::Error> {
-                match __codec_input_edqy
-                    .read_byte()
-                    .map_err(|e| e.chain("Could not decode `Call`, failed to read variant byte"))?
-                {
-                    _ => ::core::result::Result::Err(<_ as ::core::convert::Into<_>>::into(
-                        "Could not decode `Call`, variant doesn\'t exist",
-                    )),
-                }
-            }
-        }
-    };
-    #[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
-    const _: () = {
-        impl<T: Config> ::scale_info::TypeInfo for Call<T>
-        where
-            frame_support::sp_std::marker::PhantomData<(T,)>: ::scale_info::TypeInfo + 'static,
-            T: Config + 'static,
-        {
-            type Identity = Self;
-            fn type_info() -> ::scale_info::Type {
-                ::scale_info::Type::builder()
-                    .path(::scale_info::Path::new(
-                        "Call",
-                        "pallet_evm_contract_helpers::pallet",
-                    ))
-                    .type_params(<[_]>::into_vec(box [::scale_info::TypeParameter::new(
-                        "T",
-                        ::core::option::Option::None,
-                    )]))
-                    .docs_always(&[
-                        "Contains one variant per dispatchable that can be called by an extrinsic.",
-                    ])
-                    .variant(::scale_info::build::Variants::new())
-            }
-        };
-    };
-    impl<T: Config> Call<T> {}
-    impl<T: Config> frame_support::dispatch::GetDispatchInfo for Call<T> {
-        fn get_dispatch_info(&self) -> frame_support::dispatch::DispatchInfo {
-            match *self {
-                Self::__Ignore(_, _) => {
-                    ::core::panicking::panic_fmt(::core::fmt::Arguments::new_v1(
-                        &["internal error: entered unreachable code: "],
-                        &match (&"__Ignore cannot be used",) {
-                            (arg0,) => [::core::fmt::ArgumentV1::new(
-                                arg0,
-                                ::core::fmt::Display::fmt,
-                            )],
-                        },
-                    ))
-                }
-            }
-        }
-    }
-    impl<T: Config> frame_support::dispatch::GetCallName for Call<T> {
-        fn get_call_name(&self) -> &'static str {
-            match *self {
-                Self::__Ignore(_, _) => {
-                    ::core::panicking::panic_fmt(::core::fmt::Arguments::new_v1(
-                        &["internal error: entered unreachable code: "],
-                        &match (&"__PhantomItem cannot be used.",) {
-                            (arg0,) => [::core::fmt::ArgumentV1::new(
-                                arg0,
-                                ::core::fmt::Display::fmt,
-                            )],
-                        },
-                    ))
-                }
-            }
-        }
-        fn get_call_names() -> &'static [&'static str] {
-            &[]
-        }
-    }
-    impl<T: Config> frame_support::traits::UnfilteredDispatchable for Call<T> {
-        type Origin = frame_system::pallet_prelude::OriginFor<T>;
-        fn dispatch_bypass_filter(
-            self,
-            origin: Self::Origin,
-        ) -> frame_support::dispatch::DispatchResultWithPostInfo {
-            match self {
-                Self::__Ignore(_, _) => {
-                    let _ = origin;
-                    {
-                        {
-                            ::core::panicking::panic_fmt(::core::fmt::Arguments::new_v1(
-                                &["internal error: entered unreachable code: "],
-                                &match (&"__PhantomItem cannot be used.",) {
-                                    (arg0,) => [::core::fmt::ArgumentV1::new(
-                                        arg0,
-                                        ::core::fmt::Display::fmt,
-                                    )],
-                                },
-                            ))
-                        }
-                    };
-                }
-            }
-        }
-    }
-    impl<T: Config> frame_support::dispatch::Callable<T> for Pallet<T> {
-        type Call = Call<T>;
-    }
-    impl<T: Config> Pallet<T> {
-        #[doc(hidden)]
-        pub fn call_functions() -> frame_support::metadata::PalletCallMetadata {
-            frame_support::scale_info::meta_type::<Call<T>>().into()
-        }
-    }
-    impl<T: Config> frame_support::sp_std::fmt::Debug for Error<T> {
-        fn fmt(
-            &self,
-            f: &mut frame_support::sp_std::fmt::Formatter<'_>,
-        ) -> frame_support::sp_std::fmt::Result {
-            f.write_str(self.as_str())
-        }
-    }
-    impl<T: Config> Error<T> {
-        pub fn as_u8(&self) -> u8 {
-            match &self {
-                Self::__Ignore(_, _) => {
-                    ::core::panicking::panic_fmt(::core::fmt::Arguments::new_v1(
-                        &["internal error: entered unreachable code: "],
-                        &match (&"`__Ignore` can never be constructed",) {
-                            (arg0,) => [::core::fmt::ArgumentV1::new(
-                                arg0,
-                                ::core::fmt::Display::fmt,
-                            )],
-                        },
-                    ))
-                }
-                Self::NoPermission => 0usize as u8,
-            }
-        }
-        pub fn as_str(&self) -> &'static str {
-            match &self {
-                Self::__Ignore(_, _) => {
-                    ::core::panicking::panic_fmt(::core::fmt::Arguments::new_v1(
-                        &["internal error: entered unreachable code: "],
-                        &match (&"`__Ignore` can never be constructed",) {
-                            (arg0,) => [::core::fmt::ArgumentV1::new(
-                                arg0,
-                                ::core::fmt::Display::fmt,
-                            )],
-                        },
-                    ))
-                }
-                Self::NoPermission => "NoPermission",
-            }
-        }
-    }
-    impl<T: Config> From<Error<T>> for &'static str {
-        fn from(err: Error<T>) -> &'static str {
-            err.as_str()
-        }
-    }
-    impl<T: Config> From<Error<T>> for frame_support::sp_runtime::DispatchError {
-        fn from(err: Error<T>) -> Self {
-            let index = < < T as frame_system :: Config > :: PalletInfo as frame_support :: traits :: PalletInfo > :: index :: < Pallet < T > > () . expect ("Every active module has an index in the runtime; qed") as u8 ;
-            frame_support::sp_runtime::DispatchError::Module {
-                index,
-                error: err.as_u8(),
-                message: Some(err.as_str()),
-            }
-        }
-    }
-    #[doc(hidden)]
-    pub mod __substrate_event_check {
-        #[doc(hidden)]
-        pub use __is_event_part_defined_1 as is_event_part_defined;
-    }
-    impl<T: Config> Pallet<T> {
-        #[doc(hidden)]
-        pub fn storage_metadata() -> frame_support::metadata::PalletStorageMetadata {
-            frame_support :: metadata :: PalletStorageMetadata { prefix : < < T as frame_system :: Config > :: PalletInfo as frame_support :: traits :: PalletInfo > :: name :: < Pallet < T > > () . expect ("Every active pallet has a name in the runtime; qed") , entries : { # [allow (unused_mut)] let mut entries = :: alloc :: vec :: Vec :: new () ; { < Owner < T > as frame_support :: storage :: StorageEntryMetadataBuilder > :: build_metadata (:: alloc :: vec :: Vec :: new () , & mut entries) ; } { < SelfSponsoring < T > as frame_support :: storage :: StorageEntryMetadataBuilder > :: build_metadata (:: alloc :: vec :: Vec :: new () , & mut entries) ; } { < SponsoringRateLimit < T > as frame_support :: storage :: StorageEntryMetadataBuilder > :: build_metadata (:: alloc :: vec :: Vec :: new () , & mut entries) ; } { < SponsorBasket < T > as frame_support :: storage :: StorageEntryMetadataBuilder > :: build_metadata (:: alloc :: vec :: Vec :: new () , & mut entries) ; } { < AllowlistEnabled < T > as frame_support :: storage :: StorageEntryMetadataBuilder > :: build_metadata (:: alloc :: vec :: Vec :: new () , & mut entries) ; } { < Allowlist < T > as frame_support :: storage :: StorageEntryMetadataBuilder > :: build_metadata (:: alloc :: vec :: Vec :: new () , & mut entries) ; } entries } , }
-        }
-    }
-    pub(super) struct _GeneratedPrefixForStorageOwner<T>(core::marker::PhantomData<(T,)>);
-    impl<T: Config> frame_support::traits::StorageInstance for _GeneratedPrefixForStorageOwner<T> {
-        fn pallet_prefix() -> &'static str {
-            <<T as frame_system::Config>::PalletInfo as frame_support::traits::PalletInfo>::name::<
-                Pallet<T>,
-            >()
-            .expect("Every active pallet has a name in the runtime; qed")
-        }
-        const STORAGE_PREFIX: &'static str = "Owner";
-    }
-    pub(super) struct _GeneratedPrefixForStorageSelfSponsoring<T>(core::marker::PhantomData<(T,)>);
-    impl<T: Config> frame_support::traits::StorageInstance
-        for _GeneratedPrefixForStorageSelfSponsoring<T>
-    {
-        fn pallet_prefix() -> &'static str {
-            <<T as frame_system::Config>::PalletInfo as frame_support::traits::PalletInfo>::name::<
-                Pallet<T>,
-            >()
-            .expect("Every active pallet has a name in the runtime; qed")
-        }
-        const STORAGE_PREFIX: &'static str = "SelfSponsoring";
-    }
-    pub(super) struct _GeneratedPrefixForStorageSponsoringRateLimit<T>(
-        core::marker::PhantomData<(T,)>,
-    );
-    impl<T: Config> frame_support::traits::StorageInstance
-        for _GeneratedPrefixForStorageSponsoringRateLimit<T>
-    {
-        fn pallet_prefix() -> &'static str {
-            <<T as frame_system::Config>::PalletInfo as frame_support::traits::PalletInfo>::name::<
-                Pallet<T>,
-            >()
-            .expect("Every active pallet has a name in the runtime; qed")
-        }
-        const STORAGE_PREFIX: &'static str = "SponsoringRateLimit";
-    }
-    pub(super) struct _GeneratedPrefixForStorageSponsorBasket<T>(core::marker::PhantomData<(T,)>);
-    impl<T: Config> frame_support::traits::StorageInstance
-        for _GeneratedPrefixForStorageSponsorBasket<T>
-    {
-        fn pallet_prefix() -> &'static str {
-            <<T as frame_system::Config>::PalletInfo as frame_support::traits::PalletInfo>::name::<
-                Pallet<T>,
-            >()
-            .expect("Every active pallet has a name in the runtime; qed")
-        }
-        const STORAGE_PREFIX: &'static str = "SponsorBasket";
-    }
-    pub(super) struct _GeneratedPrefixForStorageAllowlistEnabled<T>(
-        core::marker::PhantomData<(T,)>,
-    );
-    impl<T: Config> frame_support::traits::StorageInstance
-        for _GeneratedPrefixForStorageAllowlistEnabled<T>
-    {
-        fn pallet_prefix() -> &'static str {
-            <<T as frame_system::Config>::PalletInfo as frame_support::traits::PalletInfo>::name::<
-                Pallet<T>,
-            >()
-            .expect("Every active pallet has a name in the runtime; qed")
-        }
-        const STORAGE_PREFIX: &'static str = "AllowlistEnabled";
-    }
-    pub(super) struct _GeneratedPrefixForStorageAllowlist<T>(core::marker::PhantomData<(T,)>);
-    impl<T: Config> frame_support::traits::StorageInstance for _GeneratedPrefixForStorageAllowlist<T> {
-        fn pallet_prefix() -> &'static str {
-            <<T as frame_system::Config>::PalletInfo as frame_support::traits::PalletInfo>::name::<
-                Pallet<T>,
-            >()
-            .expect("Every active pallet has a name in the runtime; qed")
-        }
-        const STORAGE_PREFIX: &'static str = "Allowlist";
-    }
-    #[doc(hidden)]
-    pub mod __substrate_inherent_check {
-        #[doc(hidden)]
-        pub use __is_inherent_part_defined_2 as is_inherent_part_defined;
-    }
-    #[doc = r" Hidden instance generated to be internally used when module is used without"]
-    #[doc = r" instance."]
-    #[doc(hidden)]
-    pub type __InherentHiddenInstance = ();
-    pub(super) trait Store {
-        type Owner;
-        type SelfSponsoring;
-        type SponsoringRateLimit;
-        type SponsorBasket;
-        type AllowlistEnabled;
-        type Allowlist;
-    }
-    impl<T: Config> Store for Pallet<T> {
-        type Owner = Owner<T>;
-        type SelfSponsoring = SelfSponsoring<T>;
-        type SponsoringRateLimit = SponsoringRateLimit<T>;
-        type SponsorBasket = SponsorBasket<T>;
-        type AllowlistEnabled = AllowlistEnabled<T>;
-        type Allowlist = Allowlist<T>;
-    }
-    impl<T: Config> frame_support::traits::Hooks<<T as frame_system::Config>::BlockNumber>
-        for Pallet<T>
-    {
-    }
-    impl<T: Config> frame_support::traits::OnFinalize<<T as frame_system::Config>::BlockNumber>
-        for Pallet<T>
-    {
-        fn on_finalize(n: <T as frame_system::Config>::BlockNumber) {
-            let __within_span__ = {
-                use ::tracing::__macro_support::Callsite as _;
-                static CALLSITE: ::tracing::__macro_support::MacroCallsite = {
-                    use ::tracing::__macro_support::MacroCallsite;
-                    static META: ::tracing::Metadata<'static> = {
-                        ::tracing_core::metadata::Metadata::new(
-                            "on_finalize",
-                            "pallet_evm_contract_helpers::pallet",
-                            ::tracing::Level::TRACE,
-                            Some("pallets/evm-contract-helpers/src/lib.rs"),
-                            Some(7u32),
-                            Some("pallet_evm_contract_helpers::pallet"),
-                            ::tracing_core::field::FieldSet::new(
-                                &[],
-                                ::tracing_core::callsite::Identifier(&CALLSITE),
-                            ),
-                            ::tracing::metadata::Kind::SPAN,
-                        )
-                    };
-                    MacroCallsite::new(&META)
-                };
-                let mut interest = ::tracing::subscriber::Interest::never();
-                if ::tracing::Level::TRACE <= ::tracing::level_filters::STATIC_MAX_LEVEL
-                    && ::tracing::Level::TRACE <= ::tracing::level_filters::LevelFilter::current()
-                    && {
-                        interest = CALLSITE.interest();
-                        !interest.is_never()
-                    }
-                    && CALLSITE.is_enabled(interest)
-                {
-                    let meta = CALLSITE.metadata();
-                    ::tracing::Span::new(meta, &{ meta.fields().value_set(&[]) })
-                } else {
-                    let span = CALLSITE.disabled_span();
-                    {};
-                    span
-                }
-            };
-            let __tracing_guard__ = __within_span__.enter();
-            < Self as frame_support :: traits :: Hooks < < T as frame_system :: Config > :: BlockNumber > > :: on_finalize (n)
-        }
-    }
-    impl<T: Config> frame_support::traits::OnIdle<<T as frame_system::Config>::BlockNumber>
-        for Pallet<T>
-    {
-        fn on_idle(
-            n: <T as frame_system::Config>::BlockNumber,
-            remaining_weight: frame_support::weights::Weight,
-        ) -> frame_support::weights::Weight {
-            < Self as frame_support :: traits :: Hooks < < T as frame_system :: Config > :: BlockNumber > > :: on_idle (n , remaining_weight)
-        }
-    }
-    impl<T: Config> frame_support::traits::OnInitialize<<T as frame_system::Config>::BlockNumber>
-        for Pallet<T>
-    {
-        fn on_initialize(
-            n: <T as frame_system::Config>::BlockNumber,
-        ) -> frame_support::weights::Weight {
-            let __within_span__ = {
-                use ::tracing::__macro_support::Callsite as _;
-                static CALLSITE: ::tracing::__macro_support::MacroCallsite = {
-                    use ::tracing::__macro_support::MacroCallsite;
-                    static META: ::tracing::Metadata<'static> = {
-                        ::tracing_core::metadata::Metadata::new(
-                            "on_initialize",
-                            "pallet_evm_contract_helpers::pallet",
-                            ::tracing::Level::TRACE,
-                            Some("pallets/evm-contract-helpers/src/lib.rs"),
-                            Some(7u32),
-                            Some("pallet_evm_contract_helpers::pallet"),
-                            ::tracing_core::field::FieldSet::new(
-                                &[],
-                                ::tracing_core::callsite::Identifier(&CALLSITE),
-                            ),
-                            ::tracing::metadata::Kind::SPAN,
-                        )
-                    };
-                    MacroCallsite::new(&META)
-                };
-                let mut interest = ::tracing::subscriber::Interest::never();
-                if ::tracing::Level::TRACE <= ::tracing::level_filters::STATIC_MAX_LEVEL
-                    && ::tracing::Level::TRACE <= ::tracing::level_filters::LevelFilter::current()
-                    && {
-                        interest = CALLSITE.interest();
-                        !interest.is_never()
-                    }
-                    && CALLSITE.is_enabled(interest)
-                {
-                    let meta = CALLSITE.metadata();
-                    ::tracing::Span::new(meta, &{ meta.fields().value_set(&[]) })
-                } else {
-                    let span = CALLSITE.disabled_span();
-                    {};
-                    span
-                }
-            };
-            let __tracing_guard__ = __within_span__.enter();
-            < Self as frame_support :: traits :: Hooks < < T as frame_system :: Config > :: BlockNumber > > :: on_initialize (n)
-        }
-    }
-    impl<T: Config> frame_support::traits::OnRuntimeUpgrade for Pallet<T> {
-        fn on_runtime_upgrade() -> frame_support::weights::Weight {
-            let __within_span__ = {
-                use ::tracing::__macro_support::Callsite as _;
-                static CALLSITE: ::tracing::__macro_support::MacroCallsite = {
-                    use ::tracing::__macro_support::MacroCallsite;
-                    static META: ::tracing::Metadata<'static> = {
-                        ::tracing_core::metadata::Metadata::new(
-                            "on_runtime_update",
-                            "pallet_evm_contract_helpers::pallet",
-                            ::tracing::Level::TRACE,
-                            Some("pallets/evm-contract-helpers/src/lib.rs"),
-                            Some(7u32),
-                            Some("pallet_evm_contract_helpers::pallet"),
-                            ::tracing_core::field::FieldSet::new(
-                                &[],
-                                ::tracing_core::callsite::Identifier(&CALLSITE),
-                            ),
-                            ::tracing::metadata::Kind::SPAN,
-                        )
-                    };
-                    MacroCallsite::new(&META)
-                };
-                let mut interest = ::tracing::subscriber::Interest::never();
-                if ::tracing::Level::TRACE <= ::tracing::level_filters::STATIC_MAX_LEVEL
-                    && ::tracing::Level::TRACE <= ::tracing::level_filters::LevelFilter::current()
-                    && {
-                        interest = CALLSITE.interest();
-                        !interest.is_never()
-                    }
-                    && CALLSITE.is_enabled(interest)
-                {
-                    let meta = CALLSITE.metadata();
-                    ::tracing::Span::new(meta, &{ meta.fields().value_set(&[]) })
-                } else {
-                    let span = CALLSITE.disabled_span();
-                    {};
-                    span
-                }
-            };
-            let __tracing_guard__ = __within_span__.enter();
-            let pallet_name = < < T as frame_system :: Config > :: PalletInfo as frame_support :: traits :: PalletInfo > :: name :: < Self > () . unwrap_or ("<unknown pallet name>") ;
-            {
-                let lvl = ::log::Level::Info;
-                if lvl <= ::log::STATIC_MAX_LEVEL && lvl <= ::log::max_level() {
-                    ::log::__private_api_log(
-                        ::core::fmt::Arguments::new_v1(
-                            &["\u{2705} no migration for "],
-                            &match (&pallet_name,) {
-                                (arg0,) => [::core::fmt::ArgumentV1::new(
-                                    arg0,
-                                    ::core::fmt::Display::fmt,
-                                )],
-                            },
-                        ),
-                        lvl,
-                        &(
-                            frame_support::LOG_TARGET,
-                            "pallet_evm_contract_helpers::pallet",
-                            "pallets/evm-contract-helpers/src/lib.rs",
-                            7u32,
-                        ),
-                    );
-                }
-            };
-            < Self as frame_support :: traits :: Hooks < < T as frame_system :: Config > :: BlockNumber > > :: on_runtime_upgrade ()
-        }
-    }
-    impl<T: Config> frame_support::traits::OffchainWorker<<T as frame_system::Config>::BlockNumber>
-        for Pallet<T>
-    {
-        fn offchain_worker(n: <T as frame_system::Config>::BlockNumber) {
-            < Self as frame_support :: traits :: Hooks < < T as frame_system :: Config > :: BlockNumber > > :: offchain_worker (n)
-        }
-    }
-    impl<T: Config> frame_support::traits::IntegrityTest for Pallet<T> {
-        fn integrity_test() {
-            < Self as frame_support :: traits :: Hooks < < T as frame_system :: Config > :: BlockNumber > > :: integrity_test ()
-        }
-    }
-    #[doc(hidden)]
-    pub mod __substrate_genesis_config_check {
-        #[doc(hidden)]
-        pub use __is_genesis_config_defined_3 as is_genesis_config_defined;
-        #[doc(hidden)]
-        pub use __is_std_enabled_for_genesis_3 as is_std_enabled_for_genesis;
-    }
-    #[doc(hidden)]
-    pub mod __substrate_origin_check {
-        #[doc(hidden)]
-        pub use __is_origin_part_defined_4 as is_origin_part_defined;
-    }
-    #[doc(hidden)]
-    pub mod __substrate_validate_unsigned_check {
-        #[doc(hidden)]
-        pub use __is_validate_unsigned_part_defined_5 as is_validate_unsigned_part_defined;
-    }
-}
modifiedpallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/eth.rs
+++ b/pallets/evm-contract-helpers/src/eth.rs
@@ -4,7 +4,7 @@
 use pallet_evm::{ExitRevert, OnCreate, OnMethodCall, PrecompileResult, PrecompileFailure};
 use sp_core::H160;
 use crate::{
-	AllowlistEnabled, Config, Owner, Pallet, SelfSponsoring, SponsorBasket, SponsoringRateLimit,
+	AllowlistEnabled, Config, Owner, Pallet, SponsorBasket, SponsoringRateLimit, SponsoringModeT,
 };
 use frame_support::traits::Get;
 use up_sponsorship::SponsorshipHandler;
@@ -28,9 +28,10 @@
 	}
 
 	fn sponsoring_enabled(&self, contract_address: address) -> Result<bool> {
-		Ok(<SelfSponsoring<T>>::get(contract_address))
+		Ok(<Pallet<T>>::sponsoring_mode(contract_address) != SponsoringModeT::Disabled)
 	}
 
+	/// Deprecated
 	fn toggle_sponsoring(
 		&mut self,
 		caller: caller,
@@ -42,6 +43,22 @@
 		Ok(())
 	}
 
+	fn set_sponsoring_mode(
+		&mut self,
+		caller: caller,
+		contract_address: address,
+		mode: uint8,
+	) -> Result<void> {
+		<Pallet<T>>::ensure_owner(contract_address, caller)?;
+		let mode = SponsoringModeT::from_eth(mode).ok_or("unknown mode")?;
+		<Pallet<T>>::set_sponsoring_mode(contract_address, mode);
+		Ok(())
+	}
+
+	fn sponsoring_mode(&self, contract_address: address) -> Result<uint8> {
+		Ok(<Pallet<T>>::sponsoring_mode(contract_address).to_eth())
+	}
+
 	fn set_sponsoring_rate_limit(
 		&mut self,
 		caller: caller,
@@ -61,8 +78,7 @@
 
 	fn allowed(&self, contract_address: address, user: address) -> Result<bool> {
 		self.0.consume_sload()?;
-		Ok(<Pallet<T>>::allowed(contract_address, user)
-			|| !<AllowlistEnabled<T>>::get(contract_address))
+		Ok(<Pallet<T>>::allowed(contract_address, user))
 	}
 
 	fn allowlist_enabled(&self, contract_address: address) -> Result<bool> {
@@ -147,10 +163,11 @@
 pub struct HelpersContractSponsoring<T: Config>(PhantomData<*const T>);
 impl<T: Config> SponsorshipHandler<H160, (H160, Vec<u8>)> for HelpersContractSponsoring<T> {
 	fn get_sponsor(who: &H160, call: &(H160, Vec<u8>)) -> Option<H160> {
-		if !<SelfSponsoring<T>>::get(&call.0) {
+		let mode = <Pallet<T>>::sponsoring_mode(call.0);
+		if mode == SponsoringModeT::Disabled {
 			return None;
 		}
-		if !<Pallet<T>>::allowed(call.0, *who) {
+		if mode == SponsoringModeT::Allowlisted && !<Pallet<T>>::allowed(call.0, *who) {
 			return None;
 		}
 		let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;
modifiedpallets/evm-contract-helpers/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/lib.rs
+++ b/pallets/evm-contract-helpers/src/lib.rs
@@ -1,11 +1,14 @@
 #![cfg_attr(not(feature = "std"), no_std)]
 
+use codec::{Decode, Encode, MaxEncodedLen};
 pub use pallet::*;
 pub use eth::*;
+use scale_info::TypeInfo;
 pub mod eth;
 
 #[frame_support::pallet]
 pub mod pallet {
+	pub use super::*;
 	use evm_coder::execution::Result;
 	use frame_support::pallet_prelude::*;
 	use sp_core::H160;
@@ -31,10 +34,15 @@
 		StorageMap<Hasher = Twox128, Key = H160, Value = H160, QueryKind = ValueQuery>;
 
 	#[pallet::storage]
+	#[deprecated]
 	pub(super) type SelfSponsoring<T: Config> =
 		StorageMap<Hasher = Twox128, Key = H160, Value = bool, QueryKind = ValueQuery>;
 
 	#[pallet::storage]
+	pub(super) type SponsoringMode<T: Config> =
+		StorageMap<Hasher = Twox128, Key = H160, Value = SponsoringModeT, QueryKind = OptionQuery>;
+
+	#[pallet::storage]
 	pub(super) type SponsoringRateLimit<T: Config> = StorageMap<
 		Hasher = Twox128,
 		Key = H160,
@@ -68,8 +76,31 @@
 	>;
 
 	impl<T: Config> Pallet<T> {
+		pub fn sponsoring_mode(contract: H160) -> SponsoringModeT {
+			<SponsoringMode<T>>::get(contract)
+				.or_else(|| {
+					<SelfSponsoring<T>>::get(contract).then(|| SponsoringModeT::Allowlisted)
+				})
+				.unwrap_or_default()
+		}
+		pub fn set_sponsoring_mode(contract: H160, mode: SponsoringModeT) {
+			if mode == SponsoringModeT::Disabled {
+				<SponsoringMode<T>>::remove(contract);
+			} else {
+				<SponsoringMode<T>>::insert(contract, mode);
+			}
+			<SelfSponsoring<T>>::remove(contract)
+		}
+
 		pub fn toggle_sponsoring(contract: H160, enabled: bool) {
-			<SelfSponsoring<T>>::insert(contract, enabled);
+			Self::set_sponsoring_mode(
+				contract,
+				if enabled {
+					SponsoringModeT::Allowlisted
+				} else {
+					SponsoringModeT::Disabled
+				},
+			)
 		}
 
 		pub fn set_sponsoring_rate_limit(contract: H160, rate_limit: T::BlockNumber) {
@@ -94,3 +125,34 @@
 		}
 	}
 }
+
+#[derive(Encode, Decode, PartialEq, TypeInfo, MaxEncodedLen)]
+pub enum SponsoringModeT {
+	Disabled,
+	Allowlisted,
+	Generous,
+}
+
+impl SponsoringModeT {
+	fn from_eth(v: u8) -> Option<Self> {
+		Some(match v {
+			0 => Self::Disabled,
+			1 => Self::Allowlisted,
+			2 => Self::Generous,
+			_ => return None,
+		})
+	}
+	fn to_eth(self) -> u8 {
+		match self {
+			SponsoringModeT::Disabled => 0,
+			SponsoringModeT::Allowlisted => 1,
+			SponsoringModeT::Generous => 2,
+		}
+	}
+}
+
+impl Default for SponsoringModeT {
+	fn default() -> Self {
+		Self::Disabled
+	}
+}
modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.soldiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/stubs/ContractHelpers.sol
+++ b/pallets/evm-contract-helpers/src/stubs/ContractHelpers.sol
@@ -21,7 +21,7 @@
 	}
 }
 
-// Selector: 31acb1fe
+// Selector: 7b4866f9
 contract ContractHelpers is Dummy, ERC165 {
 	// Selector: contractOwner(address) 5152b14c
 	function contractOwner(address contractAddress)
@@ -47,6 +47,8 @@
 		return false;
 	}
 
+	// Deprecated
+	//
 	// Selector: toggleSponsoring(address,bool) fcac6d86
 	function toggleSponsoring(address contractAddress, bool enabled) public {
 		require(false, stub_error);
@@ -55,6 +57,26 @@
 		dummy = 0;
 	}
 
+	// Selector: setSponsoringMode(address,uint8) fde8a560
+	function setSponsoringMode(address contractAddress, uint8 mode) public {
+		require(false, stub_error);
+		contractAddress;
+		mode;
+		dummy = 0;
+	}
+
+	// Selector: sponsoringMode(address) b70c7267
+	function sponsoringMode(address contractAddress)
+		public
+		view
+		returns (uint8)
+	{
+		require(false, stub_error);
+		contractAddress;
+		dummy;
+		return 0;
+	}
+
 	// Selector: setSponsoringRateLimit(address,uint32) 77b6c908
 	function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)
 		public
modifiedpallets/evm-migration/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-migration/Cargo.toml
+++ b/pallets/evm-migration/Cargo.toml
@@ -7,15 +7,15 @@
 scale-info = { version = "1.0.0", default-features = false, features = [
     "derive",
 ] }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
 
 [dependencies.codec]
 default-features = false
modifiedpallets/evm-transaction-payment/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-transaction-payment/Cargo.toml
+++ b/pallets/evm-transaction-payment/Cargo.toml
@@ -7,16 +7,16 @@
 scale-info = { version = "1.0.0", default-features = false, features = [
     "derive",
 ] }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.14' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.16' }
 up-evm-mapping = { default-features = false, path = "../../primitives/evm-mapping" }
 
 [dependencies.codec]
modifiedpallets/evm-transaction-payment/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-transaction-payment/src/lib.rs
+++ b/pallets/evm-transaction-payment/src/lib.rs
@@ -100,6 +100,10 @@
 			already_withdrawn.map(|e| e.negative_imbalance),
 		)
 	}
+
+	fn pay_priority_fee(tip: U256) {
+		<EVMCurrencyAdapter<<T as Config>::Currency, ()> as pallet_evm::OnChargeEVMTransaction<T>>::pay_priority_fee(tip)
+	}
 }
 
 /// Implements sponsoring for evm calls performed from pallet-evm (via api.tx.ethereum.transact/api.tx.evm.call)
modifiedpallets/fungible/Cargo.tomldiffbeforeafterboth
--- a/pallets/fungible/Cargo.toml
+++ b/pallets/fungible/Cargo.toml
@@ -10,17 +10,17 @@
 version = '2.0.0'
 
 [dependencies]
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
 pallet-common = { default-features = false, path = '../common' }
 up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
 evm-coder = { default-features = false, path = '../../crates/evm-coder' }
 pallet-evm-coder-substrate = { default-features = false, path = '../evm-coder-substrate' }
-ethereum = { version = "0.10.0", default-features = false }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+ethereum = { version = "0.11.1", default-features = false }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
 scale-info = { version = "1.0.0", default-features = false, features = [
     "derive",
 ] }
modifiedpallets/fungible/src/common.rsdiffbeforeafterboth
--- a/pallets/fungible/src/common.rs
+++ b/pallets/fungible/src/common.rs
@@ -1,10 +1,11 @@
 use core::marker::PhantomData;
 
-use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight};
+use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight, BoundedVec};
 use up_data_structs::TokenId;
 use pallet_common::{CommonCollectionOperations, CommonWeightInfo, with_weight};
 use sp_runtime::ArithmeticError;
 use sp_std::{vec::Vec, vec};
+use up_data_structs::CustomDataLimit;
 
 use crate::{
 	Allowance, Balance, Config, Error, FungibleHandle, Pallet, SelfWeightOf, weights::WeightInfo,
@@ -180,7 +181,7 @@
 		&self,
 		_sender: T::CrossAccountId,
 		_token: TokenId,
-		_data: Vec<u8>,
+		_data: BoundedVec<u8, CustomDataLimit>,
 	) -> DispatchResultWithPostInfo {
 		fail!(<Error<T>>::FungibleItemsDontHaveData)
 	}
@@ -201,8 +202,8 @@
 		TokenId::default()
 	}
 
-	fn token_owner(&self, _token: TokenId) -> T::CrossAccountId {
-		T::CrossAccountId::default()
+	fn token_owner(&self, _token: TokenId) -> Option<T::CrossAccountId> {
+		None
 	}
 	fn const_metadata(&self, _token: TokenId) -> Vec<u8> {
 		Vec::new()
modifiedpallets/fungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/fungible/src/lib.rs
+++ b/pallets/fungible/src/lib.rs
@@ -2,7 +2,7 @@
 
 use core::ops::Deref;
 use frame_support::{ensure};
-use up_data_structs::{AccessMode, Collection, CollectionId, TokenId};
+use up_data_structs::{AccessMode, CollectionId, TokenId, CreateCollectionData};
 use pallet_common::{
 	Error as CommonError, Event as CommonEvent, Pallet as PalletCommon, account::CrossAccountId,
 };
@@ -100,8 +100,11 @@
 }
 
 impl<T: Config> Pallet<T> {
-	pub fn init_collection(data: Collection<T::AccountId>) -> Result<CollectionId, DispatchError> {
-		<PalletCommon<T>>::init_collection(data)
+	pub fn init_collection(
+		owner: T::AccountId,
+		data: CreateCollectionData<T::AccountId>,
+	) -> Result<CollectionId, DispatchError> {
+		<PalletCommon<T>>::init_collection(owner, data)
 	}
 	pub fn destroy_collection(
 		collection: FungibleHandle<T>,
@@ -145,7 +148,7 @@
 		}
 		<TotalSupply<T>>::insert(collection.id, total_supply);
 
-		collection.log(ERC20Events::Transfer {
+		collection.log_mirrored(ERC20Events::Transfer {
 			from: *owner.as_eth(),
 			to: H160::default(),
 			value: amount.into(),
@@ -201,7 +204,7 @@
 			<Balance<T>>::insert((collection.id, to), balance_to);
 		}
 
-		collection.log(ERC20Events::Transfer {
+		collection.log_mirrored(ERC20Events::Transfer {
 			from: *from.as_eth(),
 			to: *to.as_eth(),
 			value: amount.into(),
@@ -258,7 +261,7 @@
 		for (user, amount) in balances {
 			<Balance<T>>::insert((collection.id, &user), amount);
 
-			collection.log(ERC20Events::Transfer {
+			collection.log_mirrored(ERC20Events::Transfer {
 				from: H160::default(),
 				to: *user.as_eth(),
 				value: amount.into(),
@@ -286,7 +289,7 @@
 			<Allowance<T>>::insert((collection.id, owner, spender), amount);
 		}
 
-		collection.log(ERC20Events::Approval {
+		collection.log_mirrored(ERC20Events::Approval {
 			owner: *owner.as_eth(),
 			spender: *spender.as_eth(),
 			value: amount.into(),
@@ -343,7 +346,7 @@
 		if allowance.is_none() {
 			ensure!(
 				collection.ignores_allowance(spender),
-				<CommonError<T>>::TokenValueNotEnough
+				<CommonError<T>>::ApprovedValueTooLow
 			);
 		}
 
@@ -374,7 +377,7 @@
 		if allowance.is_none() {
 			ensure!(
 				collection.ignores_allowance(spender),
-				<CommonError<T>>::TokenValueNotEnough
+				<CommonError<T>>::ApprovedValueTooLow
 			);
 		}
 
modifiedpallets/inflation/Cargo.tomldiffbeforeafterboth
--- a/pallets/inflation/Cargo.toml
+++ b/pallets/inflation/Cargo.toml
@@ -43,37 +43,37 @@
 default-features = false
 optional = true
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.frame-support]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.frame-system]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.pallet-balances]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.pallet-timestamp]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.pallet-randomness-collective-flip]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-std]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.serde]
 default-features = false
@@ -83,17 +83,17 @@
 [dependencies.sp-runtime]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-core]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-io]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies]
 scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }
modifiedpallets/inflation/src/tests.rsdiffbeforeafterboth
--- a/pallets/inflation/src/tests.rs
+++ b/pallets/inflation/src/tests.rs
@@ -4,7 +4,7 @@
 
 use frame_support::{
 	assert_ok, parameter_types,
-	traits::{Currency, OnInitialize, Everything},
+	traits::{Currency, OnInitialize, Everything, ConstU32},
 };
 use frame_system::RawOrigin;
 use sp_core::H256;
@@ -81,6 +81,7 @@
 	type SystemWeightInfo = ();
 	type SS58Prefix = SS58Prefix;
 	type OnSetCode = ();
+	type MaxConsumers = ConstU32<16>;
 }
 
 parameter_types! {
modifiedpallets/nonfungible/Cargo.tomldiffbeforeafterboth
--- a/pallets/nonfungible/Cargo.toml
+++ b/pallets/nonfungible/Cargo.toml
@@ -10,17 +10,17 @@
 version = '2.0.0'
 
 [dependencies]
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
 pallet-common = { default-features = false, path = '../common' }
 up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
 evm-coder = { default-features = false, path = '../../crates/evm-coder' }
 pallet-evm-coder-substrate = { default-features = false, path = '../evm-coder-substrate' }
-ethereum = { version = "0.10.0", default-features = false }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+ethereum = { version = "0.11.1", default-features = false }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
 scale-info = { version = "1.0.0", default-features = false, features = [
     "derive",
 ] }
modifiedpallets/nonfungible/src/common.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/common.rs
+++ b/pallets/nonfungible/src/common.rs
@@ -1,7 +1,7 @@
 use core::marker::PhantomData;
 
-use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight};
-use up_data_structs::TokenId;
+use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight, BoundedVec};
+use up_data_structs::{TokenId, CustomDataLimit};
 use pallet_common::{CommonCollectionOperations, CommonWeightInfo, with_weight};
 use sp_runtime::DispatchError;
 use sp_std::vec::Vec;
@@ -188,7 +188,7 @@
 		&self,
 		sender: T::CrossAccountId,
 		token: TokenId,
-		data: Vec<u8>,
+		data: BoundedVec<u8, CustomDataLimit>,
 	) -> DispatchResultWithPostInfo {
 		let len = data.len();
 		with_weight(
@@ -211,20 +211,20 @@
 		TokenId(<TokensMinted<T>>::get(self.id))
 	}
 
-	fn token_owner(&self, token: TokenId) -> T::CrossAccountId {
-		<TokenData<T>>::get((self.id, token))
-			.map(|t| t.owner)
-			.unwrap_or_default()
+	fn token_owner(&self, token: TokenId) -> Option<T::CrossAccountId> {
+		<TokenData<T>>::get((self.id, token)).map(|t| t.owner)
 	}
 	fn const_metadata(&self, token: TokenId) -> Vec<u8> {
 		<TokenData<T>>::get((self.id, token))
 			.map(|t| t.const_data)
 			.unwrap_or_default()
+			.into_inner()
 	}
 	fn variable_metadata(&self, token: TokenId) -> Vec<u8> {
 		<TokenData<T>>::get((self.id, token))
 			.map(|t| t.variable_data)
 			.unwrap_or_default()
+			.into_inner()
 	}
 
 	fn collection_tokens(&self) -> u32 {
modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -338,8 +338,14 @@
 		let caller = T::CrossAccountId::from_eth(caller);
 		let token = token_id.try_into()?;
 
-		<Pallet<T>>::set_variable_metadata(self, &caller, token, data)
-			.map_err(dispatch_to_evm::<T>)?;
+		<Pallet<T>>::set_variable_metadata(
+			self,
+			&caller,
+			token,
+			data.try_into()
+				.map_err(|_| "metadata size exceeded limit")?,
+		)
+		.map_err(dispatch_to_evm::<T>)?;
 		Ok(())
 	}
 
@@ -349,7 +355,8 @@
 
 		Ok(<TokenData<T>>::get((self.id, token))
 			.ok_or("token not found")?
-			.variable_data)
+			.variable_data
+			.into_inner())
 	}
 
 	#[weight(<SelfWeightOf<T>>::create_multiple_items(token_ids.len() as u32))]
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -2,9 +2,7 @@
 
 use erc::ERC721Events;
 use frame_support::{BoundedVec, ensure};
-use up_data_structs::{
-	AccessMode, CUSTOM_DATA_LIMIT, Collection, CollectionId, CustomDataLimit, TokenId,
-};
+use up_data_structs::{AccessMode, CollectionId, CustomDataLimit, TokenId, CreateCollectionData};
 use pallet_common::{
 	Error as CommonError, Pallet as PalletCommon, Event as CommonEvent, account::CrossAccountId,
 };
@@ -14,7 +12,7 @@
 use sp_std::{vec::Vec, vec};
 use core::ops::Deref;
 use sp_std::collections::btree_map::BTreeMap;
-use codec::{Encode, Decode};
+use codec::{Encode, Decode, MaxEncodedLen};
 use scale_info::TypeInfo;
 
 pub use pallet::*;
@@ -31,11 +29,11 @@
 }
 pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;
 
-#[derive(Encode, Decode, TypeInfo)]
-pub struct ItemData<T: Config> {
-	pub const_data: Vec<u8>,
-	pub variable_data: Vec<u8>,
-	pub owner: T::CrossAccountId,
+#[derive(Encode, Decode, TypeInfo, MaxEncodedLen)]
+pub struct ItemData<CrossAccountId> {
+	pub const_data: BoundedVec<u8, CustomDataLimit>,
+	pub variable_data: BoundedVec<u8, CustomDataLimit>,
+	pub owner: CrossAccountId,
 }
 
 #[frame_support::pallet]
@@ -72,7 +70,7 @@
 	#[pallet::storage]
 	pub type TokenData<T: Config> = StorageNMap<
 		Key = (Key<Twox64Concat, CollectionId>, Key<Twox64Concat, TokenId>),
-		Value = ItemData<T>,
+		Value = ItemData<T::CrossAccountId>,
 		QueryKind = OptionQuery,
 	>;
 
@@ -142,8 +140,11 @@
 
 // unchecked calls skips any permission checks
 impl<T: Config> Pallet<T> {
-	pub fn init_collection(data: Collection<T::AccountId>) -> Result<CollectionId, DispatchError> {
-		<PalletCommon<T>>::init_collection(data)
+	pub fn init_collection(
+		owner: T::AccountId,
+		data: CreateCollectionData<T::AccountId>,
+	) -> Result<CollectionId, DispatchError> {
+		<PalletCommon<T>>::init_collection(owner, data)
 	}
 	pub fn destroy_collection(
 		collection: NonfungibleHandle<T>,
@@ -211,7 +212,7 @@
 			));
 		}
 
-		collection.log(ERC721Events::Transfer {
+		collection.log_mirrored(ERC721Events::Transfer {
 			from: *token_data.owner.as_eth(),
 			to: H160::default(),
 			token_id: token.into(),
@@ -291,7 +292,7 @@
 		}
 		Self::set_allowance_unchecked(collection, from, token, None, true);
 
-		collection.log(ERC721Events::Transfer {
+		collection.log_mirrored(ERC721Events::Transfer {
 			from: *from.as_eth(),
 			to: *to.as_eth(),
 			token_id: token.into(),
@@ -361,14 +362,14 @@
 			<TokenData<T>>::insert(
 				(collection.id, token),
 				ItemData {
-					const_data: data.const_data.into(),
-					variable_data: data.variable_data.into(),
+					const_data: data.const_data,
+					variable_data: data.variable_data,
 					owner: data.owner.clone(),
 				},
 			);
 			<Owned<T>>::insert((collection.id, &data.owner, token), true);
 
-			collection.log(ERC721Events::Transfer {
+			collection.log_mirrored(ERC721Events::Transfer {
 				from: H160::default(),
 				to: *data.owner.as_eth(),
 				token_id: token.into(),
@@ -395,7 +396,7 @@
 			<Allowance<T>>::insert((collection.id, token), spender);
 			// In ERC721 there is only one possible approved user of token, so we set
 			// approved user to spender
-			collection.log(ERC721Events::Approval {
+			collection.log_mirrored(ERC721Events::Approval {
 				owner: *sender.as_eth(),
 				approved: *spender.as_eth(),
 				token_id: token.into(),
@@ -425,7 +426,7 @@
 			if !assume_implicit_eth {
 				// In ERC721 there is only one possible approved user of token, so we set
 				// approved user to zero address
-				collection.log(ERC721Events::Approval {
+				collection.log_mirrored(ERC721Events::Approval {
 					owner: *sender.as_eth(),
 					approved: H160::default(),
 					token_id: token.into(),
@@ -494,7 +495,7 @@
 		if <Allowance<T>>::get((collection.id, token)).as_ref() != Some(spender) {
 			ensure!(
 				collection.ignores_allowance(spender),
-				<CommonError<T>>::TokenValueNotEnough
+				<CommonError<T>>::ApprovedValueTooLow
 			);
 		}
 
@@ -522,7 +523,7 @@
 		if <Allowance<T>>::get((collection.id, token)).as_ref() != Some(spender) {
 			ensure!(
 				collection.ignores_allowance(spender),
-				<CommonError<T>>::TokenValueNotEnough
+				<CommonError<T>>::ApprovedValueTooLow
 			);
 		}
 
@@ -535,12 +536,8 @@
 		collection: &NonfungibleHandle<T>,
 		sender: &T::CrossAccountId,
 		token: TokenId,
-		data: Vec<u8>,
+		data: BoundedVec<u8, CustomDataLimit>,
 	) -> DispatchResult {
-		ensure!(
-			data.len() as u32 <= CUSTOM_DATA_LIMIT,
-			<CommonError<T>>::TokenVariableDataLimitExceeded
-		);
 		let token_data =
 			<TokenData<T>>::get((collection.id, token)).ok_or(<CommonError<T>>::TokenNotFound)?;
 		collection.check_can_update_meta(sender, &token_data.owner)?;
modifiedpallets/refungible/Cargo.tomldiffbeforeafterboth
--- a/pallets/refungible/Cargo.toml
+++ b/pallets/refungible/Cargo.toml
@@ -10,14 +10,14 @@
 version = '2.0.0'
 
 [dependencies]
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
 pallet-common = { default-features = false, path = '../common' }
 up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
 scale-info = { version = "1.0.0", default-features = false, features = [
     "derive",
 ] }
modifiedpallets/refungible/src/common.rsdiffbeforeafterboth
--- a/pallets/refungible/src/common.rs
+++ b/pallets/refungible/src/common.rs
@@ -1,8 +1,8 @@
 use core::marker::PhantomData;
 
 use sp_std::collections::btree_map::BTreeMap;
-use frame_support::{dispatch::DispatchResultWithPostInfo, fail, weights::Weight};
-use up_data_structs::TokenId;
+use frame_support::{dispatch::DispatchResultWithPostInfo, fail, weights::Weight, BoundedVec};
+use up_data_structs::{TokenId, CustomDataLimit};
 use pallet_common::{CommonCollectionOperations, CommonWeightInfo, with_weight};
 use sp_runtime::DispatchError;
 use sp_std::vec::Vec;
@@ -184,7 +184,7 @@
 		&self,
 		sender: T::CrossAccountId,
 		token: TokenId,
-		data: Vec<u8>,
+		data: BoundedVec<u8, CustomDataLimit>,
 	) -> DispatchResultWithPostInfo {
 		let len = data.len();
 		with_weight(
@@ -207,14 +207,18 @@
 		TokenId(<TokensMinted<T>>::get(self.id))
 	}
 
-	fn token_owner(&self, _token: TokenId) -> T::CrossAccountId {
-		T::CrossAccountId::default()
+	fn token_owner(&self, _token: TokenId) -> Option<T::CrossAccountId> {
+		None
 	}
 	fn const_metadata(&self, token: TokenId) -> Vec<u8> {
-		<TokenData<T>>::get((self.id, token)).const_data
+		<TokenData<T>>::get((self.id, token))
+			.const_data
+			.into_inner()
 	}
 	fn variable_metadata(&self, token: TokenId) -> Vec<u8> {
-		<TokenData<T>>::get((self.id, token)).variable_data
+		<TokenData<T>>::get((self.id, token))
+			.variable_data
+			.into_inner()
 	}
 
 	fn collection_tokens(&self) -> u32 {
modifiedpallets/refungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -2,8 +2,7 @@
 
 use frame_support::{ensure, BoundedVec};
 use up_data_structs::{
-	AccessMode, CUSTOM_DATA_LIMIT, Collection, CollectionId, CustomDataLimit,
-	MAX_REFUNGIBLE_PIECES, TokenId,
+	AccessMode, CollectionId, CustomDataLimit, MAX_REFUNGIBLE_PIECES, TokenId, CreateCollectionData,
 };
 use pallet_common::{
 	Error as CommonError, Event as CommonEvent, Pallet as PalletCommon, account::CrossAccountId,
@@ -11,7 +10,7 @@
 use sp_runtime::{ArithmeticError, DispatchError, DispatchResult};
 use sp_std::{vec::Vec, vec, collections::btree_map::BTreeMap};
 use core::ops::Deref;
-use codec::{Encode, Decode};
+use codec::{Encode, Decode, MaxEncodedLen};
 use scale_info::TypeInfo;
 
 pub use pallet::*;
@@ -27,10 +26,10 @@
 }
 pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;
 
-#[derive(Encode, Decode, Default, TypeInfo)]
+#[derive(Encode, Decode, Default, TypeInfo, MaxEncodedLen)]
 pub struct ItemData {
-	pub const_data: Vec<u8>,
-	pub variable_data: Vec<u8>,
+	pub const_data: BoundedVec<u8, CustomDataLimit>,
+	pub variable_data: BoundedVec<u8, CustomDataLimit>,
 }
 
 #[frame_support::pallet]
@@ -156,8 +155,11 @@
 
 // unchecked calls skips any permission checks
 impl<T: Config> Pallet<T> {
-	pub fn init_collection(data: Collection<T::AccountId>) -> Result<CollectionId, DispatchError> {
-		<PalletCommon<T>>::init_collection(data)
+	pub fn init_collection(
+		owner: T::AccountId,
+		data: CreateCollectionData<T::AccountId>,
+	) -> Result<CollectionId, DispatchError> {
+		<PalletCommon<T>>::init_collection(owner, data)
 	}
 	pub fn destroy_collection(
 		collection: RefungibleHandle<T>,
@@ -437,8 +439,8 @@
 			<TokenData<T>>::insert(
 				(collection.id, token_id),
 				ItemData {
-					const_data: token.const_data.into(),
-					variable_data: token.variable_data.into(),
+					const_data: token.const_data,
+					variable_data: token.variable_data,
 				},
 			);
 			for (user, amount) in token.users.into_iter() {
@@ -529,7 +531,7 @@
 		if allowance.is_none() {
 			ensure!(
 				collection.ignores_allowance(spender),
-				<CommonError<T>>::TokenValueNotEnough
+				<CommonError<T>>::ApprovedValueTooLow
 			);
 		}
 
@@ -562,7 +564,7 @@
 		if allowance.is_none() {
 			ensure!(
 				collection.ignores_allowance(spender),
-				<CommonError<T>>::TokenValueNotEnough
+				<CommonError<T>>::ApprovedValueTooLow
 			);
 		}
 
@@ -579,12 +581,8 @@
 		collection: &RefungibleHandle<T>,
 		sender: &T::CrossAccountId,
 		token: TokenId,
-		data: Vec<u8>,
+		data: BoundedVec<u8, CustomDataLimit>,
 	) -> DispatchResult {
-		ensure!(
-			data.len() as u32 <= CUSTOM_DATA_LIMIT,
-			<CommonError<T>>::TokenVariableDataLimitExceeded
-		);
 		collection.check_can_update_meta(
 			sender,
 			&T::CrossAccountId::from_sub(collection.owner.clone()),
modifiedpallets/scheduler/Cargo.tomldiffbeforeafterboth
--- a/pallets/scheduler/Cargo.toml
+++ b/pallets/scheduler/Cargo.toml
@@ -13,19 +13,19 @@
 serde = { version = "1.0.130", default-features = false }
 codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false }
 scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
 
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.14' }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.16' }
 log = { version = "0.4.14", default-features = false }
 
 [dev-dependencies]
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-substrate-test-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+substrate-test-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
 
 [features]
 default = ["std"]
modifiedpallets/scheduler/src/lib.rsdiffbeforeafterboth
--- a/pallets/scheduler/src/lib.rs
+++ b/pallets/scheduler/src/lib.rs
@@ -413,7 +413,11 @@
 						let origin = <<T as Config>::Origin as From<T::PalletsOrigin>>::from(
 							s.origin.clone()
 						).into();
-						let sender = ensure_signed(origin).unwrap_or_default();
+						let sender = match ensure_signed(origin) {
+							Ok(v) => v,
+							// TODO: Support for unsigned extrinsics?
+							Err(_) => return Some(Some(s))
+						};
 						let who_will_pay = T::SponsorshipHandler::get_sponsor(&sender, &s.call).unwrap_or(sender);
 						let sponsor = T::PalletsOrigin::from(system::RawOrigin::Signed(who_will_pay));
 						let r = s.call.clone().dispatch(sponsor.into());
@@ -661,84 +665,18 @@
 				Ok((new_time, new_index))
 			},
 		)
-	}
-}
-
-impl<T: Config> schedule::Anon<T::BlockNumber, <T as Config>::Call, T::PalletsOrigin>
-	for Module<T>
-{
-	type Address = TaskAddress<T::BlockNumber>;
-
-	fn schedule(
-		when: DispatchTime<T::BlockNumber>,
-		maybe_periodic: Option<schedule::Period<T::BlockNumber>>,
-		priority: schedule::Priority,
-		origin: T::PalletsOrigin,
-		call: <T as Config>::Call,
-	) -> Result<Self::Address, DispatchError> {
-		Self::do_schedule(when, maybe_periodic, priority, origin, call)
-	}
-
-	fn cancel((when, index): Self::Address) -> Result<(), ()> {
-		Self::do_cancel(None, (when, index)).map_err(|_| ())
 	}
-
-	fn reschedule(
-		address: Self::Address,
-		when: DispatchTime<T::BlockNumber>,
-	) -> Result<Self::Address, DispatchError> {
-		Self::do_reschedule(address, when)
-	}
-
-	fn next_dispatch_time((when, index): Self::Address) -> Result<T::BlockNumber, ()> {
-		Agenda::<T>::get(when)
-			.get(index as usize)
-			.ok_or(())
-			.map(|_| when)
-	}
 }
 
-impl<T: Config> schedule::Named<T::BlockNumber, <T as Config>::Call, T::PalletsOrigin>
-	for Module<T>
-{
-	type Address = TaskAddress<T::BlockNumber>;
-
-	fn schedule_named(
-		id: Vec<u8>,
-		when: DispatchTime<T::BlockNumber>,
-		maybe_periodic: Option<schedule::Period<T::BlockNumber>>,
-		priority: schedule::Priority,
-		origin: T::PalletsOrigin,
-		call: <T as Config>::Call,
-	) -> Result<Self::Address, ()> {
-		Self::do_schedule_named(id, when, maybe_periodic, priority, origin, call).map_err(|_| ())
-	}
-
-	fn cancel_named(id: Vec<u8>) -> Result<(), ()> {
-		Self::do_cancel_named(None, id).map_err(|_| ())
-	}
-
-	fn reschedule_named(
-		id: Vec<u8>,
-		when: DispatchTime<T::BlockNumber>,
-	) -> Result<Self::Address, DispatchError> {
-		Self::do_reschedule_named(id, when)
-	}
-
-	fn next_dispatch_time(id: Vec<u8>) -> Result<T::BlockNumber, ()> {
-		Lookup::<T>::get(id)
-			.and_then(|(when, index)| Agenda::<T>::get(when).get(index as usize).map(|_| when))
-			.ok_or(())
-	}
-}
-
 #[cfg(test)]
 #[allow(clippy::from_over_into)]
 mod tests {
 	use super::*;
 
 	use frame_support::{
-		ord_parameter_types, parameter_types, traits::Contains, weights::constants::RocksDbWeight,
+		ord_parameter_types, parameter_types,
+		traits::{Contains, ConstU32, EnsureOneOf},
+		weights::constants::RocksDbWeight,
 	};
 	use sp_core::H256;
 	use sp_runtime::{
@@ -746,7 +684,7 @@
 		testing::Header,
 		traits::{BlakeTwo256, IdentityLookup},
 	};
-	use frame_system::{EnsureOneOf, EnsureRoot, EnsureSignedBy};
+	use frame_system::{EnsureRoot, EnsureSignedBy};
 	use crate as scheduler;
 
 	mod logger {
@@ -843,6 +781,7 @@
 		type SystemWeightInfo = ();
 		type SS58Prefix = ();
 		type OnSetCode = ();
+		type MaxConsumers = ConstU32<16>;
 	}
 	impl logger::Config for Test {
 		type Event = Event;
@@ -861,7 +800,7 @@
 		type PalletsOrigin = OriginCaller;
 		type Call = Call;
 		type MaximumWeight = MaximumSchedulerWeight;
-		type ScheduleOrigin = EnsureOneOf<u64, EnsureRoot<u64>, EnsureSignedBy<One, u64>>;
+		type ScheduleOrigin = EnsureOneOf<EnsureRoot<u64>, EnsureSignedBy<One, u64>>;
 		type MaxScheduledPerBlock = MaxScheduledPerBlock;
 		type WeightInfo = ();
 		type SponsorshipHandler = ();
modifiedpallets/unique/Cargo.tomldiffbeforeafterboth
--- a/pallets/unique/Cargo.toml
+++ b/pallets/unique/Cargo.toml
@@ -61,42 +61,42 @@
 default-features = false
 optional = true
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.frame-support]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.frame-system]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.pallet-balances]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.pallet-timestamp]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.pallet-randomness-collective-flip]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-std]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.pallet-transaction-payment]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.serde]
 default-features = false
@@ -106,17 +106,17 @@
 [dependencies.sp-runtime]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-core]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-io]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 
 ################################################################################
@@ -127,11 +127,11 @@
 scale-info = { version = "1.0.0", default-features = false, features = [
     "derive",
 ] }
-ethereum = { version = "0.10.0", default-features = false }
+ethereum = { version = "0.11.1", default-features = false }
 rlp = { default-features = false, version = "0.5.0" }
-sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.14" }
+sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" }
 
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.14' }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.16' }
 up-evm-mapping = { default-features = false, path = "../../primitives/evm-mapping" }
 evm-coder = { default-features = false, path = "../../crates/evm-coder" }
 pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }
@@ -139,9 +139,9 @@
     "serde_no_std",
 ] }
 
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
 hex-literal = "0.3.3"
 
 pallet-common = { default-features = false, path = "../common" }
modifiedpallets/unique/src/lib.rsdiffbeforeafterboth
--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -29,17 +29,18 @@
 		WeightToFeePolynomial, DispatchClass,
 	},
 	StorageValue, transactional,
-	pallet_prelude::DispatchResultWithPostInfo,
+	pallet_prelude::{DispatchResultWithPostInfo, ConstU32},
+	BoundedVec,
 };
 use scale_info::TypeInfo;
 use frame_system::{self as system, ensure_signed};
 use sp_runtime::{sp_std::prelude::Vec};
 use up_data_structs::{
-	MAX_DECIMAL_POINTS, MAX_SPONSOR_TIMEOUT, MAX_TOKEN_OWNERSHIP, CUSTOM_DATA_LIMIT,
-	VARIABLE_ON_CHAIN_SCHEMA_LIMIT, CONST_ON_CHAIN_SCHEMA_LIMIT, OFFCHAIN_SCHEMA_LIMIT,
-	FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
-	NFT_SPONSOR_TRANSFER_TIMEOUT, AccessMode, Collection, CreateItemData, CollectionLimits,
-	CollectionId, CollectionMode, TokenId, SchemaVersion, SponsorshipState, MetaUpdatePermission,
+	MAX_DECIMAL_POINTS, VARIABLE_ON_CHAIN_SCHEMA_LIMIT, CONST_ON_CHAIN_SCHEMA_LIMIT,
+	OFFCHAIN_SCHEMA_LIMIT, MAX_COLLECTION_NAME_LENGTH, MAX_COLLECTION_DESCRIPTION_LENGTH,
+	MAX_TOKEN_PREFIX_LENGTH, AccessMode, CreateItemData, CollectionLimits, CollectionId,
+	CollectionMode, TokenId, SchemaVersion, SponsorshipState, MetaUpdatePermission,
+	CreateCollectionData, CustomDataLimit,
 };
 use pallet_common::{
 	account::CrossAccountId, CollectionHandle, Pallet as PalletCommon, Error as CommonError,
@@ -81,10 +82,6 @@
 		ConfirmUnsetSponsorFail,
 		/// Length of items properties must be greater than 0.
 		EmptyArgument,
-		/// Collection limit bounds per collection exceeded
-		CollectionLimitBoundsExceeded,
-		/// Tried to enable permissions which are only permitted to be disabled
-		OwnerPermissionsCantBeReverted,
 	}
 }
 
@@ -318,42 +315,39 @@
 		// returns collection ID
 		#[weight = <SelfWeightOf<T>>::create_collection()]
 		#[transactional]
+		#[deprecated]
 		pub fn create_collection(origin,
-								 collection_name: Vec<u16>,
-								 collection_description: Vec<u16>,
-								 token_prefix: Vec<u8>,
-								 mode: CollectionMode) -> DispatchResult {
-
-			// Anyone can create a collection
-			let who = ensure_signed(origin)?;
-
-			// Create new collection
-			let new_collection = Collection {
-				owner: who,
+								 collection_name: BoundedVec<u16, ConstU32<MAX_COLLECTION_NAME_LENGTH>>,
+								 collection_description: BoundedVec<u16, ConstU32<MAX_COLLECTION_DESCRIPTION_LENGTH>>,
+								 token_prefix: BoundedVec<u8, ConstU32<MAX_TOKEN_PREFIX_LENGTH>>,
+								 mode: CollectionMode) -> DispatchResult  {
+			let data: CreateCollectionData<T::AccountId> = CreateCollectionData {
 				name: collection_name,
-				mode: mode.clone(),
-				mint_mode: false,
-				access: AccessMode::Normal,
 				description: collection_description,
 				token_prefix,
-				offchain_schema: Vec::new(),
-				schema_version: SchemaVersion::ImageURL,
-				sponsorship: SponsorshipState::Disabled,
-				variable_on_chain_schema: Vec::new(),
-				const_on_chain_schema: Vec::new(),
-				limits: Default::default(),
-				meta_update_permission: Default::default(),
+				mode,
+				..Default::default()
 			};
+			Self::create_collection_ex(origin, data)
+		}
+
+		/// This method creates a collection
+		///
+		/// Prefer it to deprecated [`created_collection`] method
+		#[weight = <SelfWeightOf<T>>::create_collection()]
+		#[transactional]
+		pub fn create_collection_ex(origin, data: CreateCollectionData<T::AccountId>) -> DispatchResult {
+			let owner = ensure_signed(origin)?;
 
-			let _id = match mode {
-				CollectionMode::NFT => {<PalletNonfungible<T>>::init_collection(new_collection)?},
+			let _id = match data.mode {
+				CollectionMode::NFT => {<PalletNonfungible<T>>::init_collection(owner, data)?},
 				CollectionMode::Fungible(decimal_points) => {
 					// check params
 					ensure!(decimal_points <= MAX_DECIMAL_POINTS, Error::<T>::CollectionDecimalPointLimitExceeded);
-					<PalletFungible<T>>::init_collection(new_collection)?
+					<PalletFungible<T>>::init_collection(owner, data)?
 				}
 				CollectionMode::ReFungible => {
-					<PalletRefungible<T>>::init_collection(new_collection)?
+					<PalletRefungible<T>>::init_collection(owner, data)?
 				}
 			};
 
@@ -919,7 +913,7 @@
 			origin,
 			collection_id: CollectionId,
 			item_id: TokenId,
-			data: Vec<u8>
+			data: BoundedVec<u8, CustomDataLimit>,
 		) -> DispatchResultWithPostInfo {
 			let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
 
@@ -1004,14 +998,11 @@
 		pub fn set_offchain_schema(
 			origin,
 			collection_id: CollectionId,
-			schema: Vec<u8>
+			schema: BoundedVec<u8, ConstU32<OFFCHAIN_SCHEMA_LIMIT>>,
 		) -> DispatchResult {
 			let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
 			let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
 			target_collection.check_is_owner_or_admin(&sender)?;
-
-			// check schema limit
-			ensure!(schema.len() as u32 <= OFFCHAIN_SCHEMA_LIMIT, "");
 
 			target_collection.offchain_schema = schema;
 
@@ -1039,15 +1030,12 @@
 		pub fn set_const_on_chain_schema (
 			origin,
 			collection_id: CollectionId,
-			schema: Vec<u8>
+			schema: BoundedVec<u8, ConstU32<CONST_ON_CHAIN_SCHEMA_LIMIT>>
 		) -> DispatchResult {
 			let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
 			let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
 			target_collection.check_is_owner_or_admin(&sender)?;
 
-			// check schema limit
-			ensure!(schema.len() as u32 <= CONST_ON_CHAIN_SCHEMA_LIMIT, "");
-
 			target_collection.const_on_chain_schema = schema;
 
 			<Pallet<T>>::deposit_event(Event::<T>::ConstOnChainSchemaSet(
@@ -1074,14 +1062,11 @@
 		pub fn set_variable_on_chain_schema (
 			origin,
 			collection_id: CollectionId,
-			schema: Vec<u8>
+			schema: BoundedVec<u8, ConstU32<VARIABLE_ON_CHAIN_SCHEMA_LIMIT>>
 		) -> DispatchResult {
 			let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
 			let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
 			target_collection.check_is_owner_or_admin(&sender)?;
-
-			// check schema limit
-			ensure!(schema.len() as u32 <= VARIABLE_ON_CHAIN_SCHEMA_LIMIT, "");
 
 			target_collection.variable_on_chain_schema = schema;
 
@@ -1099,61 +1084,12 @@
 			collection_id: CollectionId,
 			new_limit: CollectionLimits,
 		) -> DispatchResult {
-			let mut new_limit = new_limit;
 			let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
 			let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
 			target_collection.check_is_owner(&sender)?;
 			let old_limit = &target_collection.limits;
 
-			macro_rules! limit_default {
-				($old:ident, $new:ident, $($field:ident $(($arg:expr))? => $check:expr),* $(,)?) => {{
-					$(
-						if let Some($new) = $new.$field {
-							let $old = $old.$field($($arg)?);
-							let _ = $new;
-							let _ = $old;
-							$check
-						} else {
-							$new.$field = $old.$field
-						}
-					)*
-				}};
-			}
-
-			limit_default!(old_limit, new_limit,
-				account_token_ownership_limit => ensure!(
-					new_limit <= MAX_TOKEN_OWNERSHIP,
-					<Error<T>>::CollectionLimitBoundsExceeded,
-				),
-				sponsor_transfer_timeout(match target_collection.mode {
-					CollectionMode::NFT => NFT_SPONSOR_TRANSFER_TIMEOUT,
-					CollectionMode::Fungible(_) => FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
-					CollectionMode::ReFungible => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
-				}) => ensure!(
-					new_limit <= MAX_SPONSOR_TIMEOUT,
-					<Error<T>>::CollectionLimitBoundsExceeded,
-				),
-				sponsored_data_size => ensure!(
-					new_limit <= CUSTOM_DATA_LIMIT,
-					<Error<T>>::CollectionLimitBoundsExceeded,
-				),
-				token_limit => ensure!(
-					old_limit >= new_limit && new_limit > 0,
-					<CommonError<T>>::CollectionTokenLimitExceeded
-				),
-				owner_can_transfer => ensure!(
-					old_limit || !new_limit,
-					<Error<T>>::OwnerPermissionsCantBeReverted,
-				),
-				owner_can_destroy => ensure!(
-					old_limit || !new_limit,
-					<Error<T>>::OwnerPermissionsCantBeReverted,
-				),
-				sponsored_data_rate_limit => {},
-				transfers_enabled => {},
-			);
-
-			target_collection.limits = new_limit;
+			target_collection.limits = <PalletCommon<T>>::clamp_limits(target_collection.mode.clone(), &old_limit, new_limit)?;
 
 			<Pallet<T>>::deposit_event(Event::<T>::CollectionLimitSet(
 				collection_id
modifiedpallets/unique/src/mock.rsdiffbeforeafterboth
--- a/pallets/unique/src/mock.rs
+++ b/pallets/unique/src/mock.rs
@@ -9,10 +9,11 @@
 };
 use pallet_transaction_payment::{CurrencyAdapter};
 use frame_system as system;
-use pallet_evm::AddressMapping;
+use pallet_evm::{AddressMapping, runner::stack::MaybeMirroredLog};
 use pallet_common::account::{EvmBackwardsAddressMapping, CrossAccountId};
-use codec::{Encode, Decode};
+use codec::{Encode, Decode, MaxEncodedLen};
 use scale_info::TypeInfo;
+use up_data_structs::ConstU32;
 
 type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
 type Block = frame_system::mocking::MockBlock<Test>;
@@ -63,6 +64,7 @@
 	type SystemWeightInfo = ();
 	type SS58Prefix = SS58Prefix;
 	type OnSetCode = ();
+	type MaxConsumers = ConstU32<16>;
 }
 
 parameter_types! {
@@ -125,7 +127,7 @@
 	}
 }
 
-#[derive(Encode, Decode, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, TypeInfo)]
+#[derive(Encode, Decode, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, TypeInfo, MaxEncodedLen)]
 pub struct TestCrossAccountId(u64, sp_core::H160);
 impl CrossAccountId<u64> for TestCrossAccountId {
 	fn as_sub(&self) -> &u64 {
@@ -161,7 +163,7 @@
 	fn submit_logs_transaction(
 		_source: H160,
 		_tx: pallet_ethereum::Transaction,
-		_logs: Vec<pallet_ethereum::Log>,
+		_logs: Vec<MaybeMirroredLog>,
 	) {
 	}
 }
modifiedpallets/unique/src/tests.rsdiffbeforeafterboth
--- a/pallets/unique/src/tests.rs
+++ b/pallets/unique/src/tests.rs
@@ -5,7 +5,7 @@
 use up_data_structs::{
 	COLLECTION_NUMBER_LIMIT, CollectionId, CreateItemData, CreateFungibleData, CreateNftData,
 	CreateReFungibleData, MAX_DECIMAL_POINTS, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission,
-	TokenId,
+	TokenId, MAX_TOKEN_OWNERSHIP,
 };
 use frame_support::{assert_noop, assert_ok};
 use sp_std::convert::TryInto;
@@ -41,9 +41,9 @@
 	let origin1 = Origin::signed(owner);
 	assert_ok!(TemplateModule::create_collection(
 		origin1,
-		col_name1,
-		col_desc1,
-		token_prefix1,
+		col_name1.try_into().unwrap(),
+		col_desc1.try_into().unwrap(),
+		token_prefix1.try_into().unwrap(),
 		mode.clone()
 	));
 
@@ -131,9 +131,9 @@
 		assert_noop!(
 			TemplateModule::create_collection(
 				origin1,
-				col_name1,
-				col_desc1,
-				token_prefix1,
+				col_name1.try_into().unwrap(),
+				col_desc1.try_into().unwrap(),
+				token_prefix1.try_into().unwrap(),
 				CollectionMode::Fungible(MAX_DECIMAL_POINTS + 1)
 			),
 			Error::<Test>::CollectionDecimalPointLimitExceeded
@@ -601,7 +601,7 @@
 				1
 			)
 			.map_err(|e| e.error),
-			CommonError::<Test>::TokenValueNotEnough
+			CommonError::<Test>::ApprovedValueTooLow
 		);
 
 		// do approve
@@ -916,7 +916,7 @@
 				4
 			)
 			.map_err(|e| e.error),
-			CommonError::<Test>::TokenValueNotEnough
+			CommonError::<Test>::ApprovedValueTooLow
 		);
 	});
 }
@@ -2271,9 +2271,9 @@
 		assert_noop!(
 			TemplateModule::create_collection(
 				origin1,
-				col_name1,
-				col_desc1,
-				token_prefix1,
+				col_name1.try_into().unwrap(),
+				col_desc1.try_into().unwrap(),
+				token_prefix1.try_into().unwrap(),
 				CollectionMode::NFT
 			),
 			CommonError::<Test>::TotalCollectionsLimitExceeded
@@ -2372,7 +2372,7 @@
 		assert_ok!(TemplateModule::set_const_on_chain_schema(
 			origin1,
 			collection_id,
-			b"test const on chain schema".to_vec()
+			b"test const on chain schema".to_vec().try_into().unwrap()
 		));
 
 		assert_eq!(
@@ -2399,7 +2399,10 @@
 		assert_ok!(TemplateModule::set_variable_on_chain_schema(
 			origin1,
 			collection_id,
-			b"test variable on chain schema".to_vec()
+			b"test variable on chain schema"
+				.to_vec()
+				.try_into()
+				.unwrap()
 		));
 
 		assert_eq!(
@@ -2432,7 +2435,7 @@
 			origin1,
 			collection_id,
 			TokenId(1),
-			variable_data.clone()
+			variable_data.clone().try_into().unwrap()
 		));
 
 		assert_eq!(
@@ -2459,7 +2462,7 @@
 			origin1,
 			collection_id,
 			TokenId(1),
-			variable_data.clone()
+			variable_data.clone().try_into().unwrap()
 		));
 
 		assert_eq!(
@@ -2485,63 +2488,15 @@
 				origin1,
 				collection_id,
 				TokenId(0),
-				variable_data
+				variable_data.try_into().unwrap()
 			)
 			.map_err(|e| e.error),
 			<pallet_fungible::Error<Test>>::FungibleItemsDontHaveData
-		);
-	});
-}
-
-#[test]
-fn set_variable_meta_data_on_nft_token_fails_for_big_data() {
-	new_test_ext().execute_with(|| {
-		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));
-
-		let origin1 = Origin::signed(1);
-
-		let data = default_nft_data();
-		create_test_item(collection_id, &data.into());
-
-		let variable_data = b"test set_variable_meta_data method, bigger than limits.".to_vec();
-		assert_noop!(
-			TemplateModule::set_variable_meta_data(
-				origin1,
-				collection_id,
-				TokenId(1),
-				variable_data
-			)
-			.map_err(|e| e.error),
-			CommonError::<Test>::TokenVariableDataLimitExceeded
 		);
 	});
 }
 
 #[test]
-fn set_variable_meta_data_on_re_fungible_token_fails_for_big_data() {
-	new_test_ext().execute_with(|| {
-		let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));
-
-		let origin1 = Origin::signed(1);
-
-		let data = default_re_fungible_data();
-		create_test_item(collection_id, &data.into());
-
-		let variable_data = b"test set_variable_meta_data method, bigger than limits.".to_vec();
-		assert_noop!(
-			TemplateModule::set_variable_meta_data(
-				origin1,
-				collection_id,
-				TokenId(1),
-				variable_data
-			)
-			.map_err(|e| e.error),
-			CommonError::<Test>::TokenVariableDataLimitExceeded
-		);
-	});
-}
-
-#[test]
 fn set_variable_meta_data_on_nft_with_item_owner_permission_flag() {
 	new_test_ext().execute_with(|| {
 		//default_limits();
@@ -2564,7 +2519,7 @@
 			origin1,
 			collection_id,
 			TokenId(1),
-			variable_data.clone()
+			variable_data.clone().try_into().unwrap()
 		));
 
 		assert_eq!(
@@ -2577,48 +2532,6 @@
 }
 
 #[test]
-fn set_variable_meta_data_on_nft_with_item_owner_permission_flag_neg() {
-	new_test_ext().execute_with(|| {
-		let collection_id =
-			create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));
-
-		let origin1 = Origin::signed(1);
-
-		assert_ok!(TemplateModule::set_mint_permission(
-			origin1.clone(),
-			collection_id,
-			true
-		));
-		assert_ok!(TemplateModule::add_to_allow_list(
-			origin1.clone(),
-			collection_id,
-			account(1)
-		));
-
-		let data = default_nft_data();
-		create_test_item(collection_id, &data.into());
-
-		assert_ok!(TemplateModule::set_meta_update_permission_flag(
-			origin1.clone(),
-			collection_id,
-			MetaUpdatePermission::ItemOwner,
-		));
-
-		let variable_data = b"1234567890123".to_vec();
-		assert_noop!(
-			TemplateModule::set_variable_meta_data(
-				origin1,
-				collection_id,
-				TokenId(1),
-				variable_data.clone()
-			)
-			.map_err(|e| e.error),
-			CommonError::<Test>::TokenVariableDataLimitExceeded
-		);
-	})
-}
-
-#[test]
 fn collection_transfer_flag_works() {
 	new_test_ext().execute_with(|| {
 		let origin1 = Origin::signed(1);
@@ -2712,7 +2625,7 @@
 			origin1,
 			collection_id,
 			TokenId(1),
-			variable_data.clone()
+			variable_data.clone().try_into().unwrap()
 		));
 
 		assert_eq!(
@@ -2761,7 +2674,7 @@
 				origin1,
 				collection_id,
 				TokenId(1),
-				variable_data.clone()
+				variable_data.try_into().unwrap()
 			)
 			.map_err(|e| e.error),
 			CommonError::<Test>::NoPermission
@@ -2819,7 +2732,7 @@
 				origin1.clone(),
 				collection_id,
 				TokenId(1),
-				variable_data.clone()
+				variable_data.try_into().unwrap()
 			)
 			.map_err(|e| e.error),
 			CommonError::<Test>::NoPermission
modifiedprimitives/data-structs/Cargo.tomldiffbeforeafterboth
--- a/primitives/data-structs/Cargo.toml
+++ b/primitives/data-structs/Cargo.toml
@@ -16,11 +16,11 @@
 serde = { version = "1.0.130", features = [
   'derive',
 ], default-features = false, optional = true }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
 derivative = "2.2.0"
 
 [features]
modifiedprimitives/data-structs/src/lib.rsdiffbeforeafterboth
--- a/primitives/data-structs/src/lib.rs
+++ b/primitives/data-structs/src/lib.rs
@@ -22,6 +22,7 @@
 		WeightToFeePolynomial, DispatchClass,
 	},
 	StorageValue, transactional,
+	pallet_prelude::ConstU32,
 };
 use derivative::Derivative;
 use scale_info::TypeInfo;
@@ -65,9 +66,9 @@
 pub const VARIABLE_ON_CHAIN_SCHEMA_LIMIT: u32 = 8192;
 pub const CONST_ON_CHAIN_SCHEMA_LIMIT: u32 = 1048576;
 
-pub const MAX_COLLECTION_NAME_LENGTH: usize = 64;
-pub const MAX_COLLECTION_DESCRIPTION_LENGTH: usize = 256;
-pub const MAX_TOKEN_PREFIX_LENGTH: usize = 16;
+pub const MAX_COLLECTION_NAME_LENGTH: u32 = 64;
+pub const MAX_COLLECTION_DESCRIPTION_LENGTH: u32 = 256;
+pub const MAX_TOKEN_PREFIX_LENGTH: u32 = 16;
 
 /// How much items can be created per single
 /// create_many call
@@ -77,13 +78,39 @@
 	pub const CustomDataLimit: u32 = CUSTOM_DATA_LIMIT;
 }
 
-#[derive(Encode, Decode, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Debug, Default, TypeInfo)]
+#[derive(
+	Encode,
+	Decode,
+	PartialEq,
+	Eq,
+	PartialOrd,
+	Ord,
+	Clone,
+	Copy,
+	Debug,
+	Default,
+	TypeInfo,
+	MaxEncodedLen,
+)]
 #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
 pub struct CollectionId(pub u32);
 impl EncodeLike<u32> for CollectionId {}
 impl EncodeLike<CollectionId> for u32 {}
 
-#[derive(Encode, Decode, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Debug, Default, TypeInfo)]
+#[derive(
+	Encode,
+	Decode,
+	PartialEq,
+	Eq,
+	PartialOrd,
+	Ord,
+	Clone,
+	Copy,
+	Debug,
+	Default,
+	TypeInfo,
+	MaxEncodedLen,
+)]
 #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
 pub struct TokenId(pub u32);
 impl EncodeLike<u32> for TokenId {}
@@ -121,7 +148,7 @@
 
 pub type DecimalPoints = u8;
 
-#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq, TypeInfo)]
+#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
 #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
 pub enum CollectionMode {
 	NFT,
@@ -144,7 +171,7 @@
 	fn resolve(who: &AccountId, call: &Call) -> Option<AccountId>;
 }
 
-#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq, TypeInfo)]
+#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
 #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
 pub enum AccessMode {
 	Normal,
@@ -156,7 +183,7 @@
 	}
 }
 
-#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq, TypeInfo)]
+#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
 #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
 pub enum SchemaVersion {
 	ImageURL,
@@ -175,7 +202,7 @@
 	pub fraction: u128,
 }
 
-#[derive(Encode, Decode, Debug, Clone, PartialEq, TypeInfo)]
+#[derive(Encode, Decode, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
 #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
 pub enum SponsorshipState<AccountId> {
 	/// The fees are applied to the transaction sender
@@ -211,25 +238,56 @@
 	}
 }
 
-#[derive(Encode, Decode, Clone, PartialEq, TypeInfo)]
+#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
 #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
 pub struct Collection<AccountId> {
 	pub owner: AccountId,
 	pub mode: CollectionMode,
 	pub access: AccessMode,
-	pub name: Vec<u16>,        // 64 include null escape char
-	pub description: Vec<u16>, // 256 include null escape char
-	pub token_prefix: Vec<u8>, // 16 include null escape char
+	#[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+	pub name: BoundedVec<u16, ConstU32<MAX_COLLECTION_NAME_LENGTH>>,
+	#[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+	pub description: BoundedVec<u16, ConstU32<MAX_COLLECTION_DESCRIPTION_LENGTH>>,
+	#[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+	pub token_prefix: BoundedVec<u8, ConstU32<MAX_TOKEN_PREFIX_LENGTH>>,
 	pub mint_mode: bool,
-	pub offchain_schema: Vec<u8>,
+	#[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+	pub offchain_schema: BoundedVec<u8, ConstU32<OFFCHAIN_SCHEMA_LIMIT>>,
 	pub schema_version: SchemaVersion,
 	pub sponsorship: SponsorshipState<AccountId>,
-	pub limits: CollectionLimits,          // Collection private restrictions
-	pub variable_on_chain_schema: Vec<u8>, //
-	pub const_on_chain_schema: Vec<u8>,    //
+	pub limits: CollectionLimits, // Collection private restrictions
+	#[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+	pub variable_on_chain_schema: BoundedVec<u8, ConstU32<VARIABLE_ON_CHAIN_SCHEMA_LIMIT>>,
+	#[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+	pub const_on_chain_schema: BoundedVec<u8, ConstU32<CONST_ON_CHAIN_SCHEMA_LIMIT>>,
 	pub meta_update_permission: MetaUpdatePermission,
 }
 
+#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, Debug, Derivative, MaxEncodedLen)]
+#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derivative(Default(bound = ""))]
+pub struct CreateCollectionData<AccountId> {
+	#[derivative(Default(value = "CollectionMode::NFT"))]
+	pub mode: CollectionMode,
+	pub access: Option<AccessMode>,
+	#[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+	pub name: BoundedVec<u16, ConstU32<MAX_COLLECTION_NAME_LENGTH>>,
+	#[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+	pub description: BoundedVec<u16, ConstU32<MAX_COLLECTION_DESCRIPTION_LENGTH>>,
+	#[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+	pub token_prefix: BoundedVec<u8, ConstU32<MAX_TOKEN_PREFIX_LENGTH>>,
+	#[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+	pub offchain_schema: BoundedVec<u8, ConstU32<OFFCHAIN_SCHEMA_LIMIT>>,
+	pub schema_version: Option<SchemaVersion>,
+	pub pending_sponsor: Option<AccountId>,
+	pub limits: Option<CollectionLimits>,
+	#[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+	pub variable_on_chain_schema: BoundedVec<u8, ConstU32<VARIABLE_ON_CHAIN_SCHEMA_LIMIT>>,
+	#[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+	pub const_on_chain_schema: BoundedVec<u8, ConstU32<CONST_ON_CHAIN_SCHEMA_LIMIT>>,
+	pub meta_update_permission: Option<MetaUpdatePermission>,
+}
+
 #[derive(Encode, Decode, Debug, Clone, PartialEq, TypeInfo)]
 #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
 pub struct NftItemType<AccountId> {
@@ -253,7 +311,7 @@
 }
 
 /// All fields are wrapped in `Option`s, where None means chain default
-#[derive(Encode, Decode, Debug, Default, Clone, PartialEq, TypeInfo)]
+#[derive(Encode, Decode, Debug, Default, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
 #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
 pub struct CollectionLimits {
 	pub account_token_ownership_limit: Option<u32>,
@@ -378,7 +436,7 @@
 	pub pieces: u128,
 }
 
-#[derive(Encode, Decode, Debug, Clone, PartialEq, TypeInfo)]
+#[derive(Encode, Decode, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
 #[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
 pub enum MetaUpdatePermission {
 	ItemOwner,
modifiedprimitives/evm-mapping/Cargo.tomldiffbeforeafterboth
--- a/primitives/evm-mapping/Cargo.toml
+++ b/primitives/evm-mapping/Cargo.toml
@@ -4,8 +4,8 @@
 edition = "2021"
 
 [dependencies]
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
 
 [features]
 default = ["std"]
modifiedprimitives/rpc/Cargo.tomldiffbeforeafterboth
--- a/primitives/rpc/Cargo.toml
+++ b/primitives/rpc/Cargo.toml
@@ -9,10 +9,10 @@
 codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
 	"derive",
 ] }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-api = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-api = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
 
 [features]
 default = ["std"]
modifiedprimitives/rpc/src/lib.rsdiffbeforeafterboth
--- a/primitives/rpc/src/lib.rs
+++ b/primitives/rpc/src/lib.rs
@@ -9,14 +9,18 @@
 type Result<T> = core::result::Result<T, DispatchError>;
 
 sp_api::decl_runtime_apis! {
+	#[api_version(2)]
 	pub trait UniqueApi<CrossAccountId, AccountId> where
 		AccountId: Decode,
 		CrossAccountId: pallet_common::account::CrossAccountId<AccountId>,
 	{
+		#[changed_in(2)]
+		fn token_owner(collection: CollectionId, token: TokenId) -> Result<CrossAccountId>;
+
 		fn account_tokens(collection: CollectionId, account: CrossAccountId) -> Result<Vec<TokenId>>;
 		fn token_exists(collection: CollectionId, token: TokenId) -> Result<bool>;
 
-		fn token_owner(collection: CollectionId, token: TokenId) -> Result<CrossAccountId>;
+		fn token_owner(collection: CollectionId, token: TokenId) -> Result<Option<CrossAccountId>>;
 		fn const_metadata(collection: CollectionId, token: TokenId) -> Result<Vec<u8>>;
 		fn variable_metadata(collection: CollectionId, token: TokenId) -> Result<Vec<u8>>;
 
modifiedruntime/Cargo.tomldiffbeforeafterboth
--- a/runtime/Cargo.toml
+++ b/runtime/Cargo.toml
@@ -10,7 +10,7 @@
 license = 'All Rights Reserved'
 name = 'unique-runtime'
 repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.9.14'
+version = '0.9.16'
 
 [package.metadata.docs.rs]
 targets = ['x86_64-unknown-linux-gnu']
@@ -69,6 +69,7 @@
     'pallet-evm-transaction-payment/std',
     'pallet-evm-coder-substrate/std',
     'pallet-ethereum/std',
+    'pallet-base-fee/std',
     'fp-rpc/std',
     'up-rpc/std',
     'up-evm-mapping/std',
@@ -117,33 +118,33 @@
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
 optional = true
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.frame-executive]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.frame-support]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.frame-system]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.frame-system-benchmarking]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
 optional = true
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.frame-system-rpc-runtime-api]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.hex-literal]
 optional = true
@@ -158,131 +159,131 @@
 [dependencies.pallet-aura]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.pallet-balances]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 # Contracts specific packages
 # [dependencies.pallet-contracts]
 # git = 'https://github.com/paritytech/substrate.git'
 # default-features = false
-# branch = 'polkadot-v0.9.14'
+# branch = 'polkadot-v0.9.16'
 # version = '4.0.0-dev'
 
 # [dependencies.pallet-contracts-primitives]
 # git = 'https://github.com/paritytech/substrate.git'
 # default-features = false
-# branch = 'polkadot-v0.9.14'
+# branch = 'polkadot-v0.9.16'
 # version = '4.0.0-dev'
 
 # [dependencies.pallet-contracts-rpc-runtime-api]
 # git = 'https://github.com/paritytech/substrate.git'
 # default-features = false
-# branch = 'polkadot-v0.9.14'
+# branch = 'polkadot-v0.9.16'
 # version = '4.0.0-dev'
 
 [dependencies.pallet-randomness-collective-flip]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.pallet-sudo]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.pallet-timestamp]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.pallet-transaction-payment]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.pallet-transaction-payment-rpc-runtime-api]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.pallet-treasury]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 # [dependencies.pallet-vesting]
 # default-features = false
 # git = 'https://github.com/paritytech/substrate.git'
-# branch = 'polkadot-v0.9.14'
+# branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-arithmetic]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-api]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-block-builder]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-core]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-consensus-aura]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-inherents]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-io]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-offchain]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-runtime]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-session]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-std]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-transaction-pool]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.sp-version]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.smallvec]
 version = '1.6.1'
@@ -292,47 +293,47 @@
 
 [dependencies.parachain-info]
 default-features = false
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 
 [dependencies.cumulus-pallet-aura-ext]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 default-features = false
 
 [dependencies.cumulus-pallet-parachain-system]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 default-features = false
 
 [dependencies.cumulus-primitives-core]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 default-features = false
 
 [dependencies.cumulus-pallet-xcm]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 default-features = false
 
 [dependencies.cumulus-pallet-dmp-queue]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 default-features = false
 
 [dependencies.cumulus-pallet-xcmp-queue]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 default-features = false
 
 [dependencies.cumulus-primitives-utility]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 default-features = false
 
 [dependencies.cumulus-primitives-timestamp]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
 default-features = false
 
 ################################################################################
@@ -340,33 +341,33 @@
 
 [dependencies.polkadot-parachain]
 git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
 default-features = false
 
 [dependencies.xcm]
 git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
 default-features = false
 
 [dependencies.xcm-builder]
 git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
 default-features = false
 
 [dependencies.xcm-executor]
 git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
 default-features = false
 
 [dependencies.pallet-xcm]
 git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
 default-features = false
 
 [dependencies.orml-vesting]
 git = 'https://github.com/UniqueNetwork/open-runtime-module-library'
-branch = 'polkadot-v0.9.14'
-version = "0.4.1-dev" 
+branch = 'unique-polkadot-v0.9.16'
+version = "0.4.1-dev"
 default-features = false
 
 ################################################################################
@@ -388,20 +389,21 @@
 pallet-nonfungible = { default-features = false, path = "../pallets/nonfungible" }
 pallet-unq-scheduler = { path = '../pallets/scheduler', default-features = false }
 # pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }
-pallet-charge-transaction = { git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.14', package = "pallet-template-transaction-payment", default-features = false, version = '3.0.0' }
+pallet-charge-transaction = { git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.16', package = "pallet-template-transaction-payment", default-features = false, version = '3.0.0' }
 pallet-evm-migration = { path = '../pallets/evm-migration', default-features = false }
 pallet-evm-contract-helpers = { path = '../pallets/evm-contract-helpers', default-features = false }
 pallet-evm-transaction-payment = { path = '../pallets/evm-transaction-payment', default-features = false }
 pallet-evm-coder-substrate = { default-features = false, path = "../pallets/evm-coder-substrate" }
 
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
 
 ################################################################################
 # Build Dependencies
 
 [build-dependencies.substrate-wasm-builder]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
modifiedruntime/src/lib.rsdiffbeforeafterboth
--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -23,10 +23,11 @@
 use sp_runtime::{
 	Permill, Perbill, Percent, create_runtime_str, generic, impl_opaque_keys,
 	traits::{
-		AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, Verify, AccountIdConversion,
+		AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, Verify,
+		AccountIdConversion, Zero,
 	},
 	transaction_validity::{TransactionSource, TransactionValidity},
-	ApplyExtrinsicResult, MultiSignature,
+	ApplyExtrinsicResult, MultiSignature, RuntimeAppPublic,
 };
 
 use sp_std::prelude::*;
@@ -45,8 +46,9 @@
 	dispatch::DispatchResult,
 	PalletId, parameter_types, StorageValue, ConsensusEngineId,
 	traits::{
-		Everything, Currency, ExistenceRequirement, Get, IsInVec, KeyOwnerProofSystem,
-		LockIdentifier, OnUnbalanced, Randomness, FindAuthor,
+		tokens::currency::Currency as CurrencyT, OnUnbalanced as OnUnbalancedT, Everything,
+		Currency, ExistenceRequirement, Get, IsInVec, KeyOwnerProofSystem, LockIdentifier,
+		OnUnbalanced, Randomness, FindAuthor,
 	},
 	weights::{
 		constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
@@ -68,10 +70,10 @@
 use codec::{Encode, Decode};
 use pallet_evm::{Account as EVMAccount, FeeCalculator, GasWeightMapping, OnMethodCall};
 use fp_rpc::TransactionStatus;
-use sp_core::crypto::Public;
 use sp_runtime::{
-	traits::{BlockNumberProvider, Dispatchable, PostDispatchInfoOf},
+	traits::{BlockNumberProvider, Dispatchable, PostDispatchInfoOf, Saturating},
 	transaction_validity::TransactionValidityError,
+	SaturatedConversion,
 };
 
 // pub use pallet_timestamp::Call as TimestampCall;
@@ -83,12 +85,23 @@
 use xcm::v1::{BodyId, Junction::*, MultiLocation, NetworkId, Junctions::*};
 use xcm_builder::{
 	AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter,
-	EnsureXcmOrigin, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset,
-	ParentAsSuperuser, ParentIsDefault, RelayChainAsNative, SiblingParachainAsNative,
-	SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
-	SovereignSignedViaLocation, TakeWeightCredit, UsingComponents,
+	EnsureXcmOrigin, FixedWeightBounds, LocationInverter, NativeAsset, ParentAsSuperuser,
+	ParentIsDefault, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
+	SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
+};
+use xcm_executor::{Config, XcmExecutor, Assets};
+use sp_std::{marker::PhantomData};
+
+use xcm::latest::{
+	//	Xcm,
+	AssetId::{Concrete},
+	Fungibility::Fungible as XcmFungible,
+	MultiAsset,
+	Error as XcmError,
 };
-use xcm_executor::{Config, XcmExecutor};
+use xcm_executor::traits::{MatchesFungible, WeightTrader};
+//use xcm_executor::traits::MatchesFungible;
+use sp_runtime::traits::CheckedConversion;
 
 // mod chain_extension;
 // use crate::chain_extension::{NFTExtension, Imbalance};
@@ -147,10 +160,11 @@
 	spec_name: create_runtime_str!("opal"),
 	impl_name: create_runtime_str!("opal"),
 	authoring_version: 1,
-	spec_version: 914000,
-	impl_version: 1,
+	spec_version: 916001,
+	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 1,
+	state_version: 0,
 };
 
 pub const MILLISECS_PER_BLOCK: u64 = 12000;
@@ -283,7 +297,8 @@
 	type CallOrigin = EnsureAddressTruncated;
 	type WithdrawOrigin = EnsureAddressTruncated;
 	type AddressMapping = HashedAddressMapping<Self::Hashing>;
-	type Precompiles = ();
+	type PrecompilesType = ();
+	type PrecompilesValue = ();
 	type Currency = Balances;
 	type Event = Event;
 	type OnMethodCall = (
@@ -370,6 +385,7 @@
 	type SystemWeightInfo = frame_system::weights::SubstrateWeight<Self>;
 	/// Version of the runtime.
 	type Version = Version;
+	type MaxConsumers = ConstU32<16>;
 }
 
 parameter_types! {
@@ -501,6 +517,7 @@
 parameter_types! {
 	pub const ProposalBond: Permill = Permill::from_percent(5);
 	pub const ProposalBondMinimum: Balance = 1 * UNIQUE;
+	pub const ProposalBondMaximum: Balance = 1000 * UNIQUE;
 	pub const SpendPeriod: BlockNumber = 5 * MINUTES;
 	pub const Burn: Permill = Permill::from_percent(0);
 	pub const TipCountdown: BlockNumber = 1 * DAYS;
@@ -526,6 +543,7 @@
 	type OnSlash = ();
 	type ProposalBond = ProposalBond;
 	type ProposalBondMinimum = ProposalBondMinimum;
+	type ProposalBondMaximum = ProposalBondMaximum;
 	type SpendPeriod = SpendPeriod;
 	type Burn = Burn;
 	type BurnDestination = ();
@@ -575,8 +593,8 @@
 
 impl cumulus_pallet_parachain_system::Config for Runtime {
 	type Event = Event;
-	type OnValidationData = ();
 	type SelfParaId = parachain_info::Pallet<Self>;
+	type OnSystemEvent = ();
 	// type DownwardMessageHandlers = cumulus_primitives_utility::UnqueuedDmpAsParent<
 	// 	MaxDownwardMessageWeight,
 	// 	XcmExecutor<XcmConfig>,
@@ -612,12 +630,22 @@
 	AccountId32Aliases<RelayNetwork, AccountId>,
 );
 
+pub struct OnlySelfCurrency;
+impl<B: TryFrom<u128>> MatchesFungible<B> for OnlySelfCurrency {
+	fn matches_fungible(a: &MultiAsset) -> Option<B> {
+		match (&a.id, &a.fun) {
+			(Concrete(_), XcmFungible(ref amount)) => CheckedConversion::checked_from(*amount),
+			_ => None,
+		}
+	}
+}
+
 /// Means for transacting assets on this chain.
 pub type LocalAssetTransactor = CurrencyAdapter<
 	// Use this currency:
 	Balances,
 	// Use this currency when it is a fungible asset matching the given location or name:
-	IsConcrete<RelayLocation>,
+	OnlySelfCurrency,
 	// Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID:
 	LocationToAccountId,
 	// Our chain's account ID type (we can't get away without mentioning it explicitly):
@@ -673,6 +701,88 @@
 	// ^^^ Parent & its unit plurality gets free execution
 );
 
+pub struct UsingOnlySelfCurrencyComponents<
+	WeightToFee: WeightToFeePolynomial<Balance = Currency::Balance>,
+	AssetId: Get<MultiLocation>,
+	AccountId,
+	Currency: CurrencyT<AccountId>,
+	OnUnbalanced: OnUnbalancedT<Currency::NegativeImbalance>,
+>(
+	Weight,
+	Currency::Balance,
+	PhantomData<(WeightToFee, AssetId, AccountId, Currency, OnUnbalanced)>,
+);
+impl<
+		WeightToFee: WeightToFeePolynomial<Balance = Currency::Balance>,
+		AssetId: Get<MultiLocation>,
+		AccountId,
+		Currency: CurrencyT<AccountId>,
+		OnUnbalanced: OnUnbalancedT<Currency::NegativeImbalance>,
+	> WeightTrader
+	for UsingOnlySelfCurrencyComponents<WeightToFee, AssetId, AccountId, Currency, OnUnbalanced>
+{
+	fn new() -> Self {
+		Self(0, Zero::zero(), PhantomData)
+	}
+
+	fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result<Assets, XcmError> {
+		let amount = WeightToFee::calc(&weight);
+		let u128_amount: u128 = amount.try_into().map_err(|_| XcmError::Overflow)?;
+
+		// location to this parachain through relay chain
+		let option1: xcm::v1::AssetId = Concrete(MultiLocation {
+			parents: 1,
+			interior: X1(Parachain(ParachainInfo::parachain_id().into())),
+		});
+		// direct location
+		let option2: xcm::v1::AssetId = Concrete(MultiLocation {
+			parents: 0,
+			interior: Here,
+		});
+
+		let required = if payment.fungible.contains_key(&option1) {
+			(option1, u128_amount).into()
+		} else if payment.fungible.contains_key(&option2) {
+			(option2, u128_amount).into()
+		} else {
+			(Concrete(MultiLocation::default()), u128_amount).into()
+		};
+
+		let unused = payment
+			.checked_sub(required)
+			.map_err(|_| XcmError::TooExpensive)?;
+		self.0 = self.0.saturating_add(weight);
+		self.1 = self.1.saturating_add(amount);
+		Ok(unused)
+	}
+
+	fn refund_weight(&mut self, weight: Weight) -> Option<MultiAsset> {
+		let weight = weight.min(self.0);
+		let amount = WeightToFee::calc(&weight);
+		self.0 -= weight;
+		self.1 = self.1.saturating_sub(amount);
+		let amount: u128 = amount.saturated_into();
+		if amount > 0 {
+			Some((AssetId::get(), amount).into())
+		} else {
+			None
+		}
+	}
+}
+impl<
+		WeightToFee: WeightToFeePolynomial<Balance = Currency::Balance>,
+		AssetId: Get<MultiLocation>,
+		AccountId,
+		Currency: CurrencyT<AccountId>,
+		OnUnbalanced: OnUnbalancedT<Currency::NegativeImbalance>,
+	> Drop
+	for UsingOnlySelfCurrencyComponents<WeightToFee, AssetId, AccountId, Currency, OnUnbalanced>
+{
+	fn drop(&mut self) {
+		OnUnbalanced::on_unbalanced(Currency::issue(self.1));
+	}
+}
+
 pub struct XcmConfig;
 impl Config for XcmConfig {
 	type Call = Call;
@@ -685,7 +795,13 @@
 	type LocationInverter = LocationInverter<Ancestry>;
 	type Barrier = Barrier;
 	type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
-	type Trader = UsingComponents<IdentityFee<Balance>, RelayLocation, AccountId, Balances, ()>;
+	type Trader = UsingOnlySelfCurrencyComponents<
+		IdentityFee<Balance>,
+		RelayLocation,
+		AccountId,
+		Balances,
+		(),
+	>;
 	type ResponseHandler = (); // Don't handle responses for now.
 	type SubscriptionService = PolkadotXcm;
 
@@ -741,6 +857,7 @@
 	type XcmExecutor = XcmExecutor<XcmConfig>;
 	type ChannelInfo = ParachainSystem;
 	type VersionWrapper = ();
+	type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;
 }
 
 impl cumulus_pallet_dmp_queue::Config for Runtime {
@@ -961,7 +1078,7 @@
 	Block,
 	frame_system::ChainContext<Runtime>,
 	Runtime,
-	AllPallets,
+	AllPalletsReversedWithSystemFirst,
 >;
 
 impl_opaque_keys! {
@@ -1038,7 +1155,7 @@
 			dispatch_unique_runtime!(collection.token_exists(token))
 		}
 
-		fn token_owner(collection: CollectionId, token: TokenId) -> Result<CrossAccountId, DispatchError> {
+		fn token_owner(collection: CollectionId, token: TokenId) -> Result<Option<CrossAccountId>, DispatchError> {
 			dispatch_unique_runtime!(collection.token_owner(token))
 		}
 		fn const_metadata(collection: CollectionId, token: TokenId) -> Result<Vec<u8>, DispatchError> {
@@ -1186,9 +1303,11 @@
 			data: Vec<u8>,
 			value: U256,
 			gas_limit: U256,
-			gas_price: Option<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();
@@ -1204,8 +1323,10 @@
 				data,
 				value,
 				gas_limit.low_u64(),
-				gas_price,
+				max_fee_per_gas,
+				max_priority_fee_per_gas,
 				nonce,
+				access_list.unwrap_or_default(),
 				config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),
 			).map_err(|err| err.into())
 		}
@@ -1216,9 +1337,11 @@
 			data: Vec<u8>,
 			value: U256,
 			gas_limit: U256,
-			gas_price: Option<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();
@@ -1233,8 +1356,10 @@
 				data,
 				value,
 				gas_limit.low_u64(),
-				gas_price,
+				max_fee_per_gas,
+				max_priority_fee_per_gas,
 				nonce,
+				access_list.unwrap_or_default(),
 				config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),
 			).map_err(|err| err.into())
 		}
@@ -1269,6 +1394,10 @@
 				_ => None
 			}).collect()
 		}
+
+		fn elasticity() -> Option<Permill> {
+			None
+		}
 	}
 
 	impl sp_session::SessionKeys<Block> for Runtime {
@@ -1294,8 +1423,8 @@
 	}
 
 	impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {
-		fn collect_collation_info() -> cumulus_primitives_core::CollationInfo {
-			ParachainSystem::collect_collation_info()
+		fn collect_collation_info(header: &<Block as BlockT>::Header) -> cumulus_primitives_core::CollationInfo {
+			ParachainSystem::collect_collation_info(header)
 		}
 	}
 
@@ -1374,7 +1503,7 @@
 			list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);
 			// list_benchmark!(list, extra, pallet_evm_coder_substrate, EvmCoderSubstrate);
 
-			let storage_info = AllPalletsWithSystem::storage_info();
+			let storage_info = AllPalletsReversedWithSystemFirst::storage_info();
 
 			return (list, storage_info)
 		}
modifiedtests/README.mddiffbeforeafterboth
--- a/tests/README.md
+++ b/tests/README.md
@@ -5,7 +5,7 @@
 1. Checkout polkadot in sibling folder with this project
 ```bash
 git clone https://github.com/paritytech/polkadot.git && cd polkadot
-git checkout release-v0.9.14
+git checkout release-v0.9.16
 ```
 
 2. Build with nightly-2021-11-11
modifiedtests/package.jsondiffbeforeafterboth
--- a/tests/package.json
+++ b/tests/package.json
@@ -64,12 +64,14 @@
     "testOverflow": "mocha --timeout 9999999 -r ts-node/register ./**/overflow.test.ts",
     "testSetVariableMetadataSponsoringRateLimit": "mocha --timeout 9999999 -r ts-node/register ./**/setVariableMetadataSponsoringRateLimit.test.ts",
     "testInflation": "mocha --timeout 9999999 -r ts-node/register ./**/inflation.test.ts",
+    "testXcmTransfer": "mocha --timeout 9999999 -r ts-node/register ./**/xcmTransfer.test.ts",
     "testPalletPresence": "mocha --timeout 9999999 -r ts-node/register ./**/pallet-presence.test.ts",
     "testBlockProduction": "mocha --timeout 9999999 -r ts-node/register ./**/block-production.test.ts",
     "testEnableDisableTransfers": "mocha --timeout 9999999 -r ts-node/register ./**/enableDisableTransfer.test.ts",
+    "polkadot-types-fetch-metadata": "curl -H 'Content-Type: application/json' -d '{\"id\":\"1\", \"jsonrpc\":\"2.0\", \"method\": \"state_getMetadata\", \"params\":[]}' http://localhost:9933 > src/interfaces/metadata.json",
     "polkadot-types-from-defs": "ts-node ./node_modules/.bin/polkadot-types-from-defs --input src/interfaces/ --package .",
-    "polkadot-types-from-chain": "ts-node ./node_modules/.bin/polkadot-types-from-chain --endpoint ws://localhost:9944 --output src/interfaces/ --package .",
-    "polkadot-types": "yarn polkadot-types-from-defs && yarn polkadot-types-from-chain"
+    "polkadot-types-from-chain": "ts-node ./node_modules/.bin/polkadot-types-from-chain --endpoint src/interfaces/metadata.json --output src/interfaces/ --package .",
+    "polkadot-types": "yarn polkadot-types-fetch-metadata && yarn polkadot-types-from-defs && yarn polkadot-types-from-chain"
   },
   "author": "",
   "license": "SEE LICENSE IN ../LICENSE",
modifiedtests/src/check-event/createCollectionEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/createCollectionEvent.test.ts
+++ b/tests/src/check-event/createCollectionEvent.test.ts
@@ -27,7 +27,7 @@
   });
   it('Check event from createCollection(): ', async () => {
     await usingApi(async (api: ApiPromise) => {
-      const tx = api.tx.unique.createCollection([0x31], [0x32], '0x33', 'NFT');
+      const tx = api.tx.unique.createCollectionEx({name: [0x31], description: [0x32], tokenPrefix: '0x33', mode: 'NFT'});
       const events = await submitTransactionAsync(alice, tx);
       const msg = JSON.stringify(uniqueEventMessage(events));
       expect(msg).to.be.contain(checkSection);
modifiedtests/src/createCollection.test.tsdiffbeforeafterboth
--- a/tests/src/createCollection.test.ts
+++ b/tests/src/createCollection.test.ts
@@ -3,12 +3,11 @@
 // file 'LICENSE', which is part of this source code package.
 //
 
-import chai from 'chai';
-import chaiAsPromised from 'chai-as-promised';
-import {createCollectionExpectFailure, createCollectionExpectSuccess} from './util/helpers';
+import {expect} from 'chai';
+import privateKey from './substrate/privateKey';
+import usingApi, {executeTransaction, submitTransactionAsync} from './substrate/substrate-api';
+import {createCollectionExpectFailure, createCollectionExpectSuccess, getCreateCollectionResult, getDetailedCollectionInfo} from './util/helpers';
 
-chai.use(chaiAsPromised);
-
 describe('integration test: ext. createCollection():', () => {
   it('Create new NFT collection', async () => {
     await createCollectionExpectSuccess({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'}});
@@ -28,6 +27,45 @@
   it('Create new ReFungible collection', async () => {
     await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});
   });
+  it('Create new collection with extra fields', async () => {
+    await usingApi(async api => {
+      const alice = privateKey('//Alice');
+      const bob = privateKey('//Bob');
+      const tx = api.tx.unique.createCollectionEx({
+        mode: {Fungible: 8},
+        access: 'AllowList',
+        name: [1],
+        description: [2],
+        tokenPrefix: '0x000000',
+        offchainSchema: '0x111111',
+        schemaVersion: 'Unique',
+        pendingSponsor: bob.address,
+        limits: {
+          accountTokenOwnershipLimit: 3,
+        },
+        variableOnChainSchema: '0x222222',
+        constOnChainSchema: '0x333333',
+        metaUpdatePermission: 'Admin',
+      });
+      const events = await submitTransactionAsync(alice, tx);
+      const result = getCreateCollectionResult(events);
+
+      const collection = (await getDetailedCollectionInfo(api, result.collectionId))!;
+      expect(collection.owner.toString()).to.equal(alice.address);
+      expect(collection.mode.asFungible.toNumber()).to.equal(8);
+      expect(collection.access.isAllowList).to.be.true;
+      expect(collection.name.map(v => v.toNumber())).to.deep.equal([1]);
+      expect(collection.description.map(v => v.toNumber())).to.deep.equal([2]);
+      expect(collection.tokenPrefix.toString()).to.equal('0x000000');
+      expect(collection.offchainSchema.toString()).to.equal('0x111111');
+      expect(collection.schemaVersion.isUnique).to.be.true;
+      expect(collection.sponsorship.asUnconfirmed.toString()).to.equal(bob.address);
+      expect(collection.limits.accountTokenOwnershipLimit.unwrap().toNumber()).to.equal(3);
+      expect(collection.variableOnChainSchema.toString()).to.equal('0x222222');
+      expect(collection.constOnChainSchema.toString()).to.equal('0x333333');
+      expect(collection.metaUpdatePermission.isAdmin).to.be.true;
+    });
+  });
 });
 
 describe('(!negative test!) integration test: ext. createCollection():', () => {
@@ -40,4 +78,11 @@
   it('(!negative test!) create new NFT collection whith incorrect data (token_prefix)', async () => {
     await createCollectionExpectFailure({tokenPrefix: 'A'.repeat(17), mode: {type: 'NFT'}});
   });
+  it('fails when bad limits are set', async () => {
+    await usingApi(async api => {
+      const alice = privateKey('//Alice');
+      const tx = api.tx.unique.createCollectionEx({mode: 'NFT', limits: {tokenLimit: 0}});
+      await expect(executeTransaction(api, alice, tx)).to.be.rejectedWith(/^common.CollectionTokenLimitExceeded$/);
+    });
+  });
 });
modifiedtests/src/eth/api/ContractHelpers.soldiffbeforeafterboth
--- a/tests/src/eth/api/ContractHelpers.sol
+++ b/tests/src/eth/api/ContractHelpers.sol
@@ -12,7 +12,7 @@
 	function supportsInterface(bytes4 interfaceID) external view returns (bool);
 }
 
-// Selector: 31acb1fe
+// Selector: 7b4866f9
 interface ContractHelpers is Dummy, ERC165 {
 	// Selector: contractOwner(address) 5152b14c
 	function contractOwner(address contractAddress)
@@ -26,9 +26,20 @@
 		view
 		returns (bool);
 
+	// Deprecated
+	//
 	// Selector: toggleSponsoring(address,bool) fcac6d86
 	function toggleSponsoring(address contractAddress, bool enabled) external;
 
+	// Selector: setSponsoringMode(address,uint8) fde8a560
+	function setSponsoringMode(address contractAddress, uint8 mode) external;
+
+	// Selector: sponsoringMode(address) b70c7267
+	function sponsoringMode(address contractAddress)
+		external
+		view
+		returns (uint8);
+
 	// Selector: setSponsoringRateLimit(address,uint32) 77b6c908
 	function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)
 		external;
modifiedtests/src/eth/contractSponsoring.test.tsdiffbeforeafterboth
--- a/tests/src/eth/contractSponsoring.test.ts
+++ b/tests/src/eth/contractSponsoring.test.ts
@@ -10,7 +10,10 @@
   createEthAccountWithBalance,
   transferBalanceToEth,
   deployFlipper,
-  itWeb3} from './util/helpers';
+  itWeb3,
+  SponsoringMode,
+  createEthAccount,
+} from './util/helpers';
 
 describe('Sponsoring EVM contracts', () => {
   itWeb3('Sponsoring can be set by the address that has deployed the contract', async ({api, web3}) => {
@@ -18,7 +21,7 @@
     const flipper = await deployFlipper(web3, owner);
     const helpers = contractHelpers(web3, owner);
     expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.false;
-    await helpers.methods.toggleSponsoring(flipper.options.address, true).send({from: owner});
+    await helpers.methods.setSponsoringMode(flipper.options.address, SponsoringMode.Allowlisted).send({from: owner});
     expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.true;
   });
 
@@ -28,11 +31,11 @@
     const flipper = await deployFlipper(web3, owner);
     const helpers = contractHelpers(web3, owner);
     expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.false;
-    await expect(helpers.methods.toggleSponsoring(notOwner, true).send({from: notOwner})).to.rejected;
+    await expect(helpers.methods.setSponsoringMode(notOwner, SponsoringMode.Allowlisted).send({from: notOwner})).to.rejected;
     expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.false;
   });
 
-  itWeb3('Sponsoring is set, an address that has no UNQ can send a transaction and it works. Sponsor balance should decrease (allowlisted)', async ({api, web3}) => {
+  itWeb3('In generous mode, non-allowlisted user transaction will be sponsored', async ({api, web3}) => {
     const alice = privateKey('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
@@ -41,11 +44,39 @@
     const flipper = await deployFlipper(web3, owner);
 
     const helpers = contractHelpers(web3, owner);
+
+    expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.false;
+    await helpers.methods.setSponsoringMode(flipper.options.address, SponsoringMode.Generous).send({from: owner});
+    await helpers.methods.setSponsoringRateLimit(flipper.options.address, 0).send({from: owner});
+    expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.true;
+
+    await transferBalanceToEth(api, alice, flipper.options.address);
+
+    const originalFlipperBalance = await web3.eth.getBalance(flipper.options.address);
+    expect(originalFlipperBalance).to.be.not.equal('0');
+
+    await flipper.methods.flip().send({from: caller});
+    expect(await flipper.methods.getValue().call()).to.be.true;
+
+    // Balance should be taken from flipper instead of caller
+    const balanceAfter = await web3.eth.getBalance(flipper.options.address);
+    expect(+balanceAfter).to.be.lessThan(+originalFlipperBalance);
+  });
+
+  itWeb3('Sponsoring is set, an address that has no UNQ can send a transaction and it works. Sponsor balance should decrease (allowlisted)', async ({api, web3}) => {
+    const alice = privateKey('//Alice');
+
+    const owner = await createEthAccountWithBalance(api, web3);
+    const caller = createEthAccount(web3);
+
+    const flipper = await deployFlipper(web3, owner);
+
+    const helpers = contractHelpers(web3, owner);
     await helpers.methods.toggleAllowlist(flipper.options.address, true).send({from: owner});
     await helpers.methods.toggleAllowed(flipper.options.address, caller, true).send({from: owner});
 
     expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.false;
-    await helpers.methods.toggleSponsoring(flipper.options.address, true).send({from: owner});
+    await helpers.methods.setSponsoringMode(flipper.options.address, SponsoringMode.Allowlisted).send({from: owner});
     await helpers.methods.setSponsoringRateLimit(flipper.options.address, 0).send({from: owner});
     expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.true;
 
@@ -66,14 +97,14 @@
     const alice = privateKey('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
-    const caller = await createEthAccountWithBalance(api, web3);
+    const caller = createEthAccount(web3);
 
     const flipper = await deployFlipper(web3, owner);
 
     const helpers = contractHelpers(web3, owner);
 
     expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.false;
-    await helpers.methods.toggleSponsoring(flipper.options.address, true).send({from: owner});
+    await helpers.methods.setSponsoringMode(flipper.options.address, SponsoringMode.Allowlisted).send({from: owner});
     await helpers.methods.setSponsoringRateLimit(flipper.options.address, 0).send({from: owner});
     expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.true;
 
@@ -104,7 +135,7 @@
     await helpers.methods.toggleAllowed(flipper.options.address, caller, true).send({from: owner});
 
     expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.false;
-    await helpers.methods.toggleSponsoring(flipper.options.address, true).send({from: owner});
+    await helpers.methods.setSponsoringMode(flipper.options.address, SponsoringMode.Allowlisted).send({from: owner});
     await helpers.methods.setSponsoringRateLimit(flipper.options.address, 0).send({from: owner});
     expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.true;
 
@@ -133,7 +164,7 @@
     await helpers.methods.toggleAllowed(flipper.options.address, caller, true).send({from: owner});
 
     expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.false;
-    await helpers.methods.toggleSponsoring(flipper.options.address, true).send({from: owner});
+    await helpers.methods.setSponsoringMode(flipper.options.address, SponsoringMode.Allowlisted).send({from: owner});
     await helpers.methods.setSponsoringRateLimit(flipper.options.address, 10).send({from: owner});
     expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.true;
 
@@ -157,33 +188,4 @@
     const helpers = contractHelpers(web3, owner);
     expect(await helpers.methods.getSponsoringRateLimit(flipper.options.address).call()).to.be.equals('7200');
   });
-
-  itWeb3('If allowlist mode is off and sponsorship is on, sponsorship does not work', async ({api, web3}) => {
-    const alice = privateKey('//Alice');
-
-    const owner = await createEthAccountWithBalance(api, web3);
-    const caller = await createEthAccountWithBalance(api, web3);
-
-    const flipper = await deployFlipper(web3, owner);
-
-    const helpers = contractHelpers(web3, owner);
-
-    expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.false;
-    await helpers.methods.toggleSponsoring(flipper.options.address, true).send({from: owner});
-    await helpers.methods.setSponsoringRateLimit(flipper.options.address, 0).send({from: owner});
-    expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.true;
-
-    await transferBalanceToEth(api, alice, flipper.options.address);
-
-    const originalFlipperBalance = await web3.eth.getBalance(flipper.options.address);
-    expect(originalFlipperBalance).to.be.not.equal('0');
-
-    await flipper.methods.flip().send({from: caller});
-    expect(await flipper.methods.getValue().call()).to.be.true;
-
-    // Balance should be taken from flipper instead of caller
-    const balanceAfter = await web3.eth.getBalance(flipper.options.address);
-    expect(+balanceAfter).to.be.equals(+originalFlipperBalance);
-  });
-
 });
modifiedtests/src/eth/marketplace/marketplace.test.tsdiffbeforeafterboth
--- a/tests/src/eth/marketplace/marketplace.test.ts
+++ b/tests/src/eth/marketplace/marketplace.test.ts
@@ -2,7 +2,7 @@
 import {getBalanceSingle, transferBalanceExpectSuccess} from '../../substrate/get-balance';
 import privateKey from '../../substrate/privateKey';
 import {addToAllowListExpectSuccess, confirmSponsorshipExpectSuccess, createCollectionExpectSuccess, createFungibleItemExpectSuccess, createItemExpectSuccess, getTokenOwner, setCollectionLimitsExpectSuccess, setCollectionSponsorExpectSuccess, transferExpectSuccess, transferFromExpectSuccess} from '../../util/helpers';
-import {collectionIdToAddress, contractHelpers, createEthAccountWithBalance, executeEthTxOnSub, GAS_ARGS, itWeb3, subToEth, subToEthLowercase, transferBalanceToEth} from '../util/helpers';
+import {collectionIdToAddress, contractHelpers, createEthAccountWithBalance, executeEthTxOnSub, GAS_ARGS, itWeb3, SponsoringMode, subToEth, subToEthLowercase, transferBalanceToEth} from '../util/helpers';
 import {evmToAddress} from '@polkadot/util-crypto';
 import nonFungibleAbi from '../nonFungibleAbi.json';
 import fungibleAbi from '../fungibleAbi.json';
@@ -20,7 +20,7 @@
     });
     const matcher = await matcherContract.deploy({data: (await readFile(`${__dirname}/MarketPlace.bin`)).toString(), arguments:[matcherOwner]}).send({from: matcherOwner});
     const helpers = contractHelpers(web3, matcherOwner);
-    await helpers.methods.toggleSponsoring(matcher.options.address, true).send({from: matcherOwner});
+    await helpers.methods.setSponsoringMode(matcher.options.address, SponsoringMode.Allowlisted).send({from: matcherOwner});
     await helpers.methods.setSponsoringRateLimit(matcher.options.address, 1).send({from: matcherOwner});
     await transferBalanceToEth(api, alice, matcher.options.address);
 
@@ -147,7 +147,7 @@
     const matcher = await matcherContract.deploy({data: (await readFile(`${__dirname}/MarketPlace.bin`)).toString(), arguments: [matcherOwner]}).send({from: matcherOwner, gas: 10000000});
     await matcher.methods.setEscrow(escrow).send({from: matcherOwner});
     const helpers = contractHelpers(web3, matcherOwner);
-    await helpers.methods.toggleSponsoring(matcher.options.address, true).send({from: matcherOwner});
+    await helpers.methods.setSponsoringMode(matcher.options.address, SponsoringMode.Allowlisted).send({from: matcherOwner});
     await helpers.methods.setSponsoringRateLimit(matcher.options.address, 1).send({from: matcherOwner});
     await transferBalanceToEth(api, alice, matcher.options.address);
 
modifiedtests/src/eth/payable.test.tsdiffbeforeafterboth
--- a/tests/src/eth/payable.test.ts
+++ b/tests/src/eth/payable.test.ts
@@ -34,6 +34,8 @@
         GAS_ARGS.gas,
         await web3.eth.getGasPrice(),
         null,
+        null,
+        [],
       );
       const events = await submitTransactionAsync(alice, tx);
       const result = getGenericResult(events);
modifiedtests/src/eth/sponsoring.test.tsdiffbeforeafterboth
--- a/tests/src/eth/sponsoring.test.ts
+++ b/tests/src/eth/sponsoring.test.ts
@@ -1,6 +1,6 @@
 import {expect} from 'chai';
 import privateKey from '../substrate/privateKey';
-import {contractHelpers, createEthAccount, createEthAccountWithBalance, deployCollector, deployFlipper, itWeb3, transferBalanceToEth} from './util/helpers';
+import {contractHelpers, createEthAccount, createEthAccountWithBalance, deployCollector, deployFlipper, itWeb3, SponsoringMode, transferBalanceToEth} from './util/helpers';
 
 describe('EVM sponsoring', () => {
   itWeb3('Fee is deducted from contract if sponsoring is enabled', async ({api, web3}) => {
@@ -18,7 +18,7 @@
     await helpers.methods.toggleAllowed(flipper.options.address, caller, true).send({from: owner});
 
     expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.false;
-    await helpers.methods.toggleSponsoring(flipper.options.address, true).send({from: owner});
+    await helpers.methods.setSponsoringMode(flipper.options.address, SponsoringMode.Allowlisted).send({from: owner});
     await helpers.methods.setSponsoringRateLimit(flipper.options.address, 0).send({from: owner});
     expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.true;
 
@@ -49,7 +49,7 @@
     await helpers.methods.toggleAllowed(collector.options.address, caller, true).send({from: owner});
 
     expect(await helpers.methods.sponsoringEnabled(collector.options.address).call()).to.be.false;
-    await helpers.methods.toggleSponsoring(collector.options.address, true).send({from: owner});
+    await helpers.methods.setSponsoringMode(collector.options.address, SponsoringMode.Allowlisted).send({from: owner});
     await helpers.methods.setSponsoringRateLimit(collector.options.address, 0).send({from: owner});
     expect(await helpers.methods.sponsoringEnabled(collector.options.address).call()).to.be.true;
 
modifiedtests/src/eth/util/contractHelpersAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/util/contractHelpersAbi.json
+++ b/tests/src/eth/util/contractHelpersAbi.json
@@ -147,6 +147,43 @@
                 "type": "address"
             },
             {
+                "internalType": "uint8",
+                "name": "mode",
+                "type": "uint8"
+            }
+        ],
+        "name": "setSponsoringMode",
+        "outputs": [],
+        "stateMutability": "nonpayable",
+        "type": "function"
+    },
+    {
+        "inputs": [
+            {
+                "internalType": "address",
+                "name": "target",
+                "type": "address"
+            }
+        ],
+        "name": "sponsoringMode",
+        "outputs": [
+            {
+                "internalType": "uint8",
+                "name": "",
+                "type": "uint8"
+            }
+        ],
+        "stateMutability": "nonpayable",
+        "type": "function"
+    },
+    {
+        "inputs": [
+            {
+                "internalType": "address",
+                "name": "target",
+                "type": "address"
+            },
+            {
                 "internalType": "uint32",
                 "name": "limit",
                 "type": "uint32"
@@ -176,4 +213,4 @@
         "stateMutability": "view",
         "type": "function"
     }
-]
\ No newline at end of file
+]
modifiedtests/src/eth/util/helpers.tsdiffbeforeafterboth
--- a/tests/src/eth/util/helpers.ts
+++ b/tests/src/eth/util/helpers.ts
@@ -21,6 +21,12 @@
 
 export const GAS_ARGS = {gas: 2500000};
 
+export enum SponsoringMode {
+  Disabled = 0,
+  Allowlisted = 1,
+  Generous = 2,
+}
+
 let web3Connected = false;
 export async function usingWeb3<T>(cb: (web3: Web3) => Promise<T> | T): Promise<T> {
   if (web3Connected) throw new Error('do not nest usingWeb3 calls');
@@ -249,6 +255,8 @@
     GAS_ARGS.gas,
     await web3.eth.getGasPrice(),
     null,
+    null,
+    [],
   );
   const events = await submitTransactionAsync(from, tx);
   expect(events.some(({event: {section, method}}) => section == 'evm' && method == 'Executed')).to.be.true;
addedtests/src/interfaces/.gitignorediffbeforeafterboth
--- /dev/null
+++ b/tests/src/interfaces/.gitignore
@@ -0,0 +1 @@
+metadata.json
modifiedtests/src/interfaces/augment-api-consts.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-api-consts.ts
+++ b/tests/src/interfaces/augment-api-consts.ts
@@ -2,7 +2,7 @@
 /* eslint-disable */
 
 import type { ApiTypes } from '@polkadot/api/types';
-import type { Vec, u128, u16, u32, u64, u8 } from '@polkadot/types';
+import type { Option, Vec, u128, u16, u32, u64, u8 } from '@polkadot/types';
 import type { Permill } from '@polkadot/types/interfaces/runtime';
 import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
 import type { Codec } from '@polkadot/types/types';
@@ -36,6 +36,9 @@
       [key: string]: Codec;
     };
     inflation: {
+      /**
+       * Number of blocks that pass between treasury balance updates due to inflation
+       **/
       inflationBlockInterval: u32 & AugmentedConst<ApiType>;
       /**
        * Generic const
@@ -146,6 +149,10 @@
        **/
       proposalBond: Permill & AugmentedConst<ApiType>;
       /**
+       * Maximum amount of funds that should be placed in a deposit for making a proposal.
+       **/
+      proposalBondMaximum: Option<u128> & AugmentedConst<ApiType>;
+      /**
        * Minimum amount of funds that should be placed in a deposit for making a proposal.
        **/
       proposalBondMinimum: u128 & AugmentedConst<ApiType>;
modifiedtests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-api-errors.ts
+++ b/tests/src/interfaces/augment-api-errors.ts
@@ -61,14 +61,18 @@
        **/
       CantApproveMoreThanOwned: AugmentedError<ApiType>;
       /**
-       * Exceeded max admin amount
+       * Exceeded max admin count
        **/
-      CollectionAdminAmountExceeded: AugmentedError<ApiType>;
+      CollectionAdminCountExceeded: AugmentedError<ApiType>;
       /**
        * Collection description can not be longer than 255 char.
        **/
       CollectionDescriptionLimitExceeded: AugmentedError<ApiType>;
       /**
+       * Collection limit bounds per collection exceeded
+       **/
+      CollectionLimitBoundsExceeded: AugmentedError<ApiType>;
+      /**
        * Collection name can not be longer than 63 char.
        **/
       CollectionNameLimitExceeded: AugmentedError<ApiType>;
@@ -97,6 +101,10 @@
        **/
       NoPermission: AugmentedError<ApiType>;
       /**
+       * Tried to enable permissions which are only permitted to be disabled
+       **/
+      OwnerPermissionsCantBeReverted: AugmentedError<ApiType>;
+      /**
        * Collection is not in mint mode.
        **/
       PublicMintingNotAllowed: AugmentedError<ApiType>;
@@ -107,7 +115,7 @@
       /**
        * Requested value more than approved.
        **/
-      TokenValueNotEnough: AugmentedError<ApiType>;
+      ApprovedValueTooLow: AugmentedError<ApiType>;
       /**
        * Item balance not enough.
        **/
@@ -227,7 +235,7 @@
       /**
        * Tried to set data for fungible item
        **/
-      FungibleItemsHaveData: AugmentedError<ApiType>;
+      FungibleItemsDontHaveData: AugmentedError<ApiType>;
       /**
        * Not default id passed as TokenId argument
        **/
@@ -381,6 +389,10 @@
     };
     system: {
       /**
+       * The origin filter prevent the call to be dispatched.
+       **/
+      CallFiltered: AugmentedError<ApiType>;
+      /**
        * Failed to extract the runtime version from the new runtime.
        * 
        * Either calling `Core_version` or decoding `RuntimeVersion` failed.
@@ -433,10 +445,6 @@
        **/
       CollectionDecimalPointLimitExceeded: AugmentedError<ApiType>;
       /**
-       * Collection limit bounds per collection exceeded
-       **/
-      CollectionLimitBoundsExceeded: AugmentedError<ApiType>;
-      /**
        * This address is not set as sponsor, use setCollectionSponsor first.
        **/
       ConfirmUnsetSponsorFail: AugmentedError<ApiType>;
@@ -444,10 +452,6 @@
        * Length of items properties must be greater than 0.
        **/
       EmptyArgument: AugmentedError<ApiType>;
-      /**
-       * Tried to enable permissions which are only permitted to be disabled
-       **/
-      OwnerPermissionsCantBeReverted: AugmentedError<ApiType>;
       /**
        * Generic error
        **/
@@ -485,6 +489,10 @@
     };
     xcmpQueue: {
       /**
+       * Bad overweight index.
+       **/
+      BadOverweightIndex: AugmentedError<ApiType>;
+      /**
        * Bad XCM data.
        **/
       BadXcm: AugmentedError<ApiType>;
@@ -497,6 +505,10 @@
        **/
       FailedToSend: AugmentedError<ApiType>;
       /**
+       * Provided weight is possibly not enough to execute the message.
+       **/
+      WeightOverLimit: AugmentedError<ApiType>;
+      /**
        * Generic error
        **/
       [key: string]: AugmentedError<ApiType>;
modifiedtests/src/interfaces/augment-api-events.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-api-events.ts
+++ b/tests/src/interfaces/augment-api-events.ts
@@ -2,7 +2,7 @@
 /* eslint-disable */
 
 import type { EthereumLog, EvmCoreErrorExitReason } from './ethereum';
-import type { PalletCommonAccountBasicCrossAccountIdRepr } from './unique';
+import type { PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode } from './unique';
 import type { ApiTypes } from '@polkadot/api/types';
 import type { Null, Option, Result, U256, U8aFixed, u128, u32, u64, u8 } from '@polkadot/types';
 import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';
@@ -12,48 +12,45 @@
   export interface AugmentedEvents<ApiType> {
     balances: {
       /**
-       * A balance was set by root. \[who, free, reserved\]
+       * A balance was set by root.
        **/
       BalanceSet: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;
       /**
-       * Some amount was deposited into the account (e.g. for transaction fees). \[who,
-       * deposit\]
+       * Some amount was deposited (e.g. for transaction fees).
        **/
       Deposit: AugmentedEvent<ApiType, [AccountId32, u128]>;
       /**
        * An account was removed whose balance was non-zero but below ExistentialDeposit,
-       * resulting in an outright loss. \[account, balance\]
+       * resulting in an outright loss.
        **/
       DustLost: AugmentedEvent<ApiType, [AccountId32, u128]>;
       /**
-       * An account was created with some free balance. \[account, free_balance\]
+       * An account was created with some free balance.
        **/
       Endowed: AugmentedEvent<ApiType, [AccountId32, u128]>;
       /**
-       * Some balance was reserved (moved from free to reserved). \[who, value\]
+       * Some balance was reserved (moved from free to reserved).
        **/
       Reserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
       /**
        * Some balance was moved from the reserve of the first account to the second account.
        * Final argument indicates the destination balance type.
-       * \[from, to, balance, destination_status\]
        **/
       ReserveRepatriated: AugmentedEvent<ApiType, [AccountId32, AccountId32, u128, FrameSupportTokensMiscBalanceStatus]>;
       /**
-       * Some amount was removed from the account (e.g. for misbehavior). \[who,
-       * amount_slashed\]
+       * Some amount was removed from the account (e.g. for misbehavior).
        **/
       Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
       /**
-       * Transfer succeeded. \[from, to, value\]
+       * Transfer succeeded.
        **/
       Transfer: AugmentedEvent<ApiType, [AccountId32, AccountId32, u128]>;
       /**
-       * Some balance was unreserved (moved from reserved to free). \[who, value\]
+       * Some balance was unreserved (moved from reserved to free).
        **/
       Unreserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
       /**
-       * Some amount was withdrawn from the account (e.g. for transaction fees). \[who, value\]
+       * Some amount was withdrawn from the account (e.g. for transaction fees).
        **/
       Withdraw: AugmentedEvent<ApiType, [AccountId32, u128]>;
       /**
@@ -87,6 +84,14 @@
        **/
       CollectionCreated: AugmentedEvent<ApiType, [u32, u8, AccountId32]>;
       /**
+       * New collection was destroyed
+       * 
+       * # Arguments
+       * 
+       * * collection_id: Globally unique identifier of collection.
+       **/
+      CollectionDestroyed: AugmentedEvent<ApiType, [u32]>;
+      /**
        * New item was created.
        * 
        * # Arguments
@@ -289,7 +294,7 @@
       InvalidResponder: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64, Option<XcmV1MultiLocation>]>;
       /**
        * Expected query response has been received but the expected origin location placed in
-       * storate by this runtime previously cannot be decoded. The query remains registered.
+       * storage by this runtime previously cannot be decoded. The query remains registered.
        * 
        * This is unexpected (since a location placed in storage in a previously executing
        * runtime should be readable prior to query timeout) and dangerous since the possibly
@@ -390,9 +395,9 @@
     };
     sudo: {
       /**
-       * The \[sudoer\] just switched identity; the old key is supplied.
+       * The \[sudoer\] just switched identity; the old key is supplied if one existed.
        **/
-      KeyChanged: AugmentedEvent<ApiType, [AccountId32]>;
+      KeyChanged: AugmentedEvent<ApiType, [Option<AccountId32>]>;
       /**
        * A sudo just took place. \[result\]
        **/
@@ -412,23 +417,23 @@
        **/
       CodeUpdated: AugmentedEvent<ApiType, []>;
       /**
-       * An extrinsic failed. \[error, info\]
+       * An extrinsic failed.
        **/
       ExtrinsicFailed: AugmentedEvent<ApiType, [SpRuntimeDispatchError, FrameSupportWeightsDispatchInfo]>;
       /**
-       * An extrinsic completed successfully. \[info\]
+       * An extrinsic completed successfully.
        **/
       ExtrinsicSuccess: AugmentedEvent<ApiType, [FrameSupportWeightsDispatchInfo]>;
       /**
-       * An \[account\] was reaped.
+       * An account was reaped.
        **/
       KilledAccount: AugmentedEvent<ApiType, [AccountId32]>;
       /**
-       * A new \[account\] was created.
+       * A new account was created.
        **/
       NewAccount: AugmentedEvent<ApiType, [AccountId32]>;
       /**
-       * On on-chain remark happened. \[origin, remark_hash\]
+       * On on-chain remark happened.
        **/
       Remarked: AugmentedEvent<ApiType, [AccountId32, H256]>;
       /**
@@ -438,32 +443,31 @@
     };
     treasury: {
       /**
-       * Some funds have been allocated. \[proposal_index, award, beneficiary\]
+       * Some funds have been allocated.
        **/
       Awarded: AugmentedEvent<ApiType, [u32, u128, AccountId32]>;
       /**
-       * Some of our funds have been burnt. \[burn\]
+       * Some of our funds have been burnt.
        **/
       Burnt: AugmentedEvent<ApiType, [u128]>;
       /**
-       * Some funds have been deposited. \[deposit\]
+       * Some funds have been deposited.
        **/
       Deposit: AugmentedEvent<ApiType, [u128]>;
       /**
-       * New proposal. \[proposal_index\]
+       * New proposal.
        **/
       Proposed: AugmentedEvent<ApiType, [u32]>;
       /**
-       * A proposal was rejected; funds were slashed. \[proposal_index, slashed\]
+       * A proposal was rejected; funds were slashed.
        **/
       Rejected: AugmentedEvent<ApiType, [u32, u128]>;
       /**
        * Spending has finished; this is the amount that rolls over until next spend.
-       * \[budget_remaining\]
        **/
       Rollover: AugmentedEvent<ApiType, [u128]>;
       /**
-       * We have ended a spend period and will now allocate funds. \[budget_remaining\]
+       * We have ended a spend period and will now allocate funds.
        **/
       Spending: AugmentedEvent<ApiType, [u128]>;
       /**
@@ -471,17 +475,159 @@
        **/
       [key: string]: AugmentedEvent<ApiType>;
     };
+    unique: {
+      /**
+       * Address was add to allow list
+       * 
+       * # Arguments
+       * 
+       * * collection_id: Globally unique collection identifier.
+       * 
+       * * user:  Address.
+       **/
+      AllowListAddressAdded: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+      /**
+       * Address was remove from allow list
+       * 
+       * # Arguments
+       * 
+       * * collection_id: Globally unique collection identifier.
+       * 
+       * * user:  Address.
+       **/
+      AllowListAddressRemoved: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+      /**
+       * Collection admin was added
+       * 
+       * # Arguments
+       * 
+       * * collection_id: Globally unique collection identifier.
+       * 
+       * * admin:  Admin address.
+       **/
+      CollectionAdminAdded: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+      /**
+       * Collection admin was removed
+       * 
+       * # Arguments
+       * 
+       * * collection_id: Globally unique collection identifier.
+       * 
+       * * admin:  Admin address.
+       **/
+      CollectionAdminRemoved: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+      /**
+       * Collection limits was set
+       * 
+       * # Arguments
+       * 
+       * * collection_id: Globally unique collection identifier.
+       **/
+      CollectionLimitSet: AugmentedEvent<ApiType, [u32]>;
+      /**
+       * Collection owned was change
+       * 
+       * # Arguments
+       * 
+       * * collection_id: Globally unique collection identifier.
+       * 
+       * * owner:  New owner address.
+       **/
+      CollectionOwnedChanged: AugmentedEvent<ApiType, [u32, AccountId32]>;
+      /**
+       * Collection sponsor was removed
+       * 
+       * # Arguments
+       * 
+       * * collection_id: Globally unique collection identifier.
+       **/
+      CollectionSponsorRemoved: AugmentedEvent<ApiType, [u32]>;
+      /**
+       * Collection sponsor was set
+       * 
+       * # Arguments
+       * 
+       * * collection_id: Globally unique collection identifier.
+       * 
+       * * owner:  New sponsor address.
+       **/
+      CollectionSponsorSet: AugmentedEvent<ApiType, [u32, AccountId32]>;
+      /**
+       * const on chain schema was set
+       * 
+       * # Arguments
+       * 
+       * * collection_id: Globally unique collection identifier.
+       **/
+      ConstOnChainSchemaSet: AugmentedEvent<ApiType, [u32]>;
+      /**
+       * Mint permission	was set
+       * 
+       * # Arguments
+       * 
+       * * collection_id: Globally unique collection identifier.
+       **/
+      MintPermissionSet: AugmentedEvent<ApiType, [u32]>;
+      /**
+       * Offchain schema was set
+       * 
+       * # Arguments
+       * 
+       * * collection_id: Globally unique collection identifier.
+       **/
+      OffchainSchemaSet: AugmentedEvent<ApiType, [u32]>;
+      /**
+       * Public access mode was set
+       * 
+       * # Arguments
+       * 
+       * * collection_id: Globally unique collection identifier.
+       * 
+       * * mode: New access state.
+       **/
+      PublicAccessModeSet: AugmentedEvent<ApiType, [u32, UpDataStructsAccessMode]>;
+      /**
+       * Schema version was set
+       * 
+       * # Arguments
+       * 
+       * * collection_id: Globally unique collection identifier.
+       **/
+      SchemaVersionSet: AugmentedEvent<ApiType, [u32]>;
+      /**
+       * New sponsor was confirm
+       * 
+       * # Arguments
+       * 
+       * * collection_id: Globally unique collection identifier.
+       * 
+       * * sponsor:  New sponsor address.
+       **/
+      SponsorshipConfirmed: AugmentedEvent<ApiType, [u32, AccountId32]>;
+      /**
+       * Variable on chain schema was set
+       * 
+       * # Arguments
+       * 
+       * * collection_id: Globally unique collection identifier.
+       **/
+      VariableOnChainSchemaSet: AugmentedEvent<ApiType, [u32]>;
+      /**
+       * Generic event
+       **/
+      [key: string]: AugmentedEvent<ApiType>;
+    };
     vesting: {
       /**
-       * Claimed vesting. \[who, locked_amount\]
+       * Claimed vesting.
        **/
       Claimed: AugmentedEvent<ApiType, [AccountId32, u128]>;
       /**
-       * Added new vesting schedule. \[from, to, vesting_schedule\]
+       * Added new vesting schedule.
        **/
       VestingScheduleAdded: AugmentedEvent<ApiType, [AccountId32, AccountId32, OrmlVestingVestingSchedule]>;
       /**
-       * Updated vesting schedules. \[who\]
+       * Updated vesting schedules.
        **/
       VestingSchedulesUpdated: AugmentedEvent<ApiType, [AccountId32]>;
       /**
@@ -503,6 +649,14 @@
        **/
       Fail: AugmentedEvent<ApiType, [Option<H256>, XcmV2TraitsError]>;
       /**
+       * An XCM exceeded the individual message weight budget.
+       **/
+      OverweightEnqueued: AugmentedEvent<ApiType, [u32, u32, u64, u64]>;
+      /**
+       * An XCM from the overweight queue was executed with the given actual weight used.
+       **/
+      OverweightServiced: AugmentedEvent<ApiType, [u64, u64]>;
+      /**
        * Some XCM was executed ok.
        **/
       Success: AugmentedEvent<ApiType, [Option<H256>]>;
modifiedtests/src/interfaces/augment-api-query.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-api-query.ts
+++ b/tests/src/interfaces/augment-api-query.ts
@@ -1,8 +1,8 @@
 // Auto-generated via `yarn polkadot-types-from-chain`, do not edit
 /* eslint-disable */
 
-import type { EthereumBlock, EthereumReceipt, EthereumTransactionLegacyTransaction, FpRpcTransactionStatus } from './ethereum';
-import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundStatus, CumulusPalletXcmpQueueOutboundStatus, CumulusPalletXcmpQueueQueueConfigData, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData } from './polkadot';
+import type { EthereumBlock, FpRpcTransactionStatus } from './ethereum';
+import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueQueueConfigData, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData } from './polkadot';
 import type { PalletCommonAccountBasicCrossAccountIdRepr, PalletNonfungibleItemData, PalletRefungibleItemData, UpDataStructsCollection, UpDataStructsCollectionStats } from './unique';
 import type { ApiTypes } from '@polkadot/api/types';
 import type { BTreeMap, Bytes, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types';
@@ -105,7 +105,7 @@
       /**
        * The current Ethereum receipts.
        **/
-      currentReceipts: AugmentedQuery<ApiType, () => Observable<Option<Vec<EthereumReceipt>>>, []> & QueryableStorageEntry<ApiType, []>;
+      currentReceipts: AugmentedQuery<ApiType, () => Observable<Option<Vec<EthereumReceiptReceiptV3>>>, []> & QueryableStorageEntry<ApiType, []>;
       /**
        * The current transaction statuses.
        **/
@@ -113,7 +113,7 @@
       /**
        * Current building block's transactions and receipts.
        **/
-      pending: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[EthereumTransactionLegacyTransaction, FpRpcTransactionStatus, EthereumReceipt]>>>, []> & QueryableStorageEntry<ApiType, []>;
+      pending: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[EthereumTransactionTransactionV2, FpRpcTransactionStatus, EthereumReceiptReceiptV3]>>>, []> & QueryableStorageEntry<ApiType, []>;
       /**
        * Generic query
        **/
@@ -163,10 +163,22 @@
     };
     inflation: {
       /**
-       * Current block inflation
+       * Current inflation for `InflationBlockInterval` number of blocks
        **/
       blockInflation: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
       /**
+       * Next target (relay) block when inflation will be applied
+       **/
+      nextInflationBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
+      /**
+       * Next target (relay) block when inflation is recalculated
+       **/
+      nextRecalculationBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
+      /**
+       * Relay block when inflation has started
+       **/
+      startBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
+      /**
        * starting year total issuance
        **/
       startingYearTotalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
@@ -208,6 +220,12 @@
        **/
       authorizedUpgrade: AugmentedQuery<ApiType, () => Observable<Option<H256>>, []> & QueryableStorageEntry<ApiType, []>;
       /**
+       * A custom head data that should be returned as result of `validate_block`.
+       * 
+       * See [`Pallet::set_custom_validation_head_data`] for more information.
+       **/
+      customValidationHeadData: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
+      /**
        * Were the validation data set to notify the relay chain?
        **/
       didSetValidationCode: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
@@ -353,7 +371,7 @@
       /**
        * The `AccountId` of the sudo key.
        **/
-      key: AugmentedQuery<ApiType, () => Observable<AccountId32>, []> & QueryableStorageEntry<ApiType, []>;
+      key: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
       /**
        * Generic query
        **/
@@ -540,7 +558,7 @@
       /**
        * Status of the inbound XCMP channels.
        **/
-      inboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, CumulusPalletXcmpQueueInboundStatus, Vec<ITuple<[u32, PolkadotParachainPrimitivesXcmpMessageFormat]>>]>>>, []> & QueryableStorageEntry<ApiType, []>;
+      inboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<CumulusPalletXcmpQueueInboundChannelDetails>>, []> & QueryableStorageEntry<ApiType, []>;
       /**
        * The messages outbound in a given XCMP channel.
        **/
@@ -553,7 +571,19 @@
        * case of the need to send a high-priority signal message this block.
        * The bool is true if there is a signal message waiting to be sent.
        **/
-      outboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, CumulusPalletXcmpQueueOutboundStatus, bool, u16, u16]>>>, []> & QueryableStorageEntry<ApiType, []>;
+      outboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<CumulusPalletXcmpQueueOutboundChannelDetails>>, []> & QueryableStorageEntry<ApiType, []>;
+      /**
+       * The messages that exceeded max individual message weight budget.
+       * 
+       * These message stay in this storage map until they are manually dispatched via
+       * `service_overweight`.
+       **/
+      overweight: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u32, u32, Bytes]>>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
+      /**
+       * The number of overweight messages ever recorded in `Overweight`. Also doubles as the next
+       * available free overweight index.
+       **/
+      overweightCount: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
       /**
        * The configuration which controls the dynamics of the outbound queue.
        **/
modifiedtests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-api-tx.ts
+++ b/tests/src/interfaces/augment-api-tx.ts
@@ -1,14 +1,13 @@
 // Auto-generated via `yarn polkadot-types-from-chain`, do not edit
 /* eslint-disable */
 
-import type { EthereumTransactionLegacyTransaction } from './ethereum';
 import type { CumulusPrimitivesParachainInherentParachainInherentData } from './polkadot';
-import type { PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCreateItemData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion } from './unique';
+import type { PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCreateCollectionData, UpDataStructsCreateItemData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion } from './unique';
 import type { ApiTypes, SubmittableExtrinsic } from '@polkadot/api/types';
 import type { Bytes, Compact, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types';
 import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
 import type { AccountId32, Call, H160, H256, MultiAddress, Perbill } from '@polkadot/types/interfaces/runtime';
-import type { SpCoreChangesTrieChangesTrieConfiguration, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
+import type { XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
 import type { AnyNumber, ITuple } from '@polkadot/types/types';
 
 declare module '@polkadot/api/types/submittable' {
@@ -33,28 +32,17 @@
        * Set the balances of a given account.
        * 
        * This will alter `FreeBalance` and `ReservedBalance` in storage. it will
-       * also decrease the total issuance of the system (`TotalIssuance`).
+       * also alter the total issuance of the system (`TotalIssuance`) appropriately.
        * If the new free or reserved balance is below the existential deposit,
        * it will reset the account nonce (`frame_system::AccountNonce`).
        * 
        * The dispatch origin for this call is `root`.
-       * 
-       * # <weight>
-       * - Independent of the arguments.
-       * - Contains a limited number of reads and writes.
-       * ---------------------
-       * - Base Weight:
-       * - Creating: 27.56 µs
-       * - Killing: 35.11 µs
-       * - DB Weight: 1 Read, 1 Write to `who`
-       * # </weight>
        **/
       setBalance: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, newFree: Compact<u128> | AnyNumber | Uint8Array, newReserved: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Compact<u128>, Compact<u128>]>;
       /**
        * Transfer some liquid free balance to another account.
        * 
        * `transfer` will set the `FreeBalance` of the sender and receiver.
-       * It will decrease the total issuance of the system by the `TransferFee`.
        * If the sender's account is below the existential deposit as a result
        * of the transfer, the account will be reaped.
        * 
@@ -75,8 +63,6 @@
        * - `transfer_keep_alive` works the same way as `transfer`, but has an additional check
        * that the transfer will not kill the origin account.
        * ---------------------------------
-       * - Base Weight: 73.64 µs, worst case scenario (account created, account removed)
-       * - DB Weight: 1 Read and 1 Write to destination account
        * - Origin account is already in memory, so no DB operations for them.
        * # </weight>
        **/
@@ -108,11 +94,6 @@
        * 99% of the time you want [`transfer`] instead.
        * 
        * [`transfer`]: struct.Pallet.html#method.transfer
-       * # <weight>
-       * - Cheaper than transfer because account cannot be killed.
-       * - Base Weight: 51.4 µs
-       * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already)
-       * #</weight>
        **/
       transferKeepAlive: AugmentedSubmittable<(dest: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Compact<u128>]>;
       /**
@@ -157,7 +138,7 @@
       /**
        * Transact an Ethereum transaction.
        **/
-      transact: AugmentedSubmittable<(transaction: EthereumTransactionLegacyTransaction | { nonce?: any; gasPrice?: any; gasLimit?: any; action?: any; value?: any; input?: any; signature?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [EthereumTransactionLegacyTransaction]>;
+      transact: AugmentedSubmittable<(transaction: EthereumTransactionTransactionV2 | { Legacy: any } | { EIP2930: any } | { EIP1559: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [EthereumTransactionTransactionV2]>;
       /**
        * Generic tx
        **/
@@ -167,16 +148,16 @@
       /**
        * Issue an EVM call operation. This is similar to a message call transaction in Ethereum.
        **/
-      call: AugmentedSubmittable<(source: H160 | string | Uint8Array, target: H160 | string | Uint8Array, input: Bytes | string | Uint8Array, value: U256 | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, gasPrice: U256 | AnyNumber | Uint8Array, nonce: Option<U256> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160, H160, Bytes, U256, u64, U256, Option<U256>]>;
+      call: AugmentedSubmittable<(source: H160 | string | Uint8Array, target: H160 | string | Uint8Array, input: Bytes | string | Uint8Array, value: U256 | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, maxFeePerGas: U256 | AnyNumber | Uint8Array, maxPriorityFeePerGas: Option<U256> | null | object | string | Uint8Array, nonce: Option<U256> | null | object | string | Uint8Array, accessList: Vec<ITuple<[H160, Vec<H256>]>> | ([H160 | string | Uint8Array, Vec<H256> | (H256 | string | Uint8Array)[]])[]) => SubmittableExtrinsic<ApiType>, [H160, H160, Bytes, U256, u64, U256, Option<U256>, Option<U256>, Vec<ITuple<[H160, Vec<H256>]>>]>;
       /**
        * Issue an EVM create operation. This is similar to a contract creation transaction in
        * Ethereum.
        **/
-      create: AugmentedSubmittable<(source: H160 | string | Uint8Array, init: Bytes | string | Uint8Array, value: U256 | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, gasPrice: U256 | AnyNumber | Uint8Array, nonce: Option<U256> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160, Bytes, U256, u64, U256, Option<U256>]>;
+      create: AugmentedSubmittable<(source: H160 | string | Uint8Array, init: Bytes | string | Uint8Array, value: U256 | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, maxFeePerGas: U256 | AnyNumber | Uint8Array, maxPriorityFeePerGas: Option<U256> | null | object | string | Uint8Array, nonce: Option<U256> | null | object | string | Uint8Array, accessList: Vec<ITuple<[H160, Vec<H256>]>> | ([H160 | string | Uint8Array, Vec<H256> | (H256 | string | Uint8Array)[]])[]) => SubmittableExtrinsic<ApiType>, [H160, Bytes, U256, u64, U256, Option<U256>, Option<U256>, Vec<ITuple<[H160, Vec<H256>]>>]>;
       /**
        * Issue an EVM create2 operation.
        **/
-      create2: AugmentedSubmittable<(source: H160 | string | Uint8Array, init: Bytes | string | Uint8Array, salt: H256 | string | Uint8Array, value: U256 | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, gasPrice: U256 | AnyNumber | Uint8Array, nonce: Option<U256> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160, Bytes, H256, U256, u64, U256, Option<U256>]>;
+      create2: AugmentedSubmittable<(source: H160 | string | Uint8Array, init: Bytes | string | Uint8Array, salt: H256 | string | Uint8Array, value: U256 | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, maxFeePerGas: U256 | AnyNumber | Uint8Array, maxPriorityFeePerGas: Option<U256> | null | object | string | Uint8Array, nonce: Option<U256> | null | object | string | Uint8Array, accessList: Vec<ITuple<[H160, Vec<H256>]>> | ([H160 | string | Uint8Array, Vec<H256> | (H256 | string | Uint8Array)[]])[]) => SubmittableExtrinsic<ApiType>, [H160, Bytes, H256, U256, u64, U256, Option<U256>, Option<U256>, Vec<ITuple<[H160, Vec<H256>]>>]>;
       /**
        * Withdraw balance from EVM into currency/balances pallet.
        **/
@@ -197,6 +178,20 @@
     };
     inflation: {
       /**
+       * This method sets the inflation start date. Can be only called once.
+       * Inflation start block can be backdated and will catch up. The method will create Treasury
+       * account if it does not exist and perform the first inflation deposit.
+       * 
+       * # Permissions
+       * 
+       * * Root
+       * 
+       * # Arguments
+       * 
+       * * inflation_start_relay_block: The relay chain block at which inflation should start
+       **/
+      startInflation: AugmentedSubmittable<(inflationStartRelayBlock: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
+      /**
        * Generic tx
        **/
       [key: string]: SubmittableExtrinsicFunction<ApiType>;
@@ -300,8 +295,8 @@
        * an `AccountId32` value.
        * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the
        * `dest` side. May not be empty.
-       * - `dest_weight`: Equal to the total weight on `dest` of the XCM message
-       * `Teleport { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`.
+       * - `fee_asset_item`: The index into `assets` of the item which should be used to pay
+       * fees.
        * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
        **/
       limitedTeleportAssets: AugmentedSubmittable<(dest: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, beneficiary: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, assets: XcmVersionedMultiAssets | { V0: any } | { V1: any } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array, weightLimit: XcmV2WeightLimit | { Unlimited: any } | { Limited: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedMultiLocation, XcmVersionedMultiLocation, XcmVersionedMultiAssets, u32, XcmV2WeightLimit]>;
@@ -339,8 +334,8 @@
        * an `AccountId32` value.
        * - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the
        * `dest` side. May not be empty.
-       * - `dest_weight`: Equal to the total weight on `dest` of the XCM message
-       * `Teleport { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`.
+       * - `fee_asset_item`: The index into `assets` of the item which should be used to pay
+       * fees.
        **/
       teleportAssets: AugmentedSubmittable<(dest: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, beneficiary: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, assets: XcmVersionedMultiAssets | { V0: any } | { V1: any } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedMultiLocation, XcmVersionedMultiLocation, XcmVersionedMultiAssets, u32]>;
       /**
@@ -374,7 +369,7 @@
        * - Weight of derivative `call` execution + 10,000.
        * # </weight>
        **/
-       sudo: AugmentedSubmittable<(call: Call) => SubmittableExtrinsic<ApiType>, [Call]>;
+      sudo: AugmentedSubmittable<(call: Call | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call]>;
       /**
        * Authenticates the sudo key and dispatches a function call with `Signed` origin from
        * a given account.
@@ -388,7 +383,7 @@
        * - Weight of derivative `call` execution + 10,000.
        * # </weight>
        **/
-      sudoAs: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, ) => SubmittableExtrinsic<ApiType>, [MultiAddress, Call]>;
+      sudoAs: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, call: Call | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Call]>;
       /**
        * Authenticates the sudo key and dispatches a function call with `Root` origin.
        * This function does not check the weight of the call, and instead allows the
@@ -401,7 +396,7 @@
        * - The weight of this call is defined by the caller.
        * # </weight>
        **/
-       sudoUncheckedWeight: AugmentedSubmittable<(call: Call, weight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, u64]>;
+      sudoUncheckedWeight: AugmentedSubmittable<(call: Call | string | Uint8Array, weight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, u64]>;
       /**
        * Generic tx
        **/
@@ -417,24 +412,10 @@
        * 
        * **NOTE:** We rely on the Root origin to provide us the number of subkeys under
        * the prefix we are removing to accurately calculate the weight of this function.
-       * 
-       * # <weight>
-       * - `O(P)` where `P` amount of keys with prefix `prefix`
-       * - `P` storage deletions.
-       * - Base Weight: 0.834 * P µs
-       * - Writes: Number of subkeys + 1
-       * # </weight>
        **/
       killPrefix: AugmentedSubmittable<(prefix: Bytes | string | Uint8Array, subkeys: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, u32]>;
       /**
        * Kill some items from storage.
-       * 
-       * # <weight>
-       * - `O(IK)` where `I` length of `keys` and `K` length of one key
-       * - `I` storage deletions.
-       * - Base Weight: .378 * i µs
-       * - Writes: Number of items
-       * # </weight>
        **/
       killStorage: AugmentedSubmittable<(keys: Vec<Bytes> | (Bytes | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Bytes>]>;
       /**
@@ -455,19 +436,6 @@
        **/
       remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
       /**
-       * Set the new changes trie configuration.
-       * 
-       * # <weight>
-       * - `O(1)`
-       * - 1 storage write or delete (codec `O(1)`).
-       * - 1 call to `deposit_log`: Uses `append` API, so O(1)
-       * - Base Weight: 7.218 µs
-       * - DB Weight:
-       * - Writes: Changes Trie, System Digest
-       * # </weight>
-       **/
-      setChangesTrieConfig: AugmentedSubmittable<(changesTrieConfig: Option<SpCoreChangesTrieChangesTrieConfiguration> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<SpCoreChangesTrieChangesTrieConfiguration>]>;
-      /**
        * Set the new runtime code.
        * 
        * # <weight>
@@ -496,25 +464,10 @@
       setCodeWithoutChecks: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
       /**
        * Set the number of pages in the WebAssembly environment's heap.
-       * 
-       * # <weight>
-       * - `O(1)`
-       * - 1 storage write.
-       * - Base Weight: 1.405 µs
-       * - 1 write to HEAP_PAGES
-       * - 1 digest item
-       * # </weight>
        **/
       setHeapPages: AugmentedSubmittable<(pages: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
       /**
        * Set some items of storage.
-       * 
-       * # <weight>
-       * - `O(I)` where `I` length of `items`
-       * - `I` storage writes (`O(1)`).
-       * - Base Weight: 0.568 * i µs
-       * - Writes: Number of items
-       * # </weight>
        **/
       setStorage: AugmentedSubmittable<(items: Vec<ITuple<[Bytes, Bytes]>> | ([Bytes | string | Uint8Array, Bytes | string | Uint8Array])[]) => SubmittableExtrinsic<ApiType>, [Vec<ITuple<[Bytes, Bytes]>>]>;
       /**
@@ -718,6 +671,12 @@
        **/
       createCollection: AugmentedSubmittable<(collectionName: Vec<u16> | (u16 | AnyNumber | Uint8Array)[], collectionDescription: Vec<u16> | (u16 | AnyNumber | Uint8Array)[], tokenPrefix: Bytes | string | Uint8Array, mode: UpDataStructsCollectionMode | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<u16>, Vec<u16>, Bytes, UpDataStructsCollectionMode]>;
       /**
+       * This method creates a collection
+       * 
+       * Prefer it to deprecated [`created_collection`] method
+       **/
+      createCollectionEx: AugmentedSubmittable<(data: UpDataStructsCreateCollectionData | { mode?: any; access?: any; name?: any; description?: any; tokenPrefix?: any; offchainSchema?: any; schemaVersion?: any; pendingSponsor?: any; limits?: any; variableOnChainSchema?: any; constOnChainSchema?: any; metaUpdatePermission?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [UpDataStructsCreateCollectionData]>;
+      /**
        * This method creates a concrete instance of NFT Collection created with CreateCollection method.
        * 
        * # Permissions
@@ -1026,6 +985,22 @@
     };
     xcmpQueue: {
       /**
+       * Services a single overweight XCM.
+       * 
+       * - `origin`: Must pass `ExecuteOverweightOrigin`.
+       * - `index`: The index of the overweight XCM to service
+       * - `weight_limit`: The amount of weight that XCM execution may take.
+       * 
+       * Errors:
+       * - `BadOverweightIndex`: XCM under `index` is not found in the `Overweight` storage map.
+       * - `BadXcm`: XCM under `index` cannot be properly decoded into a valid XCM format.
+       * - `WeightOverLimit`: XCM execution may use greater `weight_limit`.
+       * 
+       * Events:
+       * - `OverweightServiced`: On success.
+       **/
+      serviceOverweight: AugmentedSubmittable<(index: u64 | AnyNumber | Uint8Array, weightLimit: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64, u64]>;
+      /**
        * Generic tx
        **/
       [key: string]: SubmittableExtrinsicFunction<ApiType>;
modifiedtests/src/interfaces/augment-types.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-types.ts
+++ b/tests/src/interfaces/augment-types.ts
@@ -3,7 +3,7 @@
 
 import type { EthereumBlock, EthereumLog, EthereumReceipt, EthereumTransactionLegacyTransaction, EvmCoreErrorExitReason, FpRpcTransactionStatus } from './ethereum';
 import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundStatus, CumulusPalletXcmpQueueOutboundStatus, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData } from './polkadot';
-import type { PalletCommonAccountBasicCrossAccountIdRepr, PalletNonfungibleItemData, PalletRefungibleItemData, PalletUnqSchedulerCallSpec, PalletUnqSchedulerReleases, PalletUnqSchedulerScheduledV2, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionId, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateItemData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, UpDataStructsSponsorshipState, UpDataStructsTokenId } from './unique';
+import type { PalletCommonAccountBasicCrossAccountIdRepr, PalletNonfungibleItemData, PalletRefungibleItemData, PalletUnqSchedulerCallSpec, PalletUnqSchedulerReleases, PalletUnqSchedulerScheduledV2, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionId, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateItemData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, UpDataStructsSponsorshipState, UpDataStructsTokenId } from './unique';
 import type { BitVec, Bool, Bytes, Data, I128, I16, I256, I32, I64, I8, Json, Null, Raw, StorageKey, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types';
 import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';
 import type { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/types/interfaces/attestations';
@@ -1021,6 +1021,7 @@
     UpDataStructsCollectionLimits: UpDataStructsCollectionLimits;
     UpDataStructsCollectionMode: UpDataStructsCollectionMode;
     UpDataStructsCollectionStats: UpDataStructsCollectionStats;
+    UpDataStructsCreateCollectionData: UpDataStructsCreateCollectionData;
     UpDataStructsCreateItemData: UpDataStructsCreateItemData;
     UpDataStructsMetaUpdatePermission: UpDataStructsMetaUpdatePermission;
     UpDataStructsSchemaVersion: UpDataStructsSchemaVersion;
modifiedtests/src/interfaces/unique/definitions.tsdiffbeforeafterboth
--- a/tests/src/interfaces/unique/definitions.ts
+++ b/tests/src/interfaces/unique/definitions.ts
@@ -67,6 +67,20 @@
       constOnChainSchema: 'Vec<u8>',
       metaUpdatePermission: 'UpDataStructsMetaUpdatePermission',
     },
+    UpDataStructsCreateCollectionData: {
+      mode: 'UpDataStructsCollectionMode',
+      access: 'Option<UpDataStructsAccessMode>',
+      name: 'Vec<u16>',
+      description: 'Vec<u16>',
+      tokenPrefix: 'Vec<u8>',
+      offchainSchema: 'Vec<u8>',
+      schemaVersion: 'Option<UpDataStructsSchemaVersion>',
+      pendingSponsor: 'Option<AccountId>',
+      limits: 'Option<UpDataStructsCollectionLimits>',
+      variableOnChainSchema: 'Vec<u8>',
+      constOnChainSchema: 'Vec<u8>',
+      metaUpdatePermission: 'Option<UpDataStructsMetaUpdatePermission>',
+    },
     UpDataStructsCollectionStats: {
       created: 'u32',
       destroyed: 'u32',
@@ -76,7 +90,13 @@
     UpDataStructsTokenId: 'u32',
     PalletNonfungibleItemData: mkDummy('NftItemData'),
     PalletRefungibleItemData: mkDummy('RftItemData'),
-    UpDataStructsCollectionMode: mkDummy('CollectionMode'),
+    UpDataStructsCollectionMode: {
+      _enum: {
+        NFT: null,
+        Fungible: 'u32',
+        ReFungible: null,
+      },
+    },
     UpDataStructsCreateItemData: mkDummy('CreateItemData'),
     UpDataStructsCollectionLimits: {
       accountTokenOwnershipLimit: 'Option<u32>',
@@ -101,7 +121,9 @@
     UpDataStructsAccessMode: {
       _enum: ['Normal', 'AllowList'],
     },
-    UpDataStructsSchemaVersion: mkDummy('SchemaVersion'),
+    UpDataStructsSchemaVersion: {
+      _enum: ['ImageURL', 'Unique'],
+    },
 
     PalletUnqSchedulerScheduledV2: mkDummy('ScheduledV2'),
     PalletUnqSchedulerCallSpec: mkDummy('CallSpec'),
modifiedtests/src/interfaces/unique/types.tsdiffbeforeafterboth
--- a/tests/src/interfaces/unique/types.ts
+++ b/tests/src/interfaces/unique/types.ts
@@ -77,8 +77,11 @@
 }
 
 /** @name UpDataStructsCollectionMode */
-export interface UpDataStructsCollectionMode extends Struct {
-  readonly dummyCollectionMode: u32;
+export interface UpDataStructsCollectionMode extends Enum {
+  readonly isNft: boolean;
+  readonly isFungible: boolean;
+  readonly asFungible: u32;
+  readonly isReFungible: boolean;
 }
 
 /** @name UpDataStructsCollectionStats */
@@ -88,6 +91,22 @@
   readonly alive: u32;
 }
 
+/** @name UpDataStructsCreateCollectionData */
+export interface UpDataStructsCreateCollectionData extends Struct {
+  readonly mode: UpDataStructsCollectionMode;
+  readonly access: Option<UpDataStructsAccessMode>;
+  readonly name: Vec<u16>;
+  readonly description: Vec<u16>;
+  readonly tokenPrefix: Bytes;
+  readonly offchainSchema: Bytes;
+  readonly schemaVersion: Option<UpDataStructsSchemaVersion>;
+  readonly pendingSponsor: Option<AccountId>;
+  readonly limits: Option<UpDataStructsCollectionLimits>;
+  readonly variableOnChainSchema: Bytes;
+  readonly constOnChainSchema: Bytes;
+  readonly metaUpdatePermission: Option<UpDataStructsMetaUpdatePermission>;
+}
+
 /** @name UpDataStructsCreateItemData */
 export interface UpDataStructsCreateItemData extends Struct {
   readonly dummyCreateItemData: u32;
@@ -101,8 +120,9 @@
 }
 
 /** @name UpDataStructsSchemaVersion */
-export interface UpDataStructsSchemaVersion extends Struct {
-  readonly dummySchemaVersion: u32;
+export interface UpDataStructsSchemaVersion extends Enum {
+  readonly isImageUrl: boolean;
+  readonly isUnique: boolean;
 }
 
 /** @name UpDataStructsSponsorshipState */
modifiedtests/src/substrate/substrate-api.tsdiffbeforeafterboth
--- a/tests/src/substrate/substrate-api.ts
+++ b/tests/src/substrate/substrate-api.ts
@@ -95,6 +95,32 @@
   return TransactionStatus.Fail;
 }
 
+export function executeTransaction(api: ApiPromise, sender: IKeyringPair, transaction: SubmittableExtrinsic<'promise'>): Promise<EventRecord[]> {
+  return new Promise(async (res, rej) => {
+    try {
+      await transaction.signAndSend(sender, ({events, status}) => {
+        if (!status.isInBlock && !status.isFinalized) return;
+        for (const {event} of events) {
+          if (api.events.system.ExtrinsicSuccess.is(event)) {
+            res(events);
+          } else if (api.events.system.ExtrinsicFailed.is(event)) {
+            const {data: [error]} = event;
+            if (error.isModule) {
+              const decoded = api.registry.findMetaError(error.asModule);
+              const {method, section} = decoded;
+              rej(new Error(`${section}.${method}`));
+            } else {
+              rej(new Error(error.toString()));
+            }
+          }
+        }
+      });
+    } catch (e) {
+      rej(e);
+    }
+  });
+}
+
 export function
 submitTransactionAsync(sender: IKeyringPair, transaction: SubmittableExtrinsic<ApiTypes>): Promise<EventRecord[]> {
   /* eslint no-async-promise-executor: "off" */
modifiedtests/src/util/helpers.tsdiffbeforeafterboth
--- a/tests/src/util/helpers.ts
+++ b/tests/src/util/helpers.ts
@@ -49,7 +49,7 @@
     };
   } else if ('Substrate' in input) {
     return input;
-  }else if ('substrate' in input) {
+  } else if ('substrate' in input) {
     return {
       Substrate: (input as any).substrate,
     };
@@ -116,15 +116,15 @@
 
 export interface IChainLimits {
   collectionNumbersLimit: number;
-	accountTokenOwnershipLimit: number;
-	collectionsAdminsLimit: number;
-	customDataLimit: number;
-	nftSponsorTransferTimeout: number;
-	fungibleSponsorTransferTimeout: number;
-	refungibleSponsorTransferTimeout: number;
-	offchainSchemaLimit: number;
-	variableOnChainSchemaLimit: number;
-	constOnChainSchemaLimit: number;
+  accountTokenOwnershipLimit: number;
+  collectionsAdminsLimit: number;
+  customDataLimit: number;
+  nftSponsorTransferTimeout: number;
+  fungibleSponsorTransferTimeout: number;
+  refungibleSponsorTransferTimeout: number;
+  offchainSchemaLimit: number;
+  variableOnChainSchemaLimit: number;
+  constOnChainSchemaLimit: number;
 }
 
 export interface IReFungibleTokenDataType {
@@ -283,7 +283,7 @@
       modeprm = {refungible: null};
     }
 
-    const tx = api.tx.unique.createCollection(strToUTF16(name), strToUTF16(description), strToUTF16(tokenPrefix), modeprm as any);
+    const tx = api.tx.unique.createCollectionEx({name: strToUTF16(name), description: strToUTF16(description), tokenPrefix: strToUTF16(tokenPrefix), mode: modeprm as any});
     const events = await submitTransactionAsync(alicePrivateKey, tx);
     const result = getCreateCollectionResult(events);
 
@@ -329,7 +329,7 @@
 
     // Run the CreateCollection transaction
     const alicePrivateKey = privateKey('//Alice');
-    const tx = api.tx.unique.createCollection(strToUTF16(name), strToUTF16(description), strToUTF16(tokenPrefix), modeprm as any);
+    const tx = api.tx.unique.createCollectionEx({name: strToUTF16(name), description: strToUTF16(description), tokenPrefix: strToUTF16(tokenPrefix), mode: modeprm as any});
     const events = await expect(submitTransactionExpectFailAsync(alicePrivateKey, tx)).to.be.rejected;
     const result = getCreateCollectionResult(events);
 
@@ -557,7 +557,7 @@
 
   await usingApi(async (api) => {
 
-    const tx = api.tx.unique.setTransfersEnabledFlag (collectionId, enabled);
+    const tx = api.tx.unique.setTransfersEnabledFlag(collectionId, enabled);
     const events = await submitTransactionAsync(sender, tx);
     const result = getGenericResult(events);
 
@@ -569,7 +569,7 @@
 
   await usingApi(async (api) => {
 
-    const tx = api.tx.unique.setTransfersEnabledFlag (collectionId, enabled);
+    const tx = api.tx.unique.setTransfersEnabledFlag(collectionId, enabled);
     const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;
     const result = getGenericResult(events);
 
@@ -811,8 +811,7 @@
 }
 
 export async function
-getFreeBalance(account: IKeyringPair) : Promise<bigint>
-{
+getFreeBalance(account: IKeyringPair): Promise<bigint> {
   let balance = 0n;
   await usingApi(async (api) => {
     balance = BigInt((await api.query.system.account(account.address)).data.free.toString());
addedtests/src/xcmTransfer.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/xcmTransfer.test.ts
@@ -0,0 +1,178 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+
+import {WsProvider} from '@polkadot/api';
+import {ApiOptions} from '@polkadot/api/types';
+import {IKeyringPair} from '@polkadot/types/types';
+import privateKey from './substrate/privateKey';
+import usingApi, {submitTransactionAsync} from './substrate/substrate-api';
+import {getGenericResult} from './util/helpers';
+import waitNewBlocks from './substrate/wait-new-blocks';
+import getBalance from './substrate/get-balance';
+import {alicesPublicKey} from './accounts';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+
+const UNIQUE_CHAIN = 1000;
+const KARURA_CHAIN = 2000;
+const KARURA_PORT = '9946';
+
+describe('Integration test: Exchanging OPL with Karura', () => {
+  let alice: IKeyringPair;
+  
+  before(async () => {
+    await usingApi(async () => {
+      alice = privateKey('//Alice');
+    });
+
+    const karuraApiOptions: ApiOptions = {
+      provider: new WsProvider('ws://127.0.0.1:' + KARURA_PORT),
+    };
+
+    await usingApi(async (api) => {
+      const destination = {
+        V0: {
+          X2: [
+            'Parent',
+            {
+              Parachain: UNIQUE_CHAIN,
+            },
+          ],
+        },
+      };
+
+      const metadata =
+      {
+        name: 'OPL',
+        symbol: 'OPL',
+        decimals: 18,
+        minimalBalance: 1,
+      };
+
+      const tx = api.tx.assetRegistry.registerForeignAsset(destination, metadata);
+      const sudoTx = api.tx.sudo.sudo(tx as any);
+      const events = await submitTransactionAsync(alice, sudoTx);
+      const result = getGenericResult(events);
+      expect(result.success).to.be.true;
+    }, karuraApiOptions);
+  });
+
+  it('Should connect and send OPL to Karura', async () => {
+    let balanceOnKaruraBefore: bigint;
+    
+    await usingApi(async (api) => {
+      const {free} = (await api.query.tokens.accounts(alice.addressRaw, {ForeignAsset: 0})).toJSON() as any;
+      balanceOnKaruraBefore = free;
+    }, {provider: new WsProvider('ws://127.0.0.1:' + KARURA_PORT)});
+
+    await usingApi(async (api) => {
+      const destination = {
+        V0: {
+          X2: [
+            'Parent',
+            {
+              Parachain: KARURA_CHAIN,
+            },
+          ],
+        },
+      };
+
+      const beneficiary = {
+        V0: {
+          X1: {
+            AccountId32: {
+              network: 'Any',
+              id: alice.addressRaw,
+            },
+          },
+        },
+      };
+
+      const assets = {
+        V1: [
+          {
+            id: {
+              Concrete: {
+                parents: 0,
+                interior: 'Here',
+              },
+            },
+            fun: {
+              Fungible: 5000000000,
+            },
+          },
+        ],
+      };
+
+      const feeAssetItem = 0;
+
+      const weightLimit = {
+        Limited: 5000000000,
+      };
+
+      const tx = api.tx.polkadotXcm.limitedReserveTransferAssets(destination, beneficiary, assets, feeAssetItem, weightLimit);
+      const events = await submitTransactionAsync(alice, tx);
+      const result = getGenericResult(events);
+      expect(result.success).to.be.true;
+    });
+
+    await usingApi(async (api) => {
+      // todo do something about instant sealing, where there might not be any new blocks
+      await waitNewBlocks(api, 3);
+      const {free} = (await api.query.tokens.accounts(alice.addressRaw, {ForeignAsset: 0})).toJSON() as any;
+      expect(free > balanceOnKaruraBefore).to.be.true;
+    }, {provider: new WsProvider('ws://127.0.0.1:' + KARURA_PORT)});
+  });
+
+  it('Should connect to Karura and send OPL back', async () => {
+    let balanceBefore: bigint;
+    
+    await usingApi(async (api) => {
+      [balanceBefore] = await getBalance(api, [alicesPublicKey]);
+    });
+
+    await usingApi(async (api) => {
+      const destination = {
+        V0: {
+          X3: [
+            'Parent',
+            {
+              Parachain: UNIQUE_CHAIN,
+            },
+            {
+              AccountId32: {
+                network: 'Any',
+                id: alice.addressRaw,
+              },
+            },
+          ],
+        },
+      };
+
+      const id = {
+        ForeignAsset: 0,
+      };
+
+      const amount = 5000000000;
+      const destWeight = 50000000;
+
+      const tx = api.tx.xTokens.transfer(id, amount, destination, destWeight);
+      const events = await submitTransactionAsync(alice, tx);
+      const result = getGenericResult(events);
+      expect(result.success).to.be.true;
+    }, {provider: new WsProvider('ws://127.0.0.1:' + KARURA_PORT)});
+
+    await usingApi(async (api) => {
+      // todo do something about instant sealing, where there might not be any new blocks
+      await waitNewBlocks(api, 3);
+      const [balanceAfter] = await getBalance(api, [alicesPublicKey]);
+      expect(balanceAfter > balanceBefore).to.be.true;
+    });
+  });
+});
\ No newline at end of file