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

difftreelog

Merge remote-tracking branch 'origin/develop' into feature/NFTPAR-366_upstream_updates

Yaroslav Bolyukin2021-05-04parents: #1f943ae #b8ab366.patch.diff
in: master

27 files changed

modified.github/workflows/node_build_test.ymldiffbeforeafterboth
--- a/.github/workflows/node_build_test.yml
+++ b/.github/workflows/node_build_test.yml
@@ -31,14 +31,14 @@
           username: ${{ secrets.SERVER_USERNAME }}
           key: ${{ secrets.KEY }}
           port: ${{ secrets.SERVER_PORT }}
-          # command_timeout: 200m
+          command_timeout: 240m
           script: |
             eval $(ssh-agent -s)
-            ssh-add /home/devops/.ssh/git_hub
+            ssh-add /home/polkadot/.ssh/git_hub
             git clone git@github.com:usetech-llc/nft_private.git
             cd nft_private
             git checkout develop
             # git pull --all
             chmod +x ci_node.sh
             ./ci_node.sh
-            rm -rf /home/polkadot/nft_private
\ No newline at end of file
+            rm -rf /home/polkadot/nft_private
modifiedCargo.lockdiffbeforeafterboth
before · Cargo.lock
777 packageslockfile v3
after · Cargo.lock
811 packageslockfile v3
modifiedDockerfile-testsdiffbeforeafterboth
--- a/Dockerfile-tests
+++ b/Dockerfile-tests
@@ -20,11 +20,14 @@
       [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
       nvm install v15.0.1 && \
       nvm use v15.0.1 && \
-      npm install --save @polkadot/api
+      npm install --save @polkadot/api && \ 
+      npm install --save-dev mochawesome
 
 CMD export NVM_DIR="$HOME/.nvm" && \
     [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
     cd tests && \
-    npm install --global yarn && \
+    npm install --global yarn && \ 
+    yarn add mochawesome && \
     yarn install && \
-    yarn test
+    yarn test --reporter mochawesome
+   # yarn test
modifiedci_node.shdiffbeforeafterboth
--- a/ci_node.sh
+++ b/ci_node.sh
@@ -1,10 +1,12 @@
 #!/bin/bash
 
-docker-compose -f docker-compose-tests.yml up -d --build --force-recreate --no-deps
+#docker-compose -f docker-compose-tests.yml up -d --build --force-recreate --no-deps
+
+docker-compose -f docker-compose-tests.yml up -d --build
 
 # validate if testing container finished
-while [ "$(docker ps | grep unit_test | wc -l)" -ge 1 ]; do echo "Unit test in process" && date && sleep 60; done && docker logs unit_test &> /home/polkadot/unit_test.log  & \
-while [ "$(docker ps | grep integration_test | wc -l)" -ge 1 ]; do echo "Integration test in process" && sleep 60; done && docker logs integration_test &> /home/polkadot/integration_test.log
+while [ "$(docker ps | grep unit_test | wc -l)" -ge 1 ]; do echo "Unit tests in process" && sleep 600; done && docker logs unit_test &> /home/polkadot/report-log/unit_test.log  & \
+while [ "$(docker ps | grep integration_test | wc -l)" -ge 1 ]; do echo "Integration tests in process" && sleep 600; done && docker logs integration_test &> /home/polkadot/report-log/integration_test.log
 docker-compose -f docker-compose-tests.yml down -v
-echo "Wrokflow finished"
-docker system prune --force
\ No newline at end of file
+echo "Workflow finished"
+docker system prune --force
modifieddocker-compose-tests.ymldiffbeforeafterboth
--- a/docker-compose-tests.yml
+++ b/docker-compose-tests.yml
@@ -21,14 +21,16 @@
     build:
       context: ./
       dockerfile: Dockerfile-tests
-      volumes:
+    volumes:
       - ./tests/src/config_docker.ts:/nft_parachain/tests/src/config.ts
+      - /home/polkadot/mochawesome-report:/nft_parachain/tests/mochawesome-report
+  #  command: bash -c 'while true; do sleep 20; df -h; done'
     networks:
       - node_test_network
     depends_on:
       - node_validator1
 
-   unit_tests:
+  unit_tests:
     container_name: unit_test
     image: nft_unit_test
     build:
@@ -43,4 +45,4 @@
 networks:
   node_test_network:
     name: node_test_network
-    driver: bridge
\ No newline at end of file
+    driver: bridge
addedpallets/inflation/Cargo.tomldiffbeforeafterboth
--- /dev/null
+++ b/pallets/inflation/Cargo.toml
@@ -0,0 +1,48 @@
+[package]
+authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
+description = 'Unqiue pallet inflation'
+edition = '2018'
+homepage = 'https://substrate.io'
+license = 'Unlicense'
+name = 'pallet-inflation'
+repository = 'https://github.com/usetech-llc/nft_private/'
+version = '3.0.0'
+
+[package.metadata.docs.rs]
+targets = ['x86_64-unknown-linux-gnu']
+
+# alias "parity-scale-code" to "codec"
+[dependencies.codec]
+default-features = false
+features = ['derive']
+package = 'parity-scale-codec'
+version = '2.0.0'
+
+[dependencies]
+serde = { version = "1.0.119" }
+frame-support = { default-features = false, version = '3.0.0' }
+frame-system = { default-features = false, version = '3.0.0' }
+pallet-balances = { default-features = false, version = '3.0.0' }
+pallet-timestamp = { default-features = false, version = '3.0.0' }
+pallet-randomness-collective-flip = { default-features = false, version = '3.0.0' }
+sp-std = { default-features = false, version = '3.0.0' }
+frame-benchmarking = { default-features = false, version = "3.0.0", optional = true }
+sp-core = { default-features = false, version = '3.0.0' }
+sp-io = { default-features = false, version = '3.0.0' }
+sp-runtime = { default-features = false, version = '3.0.0' }
+
+[features]
+default = ['std']
+std = [
+    'codec/std',
+    'serde/std',
+    'frame-support/std',
+    'frame-system/std',
+    'pallet-balances/std',
+    'pallet-timestamp/std',
+    'pallet-randomness-collective-flip/std',
+    'sp-std/std',
+    'sp-runtime/std',
+    'frame-benchmarking/std',
+]
+runtime-benchmarks = ["frame-benchmarking"]
addedpallets/inflation/src/benchmarking.rsdiffbeforeafterboth
--- /dev/null
+++ b/pallets/inflation/src/benchmarking.rs
@@ -0,0 +1,19 @@
+#![cfg(feature = "runtime-benchmarks")]
+
+use super::*;
+use crate::Module as Inflation;
+
+use sp_std::prelude::*;
+use frame_system::RawOrigin;
+use frame_benchmarking::{benchmarks}; 
+use frame_support::traits::OnInitialize;
+
+benchmarks! {
+
+	on_initialize {
+        let block1: T::BlockNumber = T::BlockNumber::from(1u32);
+        let block2: T::BlockNumber = T::BlockNumber::from(2u32);
+        Inflation::<T>::on_initialize(block1); // Create Treasury account
+	}: { Inflation::<T>::on_initialize(block2); } // Benchmark deposit_into_existing path
+
+}
addedpallets/inflation/src/lib.rsdiffbeforeafterboth
--- /dev/null
+++ b/pallets/inflation/src/lib.rs
@@ -0,0 +1,130 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
+#![recursion_limit = "1024"]
+
+#![cfg_attr(not(feature = "std"), no_std)]
+
+#[cfg(feature = "std")]
+pub use std::*;
+
+#[cfg(feature = "std")]
+pub use serde::*;
+
+#[cfg(feature = "runtime-benchmarks")]
+mod benchmarking;
+
+#[cfg(test)]
+mod tests;
+
+pub use frame_support::{
+	construct_runtime, decl_module, decl_storage,
+	ensure,
+	traits::{
+		Currency, ExistenceRequirement, Get, Imbalance, KeyOwnerProofSystem, OnUnbalanced,
+		Randomness, IsSubType, WithdrawReasons,
+	},
+	weights::{
+		constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
+		DispatchInfo, GetDispatchInfo, IdentityFee, Pays, PostDispatchInfo, Weight,
+		WeightToFeePolynomial, DispatchClass,
+	},
+	StorageValue,
+	transactional,
+};
+
+// #[cfg(feature = "runtime-benchmarks")]
+pub use frame_support::dispatch::DispatchResult;
+
+use sp_runtime::{
+	Perbill,
+	traits::{Zero}
+};
+use sp_std::convert::TryInto;
+
+use frame_system::{self as system};
+
+/// The balance type of this module.
+pub type BalanceOf<T> =
+	<<T as Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance;
+
+pub const YEAR: u32 = 5_259_600;
+pub const TOTAL_YEARS_UNTIL_FLAT: u32 = 9;
+pub const START_INFLATION_PERCENT: u32 = 10;
+pub const END_INFLATION_PERCENT: u32 = 4;
+
+pub trait Config: system::Config {
+	type Currency: Currency<Self::AccountId>;
+	type TreasuryAccountId: Get<Self::AccountId>;
+	type InflationBlockInterval: Get<Self::BlockNumber>;
+}
+
+decl_storage! {
+	trait Store for Module<T: Config> as Inflation {
+		/// starting year total issuance
+		pub StartingYearTotalIssuance get(fn starting_year_total_issuance): BalanceOf<T>;
+
+		/// Current block inflation
+		pub BlockInflation get(fn block_inflation): BalanceOf<T>;
+	}
+}
+
+decl_module! {
+	pub struct Module<T: Config> for enum Call 
+	where 
+		origin: T::Origin,
+	{
+		const InflationBlockInterval: T::BlockNumber = T::InflationBlockInterval::get();
+
+		fn on_initialize(now: T::BlockNumber) -> Weight 
+		{
+			let mut consumed_weight = 0;
+			let mut add_weight = |reads, writes, weight| {
+				consumed_weight += T::DbWeight::get().reads_writes(reads, writes);
+				consumed_weight += weight;
+			};
+
+			let block_interval: u32 = T::InflationBlockInterval::get().try_into().unwrap_or(0);
+
+			// Recalculate inflation on the first block of the year (or if it is not initialized yet)
+			if (now % T::BlockNumber::from(YEAR)).is_zero() || <BlockInflation<T>>::get().is_zero() {
+				let current_year: u32 = (now / T::BlockNumber::from(YEAR)).try_into().unwrap_or(0);
+
+				let one_percent = Perbill::from_percent(1);
+
+				if current_year <= TOTAL_YEARS_UNTIL_FLAT {
+					let amount: BalanceOf<T> = Perbill::from_rational_approximation(
+						block_interval * (START_INFLATION_PERCENT * TOTAL_YEARS_UNTIL_FLAT - current_year * (START_INFLATION_PERCENT - END_INFLATION_PERCENT)), 
+						YEAR * TOTAL_YEARS_UNTIL_FLAT
+					) * ( one_percent * T::Currency::total_issuance() );
+					<BlockInflation<T>>::put(amount);
+				}
+				else {
+					let amount: BalanceOf<T> = Perbill::from_rational_approximation(
+						block_interval * END_INFLATION_PERCENT, 
+						YEAR
+					) * (one_percent * T::Currency::total_issuance());
+					<BlockInflation<T>>::put(amount);
+				}
+				<StartingYearTotalIssuance<T>>::set(T::Currency::total_issuance());
+
+				// First time deposit
+				T::Currency::deposit_creating(&T::TreasuryAccountId::get(), <BlockInflation<T>>::get());
+
+				add_weight(7, 6, 28_300_000);
+			}
+
+			// Apply inflation every InflationBlockInterval blocks and in the 1st block to initialize Treasury account
+			else if (now % T::BlockNumber::from(block_interval)).is_zero() {
+				T::Currency::deposit_into_existing(&T::TreasuryAccountId::get(), <BlockInflation<T>>::get()).ok();
+
+				add_weight(3, 2, 12_900_000);
+			}
+
+			consumed_weight
+		}
+
+	}
+}
addedpallets/inflation/src/tests.rsdiffbeforeafterboth
--- /dev/null
+++ b/pallets/inflation/src/tests.rs
@@ -0,0 +1,241 @@
+#[cfg(test)]
+mod tests {
+	use crate as pallet_inflation;
+
+	use frame_system;
+	use frame_support::{traits::{Currency}, parameter_types};
+	use frame_support::{traits::OnInitialize};
+	use sp_core::H256;
+	use sp_runtime::{traits::{BlakeTwo256, IdentityLookup}, testing::Header};
+
+	type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
+	type Block = frame_system::mocking::MockBlock<Test>;
+
+	const YEAR: u64 = 5_259_600;
+
+	parameter_types! {
+		pub const ExistentialDeposit: u64 = 1;
+		pub const MaxLocks: u32 = 50;
+	}
+	
+	impl pallet_balances::Config for Test {
+		type AccountStore = System;
+		type Balance = u64;
+		type DustRemoval = ();
+		type Event = ();
+		type ExistentialDeposit = ExistentialDeposit;
+		type WeightInfo = ();
+		type MaxLocks = MaxLocks;
+	}
+	
+	frame_support::construct_runtime!(
+		pub enum Test where
+			Block = Block,
+			NodeBlock = Block,
+			UncheckedExtrinsic = UncheckedExtrinsic,
+		{
+			Balances: pallet_balances::{Module, Call, Storage},
+			System: frame_system::{Module, Call, Config, Storage, Event<T>},
+			Inflation: pallet_inflation::{Module, Call, Storage},
+		}
+	);
+
+	parameter_types! {
+		pub const BlockHashCount: u64 = 250;
+		pub BlockWeights: frame_system::limits::BlockWeights =
+			frame_system::limits::BlockWeights::simple_max(1024);
+		pub const SS58Prefix: u8 = 42;
+	}
+
+	impl frame_system::Config for Test {
+		type BaseCallFilter = ();
+		type BlockWeights = ();
+		type BlockLength = ();
+		type DbWeight = ();
+		type Origin = Origin;
+		type Call = Call;
+		type Index = u64;
+		type BlockNumber = u64;
+		type Hash = H256;
+		type Hashing = BlakeTwo256;
+		type AccountId = u64;
+		type Lookup = IdentityLookup<Self::AccountId>;
+		type Header = Header;
+		type Event = ();
+		type BlockHashCount = BlockHashCount;
+		type Version = ();
+		type PalletInfo = PalletInfo;
+		type AccountData = pallet_balances::AccountData<u64>;
+		type OnNewAccount = ();
+		type OnKilledAccount = ();
+		type SystemWeightInfo = ();
+		type SS58Prefix = SS58Prefix;
+	}
+
+	parameter_types! {
+		pub TreasuryAccountId: u64 = 1234;
+		pub const InflationBlockInterval: u32 = 100; // every time per how many blocks inflation is applied
+	}
+		
+	impl pallet_inflation::Config for Test {
+		type Currency = Balances;
+		type TreasuryAccountId = TreasuryAccountId;
+		type InflationBlockInterval = InflationBlockInterval;
+	}
+
+	// Build genesis storage according to the mock runtime.
+	pub fn new_test_ext() -> sp_io::TestExternalities {
+		frame_system::GenesisConfig::default().build_storage::<Test>().unwrap().into()
+	}
+
+	#[test]
+	fn inflation_works() {
+		new_test_ext().execute_with(|| {
+			// Total issuance = 1_000_000_000
+			let initial_issuance: u64 = 1_000_000_000;
+			let _ = <Balances as Currency<_>>::deposit_creating(&1234, initial_issuance);
+			assert_eq!(Balances::free_balance(1234), initial_issuance);
+
+			// BlockInflation should be set after 1st block and 
+			// first inflation deposit should be equal to BlockInflation
+			Inflation::on_initialize(1);
+			assert!(Inflation::block_inflation() > 0);
+			assert_eq!(Balances::free_balance(1234) - initial_issuance, Inflation::block_inflation());
+		});
+	}
+
+	#[test]
+	fn inflation_second_deposit() {
+		new_test_ext().execute_with(|| {
+			// Total issuance = 1_000_000_000
+			let initial_issuance: u64 = 1_000_000_000;
+			let _ = <Balances as Currency<_>>::deposit_creating(&1234, initial_issuance);
+			assert_eq!(Balances::free_balance(1234), initial_issuance);
+			Inflation::on_initialize(1);
+
+			// Next inflation deposit happens when block is multiple of InflationBlockInterval
+			let mut block: u32 = 2;
+			let balance_before: u64 = Balances::free_balance(1234);
+			while block % InflationBlockInterval::get() != 0 {
+				Inflation::on_initialize(block as u64);
+				block += 1;
+			}
+			let balance_just_before: u64 = Balances::free_balance(1234);
+			assert_eq!(balance_before, balance_just_before);
+
+			// The block with inflation
+			Inflation::on_initialize(block as u64);
+			let balance_after: u64 = Balances::free_balance(1234);
+			assert_eq!(balance_after - balance_just_before, Inflation::block_inflation());
+		});
+	}
+
+	#[test]
+	fn inflation_in_1_year() {
+		new_test_ext().execute_with(|| {
+			// Total issuance = 1_000_000_000
+			let initial_issuance: u64 = 1_000_000_000;
+			let _ = <Balances as Currency<_>>::deposit_creating(&1234, initial_issuance);
+			assert_eq!(Balances::free_balance(1234), initial_issuance);
+			Inflation::on_initialize(1);
+			let block_inflation_year_0 = Inflation::block_inflation();
+
+			Inflation::on_initialize(YEAR);
+			let block_inflation_year_1 = Inflation::block_inflation();
+
+			// Assert that year 1 inflation is less than year 0
+			assert!(block_inflation_year_0 > block_inflation_year_1);
+		});
+	}
+
+	#[test]
+	fn inflation_in_1_to_9_years() {
+		new_test_ext().execute_with(|| {
+			// Total issuance = 1_000_000_000
+			let initial_issuance: u64 = 1_000_000_000;
+			let _ = <Balances as Currency<_>>::deposit_creating(&1234, initial_issuance);
+			assert_eq!(Balances::free_balance(1234), initial_issuance);
+			Inflation::on_initialize(1);
+
+			for year in 1..=9 {
+				let block_inflation_year_before = Inflation::block_inflation();
+				Inflation::on_initialize(YEAR * year);
+				let block_inflation_year_after = Inflation::block_inflation();
+
+				// Assert that next year inflation is less than previous year inflation
+				assert!(block_inflation_year_before > block_inflation_year_after);
+			}
+
+		});
+	}
+
+	#[test]
+	fn inflation_after_year_10_is_flat() {
+		new_test_ext().execute_with(|| {
+			// Total issuance = 1_000_000_000
+			let initial_issuance: u64 = 1_000_000_000;
+			let _ = <Balances as Currency<_>>::deposit_creating(&1234, initial_issuance);
+			assert_eq!(Balances::free_balance(1234), initial_issuance);
+			Inflation::on_initialize(YEAR * 9);
+
+			for year in 10..=20 {
+				let block_inflation_year_before = Inflation::block_inflation();
+				Inflation::on_initialize(YEAR * year);
+				let block_inflation_year_after = Inflation::block_inflation();
+
+				// Assert that next year inflation is equal to previous year inflation
+				assert_eq!(block_inflation_year_before, block_inflation_year_after);
+			}
+		});
+	}
+
+	#[test]
+	fn inflation_rate_by_year() {
+		new_test_ext().execute_with(|| {
+			let payouts: u64 = YEAR / InflationBlockInterval::get() as u64;
+
+			// Inflation starts at 10% and does down by 2/3% every year until year 9 (included), 
+			// then it is flat.
+			let payout_by_year: [u64; 11] = [
+				1000,
+				933,
+				867,
+				800,
+				733,
+				667,
+				600,
+				533,
+				467,
+				400,
+				400
+			];
+
+			// For accuracy total issuance = payout0 * payouts * 10;
+			let initial_issuance: u64 = payout_by_year[0] * payouts * 10;
+			let _ = <Balances as Currency<_>>::deposit_creating(&1234, initial_issuance);
+			assert_eq!(Balances::free_balance(1234), initial_issuance);
+
+			for year in 0..=10 {
+				// Year first block
+				Inflation::on_initialize(year*YEAR);
+				let mut actual_payout = Inflation::block_inflation();
+				assert_eq!(actual_payout, payout_by_year[year as usize]);
+
+				// Year second block
+				Inflation::on_initialize(year*YEAR+1);
+				actual_payout = Inflation::block_inflation();
+				assert_eq!(actual_payout, payout_by_year[year as usize]);
+
+				// Year middle block
+				Inflation::on_initialize(year*YEAR + YEAR/2);
+				actual_payout = Inflation::block_inflation();
+				assert_eq!(actual_payout, payout_by_year[year as usize]);
+
+				// Year last block
+				Inflation::on_initialize((year + 1)*YEAR-1);
+				actual_payout = Inflation::block_inflation();
+				assert_eq!(actual_payout, payout_by_year[year as usize]);
+			}
+		});
+	}
+}
modifiedpallets/nft/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/nft/src/benchmarking.rs
+++ b/pallets/nft/src/benchmarking.rs
@@ -1,420 +1,419 @@
-#[cfg(feature = "runtime-benchmarks")]
-// mod benchmarking {
-    use super::*;
-    use sp_std::prelude::*;
-    use frame_system::RawOrigin;
-    // use frame_support::{ensure, traits::OnFinalize};
-    use frame_benchmarking::{benchmarks, account, whitelisted_caller};  // , TrackedStorageKey, 
-    use crate::Module as Nft;
+#![cfg(feature = "runtime-benchmarks")]
 
-    const SEED: u32 = 1;
+use super::*;
+use crate::Module as Nft;
 
-    fn default_nft_data() -> CreateItemData {
-        CreateItemData::NFT(CreateNftData { const_data: vec![1, 2, 3], variable_data: vec![3, 2, 1] })
-    }
-    
-    fn default_fungible_data () -> CreateItemData {
-        CreateItemData::Fungible(CreateFungibleData { })
-    }
-    
-    fn default_re_fungible_data () -> CreateItemData {
-        CreateItemData::ReFungible(CreateReFungibleData { const_data: vec![1, 2, 3], variable_data: vec![3, 2, 1] })
-    }
+use sp_std::prelude::*;
+use frame_system::RawOrigin;
+use frame_benchmarking::{benchmarks, account, whitelisted_caller};  // , TrackedStorageKey, 
 
+const SEED: u32 = 1;
+/*
+fn default_nft_data() -> CreateItemData {
+    CreateItemData::NFT(CreateNftData { const_data: vec![1, 2, 3], variable_data: vec![3, 2, 1] })
+}
 
-    benchmarks! {
+fn default_fungible_data () -> CreateItemData {
+    CreateItemData::Fungible(CreateFungibleData { })
+}
 
-        _ {}
+fn default_re_fungible_data () -> CreateItemData {
+    CreateItemData::ReFungible(CreateReFungibleData { const_data: vec![1, 2, 3], variable_data: vec![3, 2, 1] })
+}
+*/
 
-        create_collection {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = account("caller", 0, SEED);
-        }: create_collection(RawOrigin::Signed(caller.clone()), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode)
-        verify {
-			assert_eq!(Nft::<T>::collection(2).owner, caller);
-        }
+benchmarks! {
 
-        destroy_collection {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-        }: destroy_collection(RawOrigin::Signed(caller.clone()), 2)
+    create_collection {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = account("caller", 0, SEED);
+    }: _(RawOrigin::Signed(caller.clone()), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode)
+/*
+    verify {
+        assert_eq!(Nft::<T>::collection_id(2).owner, caller);
+    }
+    destroy_collection {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+    }: _(RawOrigin::Signed(caller.clone()), 2)
 
-        add_to_white_list {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            let whitelist_account: T::AccountId = account("admin", 0, SEED);
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-        }: add_to_white_list(RawOrigin::Signed(caller.clone()), 2, whitelist_account)
+    add_to_white_list {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        let whitelist_account: T::AccountId = account("admin", 0, SEED);
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+    }: add_to_white_list(RawOrigin::Signed(caller.clone()), 2, whitelist_account)
 
-        remove_from_white_list {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            let whitelist_account: T::AccountId = account("admin", 0, SEED);
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            Nft::<T>::add_to_white_list(RawOrigin::Signed(caller.clone()).into(), 2, whitelist_account.clone())?;
-        }: remove_from_white_list(RawOrigin::Signed(caller.clone()), 2, whitelist_account)
+    remove_from_white_list {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        let whitelist_account: T::AccountId = account("admin", 0, SEED);
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        Nft::<T>::add_to_white_list(RawOrigin::Signed(caller.clone()).into(), 2, whitelist_account.clone())?;
+    }: remove_from_white_list(RawOrigin::Signed(caller.clone()), 2, whitelist_account)
 
-        set_public_access_mode {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-        }: set_public_access_mode(RawOrigin::Signed(caller.clone()), 2, AccessMode::WhiteList)
+    set_public_access_mode {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+    }: set_public_access_mode(RawOrigin::Signed(caller.clone()), 2, AccessMode::WhiteList)
 
-        set_mint_permission {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-        }: set_mint_permission(RawOrigin::Signed(caller.clone()), 2, true)
+    set_mint_permission {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+    }: set_mint_permission(RawOrigin::Signed(caller.clone()), 2, true)
 
-        change_collection_owner {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            let new_owner: T::AccountId = account("admin", 0, SEED);
-        }: change_collection_owner(RawOrigin::Signed(caller.clone()), 2, new_owner)
+    change_collection_owner {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        let new_owner: T::AccountId = account("admin", 0, SEED);
+    }: change_collection_owner(RawOrigin::Signed(caller.clone()), 2, new_owner)
 
-        add_collection_admin {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            let new_admin: T::AccountId = account("admin", 0, SEED);
-        }: add_collection_admin(RawOrigin::Signed(caller.clone()), 2, new_admin)
+    add_collection_admin {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        let new_admin: T::AccountId = account("admin", 0, SEED);
+    }: add_collection_admin(RawOrigin::Signed(caller.clone()), 2, new_admin)
 
-        remove_collection_admin {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            let new_admin: T::AccountId = account("admin", 0, SEED);
-            Nft::<T>::add_collection_admin(RawOrigin::Signed(caller.clone()).into(), 2, new_admin.clone())?;
-        }: remove_collection_admin(RawOrigin::Signed(caller.clone()), 2, new_admin)
+    remove_collection_admin {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        let new_admin: T::AccountId = account("admin", 0, SEED);
+        Nft::<T>::add_collection_admin(RawOrigin::Signed(caller.clone()).into(), 2, new_admin.clone())?;
+    }: remove_collection_admin(RawOrigin::Signed(caller.clone()), 2, new_admin)
 
-        set_collection_sponsor {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-        }: set_collection_sponsor(RawOrigin::Signed(caller.clone()), 2, caller.clone())
+    set_collection_sponsor {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+    }: set_collection_sponsor(RawOrigin::Signed(caller.clone()), 2, caller.clone())
 
-        confirm_sponsorship {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            Nft::<T>::set_collection_sponsor(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone())?;
-        }: confirm_sponsorship(RawOrigin::Signed(caller.clone()), 2)
+    confirm_sponsorship {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        Nft::<T>::set_collection_sponsor(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone())?;
+    }: confirm_sponsorship(RawOrigin::Signed(caller.clone()), 2)
 
-        remove_collection_sponsor {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            Nft::<T>::set_collection_sponsor(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone())?;
-            Nft::<T>::confirm_sponsorship(RawOrigin::Signed(caller.clone()).into(), 2)?;
-        }: remove_collection_sponsor(RawOrigin::Signed(caller.clone()), 2)
+    remove_collection_sponsor {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        Nft::<T>::set_collection_sponsor(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone())?;
+        Nft::<T>::confirm_sponsorship(RawOrigin::Signed(caller.clone()).into(), 2)?;
+    }: remove_collection_sponsor(RawOrigin::Signed(caller.clone()), 2)
 
-        // nft item
-        create_item_nft {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            let data = default_nft_data();
-            
-        }: create_item(RawOrigin::Signed(caller.clone()), 2, caller.clone(), data)
+    // nft item
+    create_item_nft {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        let data = default_nft_data();
+        
+    }: create_item(RawOrigin::Signed(caller.clone()), 2, caller.clone(), data)
 
-        #[extra]
-        create_item_nft_large {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            let mut nft_data = CreateNftData {
-                const_data: vec![],
-                variable_data: vec![]
-            };
-            for i in 0..1998 {
-                nft_data.const_data.push(10);
-                nft_data.variable_data.push(10);
-            }
-            let data = CreateItemData::NFT(nft_data);
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+    #[extra]
+    create_item_nft_large {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        let mut nft_data = CreateNftData {
+            const_data: vec![],
+            variable_data: vec![]
+        };
+        for i in 0..1998 {
+            nft_data.const_data.push(10);
+            nft_data.variable_data.push(10);
+        }
+        let data = CreateItemData::NFT(nft_data);
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
 
-        }: create_item(RawOrigin::Signed(caller.clone()), 2, caller.clone(), data)
+    }: create_item(RawOrigin::Signed(caller.clone()), 2, caller.clone(), data)
 
-        // fungible item
-        create_item_fungible {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::Fungible(3);
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            let data = default_fungible_data();
+    // fungible item
+    create_item_fungible {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::Fungible(3);
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        let data = default_fungible_data();
 
-        }: create_item(RawOrigin::Signed(caller.clone()), 2, caller.clone(), data)
+    }: create_item(RawOrigin::Signed(caller.clone()), 2, caller.clone(), data)
 
-        // refungible item
-        create_item_refungible {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::ReFungible(3);
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            let data = default_re_fungible_data();
+    // refungible item
+    create_item_refungible {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::ReFungible(3);
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        let data = default_re_fungible_data();
 
-        }: create_item(RawOrigin::Signed(caller.clone()), 2, caller.clone(), data)
+    }: create_item(RawOrigin::Signed(caller.clone()), 2, caller.clone(), data)
 
-        burn_item {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            let data = default_nft_data();
-            Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
+    burn_item {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        let data = default_nft_data();
+        Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
 
-        }: burn_item(RawOrigin::Signed(caller.clone()), 2, 1)
+    }: burn_item(RawOrigin::Signed(caller.clone()), 2, 1)
 
-        transfer_nft {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let recipient: T::AccountId = account("recipient", 0, SEED);
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            let data = default_nft_data();
-            Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
+    transfer_nft {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let recipient: T::AccountId = account("recipient", 0, SEED);
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        let data = default_nft_data();
+        Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
 
-        }: transfer(RawOrigin::Signed(caller.clone()), recipient.clone(), 2, 1, 1)
-        
-        transfer_fungible {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::Fungible(3);
-            let recipient: T::AccountId = account("recipient", 0, SEED);
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            let data = default_fungible_data();
-            Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
+    }: transfer(RawOrigin::Signed(caller.clone()), recipient.clone(), 2, 1, 1)
+    
+    transfer_fungible {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::Fungible(3);
+        let recipient: T::AccountId = account("recipient", 0, SEED);
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        let data = default_fungible_data();
+        Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
 
-        }: transfer(RawOrigin::Signed(caller.clone()), recipient.clone(), 2, 1, 1)
+    }: transfer(RawOrigin::Signed(caller.clone()), recipient.clone(), 2, 1, 1)
 
-        transfer_refungible {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::ReFungible(3);
-            let recipient: T::AccountId = account("recipient", 0, SEED);
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            let data = default_re_fungible_data();
-            Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
+    transfer_refungible {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::ReFungible(3);
+        let recipient: T::AccountId = account("recipient", 0, SEED);
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        let data = default_re_fungible_data();
+        Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
 
-        }: transfer(RawOrigin::Signed(caller.clone()), recipient.clone(), 2, 1, 1)
+    }: transfer(RawOrigin::Signed(caller.clone()), recipient.clone(), 2, 1, 1)
 
-        approve {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::ReFungible(3);
-            let recipient: T::AccountId = account("recipient", 0, SEED);
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            let data = default_re_fungible_data();
-            Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
+    approve {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::ReFungible(3);
+        let recipient: T::AccountId = account("recipient", 0, SEED);
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        let data = default_re_fungible_data();
+        Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
 
-        }: approve(RawOrigin::Signed(caller.clone()), recipient.clone(), 2, 1)
+    }: approve(RawOrigin::Signed(caller.clone()), recipient.clone(), 2, 1)
 
-        // Nft
-        transfer_from_nft {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let recipient: T::AccountId = account("recipient", 0, SEED);
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            let data = default_nft_data();
-            Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
-            Nft::<T>::approve(RawOrigin::Signed(caller.clone()).into(), recipient.clone(), 2, 1)?;
+    // Nft
+    transfer_from_nft {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let recipient: T::AccountId = account("recipient", 0, SEED);
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        let data = default_nft_data();
+        Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
+        Nft::<T>::approve(RawOrigin::Signed(caller.clone()).into(), recipient.clone(), 2, 1)?;
 
-        }: transfer_from(RawOrigin::Signed(caller.clone()), caller.clone(), recipient.clone(), 2, 1, 1)
+    }: transfer_from(RawOrigin::Signed(caller.clone()), caller.clone(), recipient.clone(), 2, 1, 1)
 
-        // Fungible
-        transfer_from_fungible {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::Fungible(3);
-            let recipient: T::AccountId = account("recipient", 0, SEED);
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            let data = default_fungible_data();
-            Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
-            Nft::<T>::approve(RawOrigin::Signed(caller.clone()).into(), recipient.clone(), 2, 1)?;
+    // Fungible
+    transfer_from_fungible {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::Fungible(3);
+        let recipient: T::AccountId = account("recipient", 0, SEED);
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        let data = default_fungible_data();
+        Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
+        Nft::<T>::approve(RawOrigin::Signed(caller.clone()).into(), recipient.clone(), 2, 1)?;
 
-        }: transfer_from(RawOrigin::Signed(caller.clone()), caller.clone(), recipient.clone(), 2, 1, 1)
+    }: transfer_from(RawOrigin::Signed(caller.clone()), caller.clone(), recipient.clone(), 2, 1, 1)
 
-        // ReFungible
-        transfer_from_refungible {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::ReFungible(3);
-            let recipient: T::AccountId = account("recipient", 0, SEED);
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            let data = default_re_fungible_data();
-            Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
-            Nft::<T>::approve(RawOrigin::Signed(caller.clone()).into(), recipient.clone(), 2, 1)?;
+    // ReFungible
+    transfer_from_refungible {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::ReFungible(3);
+        let recipient: T::AccountId = account("recipient", 0, SEED);
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        let data = default_re_fungible_data();
+        Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
+        Nft::<T>::approve(RawOrigin::Signed(caller.clone()).into(), recipient.clone(), 2, 1)?;
 
-        }: transfer_from(RawOrigin::Signed(caller.clone()), caller.clone(), recipient.clone(), 2, 1, 1)
+    }: transfer_from(RawOrigin::Signed(caller.clone()), caller.clone(), recipient.clone(), 2, 1, 1)
 
-        enable_contract_sponsoring {
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+    enable_contract_sponsoring {
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
 
-        }: enable_contract_sponsoring(RawOrigin::Signed(caller.clone()), caller.clone(), true)
+    }: enable_contract_sponsoring(RawOrigin::Signed(caller.clone()), caller.clone(), true)
 
-        set_offchain_schema {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::ReFungible(3);
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+    set_offchain_schema {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::ReFungible(3);
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
 
-        }: set_offchain_schema(RawOrigin::Signed(caller.clone()), 2, [1,2,3].to_vec())
+    }: set_offchain_schema(RawOrigin::Signed(caller.clone()), 2, [1,2,3].to_vec())
 
-        set_const_on_chain_schema {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::ReFungible(3);
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-        }: set_const_on_chain_schema(RawOrigin::Signed(caller.clone()), 2, [1,2,3].to_vec())
-        
-        set_variable_on_chain_schema {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::ReFungible(3);
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-        }: set_variable_on_chain_schema(RawOrigin::Signed(caller.clone()), 2, [1,2,3].to_vec())
+    set_const_on_chain_schema {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::ReFungible(3);
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+    }: set_const_on_chain_schema(RawOrigin::Signed(caller.clone()), 2, [1,2,3].to_vec())
+    
+    set_variable_on_chain_schema {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::ReFungible(3);
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+    }: set_variable_on_chain_schema(RawOrigin::Signed(caller.clone()), 2, [1,2,3].to_vec())
 
-        set_variable_meta_data {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            let data = default_nft_data();
-            Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
+    set_variable_meta_data {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        let data = default_nft_data();
+        Nft::<T>::create_item(RawOrigin::Signed(caller.clone()).into(), 2, caller.clone(), data)?;
 
-        }: set_variable_meta_data(RawOrigin::Signed(caller.clone()), 2, 1, [1, 2, 3].to_vec())
+    }: set_variable_meta_data(RawOrigin::Signed(caller.clone()), 2, 1, [1, 2, 3].to_vec())
 
-        set_schema_version {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-        }: set_schema_version(RawOrigin::Signed(caller.clone()), 2, SchemaVersion::Unique)
+    set_schema_version {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+    }: set_schema_version(RawOrigin::Signed(caller.clone()), 2, SchemaVersion::Unique)
 
-        set_chain_limits {
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            let limits = ChainLimits { 
-                collection_numbers_limit: 0,
-                account_token_ownership_limit: 0,
-                collections_admins_limit: 0,
-                custom_data_limit: 0,
-                nft_sponsor_transfer_timeout: 0,
-                fungible_sponsor_transfer_timeout: 0,
-                refungible_sponsor_transfer_timeout: 0
-            };
-        }: set_chain_limits(RawOrigin::Signed(caller.clone()), limits)
+    set_chain_limits {
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        let limits = ChainLimits { 
+            collection_numbers_limit: 0,
+            account_token_ownership_limit: 0,
+            collections_admins_limit: 0,
+            custom_data_limit: 0,
+            nft_sponsor_transfer_timeout: 0,
+            fungible_sponsor_transfer_timeout: 0,
+            refungible_sponsor_transfer_timeout: 0
+        };
+    }: set_chain_limits(RawOrigin::Signed(caller.clone()), limits)
 
-        set_contract_sponsoring_rate_limit {
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-            let block_number: T::BlockNumber = 0.into();   
-        }: set_contract_sponsoring_rate_limit(RawOrigin::Signed(caller.clone()), caller.clone(), block_number)
+    set_contract_sponsoring_rate_limit {
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+        let block_number: T::BlockNumber = 0.into();   
+    }: set_contract_sponsoring_rate_limit(RawOrigin::Signed(caller.clone()), caller.clone(), block_number)
 
-        set_collection_limits{
-            let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
-            let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
-            let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
-            let mode: CollectionMode = CollectionMode::NFT;
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
-     
-            let cl = CollectionLimits {
-                account_token_ownership_limit: 0,
-                sponsored_data_size: 0,
-                token_limit: 0,
-                sponsor_transfer_timeout: 0
-            };
+    set_collection_limits{
+        let col_name1: Vec<u16> = "Test1".encode_utf16().collect::<Vec<u16>>();
+        let col_desc1: Vec<u16> = "TestDescription1".encode_utf16().collect::<Vec<u16>>();
+        let token_prefix1: Vec<u8> = b"token_prefix1".to_vec();
+        let mode: CollectionMode = CollectionMode::NFT;
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::create_collection(RawOrigin::Signed(caller.clone()).into(), col_name1.clone(), col_desc1.clone(), token_prefix1.clone(), mode.clone())?;
+    
+        let cl = CollectionLimits {
+            account_token_ownership_limit: 0,
+            sponsored_data_size: 0,
+            token_limit: 0,
+            sponsor_transfer_timeout: 0
+        };
 
-        }: set_collection_limits(RawOrigin::Signed(caller.clone()), 2, cl)
+    }: set_collection_limits(RawOrigin::Signed(caller.clone()), 2, cl)
 
-        add_to_contract_white_list{
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-        }: add_to_contract_white_list(RawOrigin::Signed(caller.clone()), caller.clone(), caller.clone())
+    add_to_contract_white_list{
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+    }: add_to_contract_white_list(RawOrigin::Signed(caller.clone()), caller.clone(), caller.clone())
 
-        remove_from_contract_white_list{
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-            Nft::<T>::add_to_contract_white_list(RawOrigin::Signed(caller.clone()).into(), caller.clone(), caller.clone())?;
-        }: remove_from_contract_white_list(RawOrigin::Signed(caller.clone()), caller.clone(), caller.clone())
+    remove_from_contract_white_list{
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+        Nft::<T>::add_to_contract_white_list(RawOrigin::Signed(caller.clone()).into(), caller.clone(), caller.clone())?;
+    }: remove_from_contract_white_list(RawOrigin::Signed(caller.clone()), caller.clone(), caller.clone())
 
-        toggle_contract_white_list{
-            let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
-        }: toggle_contract_white_list(RawOrigin::Signed(caller.clone()), caller.clone(), true)
-}
\ No newline at end of file
+    toggle_contract_white_list{
+        let caller: T::AccountId = T::AccountId::from(whitelisted_caller());
+    }: toggle_contract_white_list(RawOrigin::Signed(caller.clone()), caller.clone(), true)
+*/
+}
modifiedruntime/Cargo.tomldiffbeforeafterboth
--- a/runtime/Cargo.toml
+++ b/runtime/Cargo.toml
@@ -26,6 +26,7 @@
 
 # local dependencies
 pallet-nft = { path = '../pallets/nft', default-features = false, version = '3.0.0' }
+pallet-inflation = { path = '../pallets/inflation', default-features = false, version = '3.0.0' }
 
 # Substrate dependencies
 frame-benchmarking = { default-features = false, optional = true, version = '3.0.0', git = "https://github.com/paritytech/substrate.git", branch = "frontier" }
@@ -75,6 +76,7 @@
     'pallet-balances/runtime-benchmarks',
     'pallet-timestamp/runtime-benchmarks',
     'pallet-nft/runtime-benchmarks',
+    'pallet-inflation/runtime-benchmarks',
     'sp-runtime/runtime-benchmarks',
 ]
 std = [
@@ -100,6 +102,7 @@
     'pallet-evm/std',
     'pallet-ethereum/std',
 
+    'pallet-inflation/std',
     'pallet-nft/std',
     'fp-rpc/std',
     'sp-api/std',
modifiedruntime/src/lib.rsdiffbeforeafterboth
--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -576,7 +576,7 @@
 	pub const CollectionCreationPrice: Balance = 100 * UNIQUE;
 }
 
-/// Used for the module nft in `./nft.rs`
+/// Used for the pallet nft in `./nft.rs`
 impl pallet_nft::Config for Runtime {
 	type Event = Event;
 	type WeightInfo = nft_weights::WeightInfo;
@@ -594,6 +594,21 @@
 	type EthereumTransactionSender = pallet_ethereum::Module<Runtime>;
 }
 
+/// Reimport pallet inflation
+extern crate pallet_inflation;
+pub use pallet_inflation::*;
+
+parameter_types! {
+	pub const InflationBlockInterval: BlockNumber = 100; // every time per how many blocks inflation is applied
+}
+
+/// Used for the pallet inflation
+impl pallet_inflation::Config for Runtime {
+	type Currency = Balances;
+	type TreasuryAccountId = TreasuryAccountId;
+	type InflationBlockInterval = InflationBlockInterval;
+}
+
 construct_runtime!(
 	pub enum Runtime where
 		Block = Block,
@@ -611,6 +626,7 @@
 		Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
 		TransactionPayment: pallet_transaction_payment::{Module, Storage},
 		Sudo: pallet_sudo::{Module, Call, Config<T>, Storage, Event<T>},
+		Inflation: pallet_inflation::{Module, Call, Storage},
 		Nft: pallet_nft::{Module, Call, Config<T>, Storage, Event<T>},
 		Treasury: pallet_treasury::{Module, Call, Storage, Config, Event<T>},
 		Vesting: pallet_vesting::{Module, Call, Config<T>, Storage, Event<T>},
@@ -954,6 +970,7 @@
 			let params = (&config, &whitelist);
 
 			add_benchmark!(params, batches, pallet_nft, Nft);
+			add_benchmark!(params, batches, pallet_inflation, Inflation);
 
 			if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
 			Ok(batches)
modifiedtests/package.jsondiffbeforeafterboth
--- a/tests/package.json
+++ b/tests/package.json
@@ -21,6 +21,7 @@
     "test": "mocha --timeout 9999999 -r ts-node/register ./**/*.test.ts",
     "load": "mocha --timeout 9999999 -r ts-node/register ./**/*.load.ts",
     "loadTransfer": "ts-node src/transfer.nload.ts",
+    "testCollision": "mocha --timeout 9999999 -r ts-node/register ./src/collision-tests/*.test.ts", 
     "testAddCollectionAdmin": "mocha --timeout 9999999 -r ts-node/register ./**/addCollectionAdmin.test.ts",
     "testSetSchemaVersion": "mocha --timeout 9999999 -r ts-node/register ./**/setSchemaVersion.test.ts",
     "testSetVariableMetaData": "mocha --timeout 9999999 -r ts-node/register ./**/setVariableMetaData.test.ts",
@@ -49,7 +50,9 @@
     "testSetContractSponsoringRateLimit": "mocha --timeout 9999999 -r ts-node/register ./**/setContractSponsoringRateLimit.test.ts",
     "testSetOffchainSchema": "mocha --timeout 9999999 -r ts-node/register ./**/setOffchainSchema.test.ts",
     "testOverflow": "mocha --timeout 9999999 -r ts-node/register ./**/overflow.test.ts",
-    "testSetVariableMetadataSponsoringRateLimit": "mocha --timeout 9999999 -r ts-node/register ./**/setVariableMetadataSponsoringRateLimit.test.ts"
+    "testSetVariableMetadataSponsoringRateLimit": "mocha --timeout 9999999 -r ts-node/register ./**/setVariableMetadataSponsoringRateLimit.test.ts",
+    "testInflation": "mocha --timeout 9999999 -r ts-node/register ./**/inflation.test.ts",
+    "testPalletPresence": "mocha --timeout 9999999 -r ts-node/register ./**/pallet-presence.test.ts"
   },
   "author": "",
   "license": "SEE LICENSE IN ../LICENSE",
modifiedtests/src/check-event/createMultipleItemsEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/createMultipleItemsEvent.test.ts
+++ b/tests/src/check-event/createMultipleItemsEvent.test.ts
@@ -17,7 +17,7 @@
 
 describe('Create Multiple Items Event event ', () => {
   let Alice: IKeyringPair;
-  const checkSection = 'ItemCreated (x3)';
+  const checkSection = 'ItemCreated';
   const checkTreasury = 'Deposit';
   const checkSystem = 'ExtrinsicSuccess';
   before(async () => {
addedtests/src/collision-tests/admVsOwnerChanges.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/collision-tests/admVsOwnerChanges.test.ts
@@ -0,0 +1,55 @@
+import { IKeyringPair } from '@polkadot/types/types';
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+import { alicesPublicKey, bobsPublicKey } from '../accounts';
+import getBalance from '../substrate/get-balance';
+import privateKey from '../substrate/privateKey';
+import usingApi, { submitTransactionAsync } from '../substrate/substrate-api';
+import waitNewBlocks from '../substrate/wait-new-blocks';
+import {
+  createCollectionExpectSuccess,
+  createItemExpectSuccess,
+  setCollectionSponsorExpectSuccess,
+} from '../util/helpers';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+let Alice: IKeyringPair;
+let Bob: IKeyringPair;
+let Ferdie: IKeyringPair;
+
+before(async () => {
+  await usingApi(async () => {
+    Alice = privateKey('//Alice');
+    Bob = privateKey('//Bob');
+    Ferdie = privateKey('//Ferdie');
+  });
+});
+
+describe('Admin vs Owner changes token: ', () => {
+  // tslint:disable-next-line: max-line-length
+  it('The collection admin changes the owner of the token and in the same block the current owner transfers the token to another address ', async () => {
+    await usingApi(async (api) => {
+      const collectionId = await createCollectionExpectSuccess();
+      const changeAdminTxBob = api.tx.nft.addCollectionAdmin(collectionId, Bob.address);
+      await submitTransactionAsync(Alice, changeAdminTxBob);
+      const timeoutPromise = (timeout: number) => new Promise((resolve) => setTimeout(resolve, timeout));
+      const changeAdminTxFerdie = api.tx.nft.addCollectionAdmin(collectionId, Ferdie.address);
+      await submitTransactionAsync(Bob, changeAdminTxFerdie);
+      const itemId = await createItemExpectSuccess(Ferdie, collectionId, 'NFT');
+      //
+      const changeOwner = api.tx.nft.transferFrom(Ferdie.address, Bob.address, collectionId, itemId, 1);
+      const approve = api.tx.nft.approve(Bob.address, collectionId, itemId, 1);
+      const sendItem = api.tx.nft.transfer(Alice.address, collectionId, itemId, 1);
+      await Promise.all
+      ([
+        changeOwner.signAndSend(Alice),
+        approve.signAndSend(Bob),
+        sendItem.signAndSend(Ferdie),
+      ]);
+      const itemBefore: any = await api.query.nft.nftItemList(collectionId, itemId);
+      expect(itemBefore.Owner).not.to.be.eq(Bob.address);
+      await timeoutPromise(20000);
+    });
+  });
+});
addedtests/src/collision-tests/admVsOwnerData.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/collision-tests/admVsOwnerData.test.ts
@@ -0,0 +1,54 @@
+import { IKeyringPair } from '@polkadot/types/types';
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+import { alicesPublicKey, bobsPublicKey } from '../accounts';
+import getBalance from '../substrate/get-balance';
+import privateKey from '../substrate/privateKey';
+import usingApi, { submitTransactionAsync } from '../substrate/substrate-api';
+import waitNewBlocks from '../substrate/wait-new-blocks';
+import {
+  createCollectionExpectSuccess,
+  createItemExpectSuccess,
+  setCollectionSponsorExpectSuccess,
+} from '../util/helpers';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+let Alice: IKeyringPair;
+let Bob: IKeyringPair;
+let Ferdie: IKeyringPair;
+
+before(async () => {
+  await usingApi(async () => {
+    Alice = privateKey('//Alice');
+    Bob = privateKey('//Bob');
+    Ferdie = privateKey('//Ferdie');
+  });
+});
+
+describe('Admin vs Owner changes the data in the token: ', () => {
+  it('The collection admin changes the data in the token and in the same block the token owner also changes the data in it ', async () => {
+    await usingApi(async (api) => {
+      const AliceData = 1;
+      const BobData = 2;
+      const collectionId = await createCollectionExpectSuccess();
+      const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, Bob.address);
+      await submitTransactionAsync(Alice, changeAdminTx);
+      const timeoutPromise = (timeout: number) => new Promise((resolve) => setTimeout(resolve, timeout));
+      const itemId = await createItemExpectSuccess(Bob, collectionId, 'NFT');
+      //
+      // tslint:disable-next-line: max-line-length
+      const AliceTx = api.tx.nft.setVariableMetaData(collectionId, itemId, AliceData.toString());
+      // tslint:disable-next-line: max-line-length
+      const BobTx = api.tx.nft.setVariableMetaData(collectionId, itemId, BobData.toString());
+      await Promise.all
+      ([
+        AliceTx.signAndSend(Alice),
+        BobTx.signAndSend(Bob),
+      ]);
+      const item: any = await api.query.nft.nftItemList(collectionId, itemId);
+      expect(item.VariableData).not.to.be.eq(null); // Pseudo-random selection of one of two values
+      await timeoutPromise(20000);
+    });
+  });
+});
addedtests/src/collision-tests/admVsOwnerTake.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/collision-tests/admVsOwnerTake.test.ts
@@ -0,0 +1,54 @@
+import { IKeyringPair } from '@polkadot/types/types';
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+import { alicesPublicKey, bobsPublicKey } from '../accounts';
+import getBalance from '../substrate/get-balance';
+import privateKey from '../substrate/privateKey';
+import usingApi, { submitTransactionAsync } from '../substrate/substrate-api';
+import waitNewBlocks from '../substrate/wait-new-blocks';
+import {
+  createCollectionExpectSuccess,
+  createItemExpectSuccess,
+  setCollectionSponsorExpectSuccess,
+} from '../util/helpers';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+let Alice: IKeyringPair;
+let Bob: IKeyringPair;
+let Ferdie: IKeyringPair;
+
+before(async () => {
+  await usingApi(async () => {
+    Alice = privateKey('//Alice');
+    Bob = privateKey('//Bob');
+    Ferdie = privateKey('//Ferdie');
+  });
+});
+
+describe('Admin vs Owner take token: ', () => {
+  // tslint:disable-next-line: max-line-length
+  it('The collection admin burns the token and in the same block the token owner performs a transaction on it ', async () => {
+    await usingApi(async (api) => {
+      const collectionId = await createCollectionExpectSuccess();
+      const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, Bob.address);
+      await submitTransactionAsync(Alice, changeAdminTx);
+      const timeoutPromise = (timeout: number) => new Promise((resolve) => setTimeout(resolve, timeout));
+      const itemId = await createItemExpectSuccess(Bob, collectionId, 'NFT');
+      //
+      const sendItem = api.tx.nft.transfer(Ferdie.address, collectionId, itemId, 1);
+      const burnItem = api.tx.nft.burnItem(collectionId, itemId, 1);
+      await Promise.all
+      ([
+        sendItem.signAndSend(Bob),
+        burnItem.signAndSend(Alice),
+      ]);
+      await timeoutPromise(10000);
+      let itemBurn: boolean = false;
+      itemBurn = (await (api.query.nft.nftItemList(collectionId, itemId))).toJSON() as boolean;
+      // tslint:disable-next-line: no-unused-expression
+      expect(itemBurn).to.be.null;
+      await timeoutPromise(20000);
+    });
+  });
+});
addedtests/src/collision-tests/adminDestroyCollection.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/collision-tests/adminDestroyCollection.test.ts
@@ -0,0 +1,61 @@
+import { IKeyringPair } from '@polkadot/types/types';
+import BN from 'bn.js';
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+import privateKey from '../substrate/privateKey';
+import usingApi, { submitTransactionAsync, submitTransactionExpectFailAsync } from '../substrate/substrate-api';
+import {
+  createCollectionExpectSuccess,
+} from '../util/helpers';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+interface ITokenDataType {
+  Owner: number[];
+  ConstData: number[];
+  VariableData: number[];
+}
+let Alice: IKeyringPair;
+let Bob: IKeyringPair;
+let Ferdie: IKeyringPair;
+let Charlie: IKeyringPair;
+let Eve: IKeyringPair;
+let Dave: IKeyringPair;
+
+before(async () => {
+  await usingApi(async () => {
+    Alice = privateKey('//Alice');
+    Bob = privateKey('//Bob');
+    Ferdie = privateKey('//Ferdie');
+    Charlie = privateKey('//Charlie');
+    Eve = privateKey('//Eve');
+    Dave = privateKey('//Dave');
+  });
+});
+
+describe('Deleting a collection while add address to whitelist: ', () => {
+  // tslint:disable-next-line: max-line-length
+  it('Adding an address to the collection whitelist in a block by the admin, and deleting the collection by the owner ', async () => {
+    await usingApi(async (api) => {
+      const collectionId = await createCollectionExpectSuccess();
+      const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, Bob.address);
+      await submitTransactionAsync(Alice, changeAdminTx);
+      const timeoutPromise = (timeout: number) => new Promise((resolve) => setTimeout(resolve, timeout));
+      await timeoutPromise(10000);
+      //
+      const addWhitelistAdm = api.tx.nft.addToWhiteList(collectionId, Ferdie.address);
+      const destroyCollection = api.tx.nft.destroyCollection(collectionId);
+      await Promise.all
+      ([
+        addWhitelistAdm.signAndSend(Bob),
+        destroyCollection.signAndSend(Alice),
+      ]);
+      await timeoutPromise(10000);
+      let whiteList: boolean = false;
+      whiteList = (await api.query.nft.whiteList(collectionId, Ferdie.address)).toJSON() as boolean;
+      // tslint:disable-next-line: no-unused-expression
+      expect(whiteList).to.be.false;
+      await timeoutPromise(20000);
+    });
+  });
+});
addedtests/src/collision-tests/adminLimitsOff.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/collision-tests/adminLimitsOff.test.ts
@@ -0,0 +1,74 @@
+import { IKeyringPair } from '@polkadot/types/types';
+import BN from 'bn.js';
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+import privateKey from '../substrate/privateKey';
+import usingApi, { submitTransactionAsync, submitTransactionExpectFailAsync } from '../substrate/substrate-api';
+import {
+  createCollectionExpectSuccess,
+} from '../util/helpers';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+interface ITokenDataType {
+  Owner: number[];
+  ConstData: number[];
+  VariableData: number[];
+}
+let Alice: IKeyringPair;
+let Bob: IKeyringPair;
+let Ferdie: IKeyringPair;
+let Charlie: IKeyringPair;
+let Eve: IKeyringPair;
+let Dave: IKeyringPair;
+
+before(async () => {
+  await usingApi(async () => {
+    Alice = privateKey('//Alice');
+    Bob = privateKey('//Bob');
+    Ferdie = privateKey('//Ferdie');
+    Charlie = privateKey('//Charlie');
+    Eve = privateKey('//Eve');
+    Dave = privateKey('//Dave');
+  });
+});
+
+describe('Admin limit exceeded collection: ', () => {
+  // tslint:disable-next-line: max-line-length
+  it('In one block, the owner and admin add new admins to the collection more than the limit ', async () => {
+    await usingApi(async (api) => {
+      const collectionId = await createCollectionExpectSuccess();
+
+      const chainLimit = await api.query.nft.chainLimit() as unknown as { CollectionAdminsLimit: BN };
+      const chainAdminLimit = chainLimit.CollectionAdminsLimit.toNumber();
+      expect(chainAdminLimit).to.be.equal(5);
+
+      const changeAdminTx1 = api.tx.nft.addCollectionAdmin(collectionId, Eve.address);
+      await submitTransactionAsync(Alice, changeAdminTx1);
+      const changeAdminTx2 = api.tx.nft.addCollectionAdmin(collectionId, Dave.address);
+      await submitTransactionAsync(Alice, changeAdminTx2);
+      const changeAdminTx3 = api.tx.nft.addCollectionAdmin(collectionId, Bob.address);
+      await submitTransactionAsync(Alice, changeAdminTx3);
+
+      const timeoutPromise = (timeout: number) => new Promise((resolve) => setTimeout(resolve, timeout));
+      //
+      const addAdmOne = api.tx.nft.addCollectionAdmin(collectionId, Ferdie.address);
+      const addAdmTwo = api.tx.nft.addCollectionAdmin(collectionId, Charlie.address);
+      await Promise.all
+      ([
+        addAdmOne.signAndSend(Bob),
+        addAdmTwo.signAndSend(Alice),
+      ]);
+      await timeoutPromise(10000);
+      const changeAdminTx4 = api.tx.nft.addCollectionAdmin(collectionId, Alice.address);
+      // tslint:disable-next-line: no-unused-expression
+      expect(submitTransactionExpectFailAsync(Alice, changeAdminTx4)).to.be.rejected;
+
+      const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId));
+      expect(adminListAfterAddAdmin).to.be.contains(Eve.address);
+      expect(adminListAfterAddAdmin).to.be.contains(Ferdie.address);
+      expect(adminListAfterAddAdmin).not.to.be.contains(Alice.address);
+      await timeoutPromise(20000);
+    });
+  });
+});
addedtests/src/collision-tests/adminRightsOff.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/collision-tests/adminRightsOff.test.ts
@@ -0,0 +1,62 @@
+import { IKeyringPair } from '@polkadot/types/types';
+import BN from 'bn.js';
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+import privateKey from '../substrate/privateKey';
+import usingApi, { submitTransactionAsync, submitTransactionExpectFailAsync } from '../substrate/substrate-api';
+import {
+  createCollectionExpectSuccess,
+} from '../util/helpers';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+interface ITokenDataType {
+  Owner: number[];
+  ConstData: number[];
+  VariableData: number[];
+}
+let Alice: IKeyringPair;
+let Bob: IKeyringPair;
+let Ferdie: IKeyringPair;
+let Charlie: IKeyringPair;
+let Eve: IKeyringPair;
+let Dave: IKeyringPair;
+
+before(async () => {
+  await usingApi(async () => {
+    Alice = privateKey('//Alice');
+    Bob = privateKey('//Bob');
+    Ferdie = privateKey('//Ferdie');
+    Charlie = privateKey('//Charlie');
+    Eve = privateKey('//Eve');
+    Dave = privateKey('//Dave');
+  });
+});
+
+describe('Deprivation of admin rights: ', () => {
+  // tslint:disable-next-line: max-line-length
+  it('In the block, the collection admin adds a token or changes data, and the collection owner deprives the admin of rights ', async () => {
+    await usingApi(async (api) => {
+      const collectionId = await createCollectionExpectSuccess();
+      const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, Bob.address);
+      await submitTransactionAsync(Alice, changeAdminTx);
+      const timeoutPromise = (timeout: number) => new Promise((resolve) => setTimeout(resolve, timeout));
+      await timeoutPromise(10000);
+      //
+      const args = [{ nft: ['0x31', '0x31'] }, { nft: ['0x32', '0x32'] }, { nft: ['0x33', '0x33'] }];
+      const addItemAdm = api.tx.nft.createMultipleItems(collectionId, Bob.address, args);
+      const removeAdm = api.tx.nft.removeCollectionAdmin(collectionId, Bob.address);
+      await Promise.all
+      ([
+        addItemAdm.signAndSend(Bob),
+        removeAdm.signAndSend(Alice),
+      ]);
+      await timeoutPromise(10000);
+      const itemsListIndex = await api.query.nft.itemListIndex(collectionId) as unknown as BN;
+      expect(itemsListIndex.toNumber()).to.be.equal(0);
+      const adminList: any = (await api.query.nft.adminList(collectionId));
+      expect(adminList).not.to.be.contains(Bob.address);
+      await timeoutPromise(20000);
+    });
+  });
+});
addedtests/src/collision-tests/setSponsorNewOwner.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/collision-tests/setSponsorNewOwner.test.ts
@@ -0,0 +1,53 @@
+import { IKeyringPair } from '@polkadot/types/types';
+import BN from 'bn.js';
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+import privateKey from '../substrate/privateKey';
+import usingApi, { submitTransactionAsync, submitTransactionExpectFailAsync } from '../substrate/substrate-api';
+import {
+  createCollectionExpectSuccess, createItemExpectSuccess, setCollectionSponsorExpectSuccess,
+} from '../util/helpers';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+interface ITokenDataType {
+  Owner: number[];
+  ConstData: number[];
+  VariableData: number[];
+}
+let Alice: IKeyringPair;
+let Bob: IKeyringPair;
+let Ferdie: IKeyringPair;
+
+before(async () => {
+  await usingApi(async () => {
+    Alice = privateKey('//Alice');
+    Bob = privateKey('//Bob');
+    Ferdie = privateKey('//Ferdie');
+  });
+});
+
+describe('Sponsored with new owner ', () => {
+  // tslint:disable-next-line: max-line-length
+  it('Confirmation of sponsorship of a collection in a block with a change in the owner of the collection: ', async () => {
+    await usingApi(async (api) => {
+      const collectionId = await createCollectionExpectSuccess();
+      await setCollectionSponsorExpectSuccess(collectionId, Bob.address);
+      const timeoutPromise = (timeout: number) => new Promise((resolve) => setTimeout(resolve, timeout));
+      await timeoutPromise(10000);
+      //
+      const confirmSponsorship = api.tx.nft.confirmSponsorship(collectionId);
+      const changeCollectionOwner = api.tx.nft.changeCollectionOwner(collectionId, Ferdie.address);
+      await Promise.all
+      ([
+        confirmSponsorship.signAndSend(Bob),
+        changeCollectionOwner.signAndSend(Alice),
+      ]);
+      await timeoutPromise(10000);
+      const collection: any = (await api.query.nft.collectionById(collectionId)).toJSON();
+      expect(collection.Sponsorship.Confirmed).to.be.eq(Bob.address);
+      expect(collection.Owner).to.be.eq(Ferdie.address);
+      await timeoutPromise(20000);
+    });
+  });
+});
addedtests/src/collision-tests/sponsorPayments.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/collision-tests/sponsorPayments.test.ts
@@ -0,0 +1,58 @@
+import { IKeyringPair } from '@polkadot/types/types';
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+import { alicesPublicKey, bobsPublicKey } from '../accounts';
+import getBalance from '../substrate/get-balance';
+import privateKey from '../substrate/privateKey';
+import usingApi, { submitTransactionAsync } from '../substrate/substrate-api';
+import waitNewBlocks from '../substrate/wait-new-blocks';
+import {
+  confirmSponsorshipExpectSuccess,
+  createCollectionExpectSuccess,
+  createItemExpectSuccess,
+  setCollectionSponsorExpectSuccess,
+} from '../util/helpers';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+let Alice: IKeyringPair;
+let Bob: IKeyringPair;
+let Ferdie: IKeyringPair;
+
+before(async () => {
+  await usingApi(async () => {
+    Alice = privateKey('//Alice');
+    Bob = privateKey('//Bob');
+    Ferdie = privateKey('//Ferdie');
+  });
+});
+
+describe('Payment of commission if one block: ', () => {
+  // tslint:disable-next-line: max-line-length
+  it('Payment of commission if one block contains transactions for payment from the sponsor\'s balance and his (sponsor\'s) exclusion from the collection ', async () => {
+    await usingApi(async (api) => {
+      const collectionId = await createCollectionExpectSuccess();
+      const changeAdminTxBob = api.tx.nft.addCollectionAdmin(collectionId, Bob.address);
+      await submitTransactionAsync(Alice, changeAdminTxBob);
+      const timeoutPromise = (timeout: number) => new Promise((resolve) => setTimeout(resolve, timeout));
+      const itemId = await createItemExpectSuccess(Bob, collectionId, 'NFT');
+      await setCollectionSponsorExpectSuccess(collectionId, Bob.address);
+      await confirmSponsorshipExpectSuccess(collectionId, '//Bob');
+      //
+      const [alicesBalanceBefore, bobsBalanceBefore] = await getBalance(api, [alicesPublicKey, bobsPublicKey]);
+      const sendItem = api.tx.nft.transfer(Alice.address, collectionId, itemId, 1);
+      const revokeSponsor = api.tx.nft.removeCollectionSponsor(collectionId);
+      await Promise.all
+      ([
+        sendItem.signAndSend(Bob),
+        revokeSponsor.signAndSend(Alice),
+      ]);
+      const [alicesBalanceAfter, bobsBalanceAfter] = await getBalance(api, [alicesPublicKey, bobsPublicKey]);
+      // tslint:disable-next-line:no-unused-expression
+      expect(alicesBalanceAfter === alicesBalanceBefore).to.be.true;
+      // tslint:disable-next-line:no-unused-expression
+      expect(bobsBalanceAfter === bobsBalanceBefore).to.be.true;
+      await timeoutPromise(20000);
+    });
+  });
+});
addedtests/src/collision-tests/tokenLimitsOff.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/collision-tests/tokenLimitsOff.test.ts
@@ -0,0 +1,84 @@
+import { IKeyringPair } from '@polkadot/types/types';
+import BN from 'bn.js';
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+import privateKey from '../substrate/privateKey';
+import usingApi, { submitTransactionAsync } from '../substrate/substrate-api';
+import {
+  addToWhiteListExpectSuccess,
+  createCollectionExpectSuccess,
+  getCreateItemResult,
+  setMintPermissionExpectSuccess,
+} from '../util/helpers';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+interface ITokenDataType {
+  Owner: number[];
+  ConstData: number[];
+  VariableData: number[];
+}
+let Alice: IKeyringPair;
+let Bob: IKeyringPair;
+let Ferdie: IKeyringPair;
+
+const AccountTokenOwnershipLimit = 4;
+const SponsoredMintSize = 4294967295;
+const TokenLimit = 4;
+const SponsorTimeout = 14400;
+const OwnerCanTransfer = false;
+const OwnerCanDestroy = false;
+
+before(async () => {
+  await usingApi(async () => {
+    Alice = privateKey('//Alice');
+    Bob = privateKey('//Bob');
+    Ferdie = privateKey('//Ferdie');
+  });
+});
+
+describe('Token limit exceeded collection: ', () => {
+  // tslint:disable-next-line: max-line-length
+  it('The number of tokens created in the collection from different addresses exceeds the allowed collection limit ', async () => {
+    await usingApi(async (api) => {
+      const collectionId = await createCollectionExpectSuccess();
+      await setMintPermissionExpectSuccess(Alice, collectionId, true);
+      await addToWhiteListExpectSuccess(Alice, collectionId, Ferdie.address);
+      await addToWhiteListExpectSuccess(Alice, collectionId, Bob.address);
+      const setCollectionLim = api.tx.nft.setCollectionLimits(
+        collectionId,
+        {
+          AccountTokenOwnershipLimit,
+          SponsoredMintSize,
+          TokenLimit,
+          // tslint:disable-next-line: object-literal-sort-keys
+          SponsorTimeout,
+          OwnerCanTransfer,
+          OwnerCanDestroy,
+        },
+      );
+      const subTx = await submitTransactionAsync(Alice, setCollectionLim);
+      const subTxTesult = getCreateItemResult(subTx);
+      // tslint:disable-next-line:no-unused-expression
+      expect(subTxTesult.success).to.be.true;
+      const timeoutPromise = (timeout: number) => new Promise((resolve) => setTimeout(resolve, timeout));
+      await timeoutPromise(10000);
+      //
+      const args = [{ nft: ['0x31', '0x31'] }, { nft: ['0x32', '0x32'] }, { nft: ['0x33', '0x33'] }];
+      const mintItemOne = api.tx.nft
+        .createMultipleItems(collectionId, Ferdie.address, args);
+      const mintItemTwo = api.tx.nft
+        .createMultipleItems(collectionId, Bob.address, args);
+      await Promise.all
+      ([
+        mintItemOne.signAndSend(Ferdie),
+        mintItemTwo.signAndSend(Bob),
+      ]);
+      await timeoutPromise(10000);
+      const itemsListIndexAfter = await api.query.nft.itemListIndex(collectionId) as unknown as BN;
+      expect(itemsListIndexAfter.toNumber()).to.be.equal(3);
+      // TokenLimit = 4. The first transaction is successful. The second should fail.
+      await timeoutPromise(10000);
+    });
+  });
+});
addedtests/src/collision-tests/turnsOffMinting.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/collision-tests/turnsOffMinting.test.ts
@@ -0,0 +1,50 @@
+import { IKeyringPair } from '@polkadot/types/types';
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+import privateKey from '../substrate/privateKey';
+import usingApi, { submitTransactionAsync } from '../substrate/substrate-api';
+import waitNewBlocks from '../substrate/wait-new-blocks';
+import {
+  addToWhiteListExpectSuccess,
+  createCollectionExpectSuccess,
+  setMintPermissionExpectSuccess,
+} from '../util/helpers';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+let Alice: IKeyringPair;
+let Bob: IKeyringPair;
+let Ferdie: IKeyringPair;
+
+before(async () => {
+  await usingApi(async () => {
+    Alice = privateKey('//Alice');
+    Bob = privateKey('//Bob');
+    Ferdie = privateKey('//Ferdie');
+  });
+});
+
+describe('Turns off minting mode: ', () => {
+  // tslint:disable-next-line: max-line-length
+  it('The collection owner turns off minting mode and there are minting transactions in the same block ', async () => {
+    await usingApi(async (api) => {
+      const collectionId = await createCollectionExpectSuccess();
+      const timeoutPromise = (timeout: number) => new Promise((resolve) => setTimeout(resolve, timeout));
+      await setMintPermissionExpectSuccess(Alice, collectionId, true);
+      await addToWhiteListExpectSuccess(Alice, collectionId, Ferdie.address);
+      //
+      const mintItem = api.tx.nft.createItem(collectionId, Ferdie.address, 'NFT');
+      const offMinting = api.tx.nft.setMintPermission(collectionId, false);
+      await Promise.all
+      ([
+        mintItem.signAndSend(Ferdie),
+        offMinting.signAndSend(Alice),
+      ]);
+      let itemList: boolean = false;
+      itemList = (await (api.query.nft.nftItemList(collectionId, mintItem))).toJSON() as boolean;
+      // tslint:disable-next-line: no-unused-expression
+      expect(itemList).to.be.null;
+      await timeoutPromise(20000);
+    });
+  });
+});
modifiedtests/src/creditFeesToTreasury.test.tsdiffbeforeafterboth
--- a/tests/src/creditFeesToTreasury.test.ts
+++ b/tests/src/creditFeesToTreasury.test.ts
@@ -18,6 +18,7 @@
 } from './util/helpers';
 
 import { default as waitNewBlocks } from './substrate/wait-new-blocks';
