git.delta.rocks / unique-network / refs/commits / 17ea847df73f

difftreelog

feat add mint_bulk_cross

Grigoriy Simonov2023-09-22parent: #9a3d9a7.patch.diff
in: master

15 files changed

modifiedpallets/common/src/eth.rsdiffbeforeafterboth
--- a/pallets/common/src/eth.rs
+++ b/pallets/common/src/eth.rs
@@ -631,3 +631,12 @@
 		}
 	}
 }
+
+/// Token minting parameters
+#[derive(AbiCoder, Default, Debug)]
+pub struct MintTokenData {
+	/// Minted token owner
+	pub owner: CrossAddress,
+	/// Minted token properties
+	pub properties: Vec<Property>,
+}
modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -981,13 +981,41 @@
 		Ok(true)
 	}
 
+	/// @notice Function to mint a token.
+	/// @param data Array of pairs of token owner and token's properties for minted token
+	#[weight(<SelfWeightOf<T>>::create_multiple_items(data.len() as u32) + <SelfWeightOf<T>>::set_token_properties(data.len() as u32))]
+	fn mint_bulk_cross(&mut self, caller: Caller, data: Vec<eth::MintTokenData>) -> Result<bool> {
+		let caller = T::CrossAccountId::from_eth(caller);
+		let budget = self
+			.recorder
+			.weight_calls_budget(<StructureWeight<T>>::find_parent());
+
+		let mut create_nft_data = Vec::with_capacity(data.len());
+		for eth::MintTokenData { owner, properties } in data {
+			let owner = owner.into_sub_cross_account::<T>()?;
+			create_nft_data.push(CreateItemData::<T> {
+				properties: properties
+					.into_iter()
+					.map(|property| property.try_into())
+					.collect::<Result<Vec<_>>>()?
+					.try_into()
+					.map_err(|_| "too many properties")?,
+				owner,
+			});
+		}
+
+		<Pallet<T>>::create_multiple_items(self, &caller, create_nft_data, &budget)
+			.map_err(dispatch_to_evm::<T>)?;
+		Ok(true)
+	}
+
 	/// @notice Function to mint multiple tokens with the given tokenUris.
 	/// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
 	///  numbers and first number should be obtained with `nextTokenId` method
 	/// @param to The new owner
 	/// @param tokens array of pairs of token ID and token URI for minted tokens
 	#[solidity(hide, rename_selector = "mintBulkWithTokenURI")]
-	#[weight(<SelfWeightOf<T>>::create_multiple_items(tokens.len() as u32)  + <SelfWeightOf<T>>::set_token_properties(tokens.len() as u32))]
+	#[weight(<SelfWeightOf<T>>::create_multiple_items(tokens.len() as u32) + <SelfWeightOf<T>>::set_token_properties(tokens.len() as u32))]
 	fn mint_bulk_with_token_uri(
 		&mut self,
 		caller: Caller,
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
@@ -800,7 +800,7 @@
 }
 
 /// @title Unique extensions for ERC721.
-/// @dev the ERC-165 identifier for this interface is 0x307b061a
+/// @dev the ERC-165 identifier for this interface is 0x9b397d16
 contract ERC721UniqueExtensions is Dummy, ERC165 {
 	/// @notice A descriptive name for a collection of NFTs in this contract
 	/// @dev EVM selector for this function is: 0x06fdde03,
@@ -997,6 +997,17 @@
 	// 	return false;
 	// }
 
+	/// @notice Function to mint a token.
+	/// @param data Array of pairs of token owner and token's properties for minted token
+	/// @dev EVM selector for this function is: 0xab427b0c,
+	///  or in textual repr: mintBulkCross(((address,uint256),(string,bytes)[])[])
+	function mintBulkCross(MintTokenData[] memory data) public returns (bool) {
+		require(false, stub_error);
+		data;
+		dummy = 0;
+		return false;
+	}
+
 	// /// @notice Function to mint multiple tokens with the given tokenUris.
 	// /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
 	// ///  numbers and first number should be obtained with `nextTokenId` method
@@ -1044,6 +1055,11 @@
 	string uri;
 }
 
+struct MintTokenData {
+	CrossAddress owner;
+	Property[] properties;
+}
+
 /// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 /// @dev See https://eips.ethereum.org/EIPS/eip-721
 /// @dev the ERC-165 identifier for this interface is 0x780e9d63
