difftreelog
genetate evm stubs & fix abiWriter for struct
in: master
13 files changed
crates/evm-coder/src/abi/impls.rsdiffbeforeafterboth--- a/crates/evm-coder/src/abi/impls.rs
+++ b/crates/evm-coder/src/abi/impls.rs
@@ -184,8 +184,7 @@
impl AbiWrite for Property {
fn abi_write(&self, writer: &mut AbiWriter) {
- self.key.abi_write(writer);
- self.value.abi_write(writer);
+ (&self.key, &self.value).abi_write(writer);
}
}
crates/evm-coder/src/abi/traits.rsdiffbeforeafterboth--- a/crates/evm-coder/src/abi/traits.rs
+++ b/crates/evm-coder/src/abi/traits.rs
@@ -49,3 +49,9 @@
Ok(writer.into())
}
}
+
+impl<T: AbiWrite> AbiWrite for &T {
+ fn abi_write(&self, writer: &mut AbiWriter) {
+ T::abi_write(self, writer);
+ }
+}
pallets/fungible/src/stubs/UniqueFungible.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 you to work with collections.21/// @dev the ERC-165 identifier for this interface is 0x8b91d19222contract Collection is Dummy, ERC165 {23 // /// Set collection property.24 // ///25 // /// @param key Property key.26 // /// @param value Propery value.27 // /// @dev EVM selector for this function is: 0x2f073f66,28 // /// or in textual repr: setCollectionProperty(string,bytes)29 // function setCollectionProperty(string memory key, bytes memory value) public {30 // require(false, stub_error);31 // key;32 // value;33 // dummy = 0;34 // }3536 /// Set collection properties.37 ///38 /// @param properties Vector of properties key/value pair.39 /// @dev EVM selector for this function is: 0x50b26b2a,40 /// or in textual repr: setCollectionProperties((string,bytes)[])41 function setCollectionProperties(Property[] memory properties) public {42 require(false, stub_error);43 properties;44 dummy = 0;45 }4647 // /// Delete collection property.48 // ///49 // /// @param key Property key.50 // /// @dev EVM selector for this function is: 0x7b7debce,51 // /// or in textual repr: deleteCollectionProperty(string)52 // function deleteCollectionProperty(string memory key) public {53 // require(false, stub_error);54 // key;55 // dummy = 0;56 // }5758 /// Delete collection properties.59 ///60 /// @param keys Properties keys.61 /// @dev EVM selector for this function is: 0xee206ee3,62 /// or in textual repr: deleteCollectionProperties(string[])63 function deleteCollectionProperties(string[] memory keys) public {64 require(false, stub_error);65 keys;66 dummy = 0;67 }6869 /// Get collection property.70 ///71 /// @dev Throws error if key not found.72 ///73 /// @param key Property key.74 /// @return bytes The property corresponding to the key.75 /// @dev EVM selector for this function is: 0xcf24fd6d,76 /// or in textual repr: collectionProperty(string)77 function collectionProperty(string memory key) public view returns (bytes memory) {78 require(false, stub_error);79 key;80 dummy;81 return hex"";82 }8384 /// Get collection properties.85 ///86 /// @param keys Properties keys. Empty keys for all propertyes.87 /// @return Vector of properties key/value pairs.88 /// @dev EVM selector for this function is: 0x285fb8e6,89 /// or in textual repr: collectionProperties(string[])90 function collectionProperties(string[] memory keys) public view returns (Tuple16[] memory) {91 require(false, stub_error);92 keys;93 dummy;94 return new Tuple16[](0);95 }9697 // /// Set the sponsor of the collection.98 // ///99 // /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.100 // ///101 // /// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.102 // /// @dev EVM selector for this function is: 0x7623402e,103 // /// or in textual repr: setCollectionSponsor(address)104 // function setCollectionSponsor(address sponsor) public {105 // require(false, stub_error);106 // sponsor;107 // dummy = 0;108 // }109110 /// Set the sponsor of the collection.111 ///112 /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.113 ///114 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.115 /// @dev EVM selector for this function is: 0x84a1d5a8,116 /// or in textual repr: setCollectionSponsorCross((address,uint256))117 function setCollectionSponsorCross(EthCrossAccount memory sponsor) public {118 require(false, stub_error);119 sponsor;120 dummy = 0;121 }122123 /// Whether there is a pending sponsor.124 /// @dev EVM selector for this function is: 0x058ac185,125 /// or in textual repr: hasCollectionPendingSponsor()126 function hasCollectionPendingSponsor() public view returns (bool) {127 require(false, stub_error);128 dummy;129 return false;130 }131132 /// Collection sponsorship confirmation.133 ///134 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.135 /// @dev EVM selector for this function is: 0x3c50e97a,136 /// or in textual repr: confirmCollectionSponsorship()137 function confirmCollectionSponsorship() public {138 require(false, stub_error);139 dummy = 0;140 }141142 /// Remove collection sponsor.143 /// @dev EVM selector for this function is: 0x6e0326a3,144 /// or in textual repr: removeCollectionSponsor()145 function removeCollectionSponsor() public {146 require(false, stub_error);147 dummy = 0;148 }149150 /// Get current sponsor.151 ///152 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.153 /// @dev EVM selector for this function is: 0x6ec0a9f1,154 /// or in textual repr: collectionSponsor()155 function collectionSponsor() public view returns (Tuple8 memory) {156 require(false, stub_error);157 dummy;158 return Tuple8(0x0000000000000000000000000000000000000000, 0);159 }160161 /// Set limits for the collection.162 /// @dev Throws error if limit not found.163 /// @param limit Name of the limit. Valid names:164 /// "accountTokenOwnershipLimit",165 /// "sponsoredDataSize",166 /// "sponsoredDataRateLimit",167 /// "tokenLimit",168 /// "sponsorTransferTimeout",169 /// "sponsorApproveTimeout"170 /// "ownerCanTransfer",171 /// "ownerCanDestroy",172 /// "transfersEnabled"173 /// @param value Value of the limit.174 /// @dev EVM selector for this function is: 0x4ad890a8,175 /// or in textual repr: setCollectionLimit(string,uint256)176 function setCollectionLimit(string memory limit, uint256 value) public {177 require(false, stub_error);178 limit;179 value;180 dummy = 0;181 }182183 /// Get contract address.184 /// @dev EVM selector for this function is: 0xf6b4dfb4,185 /// or in textual repr: contractAddress()186 function contractAddress() public view returns (address) {187 require(false, stub_error);188 dummy;189 return 0x0000000000000000000000000000000000000000;190 }191192 /// Add collection admin.193 /// @param newAdmin Cross account administrator address.194 /// @dev EVM selector for this function is: 0x859aa7d6,195 /// or in textual repr: addCollectionAdminCross((address,uint256))196 function addCollectionAdminCross(EthCrossAccount memory newAdmin) public {197 require(false, stub_error);198 newAdmin;199 dummy = 0;200 }201202 /// Remove collection admin.203 /// @param admin Cross account administrator address.204 /// @dev EVM selector for this function is: 0x6c0cd173,205 /// or in textual repr: removeCollectionAdminCross((address,uint256))206 function removeCollectionAdminCross(EthCrossAccount memory admin) public {207 require(false, stub_error);208 admin;209 dummy = 0;210 }211212 // /// Add collection admin.213 // /// @param newAdmin Address of the added administrator.214 // /// @dev EVM selector for this function is: 0x92e462c7,215 // /// or in textual repr: addCollectionAdmin(address)216 // function addCollectionAdmin(address newAdmin) public {217 // require(false, stub_error);218 // newAdmin;219 // dummy = 0;220 // }221222 // /// Remove collection admin.223 // ///224 // /// @param admin Address of the removed administrator.225 // /// @dev EVM selector for this function is: 0xfafd7b42,226 // /// or in textual repr: removeCollectionAdmin(address)227 // function removeCollectionAdmin(address admin) public {228 // require(false, stub_error);229 // admin;230 // dummy = 0;231 // }232233 /// Toggle accessibility of collection nesting.234 ///235 /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'236 /// @dev EVM selector for this function is: 0x112d4586,237 /// or in textual repr: setCollectionNesting(bool)238 function setCollectionNesting(bool enable) public {239 require(false, stub_error);240 enable;241 dummy = 0;242 }243244 /// Toggle accessibility of collection nesting.245 ///246 /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'247 /// @param collections Addresses of collections that will be available for nesting.248 /// @dev EVM selector for this function is: 0x64872396,249 /// or in textual repr: setCollectionNesting(bool,address[])250 function setCollectionNesting(bool enable, address[] memory collections) public {251 require(false, stub_error);252 enable;253 collections;254 dummy = 0;255 }256257 /// Set the collection access method.258 /// @param mode Access mode259 /// 0 for Normal260 /// 1 for AllowList261 /// @dev EVM selector for this function is: 0x41835d4c,262 /// or in textual repr: setCollectionAccess(uint8)263 function setCollectionAccess(uint8 mode) public {264 require(false, stub_error);265 mode;266 dummy = 0;267 }268269 /// Checks that user allowed to operate with collection.270 ///271 /// @param user User address to check.272 /// @dev EVM selector for this function is: 0xd63a8e11,273 /// or in textual repr: allowed(address)274 function allowed(address user) public view returns (bool) {275 require(false, stub_error);276 user;277 dummy;278 return false;279 }280281 // /// Add the user to the allowed list.282 // ///283 // /// @param user Address of a trusted user.284 // /// @dev EVM selector for this function is: 0x67844fe6,285 // /// or in textual repr: addToCollectionAllowList(address)286 // function addToCollectionAllowList(address user) public {287 // require(false, stub_error);288 // user;289 // dummy = 0;290 // }291292 /// Add user to allowed list.293 ///294 /// @param user User cross account address.295 /// @dev EVM selector for this function is: 0xa0184a3a,296 /// or in textual repr: addToCollectionAllowListCross((address,uint256))297 function addToCollectionAllowListCross(EthCrossAccount memory user) public {298 require(false, stub_error);299 user;300 dummy = 0;301 }302303 // /// Remove the user from the allowed list.304 // ///305 // /// @param user Address of a removed user.306 // /// @dev EVM selector for this function is: 0x85c51acb,307 // /// or in textual repr: removeFromCollectionAllowList(address)308 // function removeFromCollectionAllowList(address user) public {309 // require(false, stub_error);310 // user;311 // dummy = 0;312 // }313314 /// Remove user from allowed list.315 ///316 /// @param user User cross account address.317 /// @dev EVM selector for this function is: 0x09ba452a,318 /// or in textual repr: removeFromCollectionAllowListCross((address,uint256))319 function removeFromCollectionAllowListCross(EthCrossAccount memory user) public {320 require(false, stub_error);321 user;322 dummy = 0;323 }324325 /// Switch permission for minting.326 ///327 /// @param mode Enable if "true".328 /// @dev EVM selector for this function is: 0x00018e84,329 /// or in textual repr: setCollectionMintMode(bool)330 function setCollectionMintMode(bool mode) public {331 require(false, stub_error);332 mode;333 dummy = 0;334 }335336 // /// Check that account is the owner or admin of the collection337 // ///338 // /// @param user account to verify339 // /// @return "true" if account is the owner or admin340 // /// @dev EVM selector for this function is: 0x9811b0c7,341 // /// or in textual repr: isOwnerOrAdmin(address)342 // function isOwnerOrAdmin(address user) public view returns (bool) {343 // require(false, stub_error);344 // user;345 // dummy;346 // return false;347 // }348349 /// Check that account is the owner or admin of the collection350 ///351 /// @param user User cross account to verify352 /// @return "true" if account is the owner or admin353 /// @dev EVM selector for this function is: 0x3e75a905,354 /// or in textual repr: isOwnerOrAdminCross((address,uint256))355 function isOwnerOrAdminCross(EthCrossAccount memory user) public view returns (bool) {356 require(false, stub_error);357 user;358 dummy;359 return false;360 }361362 /// Returns collection type363 ///364 /// @return `Fungible` or `NFT` or `ReFungible`365 /// @dev EVM selector for this function is: 0xd34b55b8,366 /// or in textual repr: uniqueCollectionType()367 function uniqueCollectionType() public view returns (string memory) {368 require(false, stub_error);369 dummy;370 return "";371 }372373 /// Get collection owner.374 ///375 /// @return Tuble with sponsor address and his substrate mirror.376 /// If address is canonical then substrate mirror is zero and vice versa.377 /// @dev EVM selector for this function is: 0xdf727d3b,378 /// or in textual repr: collectionOwner()379 function collectionOwner() public view returns (EthCrossAccount memory) {380 require(false, stub_error);381 dummy;382 return EthCrossAccount(0x0000000000000000000000000000000000000000, 0);383 }384385 // /// Changes collection owner to another account386 // ///387 // /// @dev Owner can be changed only by current owner388 // /// @param newOwner new owner account389 // /// @dev EVM selector for this function is: 0x4f53e226,390 // /// or in textual repr: changeCollectionOwner(address)391 // function changeCollectionOwner(address newOwner) public {392 // require(false, stub_error);393 // newOwner;394 // dummy = 0;395 // }396397 /// Get collection administrators398 ///399 /// @return Vector of tuples with admins address and his substrate mirror.400 /// If address is canonical then substrate mirror is zero and vice versa.401 /// @dev EVM selector for this function is: 0x5813216b,402 /// or in textual repr: collectionAdmins()403 function collectionAdmins() public view returns (EthCrossAccount[] memory) {404 require(false, stub_error);405 dummy;406 return new EthCrossAccount[](0);407 }408409 /// Changes collection owner to another account410 ///411 /// @dev Owner can be changed only by current owner412 /// @param newOwner new owner cross account413 /// @dev EVM selector for this function is: 0x6496c497,414 /// or in textual repr: changeCollectionOwnerCross((address,uint256))415 function changeCollectionOwnerCross(EthCrossAccount memory newOwner) public {416 require(false, stub_error);417 newOwner;418 dummy = 0;419 }420}421422/// @dev Cross account struct423struct EthCrossAccount {424 address eth;425 uint256 sub;426}427428/// @dev anonymous struct429struct Tuple16 {430 string field_0;431 bytes field_1;432}433434/// @dev Property struct435struct Property {436 string key;437 bytes value;438}439440/// @dev the ERC-165 identifier for this interface is 0x29f4dcd9441contract ERC20UniqueExtensions is Dummy, ERC165 {442 /// @notice A description for the collection.443 /// @dev EVM selector for this function is: 0x7284e416,444 /// or in textual repr: description()445 function description() public view returns (string memory) {446 require(false, stub_error);447 dummy;448 return "";449 }450451 /// @dev EVM selector for this function is: 0x0ecd0ab0,452 /// or in textual repr: approveCross((address,uint256),uint256)453 function approveCross(EthCrossAccount memory spender, uint256 amount) public returns (bool) {454 require(false, stub_error);455 spender;456 amount;457 dummy = 0;458 return false;459 }460461 // /// Burn tokens from account462 // /// @dev Function that burns an `amount` of the tokens of a given account,463 // /// deducting from the sender's allowance for said account.464 // /// @param from The account whose tokens will be burnt.465 // /// @param amount The amount that will be burnt.466 // /// @dev EVM selector for this function is: 0x79cc6790,467 // /// or in textual repr: burnFrom(address,uint256)468 // function burnFrom(address from, uint256 amount) public returns (bool) {469 // require(false, stub_error);470 // from;471 // amount;472 // dummy = 0;473 // return false;474 // }475476 /// Burn tokens from account477 /// @dev Function that burns an `amount` of the tokens of a given account,478 /// deducting from the sender's allowance for said account.479 /// @param from The account whose tokens will be burnt.480 /// @param amount The amount that will be burnt.481 /// @dev EVM selector for this function is: 0xbb2f5a58,482 /// or in textual repr: burnFromCross((address,uint256),uint256)483 function burnFromCross(EthCrossAccount memory from, uint256 amount) public returns (bool) {484 require(false, stub_error);485 from;486 amount;487 dummy = 0;488 return false;489 }490491 /// Mint tokens for multiple accounts.492 /// @param amounts array of pairs of account address and amount493 /// @dev EVM selector for this function is: 0x1acf2d55,494 /// or in textual repr: mintBulk((address,uint256)[])495 function mintBulk(Tuple8[] memory amounts) public returns (bool) {496 require(false, stub_error);497 amounts;498 dummy = 0;499 return false;500 }501502 /// @dev EVM selector for this function is: 0x2ada85ff,503 /// or in textual repr: transferCross((address,uint256),uint256)504 function transferCross(EthCrossAccount memory to, uint256 amount) public returns (bool) {505 require(false, stub_error);506 to;507 amount;508 dummy = 0;509 return false;510 }511512 /// @dev EVM selector for this function is: 0xd5cf430b,513 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)514 function transferFromCross(515 EthCrossAccount memory from,516 EthCrossAccount memory to,517 uint256 amount518 ) public returns (bool) {519 require(false, stub_error);520 from;521 to;522 amount;523 dummy = 0;524 return false;525 }526}527528/// @dev anonymous struct529struct Tuple8 {530 address field_0;531 uint256 field_1;532}533534/// @dev the ERC-165 identifier for this interface is 0x40c10f19535contract ERC20Mintable is Dummy, ERC165 {536 /// Mint tokens for `to` account.537 /// @param to account that will receive minted tokens538 /// @param amount amount of tokens to mint539 /// @dev EVM selector for this function is: 0x40c10f19,540 /// or in textual repr: mint(address,uint256)541 function mint(address to, uint256 amount) public returns (bool) {542 require(false, stub_error);543 to;544 amount;545 dummy = 0;546 return false;547 }548}549550/// @dev inlined interface551contract ERC20Events {552 event Transfer(address indexed from, address indexed to, uint256 value);553 event Approval(address indexed owner, address indexed spender, uint256 value);554}555556/// @dev the ERC-165 identifier for this interface is 0x942e8b22557contract ERC20 is Dummy, ERC165, ERC20Events {558 /// @dev EVM selector for this function is: 0x06fdde03,559 /// or in textual repr: name()560 function name() public view returns (string memory) {561 require(false, stub_error);562 dummy;563 return "";564 }565566 /// @dev EVM selector for this function is: 0x95d89b41,567 /// or in textual repr: symbol()568 function symbol() public view returns (string memory) {569 require(false, stub_error);570 dummy;571 return "";572 }573574 /// @dev EVM selector for this function is: 0x18160ddd,575 /// or in textual repr: totalSupply()576 function totalSupply() public view returns (uint256) {577 require(false, stub_error);578 dummy;579 return 0;580 }581582 /// @dev EVM selector for this function is: 0x313ce567,583 /// or in textual repr: decimals()584 function decimals() public view returns (uint8) {585 require(false, stub_error);586 dummy;587 return 0;588 }589590 /// @dev EVM selector for this function is: 0x70a08231,591 /// or in textual repr: balanceOf(address)592 function balanceOf(address owner) public view returns (uint256) {593 require(false, stub_error);594 owner;595 dummy;596 return 0;597 }598599 /// @dev EVM selector for this function is: 0xa9059cbb,600 /// or in textual repr: transfer(address,uint256)601 function transfer(address to, uint256 amount) public returns (bool) {602 require(false, stub_error);603 to;604 amount;605 dummy = 0;606 return false;607 }608609 /// @dev EVM selector for this function is: 0x23b872dd,610 /// or in textual repr: transferFrom(address,address,uint256)611 function transferFrom(612 address from,613 address to,614 uint256 amount615 ) public returns (bool) {616 require(false, stub_error);617 from;618 to;619 amount;620 dummy = 0;621 return false;622 }623624 /// @dev EVM selector for this function is: 0x095ea7b3,625 /// or in textual repr: approve(address,uint256)626 function approve(address spender, uint256 amount) public returns (bool) {627 require(false, stub_error);628 spender;629 amount;630 dummy = 0;631 return false;632 }633634 /// @dev EVM selector for this function is: 0xdd62ed3e,635 /// or in textual repr: allowance(address,address)636 function allowance(address owner, address spender) public view returns (uint256) {637 require(false, stub_error);638 owner;639 spender;640 dummy;641 return 0;642 }643}644645contract UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}1// 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 you to work with collections.21/// @dev the ERC-165 identifier for this interface is 0x8b91d19222contract Collection is Dummy, ERC165 {23 // /// Set collection property.24 // ///25 // /// @param key Property key.26 // /// @param value Propery value.27 // /// @dev EVM selector for this function is: 0x2f073f66,28 // /// or in textual repr: setCollectionProperty(string,bytes)29 // function setCollectionProperty(string memory key, bytes memory value) public {30 // require(false, stub_error);31 // key;32 // value;33 // dummy = 0;34 // }3536 /// Set collection properties.37 ///38 /// @param properties Vector of properties key/value pair.39 /// @dev EVM selector for this function is: 0x50b26b2a,40 /// or in textual repr: setCollectionProperties((string,bytes)[])41 function setCollectionProperties(Property[] memory properties) public {42 require(false, stub_error);43 properties;44 dummy = 0;45 }4647 // /// Delete collection property.48 // ///49 // /// @param key Property key.50 // /// @dev EVM selector for this function is: 0x7b7debce,51 // /// or in textual repr: deleteCollectionProperty(string)52 // function deleteCollectionProperty(string memory key) public {53 // require(false, stub_error);54 // key;55 // dummy = 0;56 // }5758 /// Delete collection properties.59 ///60 /// @param keys Properties keys.61 /// @dev EVM selector for this function is: 0xee206ee3,62 /// or in textual repr: deleteCollectionProperties(string[])63 function deleteCollectionProperties(string[] memory keys) public {64 require(false, stub_error);65 keys;66 dummy = 0;67 }6869 /// Get collection property.70 ///71 /// @dev Throws error if key not found.72 ///73 /// @param key Property key.74 /// @return bytes The property corresponding to the key.75 /// @dev EVM selector for this function is: 0xcf24fd6d,76 /// or in textual repr: collectionProperty(string)77 function collectionProperty(string memory key) public view returns (bytes memory) {78 require(false, stub_error);79 key;80 dummy;81 return hex"";82 }8384 /// Get collection properties.85 ///86 /// @param keys Properties keys. Empty keys for all propertyes.87 /// @return Vector of properties key/value pairs.88 /// @dev EVM selector for this function is: 0x285fb8e6,89 /// or in textual repr: collectionProperties(string[])90 function collectionProperties(string[] memory keys) public view returns (Tuple16[] memory) {91 require(false, stub_error);92 keys;93 dummy;94 return new Tuple16[](0);95 }9697 // /// Set the sponsor of the collection.98 // ///99 // /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.100 // ///101 // /// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.102 // /// @dev EVM selector for this function is: 0x7623402e,103 // /// or in textual repr: setCollectionSponsor(address)104 // function setCollectionSponsor(address sponsor) public {105 // require(false, stub_error);106 // sponsor;107 // dummy = 0;108 // }109110 /// Set the sponsor of the collection.111 ///112 /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.113 ///114 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.115 /// @dev EVM selector for this function is: 0x84a1d5a8,116 /// or in textual repr: setCollectionSponsorCross((address,uint256))117 function setCollectionSponsorCross(EthCrossAccount memory sponsor) public {118 require(false, stub_error);119 sponsor;120 dummy = 0;121 }122123 /// Whether there is a pending sponsor.124 /// @dev EVM selector for this function is: 0x058ac185,125 /// or in textual repr: hasCollectionPendingSponsor()126 function hasCollectionPendingSponsor() public view returns (bool) {127 require(false, stub_error);128 dummy;129 return false;130 }131132 /// Collection sponsorship confirmation.133 ///134 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.135 /// @dev EVM selector for this function is: 0x3c50e97a,136 /// or in textual repr: confirmCollectionSponsorship()137 function confirmCollectionSponsorship() public {138 require(false, stub_error);139 dummy = 0;140 }141142 /// Remove collection sponsor.143 /// @dev EVM selector for this function is: 0x6e0326a3,144 /// or in textual repr: removeCollectionSponsor()145 function removeCollectionSponsor() public {146 require(false, stub_error);147 dummy = 0;148 }149150 /// Get current sponsor.151 ///152 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.153 /// @dev EVM selector for this function is: 0x6ec0a9f1,154 /// or in textual repr: collectionSponsor()155 function collectionSponsor() public view returns (Tuple8 memory) {156 require(false, stub_error);157 dummy;158 return Tuple8(0x0000000000000000000000000000000000000000, 0);159 }160161 /// Set limits for the collection.162 /// @dev Throws error if limit not found.163 /// @param limit Name of the limit. Valid names:164 /// "accountTokenOwnershipLimit",165 /// "sponsoredDataSize",166 /// "sponsoredDataRateLimit",167 /// "tokenLimit",168 /// "sponsorTransferTimeout",169 /// "sponsorApproveTimeout"170 /// "ownerCanTransfer",171 /// "ownerCanDestroy",172 /// "transfersEnabled"173 /// @param value Value of the limit.174 /// @dev EVM selector for this function is: 0x4ad890a8,175 /// or in textual repr: setCollectionLimit(string,uint256)176 function setCollectionLimit(string memory limit, uint256 value) public {177 require(false, stub_error);178 limit;179 value;180 dummy = 0;181 }182183 /// Get contract address.184 /// @dev EVM selector for this function is: 0xf6b4dfb4,185 /// or in textual repr: contractAddress()186 function contractAddress() public view returns (address) {187 require(false, stub_error);188 dummy;189 return 0x0000000000000000000000000000000000000000;190 }191192 /// Add collection admin.193 /// @param newAdmin Cross account administrator address.194 /// @dev EVM selector for this function is: 0x859aa7d6,195 /// or in textual repr: addCollectionAdminCross((address,uint256))196 function addCollectionAdminCross(EthCrossAccount memory newAdmin) public {197 require(false, stub_error);198 newAdmin;199 dummy = 0;200 }201202 /// Remove collection admin.203 /// @param admin Cross account administrator address.204 /// @dev EVM selector for this function is: 0x6c0cd173,205 /// or in textual repr: removeCollectionAdminCross((address,uint256))206 function removeCollectionAdminCross(EthCrossAccount memory admin) public {207 require(false, stub_error);208 admin;209 dummy = 0;210 }211212 // /// Add collection admin.213 // /// @param newAdmin Address of the added administrator.214 // /// @dev EVM selector for this function is: 0x92e462c7,215 // /// or in textual repr: addCollectionAdmin(address)216 // function addCollectionAdmin(address newAdmin) public {217 // require(false, stub_error);218 // newAdmin;219 // dummy = 0;220 // }221222 // /// Remove collection admin.223 // ///224 // /// @param admin Address of the removed administrator.225 // /// @dev EVM selector for this function is: 0xfafd7b42,226 // /// or in textual repr: removeCollectionAdmin(address)227 // function removeCollectionAdmin(address admin) public {228 // require(false, stub_error);229 // admin;230 // dummy = 0;231 // }232233 /// Toggle accessibility of collection nesting.234 ///235 /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'236 /// @dev EVM selector for this function is: 0x112d4586,237 /// or in textual repr: setCollectionNesting(bool)238 function setCollectionNesting(bool enable) public {239 require(false, stub_error);240 enable;241 dummy = 0;242 }243244 /// Toggle accessibility of collection nesting.245 ///246 /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'247 /// @param collections Addresses of collections that will be available for nesting.248 /// @dev EVM selector for this function is: 0x64872396,249 /// or in textual repr: setCollectionNesting(bool,address[])250 function setCollectionNesting(bool enable, address[] memory collections) public {251 require(false, stub_error);252 enable;253 collections;254 dummy = 0;255 }256257 /// Set the collection access method.258 /// @param mode Access mode259 /// 0 for Normal260 /// 1 for AllowList261 /// @dev EVM selector for this function is: 0x41835d4c,262 /// or in textual repr: setCollectionAccess(uint8)263 function setCollectionAccess(uint8 mode) public {264 require(false, stub_error);265 mode;266 dummy = 0;267 }268269 /// Checks that user allowed to operate with collection.270 ///271 /// @param user User address to check.272 /// @dev EVM selector for this function is: 0xd63a8e11,273 /// or in textual repr: allowed(address)274 function allowed(address user) public view returns (bool) {275 require(false, stub_error);276 user;277 dummy;278 return false;279 }280281 // /// Add the user to the allowed list.282 // ///283 // /// @param user Address of a trusted user.284 // /// @dev EVM selector for this function is: 0x67844fe6,285 // /// or in textual repr: addToCollectionAllowList(address)286 // function addToCollectionAllowList(address user) public {287 // require(false, stub_error);288 // user;289 // dummy = 0;290 // }291292 /// Add user to allowed list.293 ///294 /// @param user User cross account address.295 /// @dev EVM selector for this function is: 0xa0184a3a,296 /// or in textual repr: addToCollectionAllowListCross((address,uint256))297 function addToCollectionAllowListCross(EthCrossAccount memory user) public {298 require(false, stub_error);299 user;300 dummy = 0;301 }302303 // /// Remove the user from the allowed list.304 // ///305 // /// @param user Address of a removed user.306 // /// @dev EVM selector for this function is: 0x85c51acb,307 // /// or in textual repr: removeFromCollectionAllowList(address)308 // function removeFromCollectionAllowList(address user) public {309 // require(false, stub_error);310 // user;311 // dummy = 0;312 // }313314 /// Remove user from allowed list.315 ///316 /// @param user User cross account address.317 /// @dev EVM selector for this function is: 0x09ba452a,318 /// or in textual repr: removeFromCollectionAllowListCross((address,uint256))319 function removeFromCollectionAllowListCross(EthCrossAccount memory user) public {320 require(false, stub_error);321 user;322 dummy = 0;323 }324325 /// Switch permission for minting.326 ///327 /// @param mode Enable if "true".328 /// @dev EVM selector for this function is: 0x00018e84,329 /// or in textual repr: setCollectionMintMode(bool)330 function setCollectionMintMode(bool mode) public {331 require(false, stub_error);332 mode;333 dummy = 0;334 }335336 // /// Check that account is the owner or admin of the collection337 // ///338 // /// @param user account to verify339 // /// @return "true" if account is the owner or admin340 // /// @dev EVM selector for this function is: 0x9811b0c7,341 // /// or in textual repr: isOwnerOrAdmin(address)342 // function isOwnerOrAdmin(address user) public view returns (bool) {343 // require(false, stub_error);344 // user;345 // dummy;346 // return false;347 // }348349 /// Check that account is the owner or admin of the collection350 ///351 /// @param user User cross account to verify352 /// @return "true" if account is the owner or admin353 /// @dev EVM selector for this function is: 0x3e75a905,354 /// or in textual repr: isOwnerOrAdminCross((address,uint256))355 function isOwnerOrAdminCross(EthCrossAccount memory user) public view returns (bool) {356 require(false, stub_error);357 user;358 dummy;359 return false;360 }361362 /// Returns collection type363 ///364 /// @return `Fungible` or `NFT` or `ReFungible`365 /// @dev EVM selector for this function is: 0xd34b55b8,366 /// or in textual repr: uniqueCollectionType()367 function uniqueCollectionType() public view returns (string memory) {368 require(false, stub_error);369 dummy;370 return "";371 }372373 /// Get collection owner.374 ///375 /// @return Tuble with sponsor address and his substrate mirror.376 /// If address is canonical then substrate mirror is zero and vice versa.377 /// @dev EVM selector for this function is: 0xdf727d3b,378 /// or in textual repr: collectionOwner()379 function collectionOwner() public view returns (EthCrossAccount memory) {380 require(false, stub_error);381 dummy;382 return EthCrossAccount(0x0000000000000000000000000000000000000000, 0);383 }384385 // /// Changes collection owner to another account386 // ///387 // /// @dev Owner can be changed only by current owner388 // /// @param newOwner new owner account389 // /// @dev EVM selector for this function is: 0x4f53e226,390 // /// or in textual repr: changeCollectionOwner(address)391 // function changeCollectionOwner(address newOwner) public {392 // require(false, stub_error);393 // newOwner;394 // dummy = 0;395 // }396397 /// Get collection administrators398 ///399 /// @return Vector of tuples with admins address and his substrate mirror.400 /// If address is canonical then substrate mirror is zero and vice versa.401 /// @dev EVM selector for this function is: 0x5813216b,402 /// or in textual repr: collectionAdmins()403 function collectionAdmins() public view returns (EthCrossAccount[] memory) {404 require(false, stub_error);405 dummy;406 return new EthCrossAccount[](0);407 }408409 /// Changes collection owner to another account410 ///411 /// @dev Owner can be changed only by current owner412 /// @param newOwner new owner cross account413 /// @dev EVM selector for this function is: 0x6496c497,414 /// or in textual repr: changeCollectionOwnerCross((address,uint256))415 function changeCollectionOwnerCross(EthCrossAccount memory newOwner) public {416 require(false, stub_error);417 newOwner;418 dummy = 0;419 }420}421422/// @dev Cross account struct423struct EthCrossAccount {424 address eth;425 uint256 sub;426}427428/// @dev anonymous struct429struct Tuple16 {430 string field_0;431 bytes field_1;432}433434/// @dev Property struct435struct Property {436 string key;437 bytes value;438}439440/// @dev the ERC-165 identifier for this interface is 0x5b7038cf441contract ERC20UniqueExtensions is Dummy, ERC165 {442 /// @notice A description for the collection.443 /// @dev EVM selector for this function is: 0x7284e416,444 /// or in textual repr: description()445 function description() public view returns (string memory) {446 require(false, stub_error);447 dummy;448 return "";449 }450451 /// @dev EVM selector for this function is: 0x0ecd0ab0,452 /// or in textual repr: approveCross((address,uint256),uint256)453 function approveCross(EthCrossAccount memory spender, uint256 amount) public returns (bool) {454 require(false, stub_error);455 spender;456 amount;457 dummy = 0;458 return false;459 }460461 // /// Burn tokens from account462 // /// @dev Function that burns an `amount` of the tokens of a given account,463 // /// deducting from the sender's allowance for said account.464 // /// @param from The account whose tokens will be burnt.465 // /// @param amount The amount that will be burnt.466 // /// @dev EVM selector for this function is: 0x79cc6790,467 // /// or in textual repr: burnFrom(address,uint256)468 // function burnFrom(address from, uint256 amount) public returns (bool) {469 // require(false, stub_error);470 // from;471 // amount;472 // dummy = 0;473 // return false;474 // }475476 /// Burn tokens from account477 /// @dev Function that burns an `amount` of the tokens of a given account,478 /// deducting from the sender's allowance for said account.479 /// @param from The account whose tokens will be burnt.480 /// @param amount The amount that will be burnt.481 /// @dev EVM selector for this function is: 0xbb2f5a58,482 /// or in textual repr: burnFromCross((address,uint256),uint256)483 function burnFromCross(EthCrossAccount memory from, uint256 amount) public returns (bool) {484 require(false, stub_error);485 from;486 amount;487 dummy = 0;488 return false;489 }490491 /// Mint tokens for multiple accounts.492 /// @param amounts array of pairs of account address and amount493 /// @dev EVM selector for this function is: 0x1acf2d55,494 /// or in textual repr: mintBulk((address,uint256)[])495 function mintBulk(Tuple8[] memory amounts) public returns (bool) {496 require(false, stub_error);497 amounts;498 dummy = 0;499 return false;500 }501502 /// @dev EVM selector for this function is: 0x2ada85ff,503 /// or in textual repr: transferCross((address,uint256),uint256)504 function transferCross(EthCrossAccount memory to, uint256 amount) public returns (bool) {505 require(false, stub_error);506 to;507 amount;508 dummy = 0;509 return false;510 }511512 /// @dev EVM selector for this function is: 0xd5cf430b,513 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)514 function transferFromCross(515 EthCrossAccount memory from,516 EthCrossAccount memory to,517 uint256 amount518 ) public returns (bool) {519 require(false, stub_error);520 from;521 to;522 amount;523 dummy = 0;524 return false;525 }526}527528/// @dev anonymous struct529struct Tuple8 {530 address field_0;531 uint256 field_1;532}533534/// @dev the ERC-165 identifier for this interface is 0x40c10f19535contract ERC20Mintable is Dummy, ERC165 {536 /// Mint tokens for `to` account.537 /// @param to account that will receive minted tokens538 /// @param amount amount of tokens to mint539 /// @dev EVM selector for this function is: 0x40c10f19,540 /// or in textual repr: mint(address,uint256)541 function mint(address to, uint256 amount) public returns (bool) {542 require(false, stub_error);543 to;544 amount;545 dummy = 0;546 return false;547 }548}549550/// @dev inlined interface551contract ERC20Events {552 event Transfer(address indexed from, address indexed to, uint256 value);553 event Approval(address indexed owner, address indexed spender, uint256 value);554}555556/// @dev the ERC-165 identifier for this interface is 0x942e8b22557contract ERC20 is Dummy, ERC165, ERC20Events {558 /// @dev EVM selector for this function is: 0x06fdde03,559 /// or in textual repr: name()560 function name() public view returns (string memory) {561 require(false, stub_error);562 dummy;563 return "";564 }565566 /// @dev EVM selector for this function is: 0x95d89b41,567 /// or in textual repr: symbol()568 function symbol() public view returns (string memory) {569 require(false, stub_error);570 dummy;571 return "";572 }573574 /// @dev EVM selector for this function is: 0x18160ddd,575 /// or in textual repr: totalSupply()576 function totalSupply() public view returns (uint256) {577 require(false, stub_error);578 dummy;579 return 0;580 }581582 /// @dev EVM selector for this function is: 0x313ce567,583 /// or in textual repr: decimals()584 function decimals() public view returns (uint8) {585 require(false, stub_error);586 dummy;587 return 0;588 }589590 /// @dev EVM selector for this function is: 0x70a08231,591 /// or in textual repr: balanceOf(address)592 function balanceOf(address owner) public view returns (uint256) {593 require(false, stub_error);594 owner;595 dummy;596 return 0;597 }598599 /// @dev EVM selector for this function is: 0xa9059cbb,600 /// or in textual repr: transfer(address,uint256)601 function transfer(address to, uint256 amount) public returns (bool) {602 require(false, stub_error);603 to;604 amount;605 dummy = 0;606 return false;607 }608609 /// @dev EVM selector for this function is: 0x23b872dd,610 /// or in textual repr: transferFrom(address,address,uint256)611 function transferFrom(612 address from,613 address to,614 uint256 amount615 ) public returns (bool) {616 require(false, stub_error);617 from;618 to;619 amount;620 dummy = 0;621 return false;622 }623624 /// @dev EVM selector for this function is: 0x095ea7b3,625 /// or in textual repr: approve(address,uint256)626 function approve(address spender, uint256 amount) public returns (bool) {627 require(false, stub_error);628 spender;629 amount;630 dummy = 0;631 return false;632 }633634 /// @dev EVM selector for this function is: 0xdd62ed3e,635 /// or in textual repr: allowance(address,address)636 function allowance(address owner, address spender) public view returns (uint256) {637 require(false, stub_error);638 owner;639 spender;640 dummy;641 return 0;642 }643}644645contract UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}pallets/nonfungible/src/erc.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -725,7 +725,7 @@
&self,
token_id: uint256,
keys: Vec<string>,
- ) -> Result<Vec<(string, bytes)>> {
+ ) -> Result<Vec<PropertyStruct>> {
let keys = keys
.into_iter()
.map(|key| {
@@ -745,7 +745,7 @@
let key = string::from_utf8(p.key.to_vec())
.map_err(|e| Error::Revert(alloc::format!("{}", e)))?;
let value = bytes(p.value.to_vec());
- Ok((key, value))
+ Ok(PropertyStruct { key, value })
})
.collect::<Result<Vec<_>>>()
}
pallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth--- a/pallets/nonfungible/src/stubs/UniqueNFT.sol
+++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol
@@ -188,11 +188,11 @@
/// @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 (Tuple23[] memory) {
+ function collectionProperties(string[] memory keys) public view returns (Tuple27[] memory) {
require(false, stub_error);
keys;
dummy;
- return new Tuple23[](0);
+ return new Tuple27[](0);
}
// /// Set the sponsor of the collection.
@@ -253,10 +253,10 @@
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
/// @dev EVM selector for this function is: 0x6ec0a9f1,
/// or in textual repr: collectionSponsor()
- function collectionSponsor() public view returns (Tuple26 memory) {
+ function collectionSponsor() public view returns (Tuple30 memory) {
require(false, stub_error);
dummy;
- return Tuple26(0x0000000000000000000000000000000000000000, 0);
+ return Tuple30(0x0000000000000000000000000000000000000000, 0);
}
/// Set limits for the collection.
@@ -527,13 +527,13 @@
}
/// @dev anonymous struct
-struct Tuple26 {
+struct Tuple30 {
address field_0;
uint256 field_1;
}
/// @dev anonymous struct
-struct Tuple23 {
+struct Tuple27 {
string field_0;
bytes field_1;
}
@@ -682,7 +682,7 @@
}
/// @title Unique extensions for ERC721.
-/// @dev the ERC-165 identifier for this interface is 0x0e9fc611
+/// @dev the ERC-165 identifier for this interface is 0xb8f094a0
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,
@@ -730,12 +730,12 @@
/// @return Vector of properties key/value pairs.
/// @dev EVM selector for this function is: 0xefc26c69,
/// or in textual repr: tokenProperties(uint256,string[])
- function tokenProperties(uint256 tokenId, string[] memory keys) public view returns (Tuple8[] memory) {
+ function tokenProperties(uint256 tokenId, string[] memory keys) public view returns (Property[] memory) {
require(false, stub_error);
tokenId;
keys;
dummy;
- return new Tuple8[](0);
+ return new Property[](0);
}
/// @notice Set or reaffirm the approved address for an NFT
@@ -861,7 +861,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, Tuple11[] memory tokens) public returns (bool) {
+ // function mintBulkWithTokenURI(address to, Tuple15[] memory tokens) public returns (bool) {
// require(false, stub_error);
// to;
// tokens;
@@ -872,15 +872,9 @@
}
/// @dev anonymous struct
-struct Tuple11 {
+struct Tuple15 {
uint256 field_0;
string field_1;
-}
-
-/// @dev anonymous struct
-struct Tuple8 {
- string field_0;
- bytes field_1;
}
/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
pallets/refungible/src/erc.rsdiffbeforeafterboth--- a/pallets/refungible/src/erc.rs
+++ b/pallets/refungible/src/erc.rs
@@ -753,7 +753,7 @@
&self,
token_id: uint256,
keys: Vec<string>,
- ) -> Result<Vec<(string, bytes)>> {
+ ) -> Result<Vec<PropertyStruct>> {
let keys = keys
.into_iter()
.map(|key| {
@@ -773,7 +773,7 @@
let key = string::from_utf8(p.key.to_vec())
.map_err(|e| Error::Revert(alloc::format!("{}", e)))?;
let value = bytes(p.value.to_vec());
- Ok((key, value))
+ Ok(PropertyStruct { key, value })
})
.collect::<Result<Vec<_>>>()
}
pallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth--- a/pallets/refungible/src/stubs/UniqueRefungible.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungible.sol
@@ -188,11 +188,11 @@
/// @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 (Tuple22[] memory) {
+ function collectionProperties(string[] memory keys) public view returns (Tuple26[] memory) {
require(false, stub_error);
keys;
dummy;
- return new Tuple22[](0);
+ return new Tuple26[](0);
}
// /// Set the sponsor of the collection.
@@ -253,10 +253,10 @@
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
/// @dev EVM selector for this function is: 0x6ec0a9f1,
/// or in textual repr: collectionSponsor()
- function collectionSponsor() public view returns (Tuple25 memory) {
+ function collectionSponsor() public view returns (Tuple29 memory) {
require(false, stub_error);
dummy;
- return Tuple25(0x0000000000000000000000000000000000000000, 0);
+ return Tuple29(0x0000000000000000000000000000000000000000, 0);
}
/// Set limits for the collection.
@@ -527,13 +527,13 @@
}
/// @dev anonymous struct
-struct Tuple25 {
+struct Tuple29 {
address field_0;
uint256 field_1;
}
/// @dev anonymous struct
-struct Tuple22 {
+struct Tuple26 {
string field_0;
bytes field_1;
}
@@ -680,7 +680,7 @@
}
/// @title Unique extensions for ERC721.
-/// @dev the ERC-165 identifier for this interface is 0xab243667
+/// @dev the ERC-165 identifier for this interface is 0x1d4b64d6
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,
@@ -728,12 +728,12 @@
/// @return Vector of properties key/value pairs.
/// @dev EVM selector for this function is: 0xefc26c69,
/// or in textual repr: tokenProperties(uint256,string[])
- function tokenProperties(uint256 tokenId, string[] memory keys) public view returns (Tuple8[] memory) {
+ function tokenProperties(uint256 tokenId, string[] memory keys) public view returns (Property[] memory) {
require(false, stub_error);
tokenId;
keys;
dummy;
- return new Tuple8[](0);
+ return new Property[](0);
}
/// @notice Transfer ownership of an RFT
@@ -849,7 +849,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, Tuple10[] memory tokens) public returns (bool) {
+ // function mintBulkWithTokenURI(address to, Tuple14[] memory tokens) public returns (bool) {
// require(false, stub_error);
// to;
// tokens;
@@ -871,15 +871,9 @@
}
/// @dev anonymous struct
-struct Tuple10 {
+struct Tuple14 {
uint256 field_0;
string field_1;
-}
-
-/// @dev anonymous struct
-struct Tuple8 {
- string field_0;
- bytes field_1;
}
/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
tests/src/eth/abi/nonFungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/nonFungible.json
+++ b/tests/src/eth/abi/nonFungible.json
@@ -249,7 +249,7 @@
{ "internalType": "string", "name": "field_0", "type": "string" },
{ "internalType": "bytes", "name": "field_1", "type": "bytes" }
],
- "internalType": "struct Tuple23[]",
+ "internalType": "struct Tuple27[]",
"name": "",
"type": "tuple[]"
}
@@ -273,7 +273,7 @@
{ "internalType": "address", "name": "field_0", "type": "address" },
{ "internalType": "uint256", "name": "field_1", "type": "uint256" }
],
- "internalType": "struct Tuple26",
+ "internalType": "struct Tuple30",
"name": "",
"type": "tuple"
}
@@ -674,10 +674,10 @@
"outputs": [
{
"components": [
- { "internalType": "string", "name": "field_0", "type": "string" },
- { "internalType": "bytes", "name": "field_1", "type": "bytes" }
+ { "internalType": "string", "name": "key", "type": "string" },
+ { "internalType": "bytes", "name": "value", "type": "bytes" }
],
- "internalType": "struct Tuple8[]",
+ "internalType": "struct Property[]",
"name": "",
"type": "tuple[]"
}
tests/src/eth/abi/reFungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/reFungible.json
+++ b/tests/src/eth/abi/reFungible.json
@@ -231,7 +231,7 @@
{ "internalType": "string", "name": "field_0", "type": "string" },
{ "internalType": "bytes", "name": "field_1", "type": "bytes" }
],
- "internalType": "struct Tuple22[]",
+ "internalType": "struct Tuple26[]",
"name": "",
"type": "tuple[]"
}
@@ -255,7 +255,7 @@
{ "internalType": "address", "name": "field_0", "type": "address" },
{ "internalType": "uint256", "name": "field_1", "type": "uint256" }
],
- "internalType": "struct Tuple25",
+ "internalType": "struct Tuple29",
"name": "",
"type": "tuple"
}
@@ -665,10 +665,10 @@
"outputs": [
{
"components": [
- { "internalType": "string", "name": "field_0", "type": "string" },
- { "internalType": "bytes", "name": "field_1", "type": "bytes" }
+ { "internalType": "string", "name": "key", "type": "string" },
+ { "internalType": "bytes", "name": "value", "type": "bytes" }
],
- "internalType": "struct Tuple8[]",
+ "internalType": "struct Property[]",
"name": "",
"type": "tuple[]"
}
tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -290,7 +290,7 @@
bytes value;
}
-/// @dev the ERC-165 identifier for this interface is 0x29f4dcd9
+/// @dev the ERC-165 identifier for this interface is 0x5b7038cf
interface ERC20UniqueExtensions is Dummy, ERC165 {
/// @notice A description for the collection.
/// @dev EVM selector for this function is: 0x7284e416,
tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -45,7 +45,7 @@
/// @param properties settable properties
/// @dev EVM selector for this function is: 0x14ed3a6e,
/// or in textual repr: setProperties(uint256,(string,bytes)[])
- function setProperties(uint256 tokenId, Tuple21[] memory properties) external;
+ function setProperties(uint256 tokenId, Property[] memory properties) external;
// /// @notice Delete token property value.
// /// @dev Throws error if `msg.sender` has no permission to edit the property.
@@ -95,7 +95,7 @@
/// @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(Tuple21[] memory properties) external;
+ function setCollectionProperties(Property[] memory properties) external;
// /// Delete collection property.
// ///
@@ -127,7 +127,7 @@
/// @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 (Tuple21[] memory);
+ function collectionProperties(string[] memory keys) external view returns (Tuple25[] memory);
// /// Set the sponsor of the collection.
// ///
@@ -169,7 +169,7 @@
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
/// @dev EVM selector for this function is: 0x6ec0a9f1,
/// or in textual repr: collectionSponsor()
- function collectionSponsor() external view returns (Tuple24 memory);
+ function collectionSponsor() external view returns (Tuple28 memory);
/// Set limits for the collection.
/// @dev Throws error if limit not found.
@@ -346,13 +346,13 @@
}
/// @dev anonymous struct
-struct Tuple24 {
+struct Tuple28 {
address field_0;
uint256 field_1;
}
/// @dev anonymous struct
-struct Tuple21 {
+struct Tuple25 {
string field_0;
bytes field_1;
}
@@ -452,7 +452,7 @@
}
/// @title Unique extensions for ERC721.
-/// @dev the ERC-165 identifier for this interface is 0x244543ee
+/// @dev the ERC-165 identifier for this interface is 0xb8f094a0
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,
@@ -483,7 +483,7 @@
/// @return Vector of properties key/value pairs.
/// @dev EVM selector for this function is: 0xefc26c69,
/// or in textual repr: tokenProperties(uint256,string[])
- function tokenProperties(uint256 tokenId, string[] memory keys) external view returns (Tuple7[] memory);
+ function tokenProperties(uint256 tokenId, string[] memory keys) external view returns (Property[] memory);
/// @notice Set or reaffirm the approved address for an NFT
/// @dev The zero address indicates there is no approved address.
@@ -567,20 +567,14 @@
// /// @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, Tuple10[] memory tokens) external returns (bool);
+ // function mintBulkWithTokenURI(address to, Tuple13[] memory tokens) external returns (bool);
}
/// @dev anonymous struct
-struct Tuple10 {
+struct Tuple13 {
uint256 field_0;
string field_1;
-}
-
-/// @dev anonymous struct
-struct Tuple7 {
- string field_0;
- bytes field_1;
}
/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
tests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -127,7 +127,7 @@
/// @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 (Tuple22[] memory);
+ function collectionProperties(string[] memory keys) external view returns (Tuple24[] memory);
// /// Set the sponsor of the collection.
// ///
@@ -169,7 +169,7 @@
/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
/// @dev EVM selector for this function is: 0x6ec0a9f1,
/// or in textual repr: collectionSponsor()
- function collectionSponsor() external view returns (Tuple25 memory);
+ function collectionSponsor() external view returns (Tuple27 memory);
/// Set limits for the collection.
/// @dev Throws error if limit not found.
@@ -346,13 +346,13 @@
}
/// @dev anonymous struct
-struct Tuple25 {
+struct Tuple27 {
address field_0;
uint256 field_1;
}
/// @dev anonymous struct
-struct Tuple22 {
+struct Tuple24 {
string field_0;
bytes field_1;
}
@@ -450,7 +450,7 @@
}
/// @title Unique extensions for ERC721.
-/// @dev the ERC-165 identifier for this interface is 0xab243667
+/// @dev the ERC-165 identifier for this interface is 0x1d4b64d6
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,
@@ -481,7 +481,7 @@
/// @return Vector of properties key/value pairs.
/// @dev EVM selector for this function is: 0xefc26c69,
/// or in textual repr: tokenProperties(uint256,string[])
- function tokenProperties(uint256 tokenId, string[] memory keys) external view returns (Tuple7[] memory);
+ function tokenProperties(uint256 tokenId, string[] memory keys) external view returns (Property[] memory);
/// @notice Transfer ownership of an RFT
/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
@@ -560,7 +560,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, Tuple10[] memory tokens) external returns (bool);
+ // function mintBulkWithTokenURI(address to, Tuple12[] memory tokens) external returns (bool);
/// Returns EVM address for refungible token
///
@@ -571,15 +571,9 @@
}
/// @dev anonymous struct
-struct Tuple10 {
+struct Tuple12 {
uint256 field_0;
string field_1;
-}
-
-/// @dev anonymous struct
-struct Tuple7 {
- string field_0;
- bytes field_1;
}
/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
tests/src/eth/base.test.tsdiffbeforeafterboth--- a/tests/src/eth/base.test.ts
+++ b/tests/src/eth/base.test.ts
@@ -117,7 +117,7 @@
});
itEth('ERC721UniqueExtensions support', async ({helper}) => {
- await checkInterface(helper, '0x922a115f', true, true);
+ await checkInterface(helper, '0xb8f094a0', true, true);
});
itEth('ERC721Burnable - 0x42966c68 - support', async ({helper}) => {