git.delta.rocks / unique-network / refs/commits / 0b44e9f57a8a

difftreelog

feat add collection sponsoring for rft

Grigoriy Simonov2022-12-23parent: #aea0773.patch.diff
in: master

4 files changed

modifiedruntime/common/config/pallets/app_promotion.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/app_promotion.rs
+++ b/runtime/common/config/pallets/app_promotion.rs
@@ -22,7 +22,7 @@
 use frame_support::{parameter_types, PalletId};
 use sp_arithmetic::Perbill;
 use up_common::{
-	constants::{UNIQUE, RELAY_DAYS, DAYS},
+	constants::{UNIQUE, RELAY_DAYS},
 	types::Balance,
 };
 
modifiedruntime/common/ethereum/sponsoring.rsdiffbeforeafterboth
before · runtime/common/ethereum/sponsoring.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617//! Implements EVM sponsoring logic via TransactionValidityHack1819use core::{convert::TryInto, marker::PhantomData};20use evm_coder::{Call, abi::AbiReader};21use pallet_common::{CollectionHandle, eth::map_eth_to_id};22use pallet_evm::account::CrossAccountId;23use pallet_evm_transaction_payment::CallContext;24use pallet_nonfungible::{25	Config as NonfungibleConfig,26	erc::{27		UniqueNFTCall, ERC721UniqueExtensionsCall, ERC721UniqueMintableCall, ERC721Call,28		TokenPropertiesCall,29	},30};31use pallet_fungible::{32	Config as FungibleConfig,33	erc::{UniqueFungibleCall, ERC20Call},34};35use pallet_refungible::Config as RefungibleConfig;36use pallet_unique::Config as UniqueConfig;37use sp_std::prelude::*;38use up_data_structs::{CollectionMode, CreateItemData, CreateNftData, TokenId};39use up_sponsorship::SponsorshipHandler;4041use crate::{Runtime, runtime_common::sponsoring::*};4243pub type EvmSponsorshipHandler = (44	UniqueEthSponsorshipHandler<Runtime>,45	pallet_evm_contract_helpers::HelpersContractSponsoring<Runtime>,46);4748pub struct UniqueEthSponsorshipHandler<T: UniqueConfig>(PhantomData<*const T>);49impl<T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig>50	SponsorshipHandler<T::CrossAccountId, CallContext> for UniqueEthSponsorshipHandler<T>51{52	fn get_sponsor(53		who: &T::CrossAccountId,54		call_context: &CallContext,55	) -> Option<T::CrossAccountId> {56		let collection_id = map_eth_to_id(&call_context.contract_address)?;57		let collection = <CollectionHandle<T>>::new(collection_id)?;58		let sponsor = collection.sponsorship.sponsor()?.clone();59		let (method_id, mut reader) = AbiReader::new_call(&call_context.input).ok()?;60		Some(T::CrossAccountId::from_sub(match &collection.mode {61			CollectionMode::NFT => {62				let call = <UniqueNFTCall<T>>::parse(method_id, &mut reader).ok()??;63				match call {64					UniqueNFTCall::TokenProperties(TokenPropertiesCall::SetProperty {65						token_id,66						key,67						value,68						..69					}) => {70						let token_id: TokenId = token_id.try_into().ok()?;71						withdraw_set_token_property::<T>(72							&collection,73							&who,74							&token_id,75							key.len() + value.len(),76						)77						.map(|()| sponsor)78					}79					UniqueNFTCall::ERC721UniqueExtensions(80						ERC721UniqueExtensionsCall::Transfer { token_id, .. },81					) => {82						let token_id: TokenId = token_id.try_into().ok()?;83						withdraw_transfer::<T>(&collection, &who, &token_id).map(|()| sponsor)84					}85					UniqueNFTCall::ERC721UniqueMintable(86						ERC721UniqueMintableCall::Mint { .. }87						| ERC721UniqueMintableCall::MintCheckId { .. }88						| ERC721UniqueMintableCall::MintWithTokenUri { .. }89						| ERC721UniqueMintableCall::MintWithTokenUriCheckId { .. },90					) => withdraw_create_item::<T>(91						&collection,92						&who,93						&CreateItemData::NFT(CreateNftData::default()),94					)95					.map(|()| sponsor),96					UniqueNFTCall::ERC721(ERC721Call::TransferFrom { token_id, from, .. }) => {97						let token_id: TokenId = token_id.try_into().ok()?;98						let from = T::CrossAccountId::from_eth(from);99						withdraw_transfer::<T>(&collection, &from, &token_id).map(|()| sponsor)100					}101					UniqueNFTCall::ERC721(ERC721Call::Approve { token_id, .. }) => {102						let token_id: TokenId = token_id.try_into().ok()?;103						withdraw_approve::<T>(&collection, who.as_sub(), &token_id)104							.map(|()| sponsor)105					}106					_ => None,107				}108			}109			CollectionMode::Fungible(_) => {110				let call = <UniqueFungibleCall<T>>::parse(method_id, &mut reader).ok()??;111				#[allow(clippy::single_match)]112				match call {113					UniqueFungibleCall::ERC20(ERC20Call::Transfer { .. }) => {114						withdraw_transfer::<T>(&collection, who, &TokenId::default())115							.map(|()| sponsor)116					}117					UniqueFungibleCall::ERC20(ERC20Call::TransferFrom { from, .. }) => {118						let from = T::CrossAccountId::from_eth(from);119						withdraw_transfer::<T>(&collection, &from, &TokenId::default())120							.map(|()| sponsor)121					}122					UniqueFungibleCall::ERC20(ERC20Call::Approve { .. }) => {123						withdraw_approve::<T>(&collection, who.as_sub(), &TokenId::default())124							.map(|()| sponsor)125					}126					_ => None,127				}128			}129			_ => None,130		}?))131	}132}
after · runtime/common/ethereum/sponsoring.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617//! Implements EVM sponsoring logic via TransactionValidityHack1819use core::{convert::TryInto, marker::PhantomData};20use evm_coder::{Call, abi::AbiReader};21use pallet_common::{CollectionHandle, eth::map_eth_to_id};22use pallet_evm::account::CrossAccountId;23use pallet_evm_transaction_payment::CallContext;24use pallet_nonfungible::{25	Config as NonfungibleConfig,26	erc::{27		UniqueNFTCall, ERC721UniqueExtensionsCall, ERC721UniqueMintableCall, ERC721Call,28		TokenPropertiesCall,29	},30};31use pallet_fungible::{32	Config as FungibleConfig,33	erc::{UniqueFungibleCall, ERC20Call},34};35use pallet_refungible::{36	Config as RefungibleConfig,37	erc::UniqueRefungibleCall,38	erc_token::{RefungibleTokenHandle, UniqueRefungibleTokenCall},39	RefungibleHandle,40};41use pallet_unique::Config as UniqueConfig;42use sp_std::prelude::*;43use up_data_structs::{44	CollectionMode, CreateItemData, CreateNftData, mapping::TokenAddressMapping, TokenId,45};46use up_sponsorship::SponsorshipHandler;47use crate::{Runtime, runtime_common::sponsoring::*};4849mod refungible;5051pub type EvmSponsorshipHandler = (52	UniqueEthSponsorshipHandler<Runtime>,53	pallet_evm_contract_helpers::HelpersContractSponsoring<Runtime>,54);5556pub struct UniqueEthSponsorshipHandler<T: UniqueConfig>(PhantomData<*const T>);57impl<T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig>58	SponsorshipHandler<T::CrossAccountId, CallContext> for UniqueEthSponsorshipHandler<T>59{60	fn get_sponsor(61		who: &T::CrossAccountId,62		call_context: &CallContext,63	) -> Option<T::CrossAccountId> {64		if let Some(collection_id) = map_eth_to_id(&call_context.contract_address) {65			let collection = <CollectionHandle<T>>::new(collection_id)?;66			let sponsor = collection.sponsorship.sponsor()?.clone();67			let (method_id, mut reader) = AbiReader::new_call(&call_context.input).ok()?;68			Some(T::CrossAccountId::from_sub(match &collection.mode {69				CollectionMode::NFT => {70					let call = <UniqueNFTCall<T>>::parse(method_id, &mut reader).ok()??;71					match call {72						UniqueNFTCall::TokenProperties(TokenPropertiesCall::SetProperty {73							token_id,74							key,75							value,76							..77						}) => {78							let token_id: TokenId = token_id.try_into().ok()?;79							withdraw_set_token_property::<T>(80								&collection,81								&who,82								&token_id,83								key.len() + value.len(),84							)85							.map(|()| sponsor)86						}87						UniqueNFTCall::ERC721UniqueExtensions(88							ERC721UniqueExtensionsCall::Transfer { token_id, .. },89						) => {90							let token_id: TokenId = token_id.try_into().ok()?;91							withdraw_transfer::<T>(&collection, &who, &token_id).map(|()| sponsor)92						}93						UniqueNFTCall::ERC721UniqueMintable(94							ERC721UniqueMintableCall::Mint { .. }95							| ERC721UniqueMintableCall::MintCheckId { .. }96							| ERC721UniqueMintableCall::MintWithTokenUri { .. }97							| ERC721UniqueMintableCall::MintWithTokenUriCheckId { .. },98						) => withdraw_create_item::<T>(99							&collection,100							&who,101							&CreateItemData::NFT(CreateNftData::default()),102						)103						.map(|()| sponsor),104						UniqueNFTCall::ERC721(ERC721Call::TransferFrom {105							token_id, from, ..106						}) => {107							let token_id: TokenId = token_id.try_into().ok()?;108							let from = T::CrossAccountId::from_eth(from);109							withdraw_transfer::<T>(&collection, &from, &token_id).map(|()| sponsor)110						}111						UniqueNFTCall::ERC721(ERC721Call::Approve { token_id, .. }) => {112							let token_id: TokenId = token_id.try_into().ok()?;113							withdraw_approve::<T>(&collection, who.as_sub(), &token_id)114								.map(|()| sponsor)115						}116						_ => None,117					}118				}119				CollectionMode::ReFungible => {120					let call = <UniqueRefungibleCall<T>>::parse(method_id, &mut reader).ok()??;121					refungible::call_sponsor(call, collection, who).map(|()| sponsor)122				}123				CollectionMode::Fungible(_) => {124					let call = <UniqueFungibleCall<T>>::parse(method_id, &mut reader).ok()??;125					match call {126						UniqueFungibleCall::ERC20(ERC20Call::Transfer { .. }) => {127							withdraw_transfer::<T>(&collection, who, &TokenId::default())128								.map(|()| sponsor)129						}130						UniqueFungibleCall::ERC20(ERC20Call::TransferFrom { from, .. }) => {131							let from = T::CrossAccountId::from_eth(from);132							withdraw_transfer::<T>(&collection, &from, &TokenId::default())133								.map(|()| sponsor)134						}135						UniqueFungibleCall::ERC20(ERC20Call::Approve { .. }) => {136							withdraw_approve::<T>(&collection, who.as_sub(), &TokenId::default())137								.map(|()| sponsor)138						}139						_ => None,140					}141				}142			}?))143		} else {144			let (collection_id, token_id) =145				T::EvmTokenAddressMapping::address_to_token(&call_context.contract_address)?;146			let collection = <CollectionHandle<T>>::new(collection_id)?;147			let sponsor = collection.sponsorship.sponsor()?.clone();148			let rft_collection = RefungibleHandle::cast(collection);149			let token = RefungibleTokenHandle(rft_collection, token_id);150			let (method_id, mut reader) = AbiReader::new_call(&call_context.input).ok()?;151			let call = <UniqueRefungibleTokenCall<T>>::parse(method_id, &mut reader).ok()??;152			Some(T::CrossAccountId::from_sub(153				refungible::token_call_sponsor(call, token, who).map(|()| sponsor)?,154			))155		}156	}157}158159mod common {160	use super::*;161162	use pallet_common::erc::{CollectionCall};163164	pub fn collection_call_sponsor<T>(165		call: CollectionCall<T>,166		_collection: CollectionHandle<T>,167		_who: &T::CrossAccountId,168	) -> Option<()>169	where170		T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig,171	{172		use CollectionCall::*;173174		match call {175			// Readonly176			ERC165Call(_, _)177			| CollectionProperty { .. }178			| CollectionProperties { .. }179			| HasCollectionPendingSponsor180			| CollectionSponsor181			| ContractAddress182			| AllowlistedCross { .. }183			| IsOwnerOrAdminEth { .. }184			| IsOwnerOrAdminCross { .. }185			| CollectionOwner186			| CollectionAdmins187			| UniqueCollectionType => None,188189			// Not sponsored190			AddToCollectionAllowList { .. }191			| AddToCollectionAllowListCross { .. }192			| RemoveFromCollectionAllowList { .. }193			| RemoveFromCollectionAllowListCross { .. }194			| AddCollectionAdminCross { .. }195			| RemoveCollectionAdminCross { .. }196			| AddCollectionAdmin { .. }197			| RemoveCollectionAdmin { .. }198			| SetNestingBool { .. }199			| SetNesting { .. }200			| SetCollectionAccess { .. }201			| SetCollectionMintMode { .. }202			| SetOwner { .. }203			| ChangeCollectionOwnerCross { .. }204			| SetCollectionProperty { .. }205			| SetCollectionProperties { .. }206			| DeleteCollectionProperty { .. }207			| DeleteCollectionProperties { .. }208			| SetCollectionSponsor { .. }209			| SetCollectionSponsorCross { .. }210			| ConfirmCollectionSponsorship211			| RemoveCollectionSponsor212			| SetIntLimit { .. } => None,213		}214	}215}
addedruntime/common/ethereum/sponsoring/refungible.rsdiffbeforeafterboth
--- /dev/null
+++ b/runtime/common/ethereum/sponsoring/refungible.rs
@@ -0,0 +1,359 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+//! Implements EVM sponsoring logic via TransactionValidityHack
+
+use core::convert::TryInto;
+use pallet_common::CollectionHandle;
+use pallet_evm::account::CrossAccountId;
+use pallet_fungible::Config as FungibleConfig;
+use pallet_refungible::Config as RefungibleConfig;
+use pallet_nonfungible::Config as NonfungibleConfig;
+use pallet_unique::Config as UniqueConfig;
+use up_data_structs::{CreateItemData, CreateNftData, TokenId};
+
+use super::common;
+use crate::runtime_common::sponsoring::*;
+
+use pallet_refungible::{
+	erc::{
+		ERC721BurnableCall, ERC721Call, ERC721EnumerableCall, ERC721MetadataCall,
+		ERC721UniqueExtensionsCall, ERC721UniqueMintableCall, TokenPropertiesCall,
+		UniqueRefungibleCall,
+	},
+	erc_token::{
+		ERC1633Call, ERC20Call, ERC20UniqueExtensionsCall, RefungibleTokenHandle,
+		UniqueRefungibleTokenCall,
+	},
+};
+
+pub fn call_sponsor<T>(
+	call: UniqueRefungibleCall<T>,
+	collection: CollectionHandle<T>,
+	who: &T::CrossAccountId,
+) -> Option<()>
+where
+	T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig,
+{
+	use UniqueRefungibleCall::*;
+
+	match call {
+		// Readonly
+		ERC165Call(_, _) => None,
+
+		ERC721Enumerable(call) => erc721::enumerable_call_sponsor(call, collection, who),
+		ERC721Burnable(call) => erc721::burnable_call_sponsor(call, collection, who),
+		ERC721Metadata(call) => erc721::metadata_call_sponsor(call, collection, who),
+		Collection(call) => common::collection_call_sponsor(call, collection, who),
+		ERC721(call) => erc721::call_sponsor(call, collection, who),
+		ERC721UniqueExtensions(call) => {
+			erc721::unique_extensions_call_sponsor(call, collection, who)
+		}
+		ERC721UniqueMintable(call) => erc721::unique_mintable_call_sponsor(call, collection, who),
+		TokenProperties(call) => token_properties_call_sponsor(call, collection, who),
+	}
+}
+
+pub fn token_properties_call_sponsor<T>(
+	call: TokenPropertiesCall<T>,
+	collection: CollectionHandle<T>,
+	who: &T::CrossAccountId,
+) -> Option<()>
+where
+	T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig,
+{
+	use TokenPropertiesCall::*;
+
+	match call {
+		// Readonly
+		ERC165Call(_, _) | Property { .. } => None,
+
+		// Not sponsored
+		SetTokenPropertyPermission { .. }
+		| SetProperties { .. }
+		| DeleteProperty { .. }
+		| DeleteProperties { .. } => None,
+
+		SetProperty {
+			token_id,
+			key,
+			value,
+			..
+		} => {
+			let token_id: TokenId = token_id.try_into().ok()?;
+			withdraw_set_token_property::<T>(&collection, &who, &token_id, key.len() + value.len())
+		}
+	}
+}
+
+pub fn token_call_sponsor<T>(
+	call: UniqueRefungibleTokenCall<T>,
+	token: RefungibleTokenHandle<T>,
+	who: &T::CrossAccountId,
+) -> Option<()>
+where
+	T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig,
+{
+	use UniqueRefungibleTokenCall::*;
+
+	match call {
+		// Readonly
+		ERC165Call(_, _) => None,
+
+		ERC20(call) => erc20::call_sponsor(call, token, who),
+		ERC20UniqueExtensions(call) => erc20::unique_extensions_call_sponsor(call, token, who),
+		ERC1633(call) => erc1633::call_sponsor(call, token, who),
+	}
+}
+
+mod erc721 {
+	use super::*;
+
+	pub fn call_sponsor<T>(
+		call: ERC721Call<T>,
+		collection: CollectionHandle<T>,
+		who: &T::CrossAccountId,
+	) -> Option<()>
+	where
+		T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig,
+	{
+		use ERC721Call::*;
+
+		match call {
+			// Readonly
+			ERC165Call(_, _)
+			| BalanceOf { .. }
+			| OwnerOf { .. }
+			| GetApproved { .. }
+			| IsApprovedForAll { .. }
+			| CollectionHelperAddress => None,
+
+			// Not sponsored
+			SafeTransferFromWithData { .. }
+			| SafeTransferFrom { .. }
+			| SetApprovalForAll { .. } => None,
+
+			TransferFrom { token_id, from, .. } => {
+				let token_id: TokenId = token_id.try_into().ok()?;
+				let from = T::CrossAccountId::from_eth(from);
+				withdraw_transfer::<T>(&collection, &from, &token_id)
+			}
+			Approve { _token_id, .. } => {
+				let token_id: TokenId = _token_id.try_into().ok()?;
+				withdraw_approve::<T>(&collection, who.as_sub(), &token_id)
+			}
+		}
+	}
+
+	pub fn enumerable_call_sponsor<T>(
+		call: ERC721EnumerableCall<T>,
+		_collection: CollectionHandle<T>,
+		_who: &T::CrossAccountId,
+	) -> Option<()>
+	where
+		T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig,
+	{
+		use ERC721EnumerableCall::*;
+
+		match call {
+			// Readonly
+			ERC165Call(_, _) | TokenByIndex { .. } | TokenOfOwnerByIndex { .. } | TotalSupply => {
+				None
+			}
+		}
+	}
+
+	pub fn burnable_call_sponsor<T>(
+		call: ERC721BurnableCall<T>,
+		_collection: CollectionHandle<T>,
+		_who: &T::CrossAccountId,
+	) -> Option<()>
+	where
+		T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig,
+	{
+		use ERC721BurnableCall::*;
+
+		match call {
+			// Readonly
+			ERC165Call(_, _) => None,
+
+			// Not sponsored
+			Burn { .. } => None,
+		}
+	}
+
+	pub fn metadata_call_sponsor<T>(
+		call: ERC721MetadataCall<T>,
+		_collection: CollectionHandle<T>,
+		_who: &T::CrossAccountId,
+	) -> Option<()>
+	where
+		T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig,
+	{
+		use ERC721MetadataCall::*;
+
+		match call {
+			// Readonly
+			ERC165Call(_, _) | NameProxy | SymbolProxy | TokenUri { .. } => None,
+		}
+	}
+
+	pub fn unique_extensions_call_sponsor<T>(
+		call: ERC721UniqueExtensionsCall<T>,
+		collection: CollectionHandle<T>,
+		who: &T::CrossAccountId,
+	) -> Option<()>
+	where
+		T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig,
+	{
+		use ERC721UniqueExtensionsCall::*;
+
+		match call {
+			// Readonly
+			ERC165Call(_, _)
+			| Name
+			| Symbol
+			| Description
+			| CrossOwnerOf { .. }
+			| Properties { .. }
+			| NextTokenId
+			| TokenContractAddress { .. } => None,
+
+			// Not sponsored
+			TransferCross { .. }
+			| TransferFromCross { .. }
+			| BurnFrom { .. }
+			| BurnFromCross { .. }
+			| MintBulk { .. }
+			| MintBulkWithTokenUri { .. } => None,
+
+			Transfer { token_id, .. } => {
+				let token_id: TokenId = token_id.try_into().ok()?;
+				withdraw_transfer::<T>(&collection, &who, &token_id)
+			}
+		}
+	}
+
+	pub fn unique_mintable_call_sponsor<T>(
+		call: ERC721UniqueMintableCall<T>,
+		collection: CollectionHandle<T>,
+		who: &T::CrossAccountId,
+	) -> Option<()>
+	where
+		T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig,
+	{
+		use ERC721UniqueMintableCall::*;
+
+		match call {
+			// Readonly
+			ERC165Call(_, _) | MintingFinished => None,
+
+			// Not sponsored
+			FinishMinting => None,
+
+			Mint { .. }
+			| MintCheckId { .. }
+			| MintWithTokenUri { .. }
+			| MintWithTokenUriCheckId { .. } => withdraw_create_item::<T>(
+				&collection,
+				&who,
+				&CreateItemData::NFT(CreateNftData::default()),
+			),
+		}
+	}
+}
+
+mod erc20 {
+	use super::*;
+
+	pub fn call_sponsor<T>(
+		call: ERC20Call<T>,
+		token: RefungibleTokenHandle<T>,
+		who: &T::CrossAccountId,
+	) -> Option<()>
+	where
+		T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig,
+	{
+		use ERC20Call::*;
+
+		match call {
+			// Readonly
+			ERC165Call(_, _)
+			| Name
+			| Symbol
+			| TotalSupply
+			| Decimals
+			| BalanceOf { .. }
+			| Allowance { .. } => None,
+
+			Transfer { .. } => {
+				let RefungibleTokenHandle(handle, token_id) = token;
+				let token_id = token_id.try_into().ok()?;
+				withdraw_transfer::<T>(&handle, &who, &token_id)
+			}
+			TransferFrom { from, .. } => {
+				let RefungibleTokenHandle(handle, token_id) = token;
+				let token_id = token_id.try_into().ok()?;
+				let from = T::CrossAccountId::from_eth(from);
+				withdraw_transfer::<T>(&handle, &from, &token_id)
+			}
+			Approve { .. } => {
+				let RefungibleTokenHandle(handle, token_id) = token;
+				let token_id = token_id.try_into().ok()?;
+				withdraw_approve::<T>(&handle, who.as_sub(), &token_id)
+			}
+		}
+	}
+
+	pub fn unique_extensions_call_sponsor<T>(
+		call: ERC20UniqueExtensionsCall<T>,
+		_token: RefungibleTokenHandle<T>,
+		_who: &T::CrossAccountId,
+	) -> Option<()>
+	where
+		T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig,
+	{
+		use ERC20UniqueExtensionsCall::*;
+
+		match call {
+			// Readonly
+			ERC165Call(_, _) => None,
+
+			// Not sponsored
+			BurnFrom { .. } | Repartition { .. } => None,
+		}
+	}
+}
+
+mod erc1633 {
+	use super::*;
+
+	pub fn call_sponsor<T>(
+		call: ERC1633Call<T>,
+		_token: RefungibleTokenHandle<T>,
+		_who: &T::CrossAccountId,
+	) -> Option<()>
+	where
+		T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig,
+	{
+		use ERC1633Call::*;
+
+		match call {
+			// Readonly
+			ERC165Call(_, _) | ParentToken | ParentTokenId => None,
+		}
+	}
+}
modifiedtests/src/eth/collectionSponsoring.test.tsdiffbeforeafterboth
--- a/tests/src/eth/collectionSponsoring.test.ts
+++ b/tests/src/eth/collectionSponsoring.test.ts
@@ -15,10 +15,10 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {IKeyringPair} from '@polkadot/types/types';
-import {usingPlaygrounds} from '../util/index';
+import {Pallets, requirePalletsOrSkip, usingPlaygrounds} from '../util/index';
 import {itEth, expect} from './util';
 