modifiedpallets/refungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/refungible/src/erc.rs
+++ b/pallets/refungible/src/erc.rs
@@ -1021,6 +1021,43 @@
 		Ok(true)
 	}
 
+	/// @notice Function to mint a token.
+	/// @param tokenProperties Properties of minted token
+	#[weight(<SelfWeightOf<T>>::create_multiple_items(token_properties.len() as u32) + <SelfWeightOf<T>>::set_token_properties(token_properties.len() as u32))]
+	fn mint_bulk_cross(
+		&mut self,
+		caller: Caller,
+		token_properties: Vec<eth::MintTokenData>,
+	) -> Result<bool> {
+		let caller = T::CrossAccountId::from_eth(caller);
+		let budget = self
+			.recorder
+			.weight_calls_budget(<StructureWeight<T>>::find_parent());
+
+		let mut create_rft_data = Vec::with_capacity(token_properties.len());
+		for eth::MintTokenData { owner, properties } in token_properties {
+			let owner = owner.into_sub_cross_account::<T>()?;
+			let users: BoundedBTreeMap<_, _, _> = [(owner, 1)]
+				.into_iter()
+				.collect::<BTreeMap<_, _>>()
+				.try_into()
+				.map_err(|_| "too many users")?;
+			create_rft_data.push(CreateItemData::<T> {
+				properties: properties
+					.into_iter()
+					.map(|property| property.try_into())
+					.collect::<Result<Vec<_>>>()?
+					.try_into()
+					.map_err(|_| "too many properties")?,
+				users,
+			});
+		}
+
+		<Pallet<T>>::create_multiple_items(self, &caller, create_rft_data, &budget)
+			.map_err(dispatch_to_evm::<T>)?;
+		Ok(true)
+	}
+
 	/// @notice Function to mint multiple tokens with the given tokenUris.
 	/// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
 	///  numbers and first number should be obtained with `nextTokenId` method
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
@@ -800,7 +800,7 @@
 }
 
 /// @title Unique extensions for ERC721.
-/// @dev the ERC-165 identifier for this interface is 0x95c0f66c
+/// @dev the ERC-165 identifier for this interface is 0x3e828d60
 contract ERC721UniqueExtensions is Dummy, ERC165 {
 	/// @notice A descriptive name for a collection of NFTs in this contract
 	/// @dev EVM selector for this function is: 0x06fdde03,
@@ -986,6 +986,17 @@
 	// 	return false;
 	// }
 
+	/// @notice Function to mint a token.
+	/// @param tokenProperties Properties of minted token
+	/// @dev EVM selector for this function is: 0xab427b0c,
+	///  or in textual repr: mintBulkCross(((address,uint256),(string,bytes)[])[])
+	function mintBulkCross(MintTokenData[] memory tokenProperties) public returns (bool) {
+		require(false, stub_error);
+		tokenProperties;
+		dummy = 0;
+		return false;
+	}
+
 	// /// @notice Function to mint multiple tokens with the given tokenUris.
 	// /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
 	// ///  numbers and first number should be obtained with `nextTokenId` method
@@ -1045,6 +1056,11 @@
 	string uri;
 }
 
+struct MintTokenData {
+	CrossAddress owner;
+	Property[] properties;
+}
+
 /// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 /// @dev See https://eips.ethereum.org/EIPS/eip-721
 /// @dev the ERC-165 identifier for this interface is 0x780e9d63
modifiedpallets/unique/src/eth/stubs/CollectionHelpers.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/unique/src/eth/stubs/CollectionHelpers.soldiffbeforeafterboth
--- a/pallets/unique/src/eth/stubs/CollectionHelpers.sol
+++ b/pallets/unique/src/eth/stubs/CollectionHelpers.sol
@@ -25,12 +25,12 @@
 }
 
 /// @title Contract, which allows users to operate with collections
