git.delta.rocks / unique-network / refs/commits / 45404723cf23

difftreelog

refac: rename caller -> Caller

Trubnikov Sergey2023-01-18parent: #dc76967.patch.diff
in: master

11 files changed

modifiedcrates/evm-coder/procedural/src/solidity_interface.rsdiffbeforeafterboth
--- a/crates/evm-coder/procedural/src/solidity_interface.rs
+++ b/crates/evm-coder/procedural/src/solidity_interface.rs
@@ -354,7 +354,7 @@
 
 	fn is_caller(&self) -> bool {
 		if let Ok(ident) = self.plain() {
-			return ident == "caller";
+			return ident == "Caller";
 		}
 		false
 	}
modifiedcrates/evm-coder/src/lib.rsdiffbeforeafterboth
--- a/crates/evm-coder/src/lib.rs
+++ b/crates/evm-coder/src/lib.rs
@@ -147,7 +147,7 @@
 	/// Makes function payable
 	pub type Value = U256;
 	/// Makes function caller-sensitive
-	pub type caller = Address;
+	pub type Caller = Address;
 	//#endregion
 
 	/// Ethereum typed call message, similar to solidity
modifiedcrates/evm-coder/tests/random.rsdiffbeforeafterboth
--- a/crates/evm-coder/tests/random.rs
+++ b/crates/evm-coder/tests/random.rs
@@ -64,7 +64,7 @@
 		unreachable!()
 	}
 