+import { ApiPromise } from '@polkadot/api';
 
 chai.use(chaiAsPromised);
 const expect = chai.expect;
@@ -30,6 +31,25 @@
 let alice: IKeyringPair;
 let bob: IKeyringPair;
 
+// Skip the inflation block pauses if the block is close to inflation block 
+// until the inflation happens
+function skipInflationBlock(api: ApiPromise): Promise<void> {
+  const promise = new Promise<void>(async (resolve, reject) => {
+    const blockInterval = parseInt((await api.consts.inflation.inflationBlockInterval).toString());
+    const unsubscribe = await api.rpc.chain.subscribeNewHeads(head => {
+      const currentBlock = parseInt(head.number.toString());
+      if (currentBlock % blockInterval < blockInterval - 10) {
+        unsubscribe();
+        resolve();
+      } else {
+        console.log(`Skipping inflation block, current block: ${currentBlock}`);
+      }
+    });
+  });
+
+  return promise;
+}
+
 describe('integration test: Fees must be credited to Treasury:', () => {
   before(async () => {
     await usingApi(async (api) => {
@@ -40,6 +60,7 @@
 
   it('Total issuance does not change', async () => {
     await usingApi(async (api) => {
+      await skipInflationBlock(api);
       await waitNewBlocks(api, 1);
 
       const totalBefore = new BigNumber((await api.query.balances.totalIssuance()).toString());
@@ -59,6 +80,7 @@
 
   it('Sender balance decreased by fee+sent amount, Treasury balance increased by fee', async () => {
     await usingApi(async (api) => {
+      await skipInflationBlock(api);
       await waitNewBlocks(api, 1);
 
       const alicePrivateKey = privateKey('//Alice');
@@ -81,6 +103,7 @@
 
   it('Treasury balance increased by failed tx fee', async () => {
     await usingApi(async (api) => {
+      await skipInflationBlock(api);
       await waitNewBlocks(api, 1);
 
       const bobPrivateKey = privateKey('//Bob');
@@ -101,6 +124,7 @@
 
   it('NFT Transactions also send fees to Treasury', async () => {
     await usingApi(async (api) => {
+      await skipInflationBlock(api);
       await waitNewBlocks(api, 1);
 
       const treasuryBalanceBefore = new BigNumber((await api.query.system.account(Treasury)).data.free.toString());
@@ -119,6 +143,7 @@
 
   it('Fees are sane', async () => {
     await usingApi(async (api) => {
+      await skipInflationBlock(api);
       await waitNewBlocks(api, 1);
 
       const aliceBalanceBefore = new BigNumber((await api.query.system.account(alicesPublicKey)).data.free.toString());
@@ -135,6 +160,7 @@
 
   it('NFT Transfer fee is close to 0.1 Unique', async () => {
     await usingApi(async (api) => {
+      await skipInflationBlock(api);
       await waitNewBlocks(api, 1);
 
       const collectionId = await createCollectionExpectSuccess();
@@ -147,7 +173,7 @@
 
       // console.log(fee.toString());
       const expectedTransferFee = 0.1;
-      const tolerance = 0.00001;
+      const tolerance = 0.001;
       expect(fee.dividedBy(1e15).minus(expectedTransferFee).abs().toNumber()).to.be.lessThan(tolerance);
     });
   });
addedtests/src/inflation.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/inflation.test.ts
@@ -0,0 +1,43 @@
+//
+// 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 { default as usingApi } from "./substrate/substrate-api";
+import privateKey from "./substrate/privateKey";
+import { BigNumber } from 'bignumber.js';
+import { IKeyringPair } from '@polkadot/types/types';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+
+let alice: IKeyringPair;
+let bob: IKeyringPair;
+
+describe('integration test: Inflation', () => {
+  before(async () => {
+    await usingApi(async (api) => {
+      alice = privateKey('//Alice');
+      bob = privateKey('//Bob');
+    });
+  });
+
+  it('First year inflation is 10%', async () => {
+    await usingApi(async (api) => {
+
+      const blockInterval = parseInt((await api.consts.inflation.inflationBlockInterval).toString());
+      const totalIssuanceStart = new BigNumber((await api.query.inflation.startingYearTotalIssuance()).toString());
+      const blockInflation = new BigNumber((await api.query.inflation.blockInflation()).toString());
+
+      const YEAR = 5259600; // Blocks in one year
+      const totalExpectedInflation = totalIssuanceStart.multipliedBy(0.1);
+      const totalActualInflation = blockInflation.multipliedBy(YEAR / blockInterval);
+
+      const tolerance = 0.00001; // Relative difference per year between theoretical and actual inflation
+      expect(totalExpectedInflation.dividedBy(totalActualInflation).minus(1).abs().toNumber()).to.be.lessThan(tolerance);
+    });
+  });
+
+});
modifiedtests/src/pallet-presence.test.tsdiffbeforeafterboth
--- a/tests/src/pallet-presence.test.ts
+++ b/tests/src/pallet-presence.test.ts
@@ -13,7 +13,7 @@
 
 // Pallets that must always be present
 const requiredPallets = [
-  'nft', 'balances', 'contracts', 'randomnesscollectiveflip', 'system', 'timestamp', 'transactionpayment', 'treasury', 'vesting'
+  'nft', 'inflation', 'balances', 'contracts', 'randomnesscollectiveflip', 'system', 'timestamp', 'transactionpayment', 'treasury', 'vesting'
 ];
 
 // Pallets that depend on consensus and governance configuration