-describe('evm collection sponsoring', () => {
+describe('evm nft collection sponsoring', () => {
   let donor: IKeyringPair;
   let alice: IKeyringPair;
   let nominal: bigint;
@@ -317,3 +317,529 @@
     expect(collectionSponsor).to.deep.eq({Unconfirmed: sponsorSub.address});
   });
 });
+
+describe('evm RFT collection sponsoring', () => {
+  let donor: IKeyringPair;
+  let alice: IKeyringPair;
+  let nominal: bigint;
+
+  before(async function() {
+    await usingPlaygrounds(async (helper, privateKey) => {
+      requirePalletsOrSkip(this, helper, [Pallets.ReFungible]);
+      donor = await privateKey({filename: __filename});
+      [alice] = await helper.arrange.createAccounts([100n], donor);
+      nominal = helper.balance.getOneTokenNominal();
+    });
+  });
+  
+  itEth('sponsors mint transactions', async ({helper}) => {
+    const collection = await helper.rft.mintCollection(alice, {tokenPrefix: 'spnr', permissions: {mintMode: true}});
+    await collection.setSponsor(alice, alice.address);
+    await collection.confirmSponsorship(alice);
+
+    const minter = helper.eth.createAccount();
+    expect(await helper.balance.getEthereum(minter)).to.equal(0n);
+
+    const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);
+    const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', minter);
+
+    await collection.addToAllowList(alice, {Ethereum: minter});
+
+    const result = await contract.methods.mint(minter).send();
+
+    const events = helper.eth.normalizeEvents(result.events);
+    expect(events).to.deep.include({
+      address: collectionAddress,
+      event: 'Transfer',
+      args: {
+        from: '0x0000000000000000000000000000000000000000',
+        to: minter,
+        tokenId: '1',
+      },
+    });
+  });
+
+  // TODO: Temprorary off. Need refactor
+  // itWeb3('Set substrate sponsor', async ({api, web3, privateKeyWrapper}) => {
+  //   const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+  //   const collectionHelpers = evmCollectionHelpers(web3, owner);
+  //   let result = await collectionHelpers.methods.createRFTCollection('Sponsor collection', '1', '1').send();
+  //   const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
+  //   const sponsor = privateKeyWrapper('//Alice');
+  //   const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
+
+  //   expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
+  //   result = await collectionEvm.methods.setCollectionSponsorSubstrate(sponsor.addressRaw).send({from: owner});
+  //   expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.true;
+
+  //   const confirmTx = await api.tx.unique.confirmSponsorship(collectionId);
+  //   await submitTransactionAsync(sponsor, confirmTx);
+  //   expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
+
+  //   const sponsorTuple = await collectionEvm.methods.collectionSponsor().call({from: owner});
+  //   expect(bigIntToSub(api, BigInt(sponsorTuple[1]))).to.be.eq(sponsor.address);
+  // });
+
+  // Soft-deprecated
+  itEth('[eth] Remove sponsor', async ({helper}) => {
+    const owner = await helper.eth.createAccountWithBalance(donor);
+    const collectionHelpers = helper.ethNativeContract.collectionHelpers(owner);
+
+    let result = await collectionHelpers.methods.createRFTCollection('Sponsor collection', '1', '1').send({value: Number(2n * nominal)});
+    const collectionIdAddress = helper.ethAddress.normalizeAddress(result.events.CollectionCreated.returnValues.collectionId);
+    const sponsor = await helper.eth.createAccountWithBalance(donor);
+    const collectionEvm = helper.ethNativeContract.collection(collectionIdAddress, 'rft', owner, true);
+
+    expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
+    result = await collectionEvm.methods.setCollectionSponsor(sponsor).send({from: owner});
+    expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.true;
+
+    await collectionEvm.methods.confirmCollectionSponsorship().send({from: sponsor});
+    expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
+
+    await collectionEvm.methods.removeCollectionSponsor().send({from: owner});
+
+    const sponsorTuple = await collectionEvm.methods.collectionSponsor().call({from: owner});
+    expect(sponsorTuple.field_0).to.be.eq('0x0000000000000000000000000000000000000000');
+  });
+
+  itEth('[cross] Remove sponsor', async ({helper}) => {
+    const owner = await helper.eth.createAccountWithBalance(donor);
+    const collectionHelpers = helper.ethNativeContract.collectionHelpers(owner);
+
+    let result = await collectionHelpers.methods.createRFTCollection('Sponsor collection', '1', '1').send({value: Number(2n * nominal)});
+    const collectionIdAddress = helper.ethAddress.normalizeAddress(result.events.CollectionCreated.returnValues.collectionId);
+    const sponsor = await helper.eth.createAccountWithBalance(donor);
+    const sponsorCross = helper.ethCrossAccount.fromAddress(sponsor);
+    const collectionEvm = helper.ethNativeContract.collection(collectionIdAddress, 'rft', owner);
+
+    expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
+    result = await collectionEvm.methods.setCollectionSponsorCross(sponsorCross).send({from: owner});
+    expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.true;
+
+    await collectionEvm.methods.confirmCollectionSponsorship().send({from: sponsor});
+    expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
+
+    await collectionEvm.methods.removeCollectionSponsor().send({from: owner});
+
+    const sponsorTuple = await collectionEvm.methods.collectionSponsor().call({from: owner});
+    expect(sponsorTuple.field_0).to.be.eq('0x0000000000000000000000000000000000000000');
+  });
+
+  // Soft-deprecated
+  itEth('[eth] Sponsoring collection from evm address via access list', async ({helper}) => {
+    const owner = await helper.eth.createAccountWithBalance(donor);
+
+    const {collectionId, collectionAddress} = await helper.eth.createERC721MetadataCompatibleRFTCollection(owner, 'Sponsor collection', '1', '1', '');
+
+    const collection = helper.rft.getCollectionObject(collectionId);
+    const sponsor = await helper.eth.createAccountWithBalance(donor);
+    const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'rft', owner, true);
+
+    await collectionEvm.methods.setCollectionSponsor(sponsor).send({from: owner});
+    let collectionData = (await collection.getData())!;
+    expect(collectionData.raw.sponsorship.Unconfirmed).to.be.eq(helper.address.ethToSubstrate(sponsor, true));
+    await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('caller is not set as sponsor');
+
+    await collectionEvm.methods.confirmCollectionSponsorship().send({from: sponsor});
+    collectionData = (await collection.getData())!;
+    expect(collectionData.raw.sponsorship.Confirmed).to.be.eq(helper.address.ethToSubstrate(sponsor, true));
+
+    const user = helper.eth.createAccount();
+    const nextTokenId = await collectionEvm.methods.nextTokenId().call();
+    expect(nextTokenId).to.be.equal('1');
+
+    const oldPermissions = (await collection.getData())!.raw.permissions; // (await getDetailedCollectionInfo(api, collectionId))!.permissions.toHuman();
+    expect(oldPermissions.mintMode).to.be.false;
+    expect(oldPermissions.access).to.be.equal('Normal');
+
+    await collectionEvm.methods.setCollectionAccess(1 /*'AllowList'*/).send({from: owner});
+    await collectionEvm.methods.addToCollectionAllowList(user).send({from: owner});
+    await collectionEvm.methods.setCollectionMintMode(true).send({from: owner});
+
+    const newPermissions = (await collection.getData())!.raw.permissions; // (await getDetailedCollectionInfo(api, collectionId))!.permissions.toHuman();
+    expect(newPermissions.mintMode).to.be.true;
+    expect(newPermissions.access).to.be.equal('AllowList');
+
+    const ownerBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+    const sponsorBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor));
+
+    {
+      const result = await collectionEvm.methods.mintWithTokenURI(user, 'Test URI').send({from: user});
+      const events = helper.eth.normalizeEvents(result.events);
+
+      expect(events).to.deep.include({
+        address: collectionAddress,
+        event: 'Transfer',
+        args: {
+          from: '0x0000000000000000000000000000000000000000',
+          to: user,
+          tokenId: '1',
+        },
+      });
+
+      const ownerBalanceAfter = await helper.balance.getSubstrate(await helper.address.ethToSubstrate(owner));
+      const sponsorBalanceAfter = await helper.balance.getSubstrate(await helper.address.ethToSubstrate(sponsor));
+
+      expect(await collectionEvm.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');
+      expect(ownerBalanceBefore).to.be.eq(ownerBalanceAfter);
+      expect(sponsorBalanceBefore > sponsorBalanceAfter).to.be.true;
+    }
+  });
+
+  itEth('[cross] Sponsoring collection from evm address via access list', async ({helper}) => {
+    const owner = await helper.eth.createAccountWithBalance(donor);
+
+    const {collectionId, collectionAddress} = await helper.eth.createERC721MetadataCompatibleRFTCollection(owner, 'Sponsor collection', '1', '1', '');
+
+    const collection = helper.rft.getCollectionObject(collectionId);
+    const sponsor = await helper.eth.createAccountWithBalance(donor);
+    const sponsorCross = helper.ethCrossAccount.fromAddress(sponsor);
+    const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'rft', owner);
+
+    await collectionEvm.methods.setCollectionSponsorCross(sponsorCross).send({from: owner});
+    let collectionData = (await collection.getData())!;
+    expect(collectionData.raw.sponsorship.Unconfirmed).to.be.eq(helper.address.ethToSubstrate(sponsor, true));
+    await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('caller is not set as sponsor');
+
+    await collectionEvm.methods.confirmCollectionSponsorship().send({from: sponsor});
+    collectionData = (await collection.getData())!;
+    expect(collectionData.raw.sponsorship.Confirmed).to.be.eq(helper.address.ethToSubstrate(sponsor, true));
+
+    const user = helper.eth.createAccount();
+    const userCross = helper.ethCrossAccount.fromAddress(user);
+    const nextTokenId = await collectionEvm.methods.nextTokenId().call();
+    expect(nextTokenId).to.be.equal('1');
+
+    const oldPermissions = (await collection.getData())!.raw.permissions; // (await getDetailedCollectionInfo(api, collectionId))!.permissions.toHuman();
+    expect(oldPermissions.mintMode).to.be.false;
+    expect(oldPermissions.access).to.be.equal('Normal');
+
+    await collectionEvm.methods.setCollectionAccess(1 /*'AllowList'*/).send({from: owner});
+    await collectionEvm.methods.addToCollectionAllowListCross(userCross).send({from: owner});
+    await collectionEvm.methods.setCollectionMintMode(true).send({from: owner});
+
+    const newPermissions = (await collection.getData())!.raw.permissions; // (await getDetailedCollectionInfo(api, collectionId))!.permissions.toHuman();
+    expect(newPermissions.mintMode).to.be.true;
+    expect(newPermissions.access).to.be.equal('AllowList');
+
+    const ownerBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+    const sponsorBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor));
+
+    {
+      const result = await collectionEvm.methods.mintWithTokenURI(user, 'Test URI').send({from: user});
+      const events = helper.eth.normalizeEvents(result.events);
+
+      expect(events).to.deep.include({
+        address: collectionAddress,
+        event: 'Transfer',
+        args: {
+          from: '0x0000000000000000000000000000000000000000',
+          to: user,
+          tokenId: '1',
+        },
+      });
+
+      const ownerBalanceAfter = await helper.balance.getSubstrate(await helper.address.ethToSubstrate(owner));
+      const sponsorBalanceAfter = await helper.balance.getSubstrate(await helper.address.ethToSubstrate(sponsor));
+
+      expect(await collectionEvm.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');
+      expect(ownerBalanceBefore).to.be.eq(ownerBalanceAfter);
+      expect(sponsorBalanceBefore > sponsorBalanceAfter).to.be.true;
+    }
+  });
+
+  // TODO: Temprorary off. Need refactor
+  // itWeb3('Sponsoring collection from substrate address via access list', async ({api, web3, privateKeyWrapper}) => {
+  //   const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+  //   const collectionHelpers = evmCollectionHelpers(web3, owner);
+  //   const result = await collectionHelpers.methods.createERC721MetadataCompatibleRFTCollection('Sponsor collection', '1', '1', '').send();
+  //   const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
+  //   const sponsor = privateKeyWrapper('//Alice');
+  //   const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
+
+  //   await collectionEvm.methods.setCollectionSponsorSubstrate(sponsor.addressRaw).send({from: owner});
+
+  //   const confirmTx = await api.tx.unique.confirmSponsorship(collectionId);
+  //   await submitTransactionAsync(sponsor, confirmTx);
+
+  //   const user = createEthAccount(web3);
+  //   const nextTokenId = await collectionEvm.methods.nextTokenId().call();
+  //   expect(nextTokenId).to.be.equal('1');
+
+  //   await collectionEvm.methods.setCollectionAccess(1 /*'AllowList'*/).send({from: owner});
+  //   await collectionEvm.methods.addToCollectionAllowList(user).send({from: owner});
+  //   await collectionEvm.methods.setCollectionMintMode(true).send({from: owner});
+
+  //   const ownerBalanceBefore = await ethBalanceViaSub(api, owner);
+  //   const sponsorBalanceBefore = (await getBalance(api, [sponsor.address]))[0];
+
+  //   {
+  //     const nextTokenId = await collectionEvm.methods.nextTokenId().call();
+  //     expect(nextTokenId).to.be.equal('1');
+  //     const result = await collectionEvm.methods.mintWithTokenURI(
+  //       user,
+  //       nextTokenId,
+  //       'Test URI',
+  //     ).send({from: user});
+  //     const events = normalizeEvents(result.events);
+
+  //     expect(events).to.be.deep.equal([
+  //       {
+  //         address: collectionIdAddress,
+  //         event: 'Transfer',
+  //         args: {
+  //           from: '0x0000000000000000000000000000000000000000',
+  //           to: user,
+  //           tokenId: nextTokenId,
+  //         },
+  //       },
+  //     ]);
+
+  //     const ownerBalanceAfter = await ethBalanceViaSub(api, owner);
+  //     const sponsorBalanceAfter = (await getBalance(api, [sponsor.address]))[0];
+
+  //     expect(await collectionEvm.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');
+  //     expect(ownerBalanceBefore).to.be.eq(ownerBalanceAfter);
+  //     expect(sponsorBalanceBefore > sponsorBalanceAfter).to.be.true;
+  //   }
+  // });
+
+  // Soft-deprecated
+  itEth('[eth] Check that transaction via EVM spend money from sponsor address', async ({helper}) => {
+    const owner = await helper.eth.createAccountWithBalance(donor);
+
+    const {collectionAddress, collectionId} = await helper.eth.createERC721MetadataCompatibleRFTCollection(owner,'Sponsor collection', '1', '1', '');
+    const collection = helper.rft.getCollectionObject(collectionId);
+    const sponsor = await helper.eth.createAccountWithBalance(donor);
+    const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'rft', owner, true);
+
+    await collectionEvm.methods.setCollectionSponsor(sponsor).send();
+    let collectionData = (await collection.getData())!;
+    expect(collectionData.raw.sponsorship.Unconfirmed).to.be.eq(helper.address.ethToSubstrate(sponsor, true));
+    await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('caller is not set as sponsor');
+
+    const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor, true);
+    await sponsorCollection.methods.confirmCollectionSponsorship().send();
+    collectionData = (await collection.getData())!;
+    expect(collectionData.raw.sponsorship.Confirmed).to.be.eq(helper.address.ethToSubstrate(sponsor, true));
+
+    const user = helper.eth.createAccount();
+    await collectionEvm.methods.addCollectionAdmin(user).send();
+
+    const ownerBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+    const sponsorBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor));
+
+    const userCollectionEvm = helper.ethNativeContract.collection(collectionAddress, 'rft', user, true);
+
+    const result = await userCollectionEvm.methods.mintWithTokenURI(user, 'Test URI').send();
+    const tokenId = result.events.Transfer.returnValues.tokenId;
+
+    const events = helper.eth.normalizeEvents(result.events);
+    const address = helper.ethAddress.fromCollectionId(collectionId);
+
+    expect(events).to.deep.include({
+      address,
+      event: 'Transfer',
+      args: {
+        from: '0x0000000000000000000000000000000000000000',
+        to: user,
+        tokenId: '1',
+      },
+    });
+    expect(await userCollectionEvm.methods.tokenURI(tokenId).call()).to.be.equal('Test URI');
+
+    const ownerBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+    expect(ownerBalanceAfter).to.be.eq(ownerBalanceBefore);
+    const sponsorBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor));
+    expect(sponsorBalanceAfter < sponsorBalanceBefore).to.be.true;
+  });
+
+  itEth('[cross] Check that transaction via EVM spend money from sponsor address', async ({helper}) => {
+    const owner = await helper.eth.createAccountWithBalance(donor);
+
+    const {collectionAddress, collectionId} = await helper.eth.createERC721MetadataCompatibleRFTCollection(owner,'Sponsor collection', '1', '1', '');
+    const collection = helper.rft.getCollectionObject(collectionId);
+    const sponsor = await helper.eth.createAccountWithBalance(donor);
+    const sponsorCross = helper.ethCrossAccount.fromAddress(sponsor);
+    const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'rft', owner);
+
+    await collectionEvm.methods.setCollectionSponsorCross(sponsorCross).send();
+    let collectionData = (await collection.getData())!;
+    expect(collectionData.raw.sponsorship.Unconfirmed).to.be.eq(helper.address.ethToSubstrate(sponsor, true));
+    await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('caller is not set as sponsor');
+
+    const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor);
+    await sponsorCollection.methods.confirmCollectionSponsorship().send();
+    collectionData = (await collection.getData())!;
+    expect(collectionData.raw.sponsorship.Confirmed).to.be.eq(helper.address.ethToSubstrate(sponsor, true));
+
+    const user = helper.eth.createAccount();
+    const userCross = helper.ethCrossAccount.fromAddress(user);
+    await collectionEvm.methods.addCollectionAdminCross(userCross).send();
+
+    const ownerBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+    const sponsorBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor));
+
+    const userCollectionEvm = helper.ethNativeContract.collection(collectionAddress, 'rft', user);
+
+    const result = await userCollectionEvm.methods.mintWithTokenURI(user, 'Test URI').send();
+    const tokenId = result.events.Transfer.returnValues.tokenId;
+
+    const events = helper.eth.normalizeEvents(result.events);
+    const address = helper.ethAddress.fromCollectionId(collectionId);
+
+    expect(events).to.deep.include({
+      address,
+      event: 'Transfer',
+      args: {
+        from: '0x0000000000000000000000000000000000000000',
+        to: user,
+        tokenId: '1',
+      },
+    });
+    expect(await userCollectionEvm.methods.tokenURI(tokenId).call()).to.be.equal('Test URI');
+
+    const ownerBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+    expect(ownerBalanceAfter).to.be.eq(ownerBalanceBefore);
+    const sponsorBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor));
+    expect(sponsorBalanceAfter < sponsorBalanceBefore).to.be.true;
+  });
+});
+
+describe('evm RFT token sponsoring', () => {
+  let donor: IKeyringPair;
+
+  before(async function() {
+    await usingPlaygrounds(async (helper, privateKey) => {
+      requirePalletsOrSkip(this, helper, [Pallets.ReFungible]);
+      donor = await privateKey({filename: __filename});
+    });
+  });
+
+  itEth('[cross] Check that transfer via EVM spend money from sponsor address', async ({helper}) => {
+    const owner = await helper.eth.createAccountWithBalance(donor);
+
+    const {collectionAddress, collectionId} = await helper.eth.createERC721MetadataCompatibleRFTCollection(owner,'Sponsor collection', '1', '1', '');
+    const sponsor = await helper.eth.createAccountWithBalance(donor);
+    const sponsorCross = helper.ethCrossAccount.fromAddress(sponsor);
+    const receiver = await helper.eth.createAccountWithBalance(donor);
+    const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'rft', owner);
+
+    await collectionEvm.methods.setCollectionSponsorCross(sponsorCross).send();
+
+    const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor);
+    await sponsorCollection.methods.confirmCollectionSponsorship().send();
+
+    const user = await helper.eth.createAccountWithBalance(donor);
+    const userCross = helper.ethCrossAccount.fromAddress(user);
+    await collectionEvm.methods.addCollectionAdminCross(userCross).send();
+
+    const userCollectionEvm = helper.ethNativeContract.collection(collectionAddress, 'rft', user);
+
+    const result = await userCollectionEvm.methods.mintWithTokenURI(user, 'Test URI').send();
+    const tokenId = result.events.Transfer.returnValues.tokenId;
+
+    const tokenContract = helper.ethNativeContract.rftTokenById(collectionId, tokenId, user);    
+    await tokenContract.methods.repartition(2).send();
+    
+    const ownerBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+    const sponsorBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor));
+    const userBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(user));
+
+    await tokenContract.methods.transfer(receiver, 1).send();
+
+    const ownerBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+    expect(ownerBalanceAfter).to.be.eq(ownerBalanceBefore);
+    const sponsorBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor));
+    expect(sponsorBalanceAfter < sponsorBalanceBefore).to.be.true;
+    const userBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(user));
+    expect(userBalanceAfter).to.be.eq(userBalanceBefore);
+  });
+
+  itEth('[cross] Check that approve via EVM spend money from sponsor address', async ({helper}) => {
+    const owner = await helper.eth.createAccountWithBalance(donor);
+
+    const {collectionAddress, collectionId} = await helper.eth.createERC721MetadataCompatibleRFTCollection(owner,'Sponsor collection', '1', '1', '');
+    const sponsor = await helper.eth.createAccountWithBalance(donor);
+    const sponsorCross = helper.ethCrossAccount.fromAddress(sponsor);
+    const receiver = await helper.eth.createAccountWithBalance(donor);
+    const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'rft', owner);
+
+    await collectionEvm.methods.setCollectionSponsorCross(sponsorCross).send();
+
+    const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor);
+    await sponsorCollection.methods.confirmCollectionSponsorship().send();
+
+    const user = await helper.eth.createAccountWithBalance(donor);
+    const userCross = helper.ethCrossAccount.fromAddress(user);
+    await collectionEvm.methods.addCollectionAdminCross(userCross).send();
+
+    const userCollectionEvm = helper.ethNativeContract.collection(collectionAddress, 'rft', user);
+
+    const result = await userCollectionEvm.methods.mintWithTokenURI(user, 'Test URI').send();
+    const tokenId = result.events.Transfer.returnValues.tokenId;
+
+    const tokenContract = helper.ethNativeContract.rftTokenById(collectionId, tokenId, user);    
+    await tokenContract.methods.repartition(2).send();
+    
+    const ownerBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+    const sponsorBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor));
+    const userBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(user));
+
+    await tokenContract.methods.approve(receiver, 1).send();
+
+    const ownerBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+    expect(ownerBalanceAfter).to.be.eq(ownerBalanceBefore);
+    const sponsorBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor));
+    expect(sponsorBalanceAfter < sponsorBalanceBefore).to.be.true;
+    const userBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(user));
+    expect(userBalanceAfter).to.be.eq(userBalanceBefore);
+  });
+  
+
+  itEth('[cross] Check that transferFrom via EVM spend money from sponsor address', async ({helper}) => {
+    const owner = await helper.eth.createAccountWithBalance(donor);
+
+    const {collectionAddress, collectionId} = await helper.eth.createERC721MetadataCompatibleRFTCollection(owner,'Sponsor collection', '1', '1', '');
+    const sponsor = await helper.eth.createAccountWithBalance(donor);
+    const sponsorCross = helper.ethCrossAccount.fromAddress(sponsor);
+    const receiver = await helper.eth.createAccountWithBalance(donor);
+    const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'rft', owner);
+
+    await collectionEvm.methods.setCollectionSponsorCross(sponsorCross).send();
+
+    const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor);
+    await sponsorCollection.methods.confirmCollectionSponsorship().send();
+
+    const user = await helper.eth.createAccountWithBalance(donor);
+    const userCross = helper.ethCrossAccount.fromAddress(user);
+    await collectionEvm.methods.addCollectionAdminCross(userCross).send();
+
+    const userCollectionEvm = helper.ethNativeContract.collection(collectionAddress, 'rft', user);
+
+    const result = await userCollectionEvm.methods.mintWithTokenURI(user, 'Test URI').send();
+    const tokenId = result.events.Transfer.returnValues.tokenId;
+
+    const tokenContract = helper.ethNativeContract.rftTokenById(collectionId, tokenId, user);    
+    await tokenContract.methods.repartition(2).send();
+    await tokenContract.methods.approve(receiver, 1).send();
+    
+    const ownerBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+    const sponsorBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor));
+    const userBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(user));
+    const receiverBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(receiver));
+
+    const receiverTokenContract = helper.ethNativeContract.rftTokenById(collectionId, tokenId, receiver);   
+    await receiverTokenContract.methods.transferFrom(user, receiver, 1).send();
+
+    const receiverBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(receiver));
+    expect(receiverBalanceAfter).to.be.eq(receiverBalanceBefore);
+    const ownerBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+    expect(ownerBalanceAfter).to.be.eq(ownerBalanceBefore);
+    const sponsorBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor));
+    expect(sponsorBalanceAfter < sponsorBalanceBefore).to.be.true;
+    const userBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(user));
+    expect(userBalanceAfter).to.be.eq(userBalanceBefore);
+  });
+});