-	fn caller_sensitive(&self, _caller: caller) -> Result<u8> {
+	fn caller_sensitive(&self, _caller: Caller) -> Result<u8> {
 		unreachable!()
 	}
 	fn payable(&mut self, _value: Value) -> Result<u8> {
modifiedcrates/evm-coder/tests/solidity_generation.rsdiffbeforeafterboth
--- a/crates/evm-coder/tests/solidity_generation.rs
+++ b/crates/evm-coder/tests/solidity_generation.rs
@@ -28,19 +28,19 @@
 	fn balance_of(&self, _owner: Address) -> Result<U256> {
 		unreachable!()
 	}
-	fn transfer(&mut self, _caller: caller, _to: Address, _value: U256) -> Result<bool> {
+	fn transfer(&mut self, _caller: Caller, _to: Address, _value: U256) -> Result<bool> {
 		unreachable!()
 	}
 	fn transfer_from(
 		&mut self,
-		_caller: caller,
+		_caller: Caller,
 		_from: Address,
 		_to: Address,
 		_value: U256,
 	) -> Result<bool> {
 		unreachable!()
 	}
-	fn approve(&mut self, _caller: caller, _spender: Address, _value: U256) -> Result<bool> {
+	fn approve(&mut self, _caller: Caller, _spender: Address, _value: U256) -> Result<bool> {
 		unreachable!()
 	}
 	fn allowance(&self, _owner: Address, _spender: Address) -> Result<U256> {
modifiedpallets/common/src/erc.rsdiffbeforeafterboth
--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -94,7 +94,7 @@
 	/// @param value Propery value.
 	#[solidity(hide)]
 	#[weight(<SelfWeightOf<T>>::set_collection_properties(1))]
-	fn set_collection_property(&mut self, caller: caller, key: String, value: Bytes) -> Result<()> {
+	fn set_collection_property(&mut self, caller: Caller, key: String, value: Bytes) -> Result<()> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let key = <Vec<u8>>::from(key)
 			.try_into()
@@ -111,7 +111,7 @@
 	#[weight(<SelfWeightOf<T>>::set_collection_properties(properties.len() as u32))]
 	fn set_collection_properties(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		properties: Vec<eth::Property>,
 	) -> Result<()> {
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -130,7 +130,7 @@
 	/// @param key Property key.
 	#[solidity(hide)]
 	#[weight(<SelfWeightOf<T>>::delete_collection_properties(1))]
-	fn delete_collection_property(&mut self, caller: caller, key: String) -> Result<()> {
+	fn delete_collection_property(&mut self, caller: Caller, key: String) -> Result<()> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let key = <Vec<u8>>::from(key)
 			.try_into()
@@ -143,7 +143,7 @@
 	///
 	/// @param keys Properties keys.
 	#[weight(<SelfWeightOf<T>>::delete_collection_properties(keys.len() as u32))]
-	fn delete_collection_properties(&mut self, caller: caller, keys: Vec<String>) -> Result<()> {
+	fn delete_collection_properties(&mut self, caller: Caller, keys: Vec<String>) -> Result<()> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let keys = keys
 			.into_iter()
@@ -208,7 +208,7 @@
 	///
 	/// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
 	#[solidity(hide)]
-	fn set_collection_sponsor(&mut self, caller: caller, sponsor: Address) -> Result<()> {
+	fn set_collection_sponsor(&mut self, caller: Caller, sponsor: Address) -> Result<()> {
 		self.consume_store_reads_and_writes(1, 1)?;
 
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -225,7 +225,7 @@
 	/// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.
 	fn set_collection_sponsor_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		sponsor: eth::CrossAddress,
 	) -> Result<()> {
 		self.consume_store_reads_and_writes(1, 1)?;
@@ -248,7 +248,7 @@
 	/// Collection sponsorship confirmation.
 	///
 	/// @dev After setting the sponsor for the collection, it must be confirmed with this function.
-	fn confirm_collection_sponsorship(&mut self, caller: caller) -> Result<()> {
+	fn confirm_collection_sponsorship(&mut self, caller: Caller) -> Result<()> {
 		self.consume_store_writes(1)?;
 
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -257,7 +257,7 @@
 	}
 
 	/// Remove collection sponsor.
-	fn remove_collection_sponsor(&mut self, caller: caller) -> Result<()> {
+	fn remove_collection_sponsor(&mut self, caller: Caller) -> Result<()> {
 		self.consume_store_reads_and_writes(1, 1)?;
 		let caller = T::CrossAccountId::from_eth(caller);
 		self.remove_sponsor(&caller).map_err(dispatch_to_evm::<T>)
@@ -339,7 +339,7 @@
 	/// @dev Throws error if limit not found.
 	/// @param limit Some limit.
 	#[solidity(rename_selector = "setCollectionLimit")]
-	fn set_collection_limit(&mut self, caller: caller, limit: eth::CollectionLimit) -> Result<()> {
+	fn set_collection_limit(&mut self, caller: Caller, limit: eth::CollectionLimit) -> Result<()> {
 		self.consume_store_reads_and_writes(1, 1)?;
 
 		if !limit.has_value() {
@@ -359,7 +359,7 @@
 	/// @param newAdmin Cross account administrator address.
 	fn add_collection_admin_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		new_admin: eth::CrossAddress,
 	) -> Result<()> {
 		self.consume_store_reads_and_writes(2, 2)?;
@@ -374,7 +374,7 @@
 	/// @param admin Cross account administrator address.
 	fn remove_collection_admin_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		admin: eth::CrossAddress,
 	) -> Result<()> {
 		self.consume_store_reads_and_writes(2, 2)?;
@@ -388,7 +388,7 @@
 	/// Add collection admin.
 	/// @param newAdmin Address of the added administrator.
 	#[solidity(hide)]
-	fn add_collection_admin(&mut self, caller: caller, new_admin: Address) -> Result<()> {
+	fn add_collection_admin(&mut self, caller: Caller, new_admin: Address) -> Result<()> {
 		self.consume_store_reads_and_writes(2, 2)?;
 
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -401,7 +401,7 @@
 	///
 	/// @param admin Address of the removed administrator.
 	#[solidity(hide)]
-	fn remove_collection_admin(&mut self, caller: caller, admin: Address) -> Result<()> {
+	fn remove_collection_admin(&mut self, caller: Caller, admin: Address) -> Result<()> {
 		self.consume_store_reads_and_writes(2, 2)?;
 
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -414,7 +414,7 @@
 	///
 	/// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
 	#[solidity(rename_selector = "setCollectionNesting")]
-	fn set_nesting_bool(&mut self, caller: caller, enable: bool) -> Result<()> {
+	fn set_nesting_bool(&mut self, caller: Caller, enable: bool) -> Result<()> {
 		self.consume_store_reads_and_writes(1, 1)?;
 
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -435,7 +435,7 @@
 	#[solidity(rename_selector = "setCollectionNesting")]
 	fn set_nesting(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		enable: bool,
 		collections: Vec<Address>,
 	) -> Result<()> {
@@ -503,7 +503,7 @@
 	}
 	/// Set the collection access method.
 	/// @param mode Access mode
-	fn set_collection_access(&mut self, caller: caller, mode: eth::AccessMode) -> Result<()> {
+	fn set_collection_access(&mut self, caller: Caller, mode: eth::AccessMode) -> Result<()> {
 		self.consume_store_reads_and_writes(1, 1)?;
 
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -526,7 +526,7 @@
 	///
 	/// @param user Address of a trusted user.
 	#[solidity(hide)]
-	fn add_to_collection_allow_list(&mut self, caller: caller, user: Address) -> Result<()> {
+	fn add_to_collection_allow_list(&mut self, caller: Caller, user: Address) -> Result<()> {
 		self.consume_store_writes(1)?;
 
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -540,7 +540,7 @@
 	/// @param user User cross account address.
 	fn add_to_collection_allow_list_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		user: eth::CrossAddress,
 	) -> Result<()> {
 		self.consume_store_writes(1)?;
@@ -555,7 +555,7 @@
 	///
 	/// @param user Address of a removed user.
 	#[solidity(hide)]
-	fn remove_from_collection_allow_list(&mut self, caller: caller, user: Address) -> Result<()> {
+	fn remove_from_collection_allow_list(&mut self, caller: Caller, user: Address) -> Result<()> {
 		self.consume_store_writes(1)?;
 
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -569,7 +569,7 @@
 	/// @param user User cross account address.
 	fn remove_from_collection_allow_list_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		user: eth::CrossAddress,
 	) -> Result<()> {
 		self.consume_store_writes(1)?;
@@ -583,7 +583,7 @@
 	/// Switch permission for minting.
 	///
 	/// @param mode Enable if "true".
-	fn set_collection_mint_mode(&mut self, caller: caller, mode: bool) -> Result<()> {
+	fn set_collection_mint_mode(&mut self, caller: Caller, mode: bool) -> Result<()> {
 		self.consume_store_reads_and_writes(1, 1)?;
 
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -640,7 +640,7 @@
 	/// @dev Owner can be changed only by current owner
 	/// @param newOwner new owner account
 	#[solidity(hide, rename_selector = "changeCollectionOwner")]
-	fn set_owner(&mut self, caller: caller, new_owner: Address) -> Result<()> {
+	fn set_owner(&mut self, caller: Caller, new_owner: Address) -> Result<()> {
 		self.consume_store_writes(1)?;
 
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -666,7 +666,7 @@
 	/// @param newOwner new owner cross account
 	fn change_collection_owner_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		new_owner: eth::CrossAddress,
 	) -> Result<()> {
 		self.consume_store_writes(1)?;
modifiedpallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/eth.rs
+++ b/pallets/evm-contract-helpers/src/eth.rs
@@ -105,7 +105,7 @@
 	/// @param sponsor User address who set as pending sponsor.
 	fn set_sponsor(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		contract_address: Address,
 		sponsor: Address,
 	) -> Result<()> {
@@ -125,7 +125,7 @@
 	/// Set contract as self sponsored.
 	///
 	/// @param contractAddress Contract for which a self sponsoring is being enabled.
-	fn self_sponsored_enable(&mut self, caller: caller, contract_address: Address) -> Result<()> {
+	fn self_sponsored_enable(&mut self, caller: Caller, contract_address: Address) -> Result<()> {
 		self.recorder().consume_sload()?;
 		self.recorder().consume_sstore()?;
 
@@ -146,7 +146,7 @@
 	/// Remove sponsor.
 	///
 	/// @param contractAddress Contract for which a sponsorship is being removed.
-	fn remove_sponsor(&mut self, caller: caller, contract_address: Address) -> Result<()> {
+	fn remove_sponsor(&mut self, caller: Caller, contract_address: Address) -> Result<()> {
 		self.recorder().consume_sload()?;
 		self.recorder().consume_sstore()?;
 
@@ -161,7 +161,7 @@
 	/// @dev Caller must be same that set via [`setSponsor`].
 	///
 	/// @param contractAddress Сontract for which need to confirm sponsorship.
-	fn confirm_sponsorship(&mut self, caller: caller, contract_address: Address) -> Result<()> {
+	fn confirm_sponsorship(&mut self, caller: Caller, contract_address: Address) -> Result<()> {
 		self.recorder().consume_sload()?;
 		self.recorder().consume_sstore()?;
 
@@ -207,7 +207,7 @@
 
 	fn set_sponsoring_mode(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		contract_address: Address,
 		mode: SponsoringModeT,
 	) -> Result<()> {
@@ -239,7 +239,7 @@
 	/// @dev Only contract owner can change this setting
 	fn set_sponsoring_rate_limit(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		contract_address: Address,
 		rate_limit: u32,
 	) -> Result<()> {
@@ -259,7 +259,7 @@
 	/// @dev Only contract owner can change this setting
 	fn set_sponsoring_fee_limit(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		contract_address: Address,
 		fee_limit: U256,
 	) -> Result<()> {
@@ -300,7 +300,7 @@
 	/// @dev Only contract owner can change this setting
 	fn toggle_allowed(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		contract_address: Address,
 		user: Address,
 		is_allowed: bool,
@@ -329,7 +329,7 @@
 	/// @param enabled Should allowlist access to be enabled?
 	fn toggle_allowlist(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		contract_address: Address,
 		enabled: bool,
 	) -> Result<()> {
modifiedpallets/fungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/fungible/src/erc.rs
+++ b/pallets/fungible/src/erc.rs
@@ -86,7 +86,7 @@
 		Ok(balance.into())
 	}
 	#[weight(<SelfWeightOf<T>>::transfer())]
-	fn transfer(&mut self, caller: caller, to: Address, amount: U256) -> Result<bool> {
+	fn transfer(&mut self, caller: Caller, to: Address, amount: U256) -> Result<bool> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let to = T::CrossAccountId::from_eth(to);
 		let amount = amount.try_into().map_err(|_| "amount overflow")?;
@@ -101,7 +101,7 @@
 	#[weight(<SelfWeightOf<T>>::transfer_from())]
 	fn transfer_from(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		from: Address,
 		to: Address,
 		amount: U256,
@@ -119,7 +119,7 @@
 		Ok(true)
 	}
 	#[weight(<SelfWeightOf<T>>::approve())]
-	fn approve(&mut self, caller: caller, spender: Address, amount: U256) -> Result<bool> {
+	fn approve(&mut self, caller: Caller, spender: Address, amount: U256) -> Result<bool> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let spender = T::CrossAccountId::from_eth(spender);
 		let amount = amount.try_into().map_err(|_| "amount overflow")?;
@@ -148,7 +148,7 @@
 	/// @param to account that will receive minted tokens
 	/// @param amount amount of tokens to mint
 	#[weight(<SelfWeightOf<T>>::create_item())]
-	fn mint(&mut self, caller: caller, to: Address, amount: U256) -> Result<bool> {
+	fn mint(&mut self, caller: Caller, to: Address, amount: U256) -> Result<bool> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let to = T::CrossAccountId::from_eth(to);
 		let amount = amount.try_into().map_err(|_| "amount overflow")?;
@@ -176,7 +176,7 @@
 	#[weight(<SelfWeightOf<T>>::create_item())]
 	fn mint_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		to: pallet_common::eth::CrossAddress,
 		amount: U256,
 	) -> Result<bool> {
@@ -194,7 +194,7 @@
 	#[weight(<SelfWeightOf<T>>::approve())]
 	fn approve_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		spender: pallet_common::eth::CrossAddress,
 		amount: U256,
 	) -> Result<bool> {
@@ -214,7 +214,7 @@
 	/// @param amount The amount that will be burnt.
 	#[solidity(hide)]
 	#[weight(<SelfWeightOf<T>>::burn_from())]
-	fn burn_from(&mut self, caller: caller, from: Address, amount: U256) -> Result<bool> {
+	fn burn_from(&mut self, caller: Caller, from: Address, amount: U256) -> Result<bool> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let from = T::CrossAccountId::from_eth(from);
 		let amount = amount.try_into().map_err(|_| "amount overflow")?;
@@ -235,7 +235,7 @@
 	#[weight(<SelfWeightOf<T>>::burn_from())]
 	fn burn_from_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		from: pallet_common::eth::CrossAddress,
 		amount: U256,
 	) -> Result<bool> {
@@ -254,7 +254,7 @@
 	/// Mint tokens for multiple accounts.
 	/// @param amounts array of pairs of account address and amount
 	#[weight(<SelfWeightOf<T>>::create_multiple_items_ex(amounts.len() as u32))]
-	fn mint_bulk(&mut self, caller: caller, amounts: Vec<(Address, U256)>) -> Result<bool> {
+	fn mint_bulk(&mut self, caller: Caller, amounts: Vec<(Address, U256)>) -> Result<bool> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let budget = self
 			.recorder
@@ -277,7 +277,7 @@
 	#[weight(<SelfWeightOf<T>>::transfer())]
 	fn transfer_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		to: pallet_common::eth::CrossAddress,
 		amount: U256,
 	) -> Result<bool> {
@@ -295,7 +295,7 @@
 	#[weight(<SelfWeightOf<T>>::transfer_from())]
 	fn transfer_from_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		from: pallet_common::eth::CrossAddress,
 		to: pallet_common::eth::CrossAddress,
 		amount: U256,
modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -63,7 +63,7 @@
 	#[solidity(hide)]
 	fn set_token_property_permission(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		key: String,
 		is_mutable: bool,
 		collection_admin: bool,
@@ -93,7 +93,7 @@
 	#[weight(<SelfWeightOf<T>>::set_token_property_permissions(permissions.len() as u32))]
 	fn set_token_property_permissions(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		permissions: Vec<eth::TokenPropertyPermission>,
 	) -> Result<()> {
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -121,7 +121,7 @@
 	#[weight(<SelfWeightOf<T>>::set_token_properties(1))]
 	fn set_property(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		token_id: U256,
 		key: String,
 		value: Bytes,
@@ -154,7 +154,7 @@
 	#[weight(<SelfWeightOf<T>>::set_token_properties(properties.len() as u32))]
 	fn set_properties(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		token_id: U256,
 		properties: Vec<eth::Property>,
 	) -> Result<()> {
@@ -187,7 +187,7 @@
 	/// @param key Property key.
 	#[solidity(hide)]
 	#[weight(<SelfWeightOf<T>>::delete_token_properties(1))]
-	fn delete_property(&mut self, token_id: U256, caller: caller, key: String) -> Result<()> {
+	fn delete_property(&mut self, token_id: U256, caller: Caller, key: String) -> Result<()> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;
 		let key = <Vec<u8>>::from(key)
@@ -210,7 +210,7 @@
 	fn delete_properties(
 		&mut self,
 		token_id: U256,
-		caller: caller,
+		caller: Caller,
 		keys: Vec<String>,
 	) -> Result<()> {
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -445,7 +445,7 @@
 	#[weight(<SelfWeightOf<T>>::transfer_from())]
 	fn transfer_from(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		from: Address,
 		to: Address,
 		token_id: U256,
@@ -470,7 +470,7 @@
 	/// @param approved The new approved NFT controller
 	/// @param tokenId The NFT to approve
 	#[weight(<SelfWeightOf<T>>::approve())]
-	fn approve(&mut self, caller: caller, approved: Address, token_id: U256) -> Result<()> {
+	fn approve(&mut self, caller: Caller, approved: Address, token_id: U256) -> Result<()> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let approved = T::CrossAccountId::from_eth(approved);
 		let token = token_id.try_into()?;
@@ -487,7 +487,7 @@
 	#[weight(<SelfWeightOf<T>>::set_allowance_for_all())]
 	fn set_approval_for_all(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		operator: Address,
 		approved: bool,
 	) -> Result<()> {
@@ -523,7 +523,7 @@
 	///  operator of the current owner.
 	/// @param tokenId The NFT to approve
 	#[weight(<SelfWeightOf<T>>::burn_item())]
-	fn burn(&mut self, caller: caller, token_id: U256) -> Result<()> {
+	fn burn(&mut self, caller: Caller, token_id: U256) -> Result<()> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let token = token_id.try_into()?;
 
@@ -539,7 +539,7 @@
 	/// @param to The new owner
 	/// @return uint256 The id of the newly minted token
 	#[weight(<SelfWeightOf<T>>::create_item())]
-	fn mint(&mut self, caller: caller, to: Address) -> Result<U256> {
+	fn mint(&mut self, caller: Caller, to: Address) -> Result<U256> {
 		let token_id: U256 = <TokensMinted<T>>::get(self.id)
 			.checked_add(1)
 			.ok_or("item id overflow")?
@@ -555,7 +555,7 @@
 	/// @param tokenId ID of the minted NFT
 	#[solidity(hide, rename_selector = "mint")]
 	#[weight(<SelfWeightOf<T>>::create_item())]
-	fn mint_check_id(&mut self, caller: caller, to: Address, token_id: U256) -> Result<bool> {
+	fn mint_check_id(&mut self, caller: Caller, to: Address, token_id: U256) -> Result<bool> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let to = T::CrossAccountId::from_eth(to);
 		let token_id: u32 = token_id.try_into()?;
@@ -593,7 +593,7 @@
 	#[weight(<SelfWeightOf<T>>::create_item())]
 	fn mint_with_token_uri(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		to: Address,
 		token_uri: String,
 	) -> Result<U256> {
@@ -615,7 +615,7 @@
 	#[weight(<SelfWeightOf<T>>::create_item())]
 	fn mint_with_token_uri_check_id(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		to: Address,
 		token_id: U256,
 		token_uri: String,
@@ -765,7 +765,7 @@
 	#[weight(<SelfWeightOf<T>>::approve())]
 	fn approve_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		approved: eth::CrossAddress,
 		token_id: U256,
 	) -> Result<()> {
@@ -784,7 +784,7 @@
 	/// @param to The new owner
 	/// @param tokenId The NFT to transfer
 	#[weight(<SelfWeightOf<T>>::transfer())]
-	fn transfer(&mut self, caller: caller, to: Address, token_id: U256) -> Result<()> {
+	fn transfer(&mut self, caller: Caller, to: Address, token_id: U256) -> Result<()> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let to = T::CrossAccountId::from_eth(to);
 		let token = token_id.try_into()?;
@@ -804,7 +804,7 @@
 	#[weight(<SelfWeightOf<T>>::transfer())]
 	fn transfer_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		to: eth::CrossAddress,
 		token_id: U256,
 	) -> Result<()> {
@@ -828,7 +828,7 @@
 	#[weight(<SelfWeightOf<T>>::transfer())]
 	fn transfer_from_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		from: eth::CrossAddress,
 		to: eth::CrossAddress,
 		token_id: U256,
@@ -853,7 +853,7 @@
 	/// @param tokenId The NFT to transfer
 	#[solidity(hide)]
 	#[weight(<SelfWeightOf<T>>::burn_from())]
-	fn burn_from(&mut self, caller: caller, from: Address, token_id: U256) -> Result<()> {
+	fn burn_from(&mut self, caller: Caller, from: Address, token_id: U256) -> Result<()> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let from = T::CrossAccountId::from_eth(from);
 		let token = token_id.try_into()?;
@@ -875,7 +875,7 @@
 	#[weight(<SelfWeightOf<T>>::burn_from())]
 	fn burn_from_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		from: eth::CrossAddress,
 		token_id: U256,
 	) -> Result<()> {
@@ -907,7 +907,7 @@
 	/// @param tokenIds IDs of the minted NFTs
 	#[solidity(hide)]
 	#[weight(<SelfWeightOf<T>>::create_multiple_items(token_ids.len() as u32))]
-	fn mint_bulk(&mut self, caller: caller, to: Address, token_ids: Vec<U256>) -> Result<bool> {
+	fn mint_bulk(&mut self, caller: Caller, to: Address, token_ids: Vec<U256>) -> Result<bool> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let to = T::CrossAccountId::from_eth(to);
 		let mut expected_index = <TokensMinted<T>>::get(self.id)
@@ -946,7 +946,7 @@
 	#[weight(<SelfWeightOf<T>>::create_multiple_items(tokens.len() as u32))]
 	fn mint_bulk_with_token_uri(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		to: Address,
 		tokens: Vec<(U256, String)>,
 	) -> Result<bool> {
@@ -997,7 +997,7 @@
 	#[weight(<SelfWeightOf<T>>::create_item())]
 	fn mint_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		to: eth::CrossAddress,
 		properties: Vec<eth::Property>,
 	) -> Result<U256> {
modifiedpallets/refungible/src/erc.rsdiffbeforeafterboth
66 #[solidity(hide)]66 #[solidity(hide)]
67 fn set_token_property_permission(67 fn set_token_property_permission(
68 &mut self,68 &mut self,
69 caller: caller,69 caller: Caller,
70 key: String,70 key: String,
71 is_mutable: bool,71 is_mutable: bool,
72 collection_admin: bool,72 collection_admin: bool,
96 #[weight(<SelfWeightOf<T>>::set_token_property_permissions(permissions.len() as u32))]96 #[weight(<SelfWeightOf<T>>::set_token_property_permissions(permissions.len() as u32))]
97 fn set_token_property_permissions(97 fn set_token_property_permissions(
98 &mut self,98 &mut self,
99 caller: caller,99 caller: Caller,
100 permissions: Vec<eth::TokenPropertyPermission>,100 permissions: Vec<eth::TokenPropertyPermission>,
101 ) -> Result<()> {101 ) -> Result<()> {
102 let caller = T::CrossAccountId::from_eth(caller);102 let caller = T::CrossAccountId::from_eth(caller);
124 #[weight(<SelfWeightOf<T>>::set_token_properties(1))]124 #[weight(<SelfWeightOf<T>>::set_token_properties(1))]
125 fn set_property(125 fn set_property(
126 &mut self,126 &mut self,
127 caller: caller,127 caller: Caller,
128 token_id: U256,128 token_id: U256,
129 key: String,129 key: String,
130 value: Bytes,130 value: Bytes,
157 #[weight(<SelfWeightOf<T>>::set_token_properties(properties.len() as u32))]157 #[weight(<SelfWeightOf<T>>::set_token_properties(properties.len() as u32))]
158 fn set_properties(158 fn set_properties(
159 &mut self,159 &mut self,
160 caller: caller,160 caller: Caller,
161 token_id: U256,161 token_id: U256,
162 properties: Vec<eth::Property>,162 properties: Vec<eth::Property>,
163 ) -> Result<()> {163 ) -> Result<()> {
190 /// @param key Property key.190 /// @param key Property key.
191 #[solidity(hide)]191 #[solidity(hide)]
192 #[weight(<SelfWeightOf<T>>::delete_token_properties(1))]192 #[weight(<SelfWeightOf<T>>::delete_token_properties(1))]
193 fn delete_property(&mut self, token_id: U256, caller: caller, key: String) -> Result<()> {193 fn delete_property(&mut self, token_id: U256, caller: Caller, key: String) -> Result<()> {
194 let caller = T::CrossAccountId::from_eth(caller);194 let caller = T::CrossAccountId::from_eth(caller);
195 let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;195 let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;
196 let key = <Vec<u8>>::from(key)196 let key = <Vec<u8>>::from(key)
213 fn delete_properties(213 fn delete_properties(
214 &mut self,214 &mut self,
215 token_id: U256,215 token_id: U256,
216 caller: caller,216 caller: Caller,
217 keys: Vec<String>,217 keys: Vec<String>,
218 ) -> Result<()> {218 ) -> Result<()> {
219 let caller = T::CrossAccountId::from_eth(caller);219 let caller = T::CrossAccountId::from_eth(caller);
449 #[weight(<SelfWeightOf<T>>::transfer_from_creating_removing())]449 #[weight(<SelfWeightOf<T>>::transfer_from_creating_removing())]
450 fn transfer_from(450 fn transfer_from(
451 &mut self,451 &mut self,
452 caller: caller,452 caller: Caller,
453 from: Address,453 from: Address,
454 to: Address,454 to: Address,
455 token_id: U256,455 token_id: U256,
472 }472 }
473473
474 /// @dev Not implemented474 /// @dev Not implemented
475 fn approve(&mut self, _caller: caller, _approved: Address, _token_id: U256) -> Result<()> {475 fn approve(&mut self, _caller: Caller, _approved: Address, _token_id: U256) -> Result<()> {
476 Err("not implemented".into())476 Err("not implemented".into())
477 }477 }
478478
483 #[weight(<SelfWeightOf<T>>::set_allowance_for_all())]483 #[weight(<SelfWeightOf<T>>::set_allowance_for_all())]
484 fn set_approval_for_all(484 fn set_approval_for_all(
485 &mut self,485 &mut self,
486 caller: caller,486 caller: Caller,
487 operator: Address,487 operator: Address,
488 approved: bool,488 approved: bool,
489 ) -> Result<()> {489 ) -> Result<()> {
551 /// operator of the current owner.551 /// operator of the current owner.
552 /// @param tokenId The RFT to approve552 /// @param tokenId The RFT to approve
553 #[weight(<SelfWeightOf<T>>::burn_item_fully())]553 #[weight(<SelfWeightOf<T>>::burn_item_fully())]
554 fn burn(&mut self, caller: caller, token_id: U256) -> Result<()> {554 fn burn(&mut self, caller: Caller, token_id: U256) -> Result<()> {
555 let caller = T::CrossAccountId::from_eth(caller);555 let caller = T::CrossAccountId::from_eth(caller);
556 let token = token_id.try_into()?;556 let token = token_id.try_into()?;
557557
570 /// @param to The new owner570 /// @param to The new owner
571 /// @return uint256 The id of the newly minted token571 /// @return uint256 The id of the newly minted token
572 #[weight(<SelfWeightOf<T>>::create_item())]572 #[weight(<SelfWeightOf<T>>::create_item())]
573 fn mint(&mut self, caller: caller, to: Address) -> Result<U256> {573 fn mint(&mut self, caller: Caller, to: Address) -> Result<U256> {
574 let token_id: U256 = <TokensMinted<T>>::get(self.id)574 let token_id: U256 = <TokensMinted<T>>::get(self.id)
575 .checked_add(1)575 .checked_add(1)
576 .ok_or("item id overflow")?576 .ok_or("item id overflow")?
586 /// @param tokenId ID of the minted RFT586 /// @param tokenId ID of the minted RFT
587 #[solidity(hide, rename_selector = "mint")]587 #[solidity(hide, rename_selector = "mint")]
588 #[weight(<SelfWeightOf<T>>::create_item())]588 #[weight(<SelfWeightOf<T>>::create_item())]
589 fn mint_check_id(&mut self, caller: caller, to: Address, token_id: U256) -> Result<bool> {589 fn mint_check_id(&mut self, caller: Caller, to: Address, token_id: U256) -> Result<bool> {
590 let caller = T::CrossAccountId::from_eth(caller);590 let caller = T::CrossAccountId::from_eth(caller);
591 let to = T::CrossAccountId::from_eth(to);591 let to = T::CrossAccountId::from_eth(to);
592 let token_id: u32 = token_id.try_into()?;592 let token_id: u32 = token_id.try_into()?;
629 #[weight(<SelfWeightOf<T>>::create_item())]629 #[weight(<SelfWeightOf<T>>::create_item())]
630 fn mint_with_token_uri(630 fn mint_with_token_uri(
631 &mut self,631 &mut self,
632 caller: caller,632 caller: Caller,
633 to: Address,633 to: Address,
634 token_uri: String,634 token_uri: String,
635 ) -> Result<U256> {635 ) -> Result<U256> {
651 #[weight(<SelfWeightOf<T>>::create_item())]651 #[weight(<SelfWeightOf<T>>::create_item())]
652 fn mint_with_token_uri_check_id(652 fn mint_with_token_uri_check_id(
653 &mut self,653 &mut self,
654 caller: caller,654 caller: Caller,
655 to: Address,655 to: Address,
656 token_id: U256,656 token_id: U256,
657 token_uri: String,657 token_uri: String,
800 /// @param to The new owner800 /// @param to The new owner
801 /// @param tokenId The RFT to transfer801 /// @param tokenId The RFT to transfer
802 #[weight(<SelfWeightOf<T>>::transfer_creating_removing())]802 #[weight(<SelfWeightOf<T>>::transfer_creating_removing())]
803 fn transfer(&mut self, caller: caller, to: Address, token_id: U256) -> Result<()> {803 fn transfer(&mut self, caller: Caller, to: Address, token_id: U256) -> Result<()> {
804 let caller = T::CrossAccountId::from_eth(caller);804 let caller = T::CrossAccountId::from_eth(caller);
805 let to = T::CrossAccountId::from_eth(to);805 let to = T::CrossAccountId::from_eth(to);
806 let token = token_id.try_into()?;806 let token = token_id.try_into()?;
825 #[weight(<SelfWeightOf<T>>::transfer_creating_removing())]825 #[weight(<SelfWeightOf<T>>::transfer_creating_removing())]
826 fn transfer_cross(826 fn transfer_cross(
827 &mut self,827 &mut self,
828 caller: caller,828 caller: Caller,
829 to: eth::CrossAddress,829 to: eth::CrossAddress,
830 token_id: U256,830 token_id: U256,
831 ) -> Result<()> {831 ) -> Result<()> {
853 #[weight(<SelfWeightOf<T>>::transfer_creating_removing())]853 #[weight(<SelfWeightOf<T>>::transfer_creating_removing())]
854 fn transfer_from_cross(854 fn transfer_from_cross(
855 &mut self,855 &mut self,
856 caller: caller,856 caller: Caller,
857 from: eth::CrossAddress,857 from: eth::CrossAddress,
858 to: eth::CrossAddress,858 to: eth::CrossAddress,
859 token_id: U256,859 token_id: U256,
883 /// @param tokenId The RFT to transfer883 /// @param tokenId The RFT to transfer
884 #[solidity(hide)]884 #[solidity(hide)]
885 #[weight(<SelfWeightOf<T>>::burn_from())]885 #[weight(<SelfWeightOf<T>>::burn_from())]
886 fn burn_from(&mut self, caller: caller, from: Address, token_id: U256) -> Result<()> {886 fn burn_from(&mut self, caller: Caller, from: Address, token_id: U256) -> Result<()> {
887 let caller = T::CrossAccountId::from_eth(caller);887 let caller = T::CrossAccountId::from_eth(caller);
888 let from = T::CrossAccountId::from_eth(from);888 let from = T::CrossAccountId::from_eth(from);
889 let token = token_id.try_into()?;889 let token = token_id.try_into()?;
909 #[weight(<SelfWeightOf<T>>::burn_from())]909 #[weight(<SelfWeightOf<T>>::burn_from())]
910 fn burn_from_cross(910 fn burn_from_cross(
911 &mut self,911 &mut self,
912 caller: caller,912 caller: Caller,
913 from: eth::CrossAddress,913 from: eth::CrossAddress,
914 token_id: U256,914 token_id: U256,
915 ) -> Result<()> {915 ) -> Result<()> {
944 /// @param tokenIds IDs of the minted RFTs944 /// @param tokenIds IDs of the minted RFTs
945 #[solidity(hide)]945 #[solidity(hide)]
946 #[weight(<SelfWeightOf<T>>::create_multiple_items(token_ids.len() as u32))]946 #[weight(<SelfWeightOf<T>>::create_multiple_items(token_ids.len() as u32))]
947 fn mint_bulk(&mut self, caller: caller, to: Address, token_ids: Vec<U256>) -> Result<bool> {947 fn mint_bulk(&mut self, caller: Caller, to: Address, token_ids: Vec<U256>) -> Result<bool> {
948 let caller = T::CrossAccountId::from_eth(caller);948 let caller = T::CrossAccountId::from_eth(caller);
949 let to = T::CrossAccountId::from_eth(to);949 let to = T::CrossAccountId::from_eth(to);
950 let mut expected_index = <TokensMinted<T>>::get(self.id)950 let mut expected_index = <TokensMinted<T>>::get(self.id)
989 #[weight(<SelfWeightOf<T>>::create_multiple_items(tokens.len() as u32))]989 #[weight(<SelfWeightOf<T>>::create_multiple_items(tokens.len() as u32))]
990 fn mint_bulk_with_token_uri(990 fn mint_bulk_with_token_uri(
991 &mut self,991 &mut self,
992 caller: caller,992 caller: Caller,
993 to: Address,993 to: Address,
994 tokens: Vec<(U256, String)>,994 tokens: Vec<(U256, String)>,
995 ) -> Result<bool> {995 ) -> Result<bool> {
1046 #[weight(<SelfWeightOf<T>>::create_item())]1046 #[weight(<SelfWeightOf<T>>::create_item())]
1047 fn mint_cross(1047 fn mint_cross(
1048 &mut self,1048 &mut self,
1049 caller: caller,1049 caller: Caller,
1050 to: eth::CrossAddress,1050 to: eth::CrossAddress,
1051 properties: Vec<eth::Property>,1051 properties: Vec<eth::Property>,
1052 ) -> Result<U256> {1052 ) -> Result<U256> {
modifiedpallets/refungible/src/erc_token.rsdiffbeforeafterboth
--- a/pallets/refungible/src/erc_token.rs
+++ b/pallets/refungible/src/erc_token.rs
@@ -129,7 +129,7 @@
 	/// @param to The address to transfer to.
 	/// @param amount The amount to be transferred.
 	#[weight(<CommonWeights<T>>::transfer())]
-	fn transfer(&mut self, caller: caller, to: Address, amount: U256) -> Result<bool> {
+	fn transfer(&mut self, caller: Caller, to: Address, amount: U256) -> Result<bool> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let to = T::CrossAccountId::from_eth(to);
 		let amount = amount.try_into().map_err(|_| "amount overflow")?;
@@ -149,7 +149,7 @@
 	#[weight(<CommonWeights<T>>::transfer_from())]
 	fn transfer_from(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		from: Address,
 		to: Address,
 		amount: U256,
@@ -175,7 +175,7 @@
 	/// @param spender The address which will spend the funds.
 	/// @param amount The amount of tokens to be spent.
 	#[weight(<SelfWeightOf<T>>::approve())]
-	fn approve(&mut self, caller: caller, spender: Address, amount: U256) -> Result<bool> {
+	fn approve(&mut self, caller: Caller, spender: Address, amount: U256) -> Result<bool> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let spender = T::CrossAccountId::from_eth(spender);
 		let amount = amount.try_into().map_err(|_| "amount overflow")?;
@@ -209,7 +209,7 @@
 	/// @param amount The amount that will be burnt.
 	#[weight(<SelfWeightOf<T>>::burn_from())]
 	#[solidity(hide)]
-	fn burn_from(&mut self, caller: caller, from: Address, amount: U256) -> Result<bool> {
+	fn burn_from(&mut self, caller: Caller, from: Address, amount: U256) -> Result<bool> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let from = T::CrossAccountId::from_eth(from);
 		let amount = amount.try_into().map_err(|_| "amount overflow")?;
@@ -229,7 +229,7 @@
 	#[weight(<SelfWeightOf<T>>::burn_from())]
 	fn burn_from_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		from: pallet_common::eth::CrossAddress,
 		amount: U256,
 	) -> Result<bool> {
@@ -255,7 +255,7 @@
 	#[weight(<SelfWeightOf<T>>::approve())]
 	fn approve_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		spender: pallet_common::eth::CrossAddress,
 		amount: U256,
 	) -> Result<bool> {
@@ -271,7 +271,7 @@
 	///  Throws if `msg.sender` doesn't owns all of the tokens.
 	/// @param amount New total amount of the tokens.
 	#[weight(<SelfWeightOf<T>>::repartition_item())]
-	fn repartition(&mut self, caller: caller, amount: U256) -> Result<bool> {
+	fn repartition(&mut self, caller: Caller, amount: U256) -> Result<bool> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let amount = amount.try_into().map_err(|_| "amount overflow")?;
 
@@ -285,7 +285,7 @@
 	#[weight(<CommonWeights<T>>::transfer())]
 	fn transfer_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		to: pallet_common::eth::CrossAddress,
 		amount: U256,
 	) -> Result<bool> {
@@ -308,7 +308,7 @@
 	#[weight(<CommonWeights<T>>::transfer_from())]
 	fn transfer_from_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		from: pallet_common::eth::CrossAddress,
 		to: pallet_common::eth::CrossAddress,
 		amount: U256,
modifiedpallets/unique/src/eth/mod.rsdiffbeforeafterboth
--- a/pallets/unique/src/eth/mod.rs
+++ b/pallets/unique/src/eth/mod.rs
@@ -56,7 +56,7 @@
 }
 
 fn convert_data<T: Config>(
-	caller: caller,
+	caller: Caller,
 	name: String,
 	description: String,
 	token_prefix: String,
@@ -87,7 +87,7 @@
 
 #[inline(always)]
 fn create_collection_internal<T: Config>(
-	caller: caller,
+	caller: Caller,
 	value: Value,
 	name: String,
 	collection_mode: CollectionMode,
@@ -149,7 +149,7 @@
 	#[solidity(rename_selector = "createNFTCollection")]
 	fn create_nft_collection(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		value: Value,
 		name: String,
 		description: String,
@@ -188,7 +188,7 @@
 	#[solidity(hide)]
 	fn create_nonfungible_collection(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		value: Value,
 		name: String,
 		description: String,
@@ -208,7 +208,7 @@
 	#[solidity(rename_selector = "createRFTCollection")]
 	fn create_rft_collection(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		value: Value,
 		name: String,
 		description: String,
@@ -228,7 +228,7 @@
 	#[solidity(rename_selector = "createFTCollection")]
 	fn create_fungible_collection(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		value: Value,
 		name: String,
 		decimals: u8,
@@ -248,7 +248,7 @@
 	#[solidity(rename_selector = "makeCollectionERC721MetadataCompatible")]
 	fn make_collection_metadata_compatible(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		collection: Address,
 		base_uri: String,
 	) -> Result<()> {
@@ -334,7 +334,7 @@
 	}
 
 	#[weight(<SelfWeightOf<T>>::destroy_collection())]
-	fn destroy_collection(&mut self, caller: caller, collection_address: Address) -> Result<()> {
+	fn destroy_collection(&mut self, caller: Caller, collection_address: Address) -> Result<()> {
 		let caller = T::CrossAccountId::from_eth(caller);
 
 		let collection_id = pallet_common::eth::map_eth_to_id(&collection_address)
@@ -346,7 +346,7 @@
 	/// Check if a collection exists
 	/// @param collectionAddress Address of the collection in question
 	/// @return bool Does the collection exist?
-	fn is_collection_exist(&self, _caller: caller, collection_address: Address) -> Result<bool> {
+	fn is_collection_exist(&self, _caller: Caller, collection_address: Address) -> Result<bool> {
 		if let Some(id) = pallet_common::eth::map_eth_to_id(&collection_address) {
 			let collection_id = id;
 			return Ok(<CollectionById<T>>::contains_key(collection_id));