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
94 /// @param value Propery value.94 /// @param value Propery value.
95 #[solidity(hide)]95 #[solidity(hide)]
96 #[weight(<SelfWeightOf<T>>::set_collection_properties(1))]96 #[weight(<SelfWeightOf<T>>::set_collection_properties(1))]
97 fn set_collection_property(&mut self, caller: caller, key: String, value: Bytes) -> Result<()> {97 fn set_collection_property(&mut self, caller: Caller, key: String, value: Bytes) -> Result<()> {
98 let caller = T::CrossAccountId::from_eth(caller);98 let caller = T::CrossAccountId::from_eth(caller);
99 let key = <Vec<u8>>::from(key)99 let key = <Vec<u8>>::from(key)
100 .try_into()100 .try_into()
111 #[weight(<SelfWeightOf<T>>::set_collection_properties(properties.len() as u32))]111 #[weight(<SelfWeightOf<T>>::set_collection_properties(properties.len() as u32))]
112 fn set_collection_properties(112 fn set_collection_properties(
113 &mut self,113 &mut self,
114 caller: caller,114 caller: Caller,
115 properties: Vec<eth::Property>,115 properties: Vec<eth::Property>,
116 ) -> Result<()> {116 ) -> Result<()> {
117 let caller = T::CrossAccountId::from_eth(caller);117 let caller = T::CrossAccountId::from_eth(caller);
130 /// @param key Property key.130 /// @param key Property key.
131 #[solidity(hide)]131 #[solidity(hide)]
132 #[weight(<SelfWeightOf<T>>::delete_collection_properties(1))]132 #[weight(<SelfWeightOf<T>>::delete_collection_properties(1))]
133 fn delete_collection_property(&mut self, caller: caller, key: String) -> Result<()> {133 fn delete_collection_property(&mut self, caller: Caller, key: String) -> Result<()> {
134 let caller = T::CrossAccountId::from_eth(caller);134 let caller = T::CrossAccountId::from_eth(caller);
135 let key = <Vec<u8>>::from(key)135 let key = <Vec<u8>>::from(key)
136 .try_into()136 .try_into()
143 ///143 ///
144 /// @param keys Properties keys.144 /// @param keys Properties keys.
145 #[weight(<SelfWeightOf<T>>::delete_collection_properties(keys.len() as u32))]145 #[weight(<SelfWeightOf<T>>::delete_collection_properties(keys.len() as u32))]
146 fn delete_collection_properties(&mut self, caller: caller, keys: Vec<String>) -> Result<()> {146 fn delete_collection_properties(&mut self, caller: Caller, keys: Vec<String>) -> Result<()> {
147 let caller = T::CrossAccountId::from_eth(caller);147 let caller = T::CrossAccountId::from_eth(caller);
148 let keys = keys148 let keys = keys
149 .into_iter()149 .into_iter()
208 ///208 ///
209 /// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.209 /// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
210 #[solidity(hide)]210 #[solidity(hide)]
211 fn set_collection_sponsor(&mut self, caller: caller, sponsor: Address) -> Result<()> {211 fn set_collection_sponsor(&mut self, caller: Caller, sponsor: Address) -> Result<()> {
212 self.consume_store_reads_and_writes(1, 1)?;212 self.consume_store_reads_and_writes(1, 1)?;
213213
214 let caller = T::CrossAccountId::from_eth(caller);214 let caller = T::CrossAccountId::from_eth(caller);
225 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.225 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.
226 fn set_collection_sponsor_cross(226 fn set_collection_sponsor_cross(
227 &mut self,227 &mut self,
228 caller: caller,228 caller: Caller,
229 sponsor: eth::CrossAddress,229 sponsor: eth::CrossAddress,
230 ) -> Result<()> {230 ) -> Result<()> {
231 self.consume_store_reads_and_writes(1, 1)?;231 self.consume_store_reads_and_writes(1, 1)?;
248 /// Collection sponsorship confirmation.248 /// Collection sponsorship confirmation.
249 ///249 ///
250 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.250 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.
251 fn confirm_collection_sponsorship(&mut self, caller: caller) -> Result<()> {251 fn confirm_collection_sponsorship(&mut self, caller: Caller) -> Result<()> {
252 self.consume_store_writes(1)?;252 self.consume_store_writes(1)?;
253253
254 let caller = T::CrossAccountId::from_eth(caller);254 let caller = T::CrossAccountId::from_eth(caller);
257 }257 }
258258
259 /// Remove collection sponsor.259 /// Remove collection sponsor.
260 fn remove_collection_sponsor(&mut self, caller: caller) -> Result<()> {260 fn remove_collection_sponsor(&mut self, caller: Caller) -> Result<()> {
261 self.consume_store_reads_and_writes(1, 1)?;261 self.consume_store_reads_and_writes(1, 1)?;
262 let caller = T::CrossAccountId::from_eth(caller);262 let caller = T::CrossAccountId::from_eth(caller);
263 self.remove_sponsor(&caller).map_err(dispatch_to_evm::<T>)263 self.remove_sponsor(&caller).map_err(dispatch_to_evm::<T>)
339 /// @dev Throws error if limit not found.339 /// @dev Throws error if limit not found.
340 /// @param limit Some limit.340 /// @param limit Some limit.
341 #[solidity(rename_selector = "setCollectionLimit")]341 #[solidity(rename_selector = "setCollectionLimit")]
342 fn set_collection_limit(&mut self, caller: caller, limit: eth::CollectionLimit) -> Result<()> {342 fn set_collection_limit(&mut self, caller: Caller, limit: eth::CollectionLimit) -> Result<()> {
343 self.consume_store_reads_and_writes(1, 1)?;343 self.consume_store_reads_and_writes(1, 1)?;
344344
345 if !limit.has_value() {345 if !limit.has_value() {
359 /// @param newAdmin Cross account administrator address.359 /// @param newAdmin Cross account administrator address.
360 fn add_collection_admin_cross(360 fn add_collection_admin_cross(
361 &mut self,361 &mut self,
362 caller: caller,362 caller: Caller,
363 new_admin: eth::CrossAddress,363 new_admin: eth::CrossAddress,
364 ) -> Result<()> {364 ) -> Result<()> {
365 self.consume_store_reads_and_writes(2, 2)?;365 self.consume_store_reads_and_writes(2, 2)?;
374 /// @param admin Cross account administrator address.374 /// @param admin Cross account administrator address.
375 fn remove_collection_admin_cross(375 fn remove_collection_admin_cross(
376 &mut self,376 &mut self,
377 caller: caller,377 caller: Caller,
378 admin: eth::CrossAddress,378 admin: eth::CrossAddress,
379 ) -> Result<()> {379 ) -> Result<()> {
380 self.consume_store_reads_and_writes(2, 2)?;380 self.consume_store_reads_and_writes(2, 2)?;
388 /// Add collection admin.388 /// Add collection admin.
389 /// @param newAdmin Address of the added administrator.389 /// @param newAdmin Address of the added administrator.
390 #[solidity(hide)]390 #[solidity(hide)]
391 fn add_collection_admin(&mut self, caller: caller, new_admin: Address) -> Result<()> {391 fn add_collection_admin(&mut self, caller: Caller, new_admin: Address) -> Result<()> {
392 self.consume_store_reads_and_writes(2, 2)?;392 self.consume_store_reads_and_writes(2, 2)?;
393393
394 let caller = T::CrossAccountId::from_eth(caller);394 let caller = T::CrossAccountId::from_eth(caller);
401 ///401 ///
402 /// @param admin Address of the removed administrator.402 /// @param admin Address of the removed administrator.
403 #[solidity(hide)]403 #[solidity(hide)]
404 fn remove_collection_admin(&mut self, caller: caller, admin: Address) -> Result<()> {404 fn remove_collection_admin(&mut self, caller: Caller, admin: Address) -> Result<()> {
405 self.consume_store_reads_and_writes(2, 2)?;405 self.consume_store_reads_and_writes(2, 2)?;
406406
407 let caller = T::CrossAccountId::from_eth(caller);407 let caller = T::CrossAccountId::from_eth(caller);
414 ///414 ///
415 /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'415 /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
416 #[solidity(rename_selector = "setCollectionNesting")]416 #[solidity(rename_selector = "setCollectionNesting")]
417 fn set_nesting_bool(&mut self, caller: caller, enable: bool) -> Result<()> {417 fn set_nesting_bool(&mut self, caller: Caller, enable: bool) -> Result<()> {
418 self.consume_store_reads_and_writes(1, 1)?;418 self.consume_store_reads_and_writes(1, 1)?;
419419
420 let caller = T::CrossAccountId::from_eth(caller);420 let caller = T::CrossAccountId::from_eth(caller);
435 #[solidity(rename_selector = "setCollectionNesting")]435 #[solidity(rename_selector = "setCollectionNesting")]
436 fn set_nesting(436 fn set_nesting(
437 &mut self,437 &mut self,
438 caller: caller,438 caller: Caller,
439 enable: bool,439 enable: bool,
440 collections: Vec<Address>,440 collections: Vec<Address>,
441 ) -> Result<()> {441 ) -> Result<()> {
503 }503 }
504 /// Set the collection access method.504 /// Set the collection access method.
505 /// @param mode Access mode505 /// @param mode Access mode
506 fn set_collection_access(&mut self, caller: caller, mode: eth::AccessMode) -> Result<()> {506 fn set_collection_access(&mut self, caller: Caller, mode: eth::AccessMode) -> Result<()> {
507 self.consume_store_reads_and_writes(1, 1)?;507 self.consume_store_reads_and_writes(1, 1)?;
508508
509 let caller = T::CrossAccountId::from_eth(caller);509 let caller = T::CrossAccountId::from_eth(caller);
526 ///526 ///
527 /// @param user Address of a trusted user.527 /// @param user Address of a trusted user.
528 #[solidity(hide)]528 #[solidity(hide)]
529 fn add_to_collection_allow_list(&mut self, caller: caller, user: Address) -> Result<()> {529 fn add_to_collection_allow_list(&mut self, caller: Caller, user: Address) -> Result<()> {
530 self.consume_store_writes(1)?;530 self.consume_store_writes(1)?;
531531
532 let caller = T::CrossAccountId::from_eth(caller);532 let caller = T::CrossAccountId::from_eth(caller);
540 /// @param user User cross account address.540 /// @param user User cross account address.
541 fn add_to_collection_allow_list_cross(541 fn add_to_collection_allow_list_cross(
542 &mut self,542 &mut self,
543 caller: caller,543 caller: Caller,
544 user: eth::CrossAddress,544 user: eth::CrossAddress,
545 ) -> Result<()> {545 ) -> Result<()> {
546 self.consume_store_writes(1)?;546 self.consume_store_writes(1)?;
555 ///555 ///
556 /// @param user Address of a removed user.556 /// @param user Address of a removed user.
557 #[solidity(hide)]557 #[solidity(hide)]
558 fn remove_from_collection_allow_list(&mut self, caller: caller, user: Address) -> Result<()> {558 fn remove_from_collection_allow_list(&mut self, caller: Caller, user: Address) -> Result<()> {
559 self.consume_store_writes(1)?;559 self.consume_store_writes(1)?;
560560
561 let caller = T::CrossAccountId::from_eth(caller);561 let caller = T::CrossAccountId::from_eth(caller);
569 /// @param user User cross account address.569 /// @param user User cross account address.
570 fn remove_from_collection_allow_list_cross(570 fn remove_from_collection_allow_list_cross(
571 &mut self,571 &mut self,
572 caller: caller,572 caller: Caller,
573 user: eth::CrossAddress,573 user: eth::CrossAddress,
574 ) -> Result<()> {574 ) -> Result<()> {
575 self.consume_store_writes(1)?;575 self.consume_store_writes(1)?;
583 /// Switch permission for minting.583 /// Switch permission for minting.
584 ///584 ///
585 /// @param mode Enable if "true".585 /// @param mode Enable if "true".
586 fn set_collection_mint_mode(&mut self, caller: caller, mode: bool) -> Result<()> {586 fn set_collection_mint_mode(&mut self, caller: Caller, mode: bool) -> Result<()> {
587 self.consume_store_reads_and_writes(1, 1)?;587 self.consume_store_reads_and_writes(1, 1)?;
588588
589 let caller = T::CrossAccountId::from_eth(caller);589 let caller = T::CrossAccountId::from_eth(caller);
640 /// @dev Owner can be changed only by current owner640 /// @dev Owner can be changed only by current owner
641 /// @param newOwner new owner account641 /// @param newOwner new owner account
642 #[solidity(hide, rename_selector = "changeCollectionOwner")]642 #[solidity(hide, rename_selector = "changeCollectionOwner")]
643 fn set_owner(&mut self, caller: caller, new_owner: Address) -> Result<()> {643 fn set_owner(&mut self, caller: Caller, new_owner: Address) -> Result<()> {
644 self.consume_store_writes(1)?;644 self.consume_store_writes(1)?;
645645
646 let caller = T::CrossAccountId::from_eth(caller);646 let caller = T::CrossAccountId::from_eth(caller);
666 /// @param newOwner new owner cross account666 /// @param newOwner new owner cross account
667 fn change_collection_owner_cross(667 fn change_collection_owner_cross(
668 &mut self,668 &mut self,
669 caller: caller,669 caller: Caller,
670 new_owner: eth::CrossAddress,670 new_owner: eth::CrossAddress,
671 ) -> Result<()> {671 ) -> Result<()> {
672 self.consume_store_writes(1)?;672 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
--- a/pallets/refungible/src/erc.rs
+++ b/pallets/refungible/src/erc.rs
@@ -66,7 +66,7 @@
 	#[solidity(hide)]
 	fn set_token_property_permission(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		key: String,
 		is_mutable: bool,
 		collection_admin: bool,
@@ -96,7 +96,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);
@@ -124,7 +124,7 @@
 	#[weight(<SelfWeightOf<T>>::set_token_properties(1))]
 	fn set_property(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		token_id: U256,
 		key: String,
 		value: Bytes,
@@ -157,7 +157,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<()> {
@@ -190,7 +190,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)
@@ -213,7 +213,7 @@
 	fn delete_properties(
 		&mut self,
 		token_id: U256,
-		caller: caller,
+		caller: Caller,
 		keys: Vec<String>,
 	) -> Result<()> {
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -449,7 +449,7 @@
 	#[weight(<SelfWeightOf<T>>::transfer_from_creating_removing())]
 	fn transfer_from(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		from: Address,
 		to: Address,
 		token_id: U256,
@@ -472,7 +472,7 @@
 	}
 
 	/// @dev Not implemented
-	fn approve(&mut self, _caller: caller, _approved: Address, _token_id: U256) -> Result<()> {
+	fn approve(&mut self, _caller: Caller, _approved: Address, _token_id: U256) -> Result<()> {
 		Err("not implemented".into())
 	}
 
@@ -483,7 +483,7 @@
 	#[weight(<SelfWeightOf<T>>::set_allowance_for_all())]
 	fn set_approval_for_all(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		operator: Address,
 		approved: bool,
 	) -> Result<()> {
@@ -551,7 +551,7 @@
 	///  operator of the current owner.
 	/// @param tokenId The RFT to approve
 	#[weight(<SelfWeightOf<T>>::burn_item_fully())]
-	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()?;
 
@@ -570,7 +570,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")?
@@ -586,7 +586,7 @@
 	/// @param tokenId ID of the minted RFT
 	#[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()?;
@@ -629,7 +629,7 @@
 	#[weight(<SelfWeightOf<T>>::create_item())]
 	fn mint_with_token_uri(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		to: Address,
 		token_uri: String,
 	) -> Result<U256> {
@@ -651,7 +651,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,
@@ -800,7 +800,7 @@
 	/// @param to The new owner
 	/// @param tokenId The RFT to transfer
 	#[weight(<SelfWeightOf<T>>::transfer_creating_removing())]
-	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()?;
@@ -825,7 +825,7 @@
 	#[weight(<SelfWeightOf<T>>::transfer_creating_removing())]
 	fn transfer_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		to: eth::CrossAddress,
 		token_id: U256,
 	) -> Result<()> {
@@ -853,7 +853,7 @@
 	#[weight(<SelfWeightOf<T>>::transfer_creating_removing())]
 	fn transfer_from_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		from: eth::CrossAddress,
 		to: eth::CrossAddress,
 		token_id: U256,
@@ -883,7 +883,7 @@
 	/// @param tokenId The RFT 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()?;
@@ -909,7 +909,7 @@
 	#[weight(<SelfWeightOf<T>>::burn_from())]
 	fn burn_from_cross(
 		&mut self,
-		caller: caller,
+		caller: Caller,
 		from: eth::CrossAddress,
 		token_id: U256,
 	) -> Result<()> {
@@ -944,7 +944,7 @@
 	/// @param tokenIds IDs of the minted RFTs
 	#[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)
@@ -989,7 +989,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> {
@@ -1046,7 +1046,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_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));