difftreelog
feat add eth methots for bulk properties
in: master
14 files changed
pallets/common/src/erc.rsdiffbeforeafterboth--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -27,7 +27,7 @@
use sp_std::vec::Vec;
use up_data_structs::{
AccessMode, CollectionMode, CollectionPermissions, OwnerRestrictedSet, Property,
- SponsoringRateLimit, SponsorshipState,
+ SponsoringRateLimit, SponsorshipState, PropertyKey,
};
use alloc::format;
@@ -97,6 +97,21 @@
.map_err(dispatch_to_evm::<T>)
}
+ /// Set collection properties.
+ ///
+ /// @param properties Vector of properties key/value pair.
+ #[weight(<SelfWeightOf<T>>::set_collection_properties(properties.len() as u32))]
+ fn set_collection_properties(
+ &mut self,
+ caller: caller,
+ properties: Vec<(string, bytes)>,
+ ) -> Result<void> {
+ for (key, value) in properties.into_iter() {
+ self.set_collection_property(caller, key, value)?;
+ }
+ Ok(())
+ }
+
/// Delete collection property.
///
/// @param key Property key.
@@ -123,12 +138,38 @@
.try_into()
.map_err(|_| "key too large")?;
- let props = <CollectionProperties<T>>::get(self.id);
+ let props = CollectionProperties::<T>::get(self.id);
let prop = props.get(&key).ok_or("key not found")?;
Ok(bytes(prop.to_vec()))
}
+ /// Get collection properties.
+ ///
+ /// @param keys Properties keys.
+ /// @return Vector of properties key/value pairs.
+ fn collection_properties(&self, keys: Vec<string>) -> Result<Vec<(string, bytes)>> {
+ let mut keys_ = Vec::<PropertyKey>::with_capacity(keys.len());
+ for key in keys {
+ keys_.push(
+ <Vec<u8>>::from(key)
+ .try_into()
+ .map_err(|_| Error::Revert("key too large".into()))?,
+ )
+ }
+ let properties = Pallet::<T>::filter_collection_properties(self.id, Some(keys_))
+ .map_err(dispatch_to_evm::<T>)?;
+
+ let mut properties_ = Vec::<(string, bytes)>::with_capacity(properties.len());
+ for p in properties {
+ let key =
+ string::from_utf8(p.key.into()).map_err(|e| Error::Revert(format!("{}", e)))?;
+ let value = bytes(p.value.to_vec());
+ properties_.push((key, value));
+ }
+ Ok(properties_)
+ }
+
/// Set the sponsor of the collection.
///
/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
pallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth--- a/pallets/fungible/src/stubs/UniqueFungible.sol
+++ b/pallets/fungible/src/stubs/UniqueFungible.sol
@@ -18,7 +18,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x25d897dc
+/// @dev the ERC-165 identifier for this interface is 0x5d354410
contract Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -33,6 +33,17 @@
dummy = 0;
}
+ /// Set collection properties.
+ ///
+ /// @param properties Vector of properties key/value pair.
+ /// @dev EVM selector for this function is: 0x50b26b2a,
+ /// or in textual repr: setCollectionProperties((string,bytes)[])
+ function setCollectionProperties(Tuple10[] memory properties) public {
+ require(false, stub_error);
+ properties;
+ dummy = 0;
+ }
+
/// Delete collection property.
///
/// @param key Property key.
@@ -59,6 +70,19 @@
return hex"";
}
+ /// Get collection properties.
+ ///
+ /// @param keys Properties keys.
+ /// @return Vector of properties key/value pairs.
+ /// @dev EVM selector for this function is: 0x285fb8e6,
+ /// or in textual repr: collectionProperties(string[])
+ function collectionProperties(string[] memory keys) public view returns (Tuple10[] memory) {
+ require(false, stub_error);
+ keys;
+ dummy;
+ return new Tuple10[](0);
+ }
+
/// Set the sponsor of the collection.
///
/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
@@ -397,6 +421,12 @@
}
}
+/// @dev anonymous struct
+struct Tuple10 {
+ string field_0;
+ bytes field_1;
+}
+
/// @dev the ERC-165 identifier for this interface is 0x032e5926
contract ERC20UniqueExtensions is Dummy, ERC165 {
/// @dev EVM selector for this function is: 0x0ecd0ab0,
pallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterbothbinary blob — no preview
pallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth--- a/pallets/nonfungible/src/stubs/UniqueNFT.sol
+++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol
@@ -91,7 +91,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x25d897dc
+/// @dev the ERC-165 identifier for this interface is 0x5d354410
contract Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -106,6 +106,17 @@
dummy = 0;
}
+ /// Set collection properties.
+ ///
+ /// @param properties Vector of properties key/value pair.
+ /// @dev EVM selector for this function is: 0x50b26b2a,
+ /// or in textual repr: setCollectionProperties((string,bytes)[])
+ function setCollectionProperties(Tuple19[] memory properties) public {
+ require(false, stub_error);
+ properties;
+ dummy = 0;
+ }
+
/// Delete collection property.
///
/// @param key Property key.
@@ -132,6 +143,19 @@
return hex"";
}
+ /// Get collection properties.
+ ///
+ /// @param keys Properties keys.
+ /// @return Vector of properties key/value pairs.
+ /// @dev EVM selector for this function is: 0x285fb8e6,
+ /// or in textual repr: collectionProperties(string[])
+ function collectionProperties(string[] memory keys) public view returns (Tuple19[] memory) {
+ require(false, stub_error);
+ keys;
+ dummy;
+ return new Tuple19[](0);
+ }
+
/// Set the sponsor of the collection.
///
/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
@@ -470,6 +494,12 @@
}
}
+/// @dev anonymous struct
+struct Tuple19 {
+ string field_0;
+ bytes field_1;
+}
+
/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
/// @dev See https://eips.ethereum.org/EIPS/eip-721
/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
pallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56/// @dev common stubs holder7contract Dummy {8 uint8 dummy;9 string stub_error = "this contract is implemented in native";10}1112contract ERC165 is Dummy {13 function supportsInterface(bytes4 interfaceID) external view returns (bool) {14 require(false, stub_error);15 interfaceID;16 return true;17 }18}1920/// @title A contract that allows to set and delete token properties and change token property permissions.21/// @dev the ERC-165 identifier for this interface is 0x4136937722contract TokenProperties is Dummy, ERC165 {23 /// @notice Set permissions for token property.24 /// @dev Throws error if `msg.sender` is not admin or owner of the collection.25 /// @param key Property key.26 /// @param isMutable Permission to mutate property.27 /// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.28 /// @param tokenOwner Permission to mutate property by token owner if property is mutable.29 /// @dev EVM selector for this function is: 0x222d97fa,30 /// or in textual repr: setTokenPropertyPermission(string,bool,bool,bool)31 function setTokenPropertyPermission(32 string memory key,33 bool isMutable,34 bool collectionAdmin,35 bool tokenOwner36 ) public {37 require(false, stub_error);38 key;39 isMutable;40 collectionAdmin;41 tokenOwner;42 dummy = 0;43 }4445 /// @notice Set token property value.46 /// @dev Throws error if `msg.sender` has no permission to edit the property.47 /// @param tokenId ID of the token.48 /// @param key Property key.49 /// @param value Property value.50 /// @dev EVM selector for this function is: 0x1752d67b,51 /// or in textual repr: setProperty(uint256,string,bytes)52 function setProperty(53 uint256 tokenId,54 string memory key,55 bytes memory value56 ) public {57 require(false, stub_error);58 tokenId;59 key;60 value;61 dummy = 0;62 }6364 /// @notice Delete token property value.65 /// @dev Throws error if `msg.sender` has no permission to edit the property.66 /// @param tokenId ID of the token.67 /// @param key Property key.68 /// @dev EVM selector for this function is: 0x066111d1,69 /// or in textual repr: deleteProperty(uint256,string)70 function deleteProperty(uint256 tokenId, string memory key) public {71 require(false, stub_error);72 tokenId;73 key;74 dummy = 0;75 }7677 /// @notice Get token property value.78 /// @dev Throws error if key not found79 /// @param tokenId ID of the token.80 /// @param key Property key.81 /// @return Property value bytes82 /// @dev EVM selector for this function is: 0x7228c327,83 /// or in textual repr: property(uint256,string)84 function property(uint256 tokenId, string memory key) public view returns (bytes memory) {85 require(false, stub_error);86 tokenId;87 key;88 dummy;89 return hex"";90 }91}9293/// @title A contract that allows you to work with collections.94/// @dev the ERC-165 identifier for this interface is 0x25d897dc95contract Collection is Dummy, ERC165 {96 /// Set collection property.97 ///98 /// @param key Property key.99 /// @param value Propery value.100 /// @dev EVM selector for this function is: 0x2f073f66,101 /// or in textual repr: setCollectionProperty(string,bytes)102 function setCollectionProperty(string memory key, bytes memory value) public {103 require(false, stub_error);104 key;105 value;106 dummy = 0;107 }108109 /// Delete collection property.110 ///111 /// @param key Property key.112 /// @dev EVM selector for this function is: 0x7b7debce,113 /// or in textual repr: deleteCollectionProperty(string)114 function deleteCollectionProperty(string memory key) public {115 require(false, stub_error);116 key;117 dummy = 0;118 }119120 /// Get collection property.121 ///122 /// @dev Throws error if key not found.123 ///124 /// @param key Property key.125 /// @return bytes The property corresponding to the key.126 /// @dev EVM selector for this function is: 0xcf24fd6d,127 /// or in textual repr: collectionProperty(string)128 function collectionProperty(string memory key) public view returns (bytes memory) {129 require(false, stub_error);130 key;131 dummy;132 return hex"";133 }134135 /// Set the sponsor of the collection.136 ///137 /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.138 ///139 /// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.140 /// @dev EVM selector for this function is: 0x7623402e,141 /// or in textual repr: setCollectionSponsor(address)142 function setCollectionSponsor(address sponsor) public {143 require(false, stub_error);144 sponsor;145 dummy = 0;146 }147148 /// Set the sponsor of the collection.149 ///150 /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.151 ///152 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.153 /// @dev EVM selector for this function is: 0x84a1d5a8,154 /// or in textual repr: setCollectionSponsorCross((address,uint256))155 function setCollectionSponsorCross(Tuple6 memory sponsor) public {156 require(false, stub_error);157 sponsor;158 dummy = 0;159 }160161 /// Whether there is a pending sponsor.162 /// @dev EVM selector for this function is: 0x058ac185,163 /// or in textual repr: hasCollectionPendingSponsor()164 function hasCollectionPendingSponsor() public view returns (bool) {165 require(false, stub_error);166 dummy;167 return false;168 }169170 /// Collection sponsorship confirmation.171 ///172 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.173 /// @dev EVM selector for this function is: 0x3c50e97a,174 /// or in textual repr: confirmCollectionSponsorship()175 function confirmCollectionSponsorship() public {176 require(false, stub_error);177 dummy = 0;178 }179180 /// Remove collection sponsor.181 /// @dev EVM selector for this function is: 0x6e0326a3,182 /// or in textual repr: removeCollectionSponsor()183 function removeCollectionSponsor() public {184 require(false, stub_error);185 dummy = 0;186 }187188 /// Get current sponsor.189 ///190 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.191 /// @dev EVM selector for this function is: 0x6ec0a9f1,192 /// or in textual repr: collectionSponsor()193 function collectionSponsor() public view returns (Tuple6 memory) {194 require(false, stub_error);195 dummy;196 return Tuple6(0x0000000000000000000000000000000000000000, 0);197 }198199 /// Set limits for the collection.200 /// @dev Throws error if limit not found.201 /// @param limit Name of the limit. Valid names:202 /// "accountTokenOwnershipLimit",203 /// "sponsoredDataSize",204 /// "sponsoredDataRateLimit",205 /// "tokenLimit",206 /// "sponsorTransferTimeout",207 /// "sponsorApproveTimeout"208 /// @param value Value of the limit.209 /// @dev EVM selector for this function is: 0x6a3841db,210 /// or in textual repr: setCollectionLimit(string,uint32)211 function setCollectionLimit(string memory limit, uint32 value) public {212 require(false, stub_error);213 limit;214 value;215 dummy = 0;216 }217218 /// Set limits for the collection.219 /// @dev Throws error if limit not found.220 /// @param limit Name of the limit. Valid names:221 /// "ownerCanTransfer",222 /// "ownerCanDestroy",223 /// "transfersEnabled"224 /// @param value Value of the limit.225 /// @dev EVM selector for this function is: 0x993b7fba,226 /// or in textual repr: setCollectionLimit(string,bool)227 function setCollectionLimit(string memory limit, bool value) public {228 require(false, stub_error);229 limit;230 value;231 dummy = 0;232 }233234 /// Get contract address.235 /// @dev EVM selector for this function is: 0xf6b4dfb4,236 /// or in textual repr: contractAddress()237 function contractAddress() public view returns (address) {238 require(false, stub_error);239 dummy;240 return 0x0000000000000000000000000000000000000000;241 }242243 /// Add collection admin.244 /// @param newAdmin Cross account administrator address.245 /// @dev EVM selector for this function is: 0x859aa7d6,246 /// or in textual repr: addCollectionAdminCross((address,uint256))247 function addCollectionAdminCross(Tuple6 memory newAdmin) public {248 require(false, stub_error);249 newAdmin;250 dummy = 0;251 }252253 /// Remove collection admin.254 /// @param admin Cross account administrator address.255 /// @dev EVM selector for this function is: 0x6c0cd173,256 /// or in textual repr: removeCollectionAdminCross((address,uint256))257 function removeCollectionAdminCross(Tuple6 memory admin) public {258 require(false, stub_error);259 admin;260 dummy = 0;261 }262263 /// Add collection admin.264 /// @param newAdmin Address of the added administrator.265 /// @dev EVM selector for this function is: 0x92e462c7,266 /// or in textual repr: addCollectionAdmin(address)267 function addCollectionAdmin(address newAdmin) public {268 require(false, stub_error);269 newAdmin;270 dummy = 0;271 }272273 /// Remove collection admin.274 ///275 /// @param admin Address of the removed administrator.276 /// @dev EVM selector for this function is: 0xfafd7b42,277 /// or in textual repr: removeCollectionAdmin(address)278 function removeCollectionAdmin(address admin) public {279 require(false, stub_error);280 admin;281 dummy = 0;282 }283284 /// Toggle accessibility of collection nesting.285 ///286 /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'287 /// @dev EVM selector for this function is: 0x112d4586,288 /// or in textual repr: setCollectionNesting(bool)289 function setCollectionNesting(bool enable) public {290 require(false, stub_error);291 enable;292 dummy = 0;293 }294295 /// Toggle accessibility of collection nesting.296 ///297 /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'298 /// @param collections Addresses of collections that will be available for nesting.299 /// @dev EVM selector for this function is: 0x64872396,300 /// or in textual repr: setCollectionNesting(bool,address[])301 function setCollectionNesting(bool enable, address[] memory collections) public {302 require(false, stub_error);303 enable;304 collections;305 dummy = 0;306 }307308 /// Set the collection access method.309 /// @param mode Access mode310 /// 0 for Normal311 /// 1 for AllowList312 /// @dev EVM selector for this function is: 0x41835d4c,313 /// or in textual repr: setCollectionAccess(uint8)314 function setCollectionAccess(uint8 mode) public {315 require(false, stub_error);316 mode;317 dummy = 0;318 }319320 /// Checks that user allowed to operate with collection.321 ///322 /// @param user User address to check.323 /// @dev EVM selector for this function is: 0xd63a8e11,324 /// or in textual repr: allowed(address)325 function allowed(address user) public view returns (bool) {326 require(false, stub_error);327 user;328 dummy;329 return false;330 }331332 /// Add the user to the allowed list.333 ///334 /// @param user Address of a trusted user.335 /// @dev EVM selector for this function is: 0x67844fe6,336 /// or in textual repr: addToCollectionAllowList(address)337 function addToCollectionAllowList(address user) public {338 require(false, stub_error);339 user;340 dummy = 0;341 }342343 /// Add user to allowed list.344 ///345 /// @param user User cross account address.346 /// @dev EVM selector for this function is: 0xa0184a3a,347 /// or in textual repr: addToCollectionAllowListCross((address,uint256))348 function addToCollectionAllowListCross(Tuple6 memory user) public {349 require(false, stub_error);350 user;351 dummy = 0;352 }353354 /// Remove the user from the allowed list.355 ///356 /// @param user Address of a removed user.357 /// @dev EVM selector for this function is: 0x85c51acb,358 /// or in textual repr: removeFromCollectionAllowList(address)359 function removeFromCollectionAllowList(address user) public {360 require(false, stub_error);361 user;362 dummy = 0;363 }364365 /// Remove user from allowed list.366 ///367 /// @param user User cross account address.368 /// @dev EVM selector for this function is: 0x09ba452a,369 /// or in textual repr: removeFromCollectionAllowListCross((address,uint256))370 function removeFromCollectionAllowListCross(Tuple6 memory user) public {371 require(false, stub_error);372 user;373 dummy = 0;374 }375376 /// Switch permission for minting.377 ///378 /// @param mode Enable if "true".379 /// @dev EVM selector for this function is: 0x00018e84,380 /// or in textual repr: setCollectionMintMode(bool)381 function setCollectionMintMode(bool mode) public {382 require(false, stub_error);383 mode;384 dummy = 0;385 }386387 /// Check that account is the owner or admin of the collection388 ///389 /// @param user account to verify390 /// @return "true" if account is the owner or admin391 /// @dev EVM selector for this function is: 0x9811b0c7,392 /// or in textual repr: isOwnerOrAdmin(address)393 function isOwnerOrAdmin(address user) public view returns (bool) {394 require(false, stub_error);395 user;396 dummy;397 return false;398 }399400 /// Check that account is the owner or admin of the collection401 ///402 /// @param user User cross account to verify403 /// @return "true" if account is the owner or admin404 /// @dev EVM selector for this function is: 0x3e75a905,405 /// or in textual repr: isOwnerOrAdminCross((address,uint256))406 function isOwnerOrAdminCross(Tuple6 memory user) public view returns (bool) {407 require(false, stub_error);408 user;409 dummy;410 return false;411 }412413 /// Returns collection type414 ///415 /// @return `Fungible` or `NFT` or `ReFungible`416 /// @dev EVM selector for this function is: 0xd34b55b8,417 /// or in textual repr: uniqueCollectionType()418 function uniqueCollectionType() public view returns (string memory) {419 require(false, stub_error);420 dummy;421 return "";422 }423424 /// Get collection owner.425 ///426 /// @return Tuble with sponsor address and his substrate mirror.427 /// If address is canonical then substrate mirror is zero and vice versa.428 /// @dev EVM selector for this function is: 0xdf727d3b,429 /// or in textual repr: collectionOwner()430 function collectionOwner() public view returns (Tuple6 memory) {431 require(false, stub_error);432 dummy;433 return Tuple6(0x0000000000000000000000000000000000000000, 0);434 }435436 /// Changes collection owner to another account437 ///438 /// @dev Owner can be changed only by current owner439 /// @param newOwner new owner account440 /// @dev EVM selector for this function is: 0x4f53e226,441 /// or in textual repr: changeCollectionOwner(address)442 function changeCollectionOwner(address newOwner) public {443 require(false, stub_error);444 newOwner;445 dummy = 0;446 }447448 /// Get collection administrators449 ///450 /// @return Vector of tuples with admins address and his substrate mirror.451 /// If address is canonical then substrate mirror is zero and vice versa.452 /// @dev EVM selector for this function is: 0x5813216b,453 /// or in textual repr: collectionAdmins()454 function collectionAdmins() public view returns (Tuple6[] memory) {455 require(false, stub_error);456 dummy;457 return new Tuple6[](0);458 }459460 /// Changes collection owner to another account461 ///462 /// @dev Owner can be changed only by current owner463 /// @param newOwner new owner cross account464 /// @dev EVM selector for this function is: 0xe5c9913f,465 /// or in textual repr: setOwnerCross((address,uint256))466 function setOwnerCross(Tuple6 memory newOwner) public {467 require(false, stub_error);468 newOwner;469 dummy = 0;470 }471}472473/// @dev the ERC-165 identifier for this interface is 0x5b5e139f474contract ERC721Metadata is Dummy, ERC165 {475 // /// @notice A descriptive name for a collection of NFTs in this contract476 // /// @dev real implementation of this function lies in `ERC721UniqueExtensions`477 // /// @dev EVM selector for this function is: 0x06fdde03,478 // /// or in textual repr: name()479 // function name() public view returns (string memory) {480 // require(false, stub_error);481 // dummy;482 // return "";483 // }484485 // /// @notice An abbreviated name for NFTs in this contract486 // /// @dev real implementation of this function lies in `ERC721UniqueExtensions`487 // /// @dev EVM selector for this function is: 0x95d89b41,488 // /// or in textual repr: symbol()489 // function symbol() public view returns (string memory) {490 // require(false, stub_error);491 // dummy;492 // return "";493 // }494495 /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.496 ///497 /// @dev If the token has a `url` property and it is not empty, it is returned.498 /// Else If the collection does not have a property with key `schemaName` or its value is not equal to `ERC721Metadata`, it return an error `tokenURI not set`.499 /// If the collection property `baseURI` is empty or absent, return "" (empty string)500 /// otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix501 /// otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).502 ///503 /// @return token's const_metadata504 /// @dev EVM selector for this function is: 0xc87b56dd,505 /// or in textual repr: tokenURI(uint256)506 function tokenURI(uint256 tokenId) public view returns (string memory) {507 require(false, stub_error);508 tokenId;509 dummy;510 return "";511 }512}513514/// @title ERC721 Token that can be irreversibly burned (destroyed).515/// @dev the ERC-165 identifier for this interface is 0x42966c68516contract ERC721Burnable is Dummy, ERC165 {517 /// @notice Burns a specific ERC721 token.518 /// @dev Throws unless `msg.sender` is the current RFT owner, or an authorized519 /// operator of the current owner.520 /// @param tokenId The RFT to approve521 /// @dev EVM selector for this function is: 0x42966c68,522 /// or in textual repr: burn(uint256)523 function burn(uint256 tokenId) public {524 require(false, stub_error);525 tokenId;526 dummy = 0;527 }528}529530/// @dev inlined interface531contract ERC721UniqueMintableEvents {532 event MintingFinished();533}534535/// @title ERC721 minting logic.536/// @dev the ERC-165 identifier for this interface is 0x476ff149537contract ERC721UniqueMintable is Dummy, ERC165, ERC721UniqueMintableEvents {538 /// @dev EVM selector for this function is: 0x05d2035b,539 /// or in textual repr: mintingFinished()540 function mintingFinished() public view returns (bool) {541 require(false, stub_error);542 dummy;543 return false;544 }545546 /// @notice Function to mint token.547 /// @param to The new owner548 /// @return uint256 The id of the newly minted token549 /// @dev EVM selector for this function is: 0x6a627842,550 /// or in textual repr: mint(address)551 function mint(address to) public returns (uint256) {552 require(false, stub_error);553 to;554 dummy = 0;555 return 0;556 }557558 // /// @notice Function to mint token.559 // /// @dev `tokenId` should be obtained with `nextTokenId` method,560 // /// unlike standard, you can't specify it manually561 // /// @param to The new owner562 // /// @param tokenId ID of the minted RFT563 // /// @dev EVM selector for this function is: 0x40c10f19,564 // /// or in textual repr: mint(address,uint256)565 // function mint(address to, uint256 tokenId) public returns (bool) {566 // require(false, stub_error);567 // to;568 // tokenId;569 // dummy = 0;570 // return false;571 // }572573 /// @notice Function to mint token with the given tokenUri.574 /// @param to The new owner575 /// @param tokenUri Token URI that would be stored in the NFT properties576 /// @return uint256 The id of the newly minted token577 /// @dev EVM selector for this function is: 0x45c17782,578 /// or in textual repr: mintWithTokenURI(address,string)579 function mintWithTokenURI(address to, string memory tokenUri) public returns (uint256) {580 require(false, stub_error);581 to;582 tokenUri;583 dummy = 0;584 return 0;585 }586587 // /// @notice Function to mint token with the given tokenUri.588 // /// @dev `tokenId` should be obtained with `nextTokenId` method,589 // /// unlike standard, you can't specify it manually590 // /// @param to The new owner591 // /// @param tokenId ID of the minted RFT592 // /// @param tokenUri Token URI that would be stored in the RFT properties593 // /// @dev EVM selector for this function is: 0x50bb4e7f,594 // /// or in textual repr: mintWithTokenURI(address,uint256,string)595 // function mintWithTokenURI(address to, uint256 tokenId, string memory tokenUri) public returns (bool) {596 // require(false, stub_error);597 // to;598 // tokenId;599 // tokenUri;600 // dummy = 0;601 // return false;602 // }603604 /// @dev Not implemented605 /// @dev EVM selector for this function is: 0x7d64bcb4,606 /// or in textual repr: finishMinting()607 function finishMinting() public returns (bool) {608 require(false, stub_error);609 dummy = 0;610 return false;611 }612}613614/// @title Unique extensions for ERC721.615/// @dev the ERC-165 identifier for this interface is 0x81feb398616contract ERC721UniqueExtensions is Dummy, ERC165 {617 /// @notice A descriptive name for a collection of NFTs in this contract618 /// @dev EVM selector for this function is: 0x06fdde03,619 /// or in textual repr: name()620 function name() public view returns (string memory) {621 require(false, stub_error);622 dummy;623 return "";624 }625626 /// @notice An abbreviated name for NFTs in this contract627 /// @dev EVM selector for this function is: 0x95d89b41,628 /// or in textual repr: symbol()629 function symbol() public view returns (string memory) {630 require(false, stub_error);631 dummy;632 return "";633 }634635 /// @notice Transfer ownership of an RFT636 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`637 /// is the zero address. Throws if `tokenId` is not a valid RFT.638 /// Throws if RFT pieces have multiple owners.639 /// @param to The new owner640 /// @param tokenId The RFT to transfer641 /// @dev EVM selector for this function is: 0xa9059cbb,642 /// or in textual repr: transfer(address,uint256)643 function transfer(address to, uint256 tokenId) public {644 require(false, stub_error);645 to;646 tokenId;647 dummy = 0;648 }649650 /// @notice Transfer ownership of an RFT651 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`652 /// is the zero address. Throws if `tokenId` is not a valid RFT.653 /// Throws if RFT pieces have multiple owners.654 /// @param to The new owner655 /// @param tokenId The RFT to transfer656 /// @dev EVM selector for this function is: 0xd5cf430b,657 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)658 function transferFromCross(659 Tuple6 memory from,660 Tuple6 memory to,661 uint256 tokenId662 ) public {663 require(false, stub_error);664 from;665 to;666 tokenId;667 dummy = 0;668 }669670 /// @notice Burns a specific ERC721 token.671 /// @dev Throws unless `msg.sender` is the current owner or an authorized672 /// operator for this RFT. Throws if `from` is not the current owner. Throws673 /// if `to` is the zero address. Throws if `tokenId` is not a valid RFT.674 /// Throws if RFT pieces have multiple owners.675 /// @param from The current owner of the RFT676 /// @param tokenId The RFT to transfer677 /// @dev EVM selector for this function is: 0x79cc6790,678 /// or in textual repr: burnFrom(address,uint256)679 function burnFrom(address from, uint256 tokenId) public {680 require(false, stub_error);681 from;682 tokenId;683 dummy = 0;684 }685686 /// @notice Burns a specific ERC721 token.687 /// @dev Throws unless `msg.sender` is the current owner or an authorized688 /// operator for this RFT. Throws if `from` is not the current owner. Throws689 /// if `to` is the zero address. Throws if `tokenId` is not a valid RFT.690 /// Throws if RFT pieces have multiple owners.691 /// @param from The current owner of the RFT692 /// @param tokenId The RFT to transfer693 /// @dev EVM selector for this function is: 0xbb2f5a58,694 /// or in textual repr: burnFromCross((address,uint256),uint256)695 function burnFromCross(Tuple6 memory from, uint256 tokenId) public {696 require(false, stub_error);697 from;698 tokenId;699 dummy = 0;700 }701702 /// @notice Returns next free RFT ID.703 /// @dev EVM selector for this function is: 0x75794a3c,704 /// or in textual repr: nextTokenId()705 function nextTokenId() public view returns (uint256) {706 require(false, stub_error);707 dummy;708 return 0;709 }710711 // /// @notice Function to mint multiple tokens.712 // /// @dev `tokenIds` should be an array of consecutive numbers and first number713 // /// should be obtained with `nextTokenId` method714 // /// @param to The new owner715 // /// @param tokenIds IDs of the minted RFTs716 // /// @dev EVM selector for this function is: 0x44a9945e,717 // /// or in textual repr: mintBulk(address,uint256[])718 // function mintBulk(address to, uint256[] memory tokenIds) public returns (bool) {719 // require(false, stub_error);720 // to;721 // tokenIds;722 // dummy = 0;723 // return false;724 // }725726 // /// @notice Function to mint multiple tokens with the given tokenUris.727 // /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive728 // /// numbers and first number should be obtained with `nextTokenId` method729 // /// @param to The new owner730 // /// @param tokens array of pairs of token ID and token URI for minted tokens731 // /// @dev EVM selector for this function is: 0x36543006,732 // /// or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])733 // function mintBulkWithTokenURI(address to, Tuple8[] memory tokens) public returns (bool) {734 // require(false, stub_error);735 // to;736 // tokens;737 // dummy = 0;738 // return false;739 // }740741 /// Returns EVM address for refungible token742 ///743 /// @param token ID of the token744 /// @dev EVM selector for this function is: 0xab76fac6,745 /// or in textual repr: tokenContractAddress(uint256)746 function tokenContractAddress(uint256 token) public view returns (address) {747 require(false, stub_error);748 token;749 dummy;750 return 0x0000000000000000000000000000000000000000;751 }752}753754/// @dev anonymous struct755struct Tuple8 {756 uint256 field_0;757 string field_1;758}759760/// @dev anonymous struct761struct Tuple6 {762 address field_0;763 uint256 field_1;764}765766/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension767/// @dev See https://eips.ethereum.org/EIPS/eip-721768/// @dev the ERC-165 identifier for this interface is 0x780e9d63769contract ERC721Enumerable is Dummy, ERC165 {770 /// @notice Enumerate valid RFTs771 /// @param index A counter less than `totalSupply()`772 /// @return The token identifier for the `index`th NFT,773 /// (sort order not specified)774 /// @dev EVM selector for this function is: 0x4f6ccce7,775 /// or in textual repr: tokenByIndex(uint256)776 function tokenByIndex(uint256 index) public view returns (uint256) {777 require(false, stub_error);778 index;779 dummy;780 return 0;781 }782783 /// Not implemented784 /// @dev EVM selector for this function is: 0x2f745c59,785 /// or in textual repr: tokenOfOwnerByIndex(address,uint256)786 function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {787 require(false, stub_error);788 owner;789 index;790 dummy;791 return 0;792 }793794 /// @notice Count RFTs tracked by this contract795 /// @return A count of valid RFTs tracked by this contract, where each one of796 /// them has an assigned and queryable owner not equal to the zero address797 /// @dev EVM selector for this function is: 0x18160ddd,798 /// or in textual repr: totalSupply()799 function totalSupply() public view returns (uint256) {800 require(false, stub_error);801 dummy;802 return 0;803 }804}805806/// @dev inlined interface807contract ERC721Events {808 event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);809 event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);810 event ApprovalForAll(address indexed owner, address indexed operator, bool approved);811}812813/// @title ERC-721 Non-Fungible Token Standard814/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md815/// @dev the ERC-165 identifier for this interface is 0x58800161816contract ERC721 is Dummy, ERC165, ERC721Events {817 /// @notice Count all RFTs assigned to an owner818 /// @dev RFTs assigned to the zero address are considered invalid, and this819 /// function throws for queries about the zero address.820 /// @param owner An address for whom to query the balance821 /// @return The number of RFTs owned by `owner`, possibly zero822 /// @dev EVM selector for this function is: 0x70a08231,823 /// or in textual repr: balanceOf(address)824 function balanceOf(address owner) public view returns (uint256) {825 require(false, stub_error);826 owner;827 dummy;828 return 0;829 }830831 /// @notice Find the owner of an RFT832 /// @dev RFTs assigned to zero address are considered invalid, and queries833 /// about them do throw.834 /// Returns special 0xffffffffffffffffffffffffffffffffffffffff address for835 /// the tokens that are partially owned.836 /// @param tokenId The identifier for an RFT837 /// @return The address of the owner of the RFT838 /// @dev EVM selector for this function is: 0x6352211e,839 /// or in textual repr: ownerOf(uint256)840 function ownerOf(uint256 tokenId) public view returns (address) {841 require(false, stub_error);842 tokenId;843 dummy;844 return 0x0000000000000000000000000000000000000000;845 }846847 /// @dev Not implemented848 /// @dev EVM selector for this function is: 0x60a11672,849 /// or in textual repr: safeTransferFromWithData(address,address,uint256,bytes)850 function safeTransferFromWithData(851 address from,852 address to,853 uint256 tokenId,854 bytes memory data855 ) public {856 require(false, stub_error);857 from;858 to;859 tokenId;860 data;861 dummy = 0;862 }863864 /// @dev Not implemented865 /// @dev EVM selector for this function is: 0x42842e0e,866 /// or in textual repr: safeTransferFrom(address,address,uint256)867 function safeTransferFrom(868 address from,869 address to,870 uint256 tokenId871 ) public {872 require(false, stub_error);873 from;874 to;875 tokenId;876 dummy = 0;877 }878879 /// @notice Transfer ownership of an RFT -- THE CALLER IS RESPONSIBLE880 /// TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE881 /// THEY MAY BE PERMANENTLY LOST882 /// @dev Throws unless `msg.sender` is the current owner or an authorized883 /// operator for this RFT. Throws if `from` is not the current owner. Throws884 /// if `to` is the zero address. Throws if `tokenId` is not a valid RFT.885 /// Throws if RFT pieces have multiple owners.886 /// @param from The current owner of the NFT887 /// @param to The new owner888 /// @param tokenId The NFT to transfer889 /// @dev EVM selector for this function is: 0x23b872dd,890 /// or in textual repr: transferFrom(address,address,uint256)891 function transferFrom(892 address from,893 address to,894 uint256 tokenId895 ) public {896 require(false, stub_error);897 from;898 to;899 tokenId;900 dummy = 0;901 }902903 /// @dev Not implemented904 /// @dev EVM selector for this function is: 0x095ea7b3,905 /// or in textual repr: approve(address,uint256)906 function approve(address approved, uint256 tokenId) public {907 require(false, stub_error);908 approved;909 tokenId;910 dummy = 0;911 }912913 /// @dev Not implemented914 /// @dev EVM selector for this function is: 0xa22cb465,915 /// or in textual repr: setApprovalForAll(address,bool)916 function setApprovalForAll(address operator, bool approved) public {917 require(false, stub_error);918 operator;919 approved;920 dummy = 0;921 }922923 /// @dev Not implemented924 /// @dev EVM selector for this function is: 0x081812fc,925 /// or in textual repr: getApproved(uint256)926 function getApproved(uint256 tokenId) public view returns (address) {927 require(false, stub_error);928 tokenId;929 dummy;930 return 0x0000000000000000000000000000000000000000;931 }932933 /// @dev Not implemented934 /// @dev EVM selector for this function is: 0xe985e9c5,935 /// or in textual repr: isApprovedForAll(address,address)936 function isApprovedForAll(address owner, address operator) public view returns (address) {937 require(false, stub_error);938 owner;939 operator;940 dummy;941 return 0x0000000000000000000000000000000000000000;942 }943}944945contract UniqueRefungible is946 Dummy,947 ERC165,948 ERC721,949 ERC721Enumerable,950 ERC721UniqueExtensions,951 ERC721UniqueMintable,952 ERC721Burnable,953 ERC721Metadata,954 Collection,955 TokenProperties956{}tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -13,7 +13,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x25d897dc
+/// @dev the ERC-165 identifier for this interface is 0x5d354410
interface Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -23,6 +23,13 @@
/// or in textual repr: setCollectionProperty(string,bytes)
function setCollectionProperty(string memory key, bytes memory value) external;
+ /// Set collection properties.
+ ///
+ /// @param properties Vector of properties key/value pair.
+ /// @dev EVM selector for this function is: 0x50b26b2a,
+ /// or in textual repr: setCollectionProperties((string,bytes)[])
+ function setCollectionProperties(Tuple10[] memory properties) external;
+
/// Delete collection property.
///
/// @param key Property key.
@@ -40,6 +47,14 @@
/// or in textual repr: collectionProperty(string)
function collectionProperty(string memory key) external view returns (bytes memory);
+ /// Get collection properties.
+ ///
+ /// @param keys Properties keys.
+ /// @return Vector of properties key/value pairs.
+ /// @dev EVM selector for this function is: 0x285fb8e6,
+ /// or in textual repr: collectionProperties(string[])
+ function collectionProperties(string[] memory keys) external view returns (Tuple10[] memory);
+
/// Set the sponsor of the collection.
///
/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
@@ -258,6 +273,12 @@
function setOwnerCross(Tuple6 memory newOwner) external;
}
+/// @dev anonymous struct
+struct Tuple10 {
+ string field_0;
+ bytes field_1;
+}
+
/// @dev the ERC-165 identifier for this interface is 0x032e5926
interface ERC20UniqueExtensions is Dummy, ERC165 {
/// @dev EVM selector for this function is: 0x0ecd0ab0,
tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -62,7 +62,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x25d897dc
+/// @dev the ERC-165 identifier for this interface is 0x5d354410
interface Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -72,6 +72,13 @@
/// or in textual repr: setCollectionProperty(string,bytes)
function setCollectionProperty(string memory key, bytes memory value) external;
+ /// Set collection properties.
+ ///
+ /// @param properties Vector of properties key/value pair.
+ /// @dev EVM selector for this function is: 0x50b26b2a,
+ /// or in textual repr: setCollectionProperties((string,bytes)[])
+ function setCollectionProperties(Tuple19[] memory properties) external;
+
/// Delete collection property.
///
/// @param key Property key.
@@ -89,6 +96,14 @@
/// or in textual repr: collectionProperty(string)
function collectionProperty(string memory key) external view returns (bytes memory);
+ /// Get collection properties.
+ ///
+ /// @param keys Properties keys.
+ /// @return Vector of properties key/value pairs.
+ /// @dev EVM selector for this function is: 0x285fb8e6,
+ /// or in textual repr: collectionProperties(string[])
+ function collectionProperties(string[] memory keys) external view returns (Tuple19[] memory);
+
/// Set the sponsor of the collection.
///
/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
@@ -307,6 +322,12 @@
function setOwnerCross(Tuple6 memory newOwner) external;
}
+/// @dev anonymous struct
+struct Tuple19 {
+ string field_0;
+ bytes field_1;
+}
+
/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
/// @dev See https://eips.ethereum.org/EIPS/eip-721
/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
tests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -62,7 +62,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x25d897dc
+/// @dev the ERC-165 identifier for this interface is 0x5d354410
interface Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -72,6 +72,13 @@
/// or in textual repr: setCollectionProperty(string,bytes)
function setCollectionProperty(string memory key, bytes memory value) external;
+ /// Set collection properties.
+ ///
+ /// @param properties Vector of properties key/value pair.
+ /// @dev EVM selector for this function is: 0x50b26b2a,
+ /// or in textual repr: setCollectionProperties((string,bytes)[])
+ function setCollectionProperties(Tuple19[] memory properties) external;
+
/// Delete collection property.
///
/// @param key Property key.
@@ -89,6 +96,14 @@
/// or in textual repr: collectionProperty(string)
function collectionProperty(string memory key) external view returns (bytes memory);
+ /// Get collection properties.
+ ///
+ /// @param keys Properties keys.
+ /// @return Vector of properties key/value pairs.
+ /// @dev EVM selector for this function is: 0x285fb8e6,
+ /// or in textual repr: collectionProperties(string[])
+ function collectionProperties(string[] memory keys) external view returns (Tuple19[] memory);
+
/// Set the sponsor of the collection.
///
/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
@@ -307,6 +322,12 @@
function setOwnerCross(Tuple6 memory newOwner) external;
}
+/// @dev anonymous struct
+struct Tuple19 {
+ string field_0;
+ bytes field_1;
+}
+
/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
interface ERC721Metadata is Dummy, ERC165 {
// /// @notice A descriptive name for a collection of NFTs in this contract
tests/src/eth/collectionProperties.test.tsdiffbeforeafterboth--- a/tests/src/eth/collectionProperties.test.ts
+++ b/tests/src/eth/collectionProperties.test.ts
@@ -161,3 +161,31 @@
await checkERC721Metadata(helper, 'rft');
});
});
+
+describe('EVM collection property', () => {
+ itEth('Set/read properties', async ({helper, privateKey}) => {
+ const alice = await privateKey('//Alice');
+ const collection = await helper.nft.mintCollection(alice, {name: 'A', description: 'B', tokenPrefix: 'C'});
+
+ const sender = await helper.eth.createAccountWithBalance(alice, 100n);
+ await collection.addAdmin(alice, {Ethereum: sender});
+
+ const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);
+ const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', sender);
+
+ const key1 = 'key1';
+ const value1 = Buffer.from('value1');
+
+ const key2 = 'key2';
+ const value2 = Buffer.from('value2');
+
+ const writeProperties = [
+ [key1, '0x'+value1.toString('hex')],
+ [key2, '0x'+value2.toString('hex')],
+ ];
+
+ await contract.methods.setCollectionProperties(writeProperties).send();
+ const readProperties = await contract.methods.collectionProperties([key1, key2]).call();
+ expect(readProperties).to.be.like(writeProperties);
+ });
+});
tests/src/eth/fungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/fungibleAbi.json
+++ b/tests/src/eth/fungibleAbi.json
@@ -229,6 +229,25 @@
"type": "function"
},
{
+ "inputs": [
+ { "internalType": "string[]", "name": "keys", "type": "string[]" }
+ ],
+ "name": "collectionProperties",
+ "outputs": [
+ {
+ "components": [
+ { "internalType": "string", "name": "field_0", "type": "string" },
+ { "internalType": "bytes", "name": "field_1", "type": "bytes" }
+ ],
+ "internalType": "struct Tuple10[]",
+ "name": "",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
"inputs": [{ "internalType": "string", "name": "key", "type": "string" }],
"name": "collectionProperty",
"outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
@@ -463,6 +482,23 @@
},
{
"inputs": [
+ {
+ "components": [
+ { "internalType": "string", "name": "field_0", "type": "string" },
+ { "internalType": "bytes", "name": "field_1", "type": "bytes" }
+ ],
+ "internalType": "struct Tuple10[]",
+ "name": "properties",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "setCollectionProperties",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
{ "internalType": "string", "name": "key", "type": "string" },
{ "internalType": "bytes", "name": "value", "type": "bytes" }
],
tests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/nonFungibleAbi.json
+++ b/tests/src/eth/nonFungibleAbi.json
@@ -259,6 +259,25 @@
"type": "function"
},
{
+ "inputs": [
+ { "internalType": "string[]", "name": "keys", "type": "string[]" }
+ ],
+ "name": "collectionProperties",
+ "outputs": [
+ {
+ "components": [
+ { "internalType": "string", "name": "field_0", "type": "string" },
+ { "internalType": "bytes", "name": "field_1", "type": "bytes" }
+ ],
+ "internalType": "struct Tuple19[]",
+ "name": "",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
"inputs": [{ "internalType": "string", "name": "key", "type": "string" }],
"name": "collectionProperty",
"outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
@@ -578,6 +597,23 @@
},
{
"inputs": [
+ {
+ "components": [
+ { "internalType": "string", "name": "field_0", "type": "string" },
+ { "internalType": "bytes", "name": "field_1", "type": "bytes" }
+ ],
+ "internalType": "struct Tuple19[]",
+ "name": "properties",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "setCollectionProperties",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
{ "internalType": "string", "name": "key", "type": "string" },
{ "internalType": "bytes", "name": "value", "type": "bytes" }
],
tests/src/eth/reFungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/reFungibleAbi.json
+++ b/tests/src/eth/reFungibleAbi.json
@@ -241,6 +241,25 @@
"type": "function"
},
{
+ "inputs": [
+ { "internalType": "string[]", "name": "keys", "type": "string[]" }
+ ],
+ "name": "collectionProperties",
+ "outputs": [
+ {
+ "components": [
+ { "internalType": "string", "name": "field_0", "type": "string" },
+ { "internalType": "bytes", "name": "field_1", "type": "bytes" }
+ ],
+ "internalType": "struct Tuple19[]",
+ "name": "",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
"inputs": [{ "internalType": "string", "name": "key", "type": "string" }],
"name": "collectionProperty",
"outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
@@ -560,6 +579,23 @@
},
{
"inputs": [
+ {
+ "components": [
+ { "internalType": "string", "name": "field_0", "type": "string" },
+ { "internalType": "bytes", "name": "field_1", "type": "bytes" }
+ ],
+ "internalType": "struct Tuple19[]",
+ "name": "properties",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "setCollectionProperties",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
{ "internalType": "string", "name": "key", "type": "string" },
{ "internalType": "bytes", "name": "value", "type": "bytes" }
],