-/// @dev the ERC-165 identifier for this interface is 0x4135fff1
+/// @dev the ERC-165 identifier for this interface is 0x94e5af0d
 contract CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {
 	/// Create a collection
 	/// @return address Address of the newly created collection
-	/// @dev EVM selector for this function is: 0xa765ee5b,
-	///  or in textual repr: createCollection(((address,uint256),string,string,string,uint8,uint8,(string,bytes)[],(string,(uint8,bool)[])[],(address,uint256)[],(bool,bool,address[]),(uint8,uint256)[],uint8))
+	/// @dev EVM selector for this function is: 0x72b5bea7,
+	///  or in textual repr: createCollection((string,string,string,uint8,uint8,(string,bytes)[],(string,(uint8,bool)[])[],(address,uint256)[],(bool,bool,address[]),(uint8,uint256)[],(address,uint256),uint8))
 	function createCollection(CreateCollectionData memory data) public payable returns (address) {
 		require(false, stub_error);
 		data;
@@ -170,8 +170,6 @@
 
 /// Collection properties
 struct CreateCollectionData {
-	/// Collection sponsor
-	CrossAddress pending_sponsor;
 	/// Collection name
 	string name;
 	/// Collection description
@@ -192,11 +190,12 @@
 	CollectionNestingAndPermission nesting_settings;
 	/// Collection limits
 	CollectionLimitValue[] limits;
+	/// Collection sponsor
+	CrossAddress pending_sponsor;
 	/// Extra collection flags
 	CollectionFlags flags;
 }
 
-/// Cross account struct
 type CollectionFlags is uint8;
 
 library CollectionFlagsLib {
@@ -207,13 +206,19 @@
 	/// External collections can't be managed using `unique` api
 	CollectionFlags constant externalField = CollectionFlags.wrap(1);
 
-	/// Reserved bits
+	/// Reserved flags
 	function reservedField(uint8 value) public pure returns (CollectionFlags) {
 		require(value < 1 << 5, "out of bound value");
 		return CollectionFlags.wrap(value << 1);
 	}
 }
 
+/// Cross account struct
+struct CrossAddress {
+	address eth;
+	uint256 sub;
+}
+
 /// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.
 struct CollectionLimitValue {
 	CollectionLimitField field;
@@ -250,12 +255,6 @@
 	bool collection_admin;
 	/// If set - only tokens from specified collections can be nested.
 	address[] restricted;
-}
-
-/// Cross account struct
-struct CrossAddress {
-	address eth;
-	uint256 sub;
 }
 
 /// Ethereum representation of Token Property Permissions.
@@ -292,10 +291,10 @@
 
 /// Type of tokens in collection
 enum CollectionMode {
-	/// Fungible
-	Fungible,
 	/// Nonfungible
 	Nonfungible,
+	/// Fungible
+	Fungible,
 	/// Refungible
 	Refungible
 }
modifiedruntime/common/ethereum/sponsoring/refungible.rsdiffbeforeafterboth
--- a/runtime/common/ethereum/sponsoring/refungible.rs
+++ b/runtime/common/ethereum/sponsoring/refungible.rs
@@ -242,6 +242,7 @@
 			BurnFrom { .. }
 			| BurnFromCross { .. }
 			| MintBulk { .. }
+			| MintBulkCross { .. }
 			| MintBulkWithTokenUri { .. } => None,
 
 			MintCross { .. } => withdraw_create_item::<T>(
modifiedtests/src/eth/abi/nonFungible.jsondiffbeforeafterboth
--- a/tests/src/eth/abi/nonFungible.json
+++ b/tests/src/eth/abi/nonFungible.json
@@ -469,6 +469,39 @@
     "inputs": [
       {
         "components": [
+          {
+            "components": [
+              { "internalType": "address", "name": "eth", "type": "address" },
+              { "internalType": "uint256", "name": "sub", "type": "uint256" }
+            ],
+            "internalType": "struct CrossAddress",
+            "name": "owner",
+            "type": "tuple"
+          },
+          {
+            "components": [
+              { "internalType": "string", "name": "key", "type": "string" },
+              { "internalType": "bytes", "name": "value", "type": "bytes" }
+            ],
+            "internalType": "struct Property[]",
+            "name": "properties",
+            "type": "tuple[]"
+          }
+        ],
+        "internalType": "struct MintTokenData[]",
+        "name": "data",
+        "type": "tuple[]"
+      }
+    ],
+    "name": "mintBulkCross",
+    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
+    "stateMutability": "nonpayable",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "components": [
           { "internalType": "address", "name": "eth", "type": "address" },
           { "internalType": "uint256", "name": "sub", "type": "uint256" }
         ],
modifiedtests/src/eth/abi/reFungible.jsondiffbeforeafterboth
--- a/tests/src/eth/abi/reFungible.json
+++ b/tests/src/eth/abi/reFungible.json
@@ -451,6 +451,39 @@
     "inputs": [
       {
         "components": [
+          {
+            "components": [
+              { "internalType": "address", "name": "eth", "type": "address" },
+              { "internalType": "uint256", "name": "sub", "type": "uint256" }
+            ],
+            "internalType": "struct CrossAddress",
+            "name": "owner",
+            "type": "tuple"
+          },
+          {
+            "components": [
+              { "internalType": "string", "name": "key", "type": "string" },
+              { "internalType": "bytes", "name": "value", "type": "bytes" }
+            ],
+            "internalType": "struct Property[]",
+            "name": "properties",
+            "type": "tuple[]"
+          }
+        ],
+        "internalType": "struct MintTokenData[]",
+        "name": "tokenProperties",
+        "type": "tuple[]"
+      }
+    ],
+    "name": "mintBulkCross",
+    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
+    "stateMutability": "nonpayable",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "components": [
           { "internalType": "address", "name": "eth", "type": "address" },
           { "internalType": "uint256", "name": "sub", "type": "uint256" }
         ],
modifiedtests/src/eth/api/CollectionHelpers.soldiffbeforeafterboth
after · tests/src/eth/api/CollectionHelpers.sol
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56/// @dev common stubs holder7interface Dummy {89}1011interface ERC165 is Dummy {12	function supportsInterface(bytes4 interfaceID) external view returns (bool);13}1415/// @dev inlined interface16interface CollectionHelpersEvents {17	event CollectionCreated(address indexed owner, address indexed collectionId);18	event CollectionDestroyed(address indexed collectionId);19	event CollectionChanged(address indexed collectionId);20}2122/// @title Contract, which allows users to operate with collections23/// @dev the ERC-165 identifier for this interface is 0x94e5af0d24interface CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {25	/// Create a collection26	/// @return address Address of the newly created collection27	/// @dev EVM selector for this function is: 0x72b5bea7,28	///  or in textual repr: createCollection((string,string,string,uint8,uint8,(string,bytes)[],(string,(uint8,bool)[])[],(address,uint256)[],(bool,bool,address[]),(uint8,uint256)[],(address,uint256),uint8))29	function createCollection(CreateCollectionData memory data) external payable returns (address);3031	/// Create an NFT collection32	/// @param name Name of the collection33	/// @param description Informative description of the collection34	/// @param tokenPrefix Token prefix to represent the collection tokens in UI and user applications35	/// @return address Address of the newly created collection36	/// @dev EVM selector for this function is: 0x844af658,37	///  or in textual repr: createNFTCollection(string,string,string)38	function createNFTCollection(39		string memory name,40		string memory description,41		string memory tokenPrefix42	) external payable returns (address);4344	// /// Create an NFT collection45	// /// @param name Name of the collection46	// /// @param description Informative description of the collection47	// /// @param tokenPrefix Token prefix to represent the collection tokens in UI and user applications48	// /// @return address Address of the newly created collection49	// /// @dev EVM selector for this function is: 0xe34a6844,50	// ///  or in textual repr: createNonfungibleCollection(string,string,string)51	// function createNonfungibleCollection(string memory name, string memory description, string memory tokenPrefix) external payable returns (address);5253	/// @dev EVM selector for this function is: 0xab173450,54	///  or in textual repr: createRFTCollection(string,string,string)55	function createRFTCollection(56		string memory name,57		string memory description,58		string memory tokenPrefix59	) external payable returns (address);6061	/// @dev EVM selector for this function is: 0x7335b79f,62	///  or in textual repr: createFTCollection(string,uint8,string,string)63	function createFTCollection(64		string memory name,65		uint8 decimals,66		string memory description,67		string memory tokenPrefix68	) external payable returns (address);6970	/// @dev EVM selector for this function is: 0x85624258,71	///  or in textual repr: makeCollectionERC721MetadataCompatible(address,string)72	function makeCollectionERC721MetadataCompatible(address collection, string memory baseUri) external;7374	/// @dev EVM selector for this function is: 0x564e321f,75	///  or in textual repr: destroyCollection(address)76	function destroyCollection(address collectionAddress) external;7778	/// Check if a collection exists79	/// @param collectionAddress Address of the collection in question80	/// @return bool Does the collection exist?81	/// @dev EVM selector for this function is: 0xc3de1494,82	///  or in textual repr: isCollectionExist(address)83	function isCollectionExist(address collectionAddress) external view returns (bool);8485	/// @dev EVM selector for this function is: 0xd23a7ab1,86	///  or in textual repr: collectionCreationFee()87	function collectionCreationFee() external view returns (uint256);8889	/// Returns address of a collection.90	/// @param collectionId  - CollectionId  of the collection91	/// @return eth mirror address of the collection92	/// @dev EVM selector for this function is: 0x2e716683,93	///  or in textual repr: collectionAddress(uint32)94	function collectionAddress(uint32 collectionId) external view returns (address);9596	/// Returns collectionId of a collection.97	/// @param collectionAddress  - Eth address of the collection98	/// @return collectionId of the collection99	/// @dev EVM selector for this function is: 0xb5cb7498,100	///  or in textual repr: collectionId(address)101	function collectionId(address collectionAddress) external view returns (uint32);102}103104/// Collection properties105struct CreateCollectionData {106	/// Collection name107	string name;108	/// Collection description109	string description;110	/// Token prefix111	string token_prefix;112	/// Token type (NFT, FT or RFT)113	CollectionMode mode;114	/// Fungible token precision115	uint8 decimals;116	/// Custom Properties117	Property[] properties;118	/// Permissions for token properties119	TokenPropertyPermission[] token_property_permissions;120	/// Collection admins121	CrossAddress[] admin_list;122	/// Nesting settings123	CollectionNestingAndPermission nesting_settings;124	/// Collection limits125	CollectionLimitValue[] limits;126	/// Collection sponsor127	CrossAddress pending_sponsor;128	/// Extra collection flags129	CollectionFlags flags;130}131132type CollectionFlags is uint8;133134library CollectionFlagsLib {135	/// Tokens in foreign collections can be transferred, but not burnt136	CollectionFlags constant foreignField = CollectionFlags.wrap(128);137	/// Supports ERC721Metadata138	CollectionFlags constant erc721metadataField = CollectionFlags.wrap(64);139	/// External collections can't be managed using `unique` api140	CollectionFlags constant externalField = CollectionFlags.wrap(1);141142	/// Reserved flags143	function reservedField(uint8 value) public pure returns (CollectionFlags) {144		require(value < 1 << 5, "out of bound value");145		return CollectionFlags.wrap(value << 1);146	}147}148149/// Cross account struct150struct CrossAddress {151	address eth;152	uint256 sub;153}154155/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.156struct CollectionLimitValue {157	CollectionLimitField field;158	uint256 value;159}160161/// [`CollectionLimits`](up_data_structs::CollectionLimits) fields representation for EVM.162enum CollectionLimitField {163	/// How many tokens can a user have on one account.164	AccountTokenOwnership,165	/// How many bytes of data are available for sponsorship.166	SponsoredDataSize,167	/// In any case, chain default: [`SponsoringRateLimit::SponsoringDisabled`]168	SponsoredDataRateLimit,169	/// How many tokens can be mined into this collection.170	TokenLimit,171	/// Timeouts for transfer sponsoring.172	SponsorTransferTimeout,173	/// Timeout for sponsoring an approval in passed blocks.174	SponsorApproveTimeout,175	/// Whether the collection owner of the collection can send tokens (which belong to other users).176	OwnerCanTransfer,177	/// Can the collection owner burn other people's tokens.178	OwnerCanDestroy,179	/// Is it possible to send tokens from this collection between users.180	TransferEnabled181}182183/// Nested collections and permissions184struct CollectionNestingAndPermission {185	/// Owner of token can nest tokens under it.186	bool token_owner;187	/// Admin of token collection can nest tokens under token.188	bool collection_admin;189	/// If set - only tokens from specified collections can be nested.190	address[] restricted;191}192193/// Ethereum representation of Token Property Permissions.194struct TokenPropertyPermission {195	/// Token property key.196	string key;197	/// Token property permissions.198	PropertyPermission[] permissions;199}200201/// Ethereum representation of TokenPermissions (see [`up_data_structs::PropertyPermission`]) as an key and value.202struct PropertyPermission {203	/// TokenPermission field.204	TokenPermissionField code;205	/// TokenPermission value.206	bool value;207}208209/// Ethereum representation of TokenPermissions (see [`up_data_structs::PropertyPermission`]) fields as an enumeration.210enum TokenPermissionField {211	/// Permission to change the property and property permission. See [`up_data_structs::PropertyPermission::mutable`]212	Mutable,213	/// Change permission for the collection administrator. See [`up_data_structs::PropertyPermission::token_owner`]214	TokenOwner,215	/// Permission to change the property for the owner of the token. See [`up_data_structs::PropertyPermission::collection_admin`]216	CollectionAdmin217}218219/// Ethereum representation of collection [`PropertyKey`](up_data_structs::PropertyKey) and [`PropertyValue`](up_data_structs::PropertyValue).220struct Property {221	string key;222	bytes value;223}224225/// Type of tokens in collection226enum CollectionMode {227	/// Nonfungible228	Nonfungible,229	/// Fungible230	Fungible,231	/// Refungible232	Refungible233}
modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -551,7 +551,7 @@
 }
 
 /// @title Unique extensions for ERC721.
-/// @dev the ERC-165 identifier for this interface is 0x307b061a
+/// @dev the ERC-165 identifier for this interface is 0x9b397d16
 interface ERC721UniqueExtensions is Dummy, ERC165 {
 	/// @notice A descriptive name for a collection of NFTs in this contract
 	/// @dev EVM selector for this function is: 0x06fdde03,
@@ -674,6 +674,12 @@
 	// ///  or in textual repr: mintBulk(address,uint256[])
 	// function mintBulk(address to, uint256[] memory tokenIds) external returns (bool);
 
+	/// @notice Function to mint a token.
+	/// @param data Array of pairs of token owner and token's properties for minted token
+	/// @dev EVM selector for this function is: 0xab427b0c,
+	///  or in textual repr: mintBulkCross(((address,uint256),(string,bytes)[])[])
+	function mintBulkCross(MintTokenData[] memory data) external returns (bool);
+
 	// /// @notice Function to mint multiple tokens with the given tokenUris.
 	// /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
 	// ///  numbers and first number should be obtained with `nextTokenId` method
@@ -705,6 +711,11 @@
 	string uri;
 }
 
+struct MintTokenData {
+	CrossAddress owner;
+	Property[] properties;
+}
+
 /// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 /// @dev See https://eips.ethereum.org/EIPS/eip-721
 /// @dev the ERC-165 identifier for this interface is 0x780e9d63
modifiedtests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -551,7 +551,7 @@
 }
 
 /// @title Unique extensions for ERC721.
-/// @dev the ERC-165 identifier for this interface is 0x95c0f66c
+/// @dev the ERC-165 identifier for this interface is 0x3e828d60
 interface ERC721UniqueExtensions is Dummy, ERC165 {
 	/// @notice A descriptive name for a collection of NFTs in this contract
 	/// @dev EVM selector for this function is: 0x06fdde03,
@@ -668,6 +668,12 @@
 	// ///  or in textual repr: mintBulk(address,uint256[])
 	// function mintBulk(address to, uint256[] memory tokenIds) external returns (bool);
 
+	/// @notice Function to mint a token.
+	/// @param tokenProperties Properties of minted token
+	/// @dev EVM selector for this function is: 0xab427b0c,
+	///  or in textual repr: mintBulkCross(((address,uint256),(string,bytes)[])[])
+	function mintBulkCross(MintTokenData[] memory tokenProperties) external returns (bool);
+
 	// /// @notice Function to mint multiple tokens with the given tokenUris.
 	// /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
 	// ///  numbers and first number should be obtained with `nextTokenId` method
@@ -706,6 +712,11 @@
 	string uri;
 }
 
+struct MintTokenData {
+	CrossAddress owner;
+	Property[] properties;
+}
+
 /// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 /// @dev See https://eips.ethereum.org/EIPS/eip-721
 /// @dev the ERC-165 identifier for this interface is 0x780e9d63