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

difftreelog

name anonymous tuples

Trubnikov Sergey2023-02-01parent: #55aed0d.patch.diff
in: master

15 files changed

modifiedpallets/common/src/eth.rsdiffbeforeafterboth
--- a/pallets/common/src/eth.rs
+++ b/pallets/common/src/eth.rs
@@ -18,7 +18,10 @@
 
 use alloc::format;
 use sp_std::{vec, vec::Vec};
-use evm_coder::{AbiCoder, types::Address};
+use evm_coder::{
+	AbiCoder,
+	types::{Address, String},
+};
 pub use pallet_evm::{Config, account::CrossAccountId};
 use sp_core::{H160, U256};
 use up_data_structs::CollectionId;
@@ -390,6 +393,16 @@
 	}
 }
 
+/// Data for creation token with uri.
+#[derive(Debug, AbiCoder)]
+pub struct TokenUri {
+	/// Id of new token.
+	pub id: U256,
+
+	/// Uri of new token.
+	pub uri: String,
+}
+
 /// Nested collections.
 #[derive(Debug, Default, AbiCoder)]
 pub struct CollectionNesting {
modifiedpallets/fungible/src/erc.rsdiffbeforeafterboth
before · pallets/fungible/src/erc.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//! ERC-20 standart support implementation.1819extern crate alloc;20use core::char::{REPLACEMENT_CHARACTER, decode_utf16};21use core::convert::TryInto;22use evm_coder::{23	abi::AbiType, ToLog, execution::*, generate_stubgen, solidity, solidity_interface, types::*,24	weight,25};26use up_data_structs::CollectionMode;27use pallet_common::{28	CollectionHandle,29	erc::{CommonEvmHandler, PrecompileResult, CollectionCall},30};31use sp_std::vec::Vec;32use pallet_evm::{account::CrossAccountId, PrecompileHandle};33use pallet_evm_coder_substrate::{call, dispatch_to_evm};34use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};35use sp_core::{U256, Get};3637use crate::{38	Allowance, Balance, Config, FungibleHandle, Pallet, SelfWeightOf, TotalSupply,39	weights::WeightInfo,40};4142#[derive(ToLog)]43pub enum ERC20Events {44	Transfer {45		#[indexed]46		from: Address,47		#[indexed]48		to: Address,49		value: U256,50	},51	Approval {52		#[indexed]53		owner: Address,54		#[indexed]55		spender: Address,56		value: U256,57	},58}5960#[solidity_interface(name = ERC20, events(ERC20Events), expect_selector = 0x942e8b22)]61impl<T: Config> FungibleHandle<T> {62	fn name(&self) -> Result<String> {63		Ok(decode_utf16(self.name.iter().copied())64			.map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))65			.collect::<String>())66	}67	fn symbol(&self) -> Result<String> {68		Ok(String::from_utf8_lossy(&self.token_prefix).into())69	}70	fn total_supply(&self) -> Result<U256> {71		self.consume_store_reads(1)?;72		Ok(<TotalSupply<T>>::get(self.id).into())73	}7475	fn decimals(&self) -> Result<u8> {76		Ok(if let CollectionMode::Fungible(decimals) = &self.mode {77			*decimals78		} else {79			unreachable!()80		})81	}82	fn balance_of(&self, owner: Address) -> Result<U256> {83		self.consume_store_reads(1)?;84		let owner = T::CrossAccountId::from_eth(owner);85		let balance = <Balance<T>>::get((self.id, owner));86		Ok(balance.into())87	}88	#[weight(<SelfWeightOf<T>>::transfer())]89	fn transfer(&mut self, caller: Caller, to: Address, amount: U256) -> Result<bool> {90		let caller = T::CrossAccountId::from_eth(caller);91		let to = T::CrossAccountId::from_eth(to);92		let amount = amount.try_into().map_err(|_| "amount overflow")?;93		let budget = self94			.recorder95			.weight_calls_budget(<StructureWeight<T>>::find_parent());9697		<Pallet<T>>::transfer(self, &caller, &to, amount, &budget).map_err(|_| "transfer error")?;98		Ok(true)99	}100101	#[weight(<SelfWeightOf<T>>::transfer_from())]102	fn transfer_from(103		&mut self,104		caller: Caller,105		from: Address,106		to: Address,107		amount: U256,108	) -> Result<bool> {109		let caller = T::CrossAccountId::from_eth(caller);110		let from = T::CrossAccountId::from_eth(from);111		let to = T::CrossAccountId::from_eth(to);112		let amount = amount.try_into().map_err(|_| "amount overflow")?;113		let budget = self114			.recorder115			.weight_calls_budget(<StructureWeight<T>>::find_parent());116117		<Pallet<T>>::transfer_from(self, &caller, &from, &to, amount, &budget)118			.map_err(dispatch_to_evm::<T>)?;119		Ok(true)120	}121	#[weight(<SelfWeightOf<T>>::approve())]122	fn approve(&mut self, caller: Caller, spender: Address, amount: U256) -> Result<bool> {123		let caller = T::CrossAccountId::from_eth(caller);124		let spender = T::CrossAccountId::from_eth(spender);125		let amount = amount.try_into().map_err(|_| "amount overflow")?;126127		<Pallet<T>>::set_allowance(self, &caller, &spender, amount)128			.map_err(dispatch_to_evm::<T>)?;129		Ok(true)130	}131	fn allowance(&self, owner: Address, spender: Address) -> Result<U256> {132		self.consume_store_reads(1)?;133		let owner = T::CrossAccountId::from_eth(owner);134		let spender = T::CrossAccountId::from_eth(spender);135136		Ok(<Allowance<T>>::get((self.id, owner, spender)).into())137	}138}139140#[solidity_interface(name = ERC20Mintable)]141impl<T: Config> FungibleHandle<T> {142	/// Mint tokens for `to` account.143	/// @param to account that will receive minted tokens144	/// @param amount amount of tokens to mint145	#[weight(<SelfWeightOf<T>>::create_item())]146	fn mint(&mut self, caller: Caller, to: Address, amount: U256) -> Result<bool> {147		let caller = T::CrossAccountId::from_eth(caller);148		let to = T::CrossAccountId::from_eth(to);149		let amount = amount.try_into().map_err(|_| "amount overflow")?;150		let budget = self151			.recorder152			.weight_calls_budget(<StructureWeight<T>>::find_parent());153		<Pallet<T>>::create_item(&self, &caller, (to, amount), &budget)154			.map_err(dispatch_to_evm::<T>)?;155		Ok(true)156	}157}158159#[solidity_interface(name = ERC20UniqueExtensions)]160impl<T: Config> FungibleHandle<T>161where162	T::AccountId: From<[u8; 32]>,163{164	/// @dev Function to check the amount of tokens that an owner allowed to a spender.165	/// @param owner crossAddress The address which owns the funds.166	/// @param spender crossAddress The address which will spend the funds.167	/// @return A uint256 specifying the amount of tokens still available for the spender.168	fn allowance_cross(169		&self,170		owner: pallet_common::eth::CrossAddress,171		spender: pallet_common::eth::CrossAddress,172	) -> Result<U256> {173		let owner = owner.into_sub_cross_account::<T>()?;174		let spender = spender.into_sub_cross_account::<T>()?;175176		Ok(<Allowance<T>>::get((self.id, owner, spender)).into())177	}178179	/// @notice A description for the collection.180	fn description(&self) -> Result<String> {181		Ok(decode_utf16(self.description.iter().copied())182			.map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))183			.collect::<String>())184	}185186	#[weight(<SelfWeightOf<T>>::create_item())]187	fn mint_cross(188		&mut self,189		caller: Caller,190		to: pallet_common::eth::CrossAddress,191		amount: U256,192	) -> Result<bool> {193		let caller = T::CrossAccountId::from_eth(caller);194		let to = to.into_sub_cross_account::<T>()?;195		let amount = amount.try_into().map_err(|_| "amount overflow")?;196		let budget = self197			.recorder198			.weight_calls_budget(<StructureWeight<T>>::find_parent());199		<Pallet<T>>::create_item(&self, &caller, (to, amount), &budget)200			.map_err(dispatch_to_evm::<T>)?;201		Ok(true)202	}203204	#[weight(<SelfWeightOf<T>>::approve())]205	fn approve_cross(206		&mut self,207		caller: Caller,208		spender: pallet_common::eth::CrossAddress,209		amount: U256,210	) -> Result<bool> {211		let caller = T::CrossAccountId::from_eth(caller);212		let spender = spender.into_sub_cross_account::<T>()?;213		let amount = amount.try_into().map_err(|_| "amount overflow")?;214215		<Pallet<T>>::set_allowance(self, &caller, &spender, amount)216			.map_err(dispatch_to_evm::<T>)?;217		Ok(true)218	}219220	/// Burn tokens from account221	/// @dev Function that burns an `amount` of the tokens of a given account,222	/// deducting from the sender's allowance for said account.223	/// @param from The account whose tokens will be burnt.224	/// @param amount The amount that will be burnt.225	#[solidity(hide)]226	#[weight(<SelfWeightOf<T>>::burn_from())]227	fn burn_from(&mut self, caller: Caller, from: Address, amount: U256) -> Result<bool> {228		let caller = T::CrossAccountId::from_eth(caller);229		let from = T::CrossAccountId::from_eth(from);230		let amount = amount.try_into().map_err(|_| "amount overflow")?;231		let budget = self232			.recorder233			.weight_calls_budget(<StructureWeight<T>>::find_parent());234235		<Pallet<T>>::burn_from(self, &caller, &from, amount, &budget)236			.map_err(dispatch_to_evm::<T>)?;237		Ok(true)238	}239240	/// Burn tokens from account241	/// @dev Function that burns an `amount` of the tokens of a given account,242	/// deducting from the sender's allowance for said account.243	/// @param from The account whose tokens will be burnt.244	/// @param amount The amount that will be burnt.245	#[weight(<SelfWeightOf<T>>::burn_from())]246	fn burn_from_cross(247		&mut self,248		caller: Caller,249		from: pallet_common::eth::CrossAddress,250		amount: U256,251	) -> Result<bool> {252		let caller = T::CrossAccountId::from_eth(caller);253		let from = from.into_sub_cross_account::<T>()?;254		let amount = amount.try_into().map_err(|_| "amount overflow")?;255		let budget = self256			.recorder257			.weight_calls_budget(<StructureWeight<T>>::find_parent());258259		<Pallet<T>>::burn_from(self, &caller, &from, amount, &budget)260			.map_err(dispatch_to_evm::<T>)?;261		Ok(true)262	}263264	/// Mint tokens for multiple accounts.265	/// @param amounts array of pairs of account address and amount266	#[weight(<SelfWeightOf<T>>::create_multiple_items_ex(amounts.len() as u32))]267	fn mint_bulk(&mut self, caller: Caller, amounts: Vec<(Address, U256)>) -> Result<bool> {268		let caller = T::CrossAccountId::from_eth(caller);269		let budget = self270			.recorder271			.weight_calls_budget(<StructureWeight<T>>::find_parent());272		let amounts = amounts273			.into_iter()274			.map(|(to, amount)| {275				Ok((276					T::CrossAccountId::from_eth(to),277					amount.try_into().map_err(|_| "amount overflow")?,278				))279			})280			.collect::<Result<_>>()?;281282		<Pallet<T>>::create_multiple_items(&self, &caller, amounts, &budget)283			.map_err(dispatch_to_evm::<T>)?;284		Ok(true)285	}286287	#[weight(<SelfWeightOf<T>>::transfer())]288	fn transfer_cross(289		&mut self,290		caller: Caller,291		to: pallet_common::eth::CrossAddress,292		amount: U256,293	) -> Result<bool> {294		let caller = T::CrossAccountId::from_eth(caller);295		let to = to.into_sub_cross_account::<T>()?;296		let amount = amount.try_into().map_err(|_| "amount overflow")?;297		let budget = self298			.recorder299			.weight_calls_budget(<StructureWeight<T>>::find_parent());300301		<Pallet<T>>::transfer(self, &caller, &to, amount, &budget).map_err(|_| "transfer error")?;302		Ok(true)303	}304305	#[weight(<SelfWeightOf<T>>::transfer_from())]306	fn transfer_from_cross(307		&mut self,308		caller: Caller,309		from: pallet_common::eth::CrossAddress,310		to: pallet_common::eth::CrossAddress,311		amount: U256,312	) -> Result<bool> {313		let caller = T::CrossAccountId::from_eth(caller);314		let from = from.into_sub_cross_account::<T>()?;315		let to = to.into_sub_cross_account::<T>()?;316		let amount = amount.try_into().map_err(|_| "amount overflow")?;317		let budget = self318			.recorder319			.weight_calls_budget(<StructureWeight<T>>::find_parent());320321		<Pallet<T>>::transfer_from(self, &caller, &from, &to, amount, &budget)322			.map_err(dispatch_to_evm::<T>)?;323		Ok(true)324	}325326	/// @notice Returns collection helper contract address327	fn collection_helper_address(&self) -> Result<Address> {328		Ok(T::ContractAddress::get())329	}330}331332#[solidity_interface(333	name = UniqueFungible,334	is(335		ERC20,336		ERC20Mintable,337		ERC20UniqueExtensions,338		Collection(via(common_mut returns CollectionHandle<T>)),339	)340)]341impl<T: Config> FungibleHandle<T> where T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]> {}342343generate_stubgen!(gen_impl, UniqueFungibleCall<()>, true);344generate_stubgen!(gen_iface, UniqueFungibleCall<()>, false);345346impl<T: Config> CommonEvmHandler for FungibleHandle<T>347where348	T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]>,349{350	const CODE: &'static [u8] = include_bytes!("./stubs/UniqueFungible.raw");351352	fn call(self, handle: &mut impl PrecompileHandle) -> Option<PrecompileResult> {353		call::<T, UniqueFungibleCall<T>, _, _>(handle, self)354	}355}
modifiedpallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth
--- a/pallets/fungible/src/stubs/UniqueFungible.sol
+++ b/pallets/fungible/src/stubs/UniqueFungible.sol
@@ -590,7 +590,7 @@
 	/// @param amounts array of pairs of account address and amount
 	/// @dev EVM selector for this function is: 0x1acf2d55,
 	///  or in textual repr: mintBulk((address,uint256)[])
-	function mintBulk(Tuple11[] memory amounts) public returns (bool) {
+	function mintBulk(AmountForAddress[] memory amounts) public returns (bool) {
 		require(false, stub_error);
 		amounts;
 		dummy = 0;
@@ -632,10 +632,9 @@
 	}
 }
 
-/// @dev anonymous struct
-struct Tuple11 {
-	address field_0;
-	uint256 field_1;
+struct AmountForAddress {
+	address to;
+	uint256 amount;
 }
 
 /// @dev the ERC-165 identifier for this interface is 0x40c10f19
modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -38,7 +38,7 @@
 use pallet_common::{
 	CollectionHandle, CollectionPropertyPermissions, CommonCollectionOperations,
 	erc::{CommonEvmHandler, PrecompileResult, CollectionCall, static_property::key},
-	eth,
+	eth::{self, TokenUri},
 };
 use pallet_evm::{account::CrossAccountId, PrecompileHandle};
 use pallet_evm_coder_substrate::call;
@@ -948,7 +948,7 @@
 		&mut self,
 		caller: Caller,
 		to: Address,
-		tokens: Vec<(U256, String)>,
+		tokens: Vec<TokenUri>,
 	) -> Result<bool> {
 		let key = key::url();
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -961,7 +961,7 @@
 			.weight_calls_budget(<StructureWeight<T>>::find_parent());
 
 		let mut data = Vec::with_capacity(tokens.len());
-		for (id, token_uri) in tokens {
+		for TokenUri { id, uri } in tokens {
 			let id: u32 = id.try_into().map_err(|_| "token id overflow")?;
 			if id != expected_index {
 				return Err("item id should be next".into());
@@ -972,7 +972,7 @@
 			properties
 				.try_push(Property {
 					key: key.clone(),
-					value: token_uri
+					value: uri
 						.into_bytes()
 						.try_into()
 						.map_err(|_| "token uri is too long")?,
modifiedpallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth
--- a/pallets/nonfungible/src/stubs/UniqueNFT.sol
+++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol
@@ -949,7 +949,7 @@
 	// /// @param tokens array of pairs of token ID and token URI for minted tokens
 	// /// @dev EVM selector for this function is: 0x36543006,
 	// ///  or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])
-	// function mintBulkWithTokenURI(address to, Tuple15[] memory tokens) public returns (bool) {
+	// function mintBulkWithTokenURI(address to, TokenUri[] memory tokens) public returns (bool) {
 	// 	require(false, stub_error);
 	// 	to;
 	// 	tokens;
@@ -981,10 +981,12 @@
 	}
 }
 
-/// @dev anonymous struct
-struct Tuple15 {
-	uint256 field_0;
-	string field_1;
+/// Data for creation token with uri.
+struct TokenUri {
+	/// Id of new token.
+	uint256 id;
+	/// Uri of new token.
+	string uri;
 }
 
 /// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
modifiedpallets/refungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/refungible/src/erc.rs
+++ b/pallets/refungible/src/erc.rs
@@ -34,7 +34,7 @@
 	CollectionHandle, CollectionPropertyPermissions, CommonCollectionOperations,
 	Error as CommonError,
 	erc::{CommonEvmHandler, CollectionCall, static_property::key},
-	eth,
+	eth::{self, TokenUri},
 };
 use pallet_evm::{account::CrossAccountId, PrecompileHandle};
 use pallet_evm_coder_substrate::{call, dispatch_to_evm};
@@ -999,7 +999,7 @@
 		&mut self,
 		caller: Caller,
 		to: Address,
-		tokens: Vec<(U256, String)>,
+		tokens: Vec<TokenUri>,
 	) -> Result<bool> {
 		let key = key::url();
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -1017,7 +1017,7 @@
 			.collect::<BTreeMap<_, _>>()
 			.try_into()
 			.unwrap();
-		for (id, token_uri) in tokens {
+		for TokenUri { id, uri } in tokens {
 			let id: u32 = id.try_into().map_err(|_| "token id overflow")?;
 			if id != expected_index {
 				return Err("item id should be next".into());
@@ -1028,7 +1028,7 @@
 			properties
 				.try_push(Property {
 					key: key.clone(),
-					value: token_uri
+					value: uri
 						.into_bytes()
 						.try_into()
 						.map_err(|_| "token uri is too long")?,
modifiedpallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth
--- a/pallets/refungible/src/stubs/UniqueRefungible.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungible.sol
@@ -938,7 +938,7 @@
 	// /// @param tokens array of pairs of token ID and token URI for minted tokens
 	// /// @dev EVM selector for this function is: 0x36543006,
 	// ///  or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])
-	// function mintBulkWithTokenURI(address to, Tuple14[] memory tokens) public returns (bool) {
+	// function mintBulkWithTokenURI(address to, TokenUri[] memory tokens) public returns (bool) {
 	// 	require(false, stub_error);
 	// 	to;
 	// 	tokens;
@@ -982,10 +982,12 @@
 	}
 }
 
-/// @dev anonymous struct
-struct Tuple14 {
-	uint256 field_0;
-	string field_1;
+/// Data for creation token with uri.
+struct TokenUri {
+	/// Id of new token.
+	uint256 id;
+	/// Uri of new token.
+	string uri;
 }
 
 /// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
modifiedtests/src/eth/abi/fungible.jsondiffbeforeafterboth
--- a/tests/src/eth/abi/fungible.json
+++ b/tests/src/eth/abi/fungible.json
@@ -434,10 +434,10 @@
     "inputs": [
       {
         "components": [
-          { "internalType": "address", "name": "field_0", "type": "address" },
-          { "internalType": "uint256", "name": "field_1", "type": "uint256" }
+          { "internalType": "address", "name": "to", "type": "address" },
+          { "internalType": "uint256", "name": "amount", "type": "uint256" }
         ],
-        "internalType": "struct Tuple11[]",
+        "internalType": "struct AmountForAddress[]",
         "name": "amounts",
         "type": "tuple[]"
       }
modifiedtests/src/eth/api/UniqueFungible.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -398,7 +398,7 @@
 	/// @param amounts array of pairs of account address and amount
 	/// @dev EVM selector for this function is: 0x1acf2d55,
 	///  or in textual repr: mintBulk((address,uint256)[])
-	function mintBulk(Tuple11[] memory amounts) external returns (bool);
+	function mintBulk(AmountForAddress[] memory amounts) external returns (bool);
 
 	/// @dev EVM selector for this function is: 0x2ada85ff,
 	///  or in textual repr: transferCross((address,uint256),uint256)
@@ -418,10 +418,9 @@
 	function collectionHelperAddress() external view returns (address);
 }
 
-/// @dev anonymous struct
-struct Tuple11 {
-	address field_0;
-	uint256 field_1;
+struct AmountForAddress {
+	address to;
+	uint256 amount;
 }
 
 /// @dev the ERC-165 identifier for this interface is 0x40c10f19
modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -644,7 +644,7 @@
 	// /// @param tokens array of pairs of token ID and token URI for minted tokens
 	// /// @dev EVM selector for this function is: 0x36543006,
 	// ///  or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])
-	// function mintBulkWithTokenURI(address to, Tuple13[] memory tokens) external returns (bool);
+	// function mintBulkWithTokenURI(address to, TokenUri[] memory tokens) external returns (bool);
 
 	/// @notice Function to mint a token.
 	/// @param to The new owner crossAccountId
@@ -660,10 +660,12 @@
 	function collectionHelperAddress() external view returns (address);
 }
 
-/// @dev anonymous struct
-struct Tuple13 {
-	uint256 field_0;
-	string field_1;
+/// Data for creation token with uri.
+struct TokenUri {
+	/// Id of new token.
+	uint256 id;
+	/// Uri of new token.
+	string uri;
 }
 
 /// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
modifiedtests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -638,7 +638,7 @@
 	// /// @param tokens array of pairs of token ID and token URI for minted tokens
 	// /// @dev EVM selector for this function is: 0x36543006,
 	// ///  or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])
-	// function mintBulkWithTokenURI(address to, Tuple12[] memory tokens) external returns (bool);
+	// function mintBulkWithTokenURI(address to, TokenUri[] memory tokens) external returns (bool);
 
 	/// @notice Function to mint a token.
 	/// @param to The new owner crossAccountId
@@ -661,10 +661,12 @@
 	function collectionHelperAddress() external view returns (address);
 }
 
-/// @dev anonymous struct
-struct Tuple12 {
-	uint256 field_0;
-	string field_1;
+/// Data for creation token with uri.
+struct TokenUri {
+	/// Id of new token.
+	uint256 id;
+	/// Uri of new token.
+	string uri;
 }
 
 /// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
modifiedtests/src/eth/proxy/UniqueNFTProxy.soldiffbeforeafterboth
--- a/tests/src/eth/proxy/UniqueNFTProxy.sol
+++ b/tests/src/eth/proxy/UniqueNFTProxy.sol
@@ -168,7 +168,7 @@
         return proxied.mintBulk(to, tokenIds);
     }
 
-    function mintBulkWithTokenURI(address to, Tuple6[] memory tokens)
+    function mintBulkWithTokenURI(address to, TokenUri[] memory tokens)
         external
         override
         returns (bool)