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/// @dev inlined interface21contract ERC721TokenEvent {22 event TokenChanged(uint256 indexed tokenId);23}2425/// @title A contract that allows to set and delete token properties and change token property permissions.26/// @dev the ERC-165 identifier for this interface is 0xde0695c227contract TokenProperties is Dummy, ERC165, ERC721TokenEvent {28 // /// @notice Set permissions for token property.29 // /// @dev Throws error if `msg.sender` is not admin or owner of the collection.30 // /// @param key Property key.31 // /// @param isMutable Permission to mutate property.32 // /// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.33 // /// @param tokenOwner Permission to mutate property by token owner if property is mutable.34 // /// @dev EVM selector for this function is: 0x222d97fa,35 // /// or in textual repr: setTokenPropertyPermission(string,bool,bool,bool)36 // function setTokenPropertyPermission(string memory key, bool isMutable, bool collectionAdmin, bool tokenOwner) public {37 // require(false, stub_error);38 // key;39 // isMutable;40 // collectionAdmin;41 // tokenOwner;42 // dummy = 0;43 // }4445 /// @notice Set permissions for token property.46 /// @dev Throws error if `msg.sender` is not admin or owner of the collection.47 /// @param permissions Permissions for keys.48 /// @dev EVM selector for this function is: 0xbd92983a,49 /// or in textual repr: setTokenPropertyPermissions((string,(uint8,bool)[])[])50 function setTokenPropertyPermissions(TokenPropertyPermission[] memory permissions) public {51 require(false, stub_error);52 permissions;53 dummy = 0;54 }5556 /// @notice Get permissions for token properties.57 /// @dev EVM selector for this function is: 0xf23d7790,58 /// or in textual repr: tokenPropertyPermissions()59 function tokenPropertyPermissions() public view returns (TokenPropertyPermission[] memory) {60 require(false, stub_error);61 dummy;62 return new TokenPropertyPermission[](0);63 }6465 // /// @notice Set token property value.66 // /// @dev Throws error if `msg.sender` has no permission to edit the property.67 // /// @param tokenId ID of the token.68 // /// @param key Property key.69 // /// @param value Property value.70 // /// @dev EVM selector for this function is: 0x1752d67b,71 // /// or in textual repr: setProperty(uint256,string,bytes)72 // function setProperty(uint256 tokenId, string memory key, bytes memory value) public {73 // require(false, stub_error);74 // tokenId;75 // key;76 // value;77 // dummy = 0;78 // }7980 /// @notice Set token properties value.81 /// @dev Throws error if `msg.sender` has no permission to edit the property.82 /// @param tokenId ID of the token.83 /// @param properties settable properties84 /// @dev EVM selector for this function is: 0x14ed3a6e,85 /// or in textual repr: setProperties(uint256,(string,bytes)[])86 function setProperties(uint256 tokenId, Property[] memory properties) public {87 require(false, stub_error);88 tokenId;89 properties;90 dummy = 0;91 }9293 // /// @notice Delete token property value.94 // /// @dev Throws error if `msg.sender` has no permission to edit the property.95 // /// @param tokenId ID of the token.96 // /// @param key Property key.97 // /// @dev EVM selector for this function is: 0x066111d1,98 // /// or in textual repr: deleteProperty(uint256,string)99 // function deleteProperty(uint256 tokenId, string memory key) public {100 // require(false, stub_error);101 // tokenId;102 // key;103 // dummy = 0;104 // }105106 /// @notice Delete token properties value.107 /// @dev Throws error if `msg.sender` has no permission to edit the property.108 /// @param tokenId ID of the token.109 /// @param keys Properties key.110 /// @dev EVM selector for this function is: 0xc472d371,111 /// or in textual repr: deleteProperties(uint256,string[])112 function deleteProperties(uint256 tokenId, string[] memory keys) public {113 require(false, stub_error);114 tokenId;115 keys;116 dummy = 0;117 }118119 /// @notice Get token property value.120 /// @dev Throws error if key not found121 /// @param tokenId ID of the token.122 /// @param key Property key.123 /// @return Property value bytes124 /// @dev EVM selector for this function is: 0x7228c327,125 /// or in textual repr: property(uint256,string)126 function property(uint256 tokenId, string memory key) public view returns (bytes memory) {127 require(false, stub_error);128 tokenId;129 key;130 dummy;131 return hex"";132 }133}134135/// Ethereum representation of collection [`PropertyKey`](up_data_structs::PropertyKey) and [`PropertyValue`](up_data_structs::PropertyValue).136struct Property {137 string key;138 bytes value;139}140141/// Ethereum representation of Token Property Permissions.142struct TokenPropertyPermission {143 /// Token property key.144 string key;145 /// Token property permissions.146 PropertyPermission[] permissions;147}148149/// Ethereum representation of TokenPermissions (see [`up_data_structs::PropertyPermission`]) as an key and value.150struct PropertyPermission {151 /// TokenPermission field.152 TokenPermissionField code;153 /// TokenPermission value.154 bool value;155}156157/// Ethereum representation of TokenPermissions (see [`up_data_structs::PropertyPermission`]) fields as an enumeration.158enum TokenPermissionField {159 /// Permission to change the property and property permission. See [`up_data_structs::PropertyPermission::mutable`]160 Mutable,161 /// Change permission for the collection administrator. See [`up_data_structs::PropertyPermission::token_owner`]162 TokenOwner,163 /// Permission to change the property for the owner of the token. See [`up_data_structs::PropertyPermission::collection_admin`]164 CollectionAdmin165}166167/// @title A contract that allows you to work with collections.168/// @dev the ERC-165 identifier for this interface is 0xb34d97e9169contract Collection is Dummy, ERC165 {170 // /// Set collection property.171 // ///172 // /// @param key Property key.173 // /// @param value Propery value.174 // /// @dev EVM selector for this function is: 0x2f073f66,175 // /// or in textual repr: setCollectionProperty(string,bytes)176 // function setCollectionProperty(string memory key, bytes memory value) public {177 // require(false, stub_error);178 // key;179 // value;180 // dummy = 0;181 // }182183 /// Set collection properties.184 ///185 /// @param properties Vector of properties key/value pair.186 /// @dev EVM selector for this function is: 0x50b26b2a,187 /// or in textual repr: setCollectionProperties((string,bytes)[])188 function setCollectionProperties(Property[] memory properties) public {189 require(false, stub_error);190 properties;191 dummy = 0;192 }193194 // /// Delete collection property.195 // ///196 // /// @param key Property key.197 // /// @dev EVM selector for this function is: 0x7b7debce,198 // /// or in textual repr: deleteCollectionProperty(string)199 // function deleteCollectionProperty(string memory key) public {200 // require(false, stub_error);201 // key;202 // dummy = 0;203 // }204205 /// Delete collection properties.206 ///207 /// @param keys Properties keys.208 /// @dev EVM selector for this function is: 0xee206ee3,209 /// or in textual repr: deleteCollectionProperties(string[])210 function deleteCollectionProperties(string[] memory keys) public {211 require(false, stub_error);212 keys;213 dummy = 0;214 }215216 /// Get collection property.217 ///218 /// @dev Throws error if key not found.219 ///220 /// @param key Property key.221 /// @return bytes The property corresponding to the key.222 /// @dev EVM selector for this function is: 0xcf24fd6d,223 /// or in textual repr: collectionProperty(string)224 function collectionProperty(string memory key) public view returns (bytes memory) {225 require(false, stub_error);226 key;227 dummy;228 return hex"";229 }230231 /// Get collection properties.232 ///233 /// @param keys Properties keys. Empty keys for all propertyes.234 /// @return Vector of properties key/value pairs.235 /// @dev EVM selector for this function is: 0x285fb8e6,236 /// or in textual repr: collectionProperties(string[])237 function collectionProperties(string[] memory keys) public view returns (Property[] memory) {238 require(false, stub_error);239 keys;240 dummy;241 return new Property[](0);242 }243244 // /// Set the sponsor of the collection.245 // ///246 // /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.247 // ///248 // /// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.249 // /// @dev EVM selector for this function is: 0x7623402e,250 // /// or in textual repr: setCollectionSponsor(address)251 // function setCollectionSponsor(address sponsor) public {252 // require(false, stub_error);253 // sponsor;254 // dummy = 0;255 // }256257 /// Set the sponsor of the collection.258 ///259 /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.260 ///261 /// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.262 /// @dev EVM selector for this function is: 0x84a1d5a8,263 /// or in textual repr: setCollectionSponsorCross((address,uint256))264 function setCollectionSponsorCross(CrossAddress memory sponsor) public {265 require(false, stub_error);266 sponsor;267 dummy = 0;268 }269270 /// Whether there is a pending sponsor.271 /// @dev EVM selector for this function is: 0x058ac185,272 /// or in textual repr: hasCollectionPendingSponsor()273 function hasCollectionPendingSponsor() public view returns (bool) {274 require(false, stub_error);275 dummy;276 return false;277 }278279 /// Collection sponsorship confirmation.280 ///281 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.282 /// @dev EVM selector for this function is: 0x3c50e97a,283 /// or in textual repr: confirmCollectionSponsorship()284 function confirmCollectionSponsorship() public {285 require(false, stub_error);286 dummy = 0;287 }288289 /// Remove collection sponsor.290 /// @dev EVM selector for this function is: 0x6e0326a3,291 /// or in textual repr: removeCollectionSponsor()292 function removeCollectionSponsor() public {293 require(false, stub_error);294 dummy = 0;295 }296297 /// Get current sponsor.298 ///299 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.300 /// @dev EVM selector for this function is: 0x6ec0a9f1,301 /// or in textual repr: collectionSponsor()302 function collectionSponsor() public view returns (CrossAddress memory) {303 require(false, stub_error);304 dummy;305 return CrossAddress(0x0000000000000000000000000000000000000000, 0);306 }307308 /// Get current collection limits.309 ///310 /// @return Array of collection limits311 /// @dev EVM selector for this function is: 0xf63bc572,312 /// or in textual repr: collectionLimits()313 function collectionLimits() public view returns (CollectionLimit[] memory) {314 require(false, stub_error);315 dummy;316 return new CollectionLimit[](0);317 }318319 /// Set limits for the collection.320 /// @dev Throws error if limit not found.321 /// @param limit Some limit.322 /// @dev EVM selector for this function is: 0x2316ee74,323 /// or in textual repr: setCollectionLimit((uint8,(bool,uint256)))324 function setCollectionLimit(CollectionLimit memory limit) public {325 require(false, stub_error);326 limit;327 dummy = 0;328 }329330 /// Get contract address.331 /// @dev EVM selector for this function is: 0xf6b4dfb4,332 /// or in textual repr: contractAddress()333 function contractAddress() public view returns (address) {334 require(false, stub_error);335 dummy;336 return 0x0000000000000000000000000000000000000000;337 }338339 /// Add collection admin.340 /// @param newAdmin Cross account administrator address.341 /// @dev EVM selector for this function is: 0x859aa7d6,342 /// or in textual repr: addCollectionAdminCross((address,uint256))343 function addCollectionAdminCross(CrossAddress memory newAdmin) public {344 require(false, stub_error);345 newAdmin;346 dummy = 0;347 }348349 /// Remove collection admin.350 /// @param admin Cross account administrator address.351 /// @dev EVM selector for this function is: 0x6c0cd173,352 /// or in textual repr: removeCollectionAdminCross((address,uint256))353 function removeCollectionAdminCross(CrossAddress memory admin) public {354 require(false, stub_error);355 admin;356 dummy = 0;357 }358359 // /// Add collection admin.360 // /// @param newAdmin Address of the added administrator.361 // /// @dev EVM selector for this function is: 0x92e462c7,362 // /// or in textual repr: addCollectionAdmin(address)363 // function addCollectionAdmin(address newAdmin) public {364 // require(false, stub_error);365 // newAdmin;366 // dummy = 0;367 // }368369 // /// Remove collection admin.370 // ///371 // /// @param admin Address of the removed administrator.372 // /// @dev EVM selector for this function is: 0xfafd7b42,373 // /// or in textual repr: removeCollectionAdmin(address)374 // function removeCollectionAdmin(address admin) public {375 // require(false, stub_error);376 // admin;377 // dummy = 0;378 // }379380 /// @dev EVM selector for this function is: 0x0b9f3890,381 /// or in textual repr: setCollectionNesting((bool,bool,address[]))382 function setCollectionNesting(CollectionNestingAndPermission memory collectionNestingAndPermissions) public {383 require(false, stub_error);384 collectionNestingAndPermissions;385 dummy = 0;386 }387388 // /// Toggle accessibility of collection nesting.389 // ///390 // /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'391 // /// @dev EVM selector for this function is: 0x112d4586,392 // /// or in textual repr: setCollectionNesting(bool)393 // function setCollectionNesting(bool enable) public {394 // require(false, stub_error);395 // enable;396 // dummy = 0;397 // }398399 // /// Toggle accessibility of collection nesting.400 // ///401 // /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'402 // /// @param collections Addresses of collections that will be available for nesting.403 // /// @dev EVM selector for this function is: 0x64872396,404 // /// or in textual repr: setCollectionNesting(bool,address[])405 // function setCollectionNesting(bool enable, address[] memory collections) public {406 // require(false, stub_error);407 // enable;408 // collections;409 // dummy = 0;410 // }411412 /// @dev EVM selector for this function is: 0x92c660a8,413 /// or in textual repr: collectionNesting()414 function collectionNesting() public view returns (CollectionNestingAndPermission memory) {415 require(false, stub_error);416 dummy;417 return CollectionNestingAndPermission(false, false, new address[](0));418 }419420 // /// Returns nesting for a collection421 // /// @dev EVM selector for this function is: 0x22d25bfe,422 // /// or in textual repr: collectionNestingRestrictedCollectionIds()423 // function collectionNestingRestrictedCollectionIds() public view returns (CollectionNesting memory) {424 // require(false, stub_error);425 // dummy;426 // return CollectionNesting(false,new uint256[](0));427 // }428429 // /// Returns permissions for a collection430 // /// @dev EVM selector for this function is: 0x5b2eaf4b,431 // /// or in textual repr: collectionNestingPermissions()432 // function collectionNestingPermissions() public view returns (CollectionNestingPermission[] memory) {433 // require(false, stub_error);434 // dummy;435 // return new CollectionNestingPermission[](0);436 // }437438 /// Set the collection access method.439 /// @param mode Access mode440 /// @dev EVM selector for this function is: 0x41835d4c,441 /// or in textual repr: setCollectionAccess(uint8)442 function setCollectionAccess(AccessMode mode) public {443 require(false, stub_error);444 mode;445 dummy = 0;446 }447448 /// Checks that user allowed to operate with collection.449 ///450 /// @param user User address to check.451 /// @dev EVM selector for this function is: 0x91b6df49,452 /// or in textual repr: allowlistedCross((address,uint256))453 function allowlistedCross(CrossAddress memory user) public view returns (bool) {454 require(false, stub_error);455 user;456 dummy;457 return false;458 }459460 // /// Add the user to the allowed list.461 // ///462 // /// @param user Address of a trusted user.463 // /// @dev EVM selector for this function is: 0x67844fe6,464 // /// or in textual repr: addToCollectionAllowList(address)465 // function addToCollectionAllowList(address user) public {466 // require(false, stub_error);467 // user;468 // dummy = 0;469 // }470471 /// Add user to allowed list.472 ///473 /// @param user User cross account address.474 /// @dev EVM selector for this function is: 0xa0184a3a,475 /// or in textual repr: addToCollectionAllowListCross((address,uint256))476 function addToCollectionAllowListCross(CrossAddress memory user) public {477 require(false, stub_error);478 user;479 dummy = 0;480 }481482 // /// Remove the user from the allowed list.483 // ///484 // /// @param user Address of a removed user.485 // /// @dev EVM selector for this function is: 0x85c51acb,486 // /// or in textual repr: removeFromCollectionAllowList(address)487 // function removeFromCollectionAllowList(address user) public {488 // require(false, stub_error);489 // user;490 // dummy = 0;491 // }492493 /// Remove user from allowed list.494 ///495 /// @param user User cross account address.496 /// @dev EVM selector for this function is: 0x09ba452a,497 /// or in textual repr: removeFromCollectionAllowListCross((address,uint256))498 function removeFromCollectionAllowListCross(CrossAddress memory user) public {499 require(false, stub_error);500 user;501 dummy = 0;502 }503504 /// Switch permission for minting.505 ///506 /// @param mode Enable if "true".507 /// @dev EVM selector for this function is: 0x00018e84,508 /// or in textual repr: setCollectionMintMode(bool)509 function setCollectionMintMode(bool mode) public {510 require(false, stub_error);511 mode;512 dummy = 0;513 }514515 // /// Check that account is the owner or admin of the collection516 // ///517 // /// @param user account to verify518 // /// @return "true" if account is the owner or admin519 // /// @dev EVM selector for this function is: 0x9811b0c7,520 // /// or in textual repr: isOwnerOrAdmin(address)521 // function isOwnerOrAdmin(address user) public view returns (bool) {522 // require(false, stub_error);523 // user;524 // dummy;525 // return false;526 // }527528 /// Check that account is the owner or admin of the collection529 ///530 /// @param user User cross account to verify531 /// @return "true" if account is the owner or admin532 /// @dev EVM selector for this function is: 0x3e75a905,533 /// or in textual repr: isOwnerOrAdminCross((address,uint256))534 function isOwnerOrAdminCross(CrossAddress memory user) public view returns (bool) {535 require(false, stub_error);536 user;537 dummy;538 return false;539 }540541 /// Returns collection type542 ///543 /// @return `Fungible` or `NFT` or `ReFungible`544 /// @dev EVM selector for this function is: 0xd34b55b8,545 /// or in textual repr: uniqueCollectionType()546 function uniqueCollectionType() public view returns (string memory) {547 require(false, stub_error);548 dummy;549 return "";550 }551552 /// Get collection owner.553 ///554 /// @return Tuble with sponsor address and his substrate mirror.555 /// If address is canonical then substrate mirror is zero and vice versa.556 /// @dev EVM selector for this function is: 0xdf727d3b,557 /// or in textual repr: collectionOwner()558 function collectionOwner() public view returns (CrossAddress memory) {559 require(false, stub_error);560 dummy;561 return CrossAddress(0x0000000000000000000000000000000000000000, 0);562 }563564 // /// Changes collection owner to another account565 // ///566 // /// @dev Owner can be changed only by current owner567 // /// @param newOwner new owner account568 // /// @dev EVM selector for this function is: 0x4f53e226,569 // /// or in textual repr: changeCollectionOwner(address)570 // function changeCollectionOwner(address newOwner) public {571 // require(false, stub_error);572 // newOwner;573 // dummy = 0;574 // }575576 /// Get collection administrators577 ///578 /// @return Vector of tuples with admins address and his substrate mirror.579 /// If address is canonical then substrate mirror is zero and vice versa.580 /// @dev EVM selector for this function is: 0x5813216b,581 /// or in textual repr: collectionAdmins()582 function collectionAdmins() public view returns (CrossAddress[] memory) {583 require(false, stub_error);584 dummy;585 return new CrossAddress[](0);586 }587588 /// Changes collection owner to another account589 ///590 /// @dev Owner can be changed only by current owner591 /// @param newOwner new owner cross account592 /// @dev EVM selector for this function is: 0x6496c497,593 /// or in textual repr: changeCollectionOwnerCross((address,uint256))594 function changeCollectionOwnerCross(CrossAddress memory newOwner) public {595 require(false, stub_error);596 newOwner;597 dummy = 0;598 }599}600601/// Cross account struct602struct CrossAddress {603 address eth;604 uint256 sub;605}606607/// Ethereum representation of `AccessMode` (see [`up_data_structs::AccessMode`]).608enum AccessMode {609 /// Access grant for owner and admins. Used as default.610 Normal,611 /// Like a [`Normal`](AccessMode::Normal) but also users in allow list.612 AllowList613}614615/// Ethereum representation of `NestingPermissions` (see [`up_data_structs::NestingPermissions`]) field.616struct CollectionNestingPermission {617 CollectionPermissionField field;618 bool value;619}620621/// Ethereum representation of `NestingPermissions` (see [`up_data_structs::NestingPermissions`]) fields as an enumeration.622enum CollectionPermissionField {623 /// Owner of token can nest tokens under it.624 TokenOwner,625 /// Admin of token collection can nest tokens under token.626 CollectionAdmin627}628629/// Nested collections.630struct CollectionNesting {631 bool token_owner;632 uint256[] ids;633}634635/// Nested collections and permissions636struct CollectionNestingAndPermission {637 /// Owner of token can nest tokens under it.638 bool token_owner;639 /// Admin of token collection can nest tokens under token.640 bool collection_admin;641 /// If set - only tokens from specified collections can be nested.642 address[] restricted;643}644645/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.646struct CollectionLimit {647 CollectionLimitField field;648 OptionUint256 value;649}650651/// Optional value652struct OptionUint256 {653 /// Shows the status of accessibility of value654 bool status;655 /// Actual value if `status` is true656 uint256 value;657}658659/// [`CollectionLimits`](up_data_structs::CollectionLimits) fields representation for EVM.660enum CollectionLimitField {661 /// How many tokens can a user have on one account.662 AccountTokenOwnership,663 /// How many bytes of data are available for sponsorship.664 SponsoredDataSize,665 /// In any case, chain default: [`SponsoringRateLimit::SponsoringDisabled`]666 SponsoredDataRateLimit,667 /// How many tokens can be mined into this collection.668 TokenLimit,669 /// Timeouts for transfer sponsoring.670 SponsorTransferTimeout,671 /// Timeout for sponsoring an approval in passed blocks.672 SponsorApproveTimeout,673 /// Whether the collection owner of the collection can send tokens (which belong to other users).674 OwnerCanTransfer,675 /// Can the collection owner burn other people's tokens.676 OwnerCanDestroy,677 /// Is it possible to send tokens from this collection between users.678 TransferEnabled679}680681/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension682/// @dev See https://eips.ethereum.org/EIPS/eip-721683/// @dev the ERC-165 identifier for this interface is 0x5b5e139f684contract ERC721Metadata is Dummy, ERC165 {685 // /// @notice A descriptive name for a collection of NFTs in this contract686 // /// @dev real implementation of this function lies in `ERC721UniqueExtensions`687 // /// @dev EVM selector for this function is: 0x06fdde03,688 // /// or in textual repr: name()689 // function name() public view returns (string memory) {690 // require(false, stub_error);691 // dummy;692 // return "";693 // }694695 // /// @notice An abbreviated name for NFTs in this contract696 // /// @dev real implementation of this function lies in `ERC721UniqueExtensions`697 // /// @dev EVM selector for this function is: 0x95d89b41,698 // /// or in textual repr: symbol()699 // function symbol() public view returns (string memory) {700 // require(false, stub_error);701 // dummy;702 // return "";703 // }704705 /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.706 ///707 /// @dev If the token has a `url` property and it is not empty, it is returned.708 /// 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`.709 /// If the collection property `baseURI` is empty or absent, return "" (empty string)710 /// otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix711 /// otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).712 ///713 /// @return token's const_metadata714 /// @dev EVM selector for this function is: 0xc87b56dd,715 /// or in textual repr: tokenURI(uint256)716 function tokenURI(uint256 tokenId) public view returns (string memory) {717 require(false, stub_error);718 tokenId;719 dummy;720 return "";721 }722}723724/// @title ERC721 Token that can be irreversibly burned (destroyed).725/// @dev the ERC-165 identifier for this interface is 0x42966c68726contract ERC721Burnable is Dummy, ERC165 {727 /// @notice Burns a specific ERC721 token.728 /// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized729 /// operator of the current owner.730 /// @param tokenId The NFT to approve731 /// @dev EVM selector for this function is: 0x42966c68,732 /// or in textual repr: burn(uint256)733 function burn(uint256 tokenId) public {734 require(false, stub_error);735 tokenId;736 dummy = 0;737 }738}739740/// @title ERC721 minting logic.741/// @dev the ERC-165 identifier for this interface is 0x3fd94ea6742contract ERC721UniqueMintable is Dummy, ERC165 {743 /// @notice Function to mint a token.744 /// @param to The new owner745 /// @return uint256 The id of the newly minted token746 /// @dev EVM selector for this function is: 0x6a627842,747 /// or in textual repr: mint(address)748 function mint(address to) public returns (uint256) {749 require(false, stub_error);750 to;751 dummy = 0;752 return 0;753 }754755 // /// @notice Function to mint a token.756 // /// @dev `tokenId` should be obtained with `nextTokenId` method,757 // /// unlike standard, you can't specify it manually758 // /// @param to The new owner759 // /// @param tokenId ID of the minted NFT760 // /// @dev EVM selector for this function is: 0x40c10f19,761 // /// or in textual repr: mint(address,uint256)762 // function mint(address to, uint256 tokenId) public returns (bool) {763 // require(false, stub_error);764 // to;765 // tokenId;766 // dummy = 0;767 // return false;768 // }769770 /// @notice Function to mint token with the given tokenUri.771 /// @param to The new owner772 /// @param tokenUri Token URI that would be stored in the NFT properties773 /// @return uint256 The id of the newly minted token774 /// @dev EVM selector for this function is: 0x45c17782,775 /// or in textual repr: mintWithTokenURI(address,string)776 function mintWithTokenURI(address to, string memory tokenUri) public returns (uint256) {777 require(false, stub_error);778 to;779 tokenUri;780 dummy = 0;781 return 0;782 }783 // /// @notice Function to mint token with the given tokenUri.784 // /// @dev `tokenId` should be obtained with `nextTokenId` method,785 // /// unlike standard, you can't specify it manually786 // /// @param to The new owner787 // /// @param tokenId ID of the minted NFT788 // /// @param tokenUri Token URI that would be stored in the NFT properties789 // /// @dev EVM selector for this function is: 0x50bb4e7f,790 // /// or in textual repr: mintWithTokenURI(address,uint256,string)791 // function mintWithTokenURI(address to, uint256 tokenId, string memory tokenUri) public returns (bool) {792 // require(false, stub_error);793 // to;794 // tokenId;795 // tokenUri;796 // dummy = 0;797 // return false;798 // }799800}801802/// @title Unique extensions for ERC721.803/// @dev the ERC-165 identifier for this interface is 0x9b397d16804contract ERC721UniqueExtensions is Dummy, ERC165 {805 /// @notice A descriptive name for a collection of NFTs in this contract806 /// @dev EVM selector for this function is: 0x06fdde03,807 /// or in textual repr: name()808 function name() public view returns (string memory) {809 require(false, stub_error);810 dummy;811 return "";812 }813814 /// @notice An abbreviated name for NFTs in this contract815 /// @dev EVM selector for this function is: 0x95d89b41,816 /// or in textual repr: symbol()817 function symbol() public view returns (string memory) {818 require(false, stub_error);819 dummy;820 return "";821 }822823 /// @notice A description for the collection.824 /// @dev EVM selector for this function is: 0x7284e416,825 /// or in textual repr: description()826 function description() public view returns (string memory) {827 require(false, stub_error);828 dummy;829 return "";830 }831832 // /// Returns the owner (in cross format) of the token.833 // ///834 // /// @param tokenId Id for the token.835 // /// @dev EVM selector for this function is: 0x2b29dace,836 // /// or in textual repr: crossOwnerOf(uint256)837 // function crossOwnerOf(uint256 tokenId) public view returns (CrossAddress memory) {838 // require(false, stub_error);839 // tokenId;840 // dummy;841 // return CrossAddress(0x0000000000000000000000000000000000000000,0);842 // }843844 /// Returns the owner (in cross format) of the token.845 ///846 /// @param tokenId Id for the token.847 /// @dev EVM selector for this function is: 0xcaa3a4d0,848 /// or in textual repr: ownerOfCross(uint256)849 function ownerOfCross(uint256 tokenId) public view returns (CrossAddress memory) {850 require(false, stub_error);851 tokenId;852 dummy;853 return CrossAddress(0x0000000000000000000000000000000000000000, 0);854 }855856 /// @notice Count all NFTs assigned to an owner857 /// @param owner An cross address for whom to query the balance858 /// @return The number of NFTs owned by `owner`, possibly zero859 /// @dev EVM selector for this function is: 0xec069398,860 /// or in textual repr: balanceOfCross((address,uint256))861 function balanceOfCross(CrossAddress memory owner) public view returns (uint256) {862 require(false, stub_error);863 owner;864 dummy;865 return 0;866 }867868 /// Returns the token properties.869 ///870 /// @param tokenId Id for the token.871 /// @param keys Properties keys. Empty keys for all propertyes.872 /// @return Vector of properties key/value pairs.873 /// @dev EVM selector for this function is: 0xe07ede7e,874 /// or in textual repr: properties(uint256,string[])875 function properties(uint256 tokenId, string[] memory keys) public view returns (Property[] memory) {876 require(false, stub_error);877 tokenId;878 keys;879 dummy;880 return new Property[](0);881 }882883 /// @notice Set or reaffirm the approved address for an NFT884 /// @dev The zero address indicates there is no approved address.885 /// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized886 /// operator of the current owner.887 /// @param approved The new substrate address approved NFT controller888 /// @param tokenId The NFT to approve889 /// @dev EVM selector for this function is: 0x0ecd0ab0,890 /// or in textual repr: approveCross((address,uint256),uint256)891 function approveCross(CrossAddress memory approved, uint256 tokenId) public {892 require(false, stub_error);893 approved;894 tokenId;895 dummy = 0;896 }897898 /// @notice Transfer ownership of an NFT899 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`900 /// is the zero address. Throws if `tokenId` is not a valid NFT.901 /// @param to The new owner902 /// @param tokenId The NFT to transfer903 /// @dev EVM selector for this function is: 0xa9059cbb,904 /// or in textual repr: transfer(address,uint256)905 function transfer(address to, uint256 tokenId) public {906 require(false, stub_error);907 to;908 tokenId;909 dummy = 0;910 }911912 /// @notice Transfer ownership of an NFT913 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`914 /// is the zero address. Throws if `tokenId` is not a valid NFT.915 /// @param to The new owner916 /// @param tokenId The NFT to transfer917 /// @dev EVM selector for this function is: 0x2ada85ff,918 /// or in textual repr: transferCross((address,uint256),uint256)919 function transferCross(CrossAddress memory to, uint256 tokenId) public {920 require(false, stub_error);921 to;922 tokenId;923 dummy = 0;924 }925926 /// @notice Transfer ownership of an NFT from cross account address to cross account address927 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`928 /// is the zero address. Throws if `tokenId` is not a valid NFT.929 /// @param from Cross acccount address of current owner930 /// @param to Cross acccount address of new owner931 /// @param tokenId The NFT to transfer932 /// @dev EVM selector for this function is: 0xd5cf430b,933 /// or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)934 function transferFromCross(935 CrossAddress memory from,936 CrossAddress memory to,937 uint256 tokenId938 ) public {939 require(false, stub_error);940 from;941 to;942 tokenId;943 dummy = 0;944 }945946 // /// @notice Burns a specific ERC721 token.947 // /// @dev Throws unless `msg.sender` is the current owner or an authorized948 // /// operator for this NFT. Throws if `from` is not the current owner. Throws949 // /// if `to` is the zero address. Throws if `tokenId` is not a valid NFT.950 // /// @param from The current owner of the NFT951 // /// @param tokenId The NFT to transfer952 // /// @dev EVM selector for this function is: 0x79cc6790,953 // /// or in textual repr: burnFrom(address,uint256)954 // function burnFrom(address from, uint256 tokenId) public {955 // require(false, stub_error);956 // from;957 // tokenId;958 // dummy = 0;959 // }960961 /// @notice Burns a specific ERC721 token.962 /// @dev Throws unless `msg.sender` is the current owner or an authorized963 /// operator for this NFT. Throws if `from` is not the current owner. Throws964 /// if `to` is the zero address. Throws if `tokenId` is not a valid NFT.965 /// @param from The current owner of the NFT966 /// @param tokenId The NFT to transfer967 /// @dev EVM selector for this function is: 0xbb2f5a58,968 /// or in textual repr: burnFromCross((address,uint256),uint256)969 function burnFromCross(CrossAddress memory from, uint256 tokenId) public {970 require(false, stub_error);971 from;972 tokenId;973 dummy = 0;974 }975976 /// @notice Returns next free NFT ID.977 /// @dev EVM selector for this function is: 0x75794a3c,978 /// or in textual repr: nextTokenId()979 function nextTokenId() public view returns (uint256) {980 require(false, stub_error);981 dummy;982 return 0;983 }984985 // /// @notice Function to mint multiple tokens.986 // /// @dev `tokenIds` should be an array of consecutive numbers and first number987 // /// should be obtained with `nextTokenId` method988 // /// @param to The new owner989 // /// @param tokenIds IDs of the minted NFTs990 // /// @dev EVM selector for this function is: 0x44a9945e,991 // /// or in textual repr: mintBulk(address,uint256[])992 // function mintBulk(address to, uint256[] memory tokenIds) public returns (bool) {993 // require(false, stub_error);994 // to;995 // tokenIds;996 // dummy = 0;997 // return false;998 // }9991000 /// @notice Function to mint a token.1001 /// @param data Array of pairs of token owner and token's properties for minted token1002 /// @dev EVM selector for this function is: 0xab427b0c,1003 /// or in textual repr: mintBulkCross(((address,uint256),(string,bytes)[])[])1004 function mintBulkCross(MintTokenData[] memory data) public returns (bool) {1005 require(false, stub_error);1006 data;1007 dummy = 0;1008 return false;1009 }10101011 // /// @notice Function to mint multiple tokens with the given tokenUris.1012 // /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive1013 // /// numbers and first number should be obtained with `nextTokenId` method1014 // /// @param to The new owner1015 // /// @param tokens array of pairs of token ID and token URI for minted tokens1016 // /// @dev EVM selector for this function is: 0x36543006,1017 // /// or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])1018 // function mintBulkWithTokenURI(address to, TokenUri[] memory tokens) public returns (bool) {1019 // require(false, stub_error);1020 // to;1021 // tokens;1022 // dummy = 0;1023 // return false;1024 // }10251026 /// @notice Function to mint a token.1027 /// @param to The new owner crossAccountId1028 /// @param properties Properties of minted token1029 /// @return uint256 The id of the newly minted token1030 /// @dev EVM selector for this function is: 0xb904db03,1031 /// or in textual repr: mintCross((address,uint256),(string,bytes)[])1032 function mintCross(CrossAddress memory to, Property[] memory properties) public returns (uint256) {1033 require(false, stub_error);1034 to;1035 properties;1036 dummy = 0;1037 return 0;1038 }10391040 /// @notice Returns collection helper contract address1041 /// @dev EVM selector for this function is: 0x1896cce6,1042 /// or in textual repr: collectionHelperAddress()1043 function collectionHelperAddress() public view returns (address) {1044 require(false, stub_error);1045 dummy;1046 return 0x0000000000000000000000000000000000000000;1047 }1048}10491050/// Data for creation token with uri.1051struct TokenUri {1052 /// Id of new token.1053 uint256 id;1054 /// Uri of new token.1055 string uri;1056}10571058/// Token minting parameters1059struct MintTokenData {1060 /// Minted token owner1061 CrossAddress owner;1062 /// Minted token properties1063 Property[] properties;1064}10651066/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension1067/// @dev See https://eips.ethereum.org/EIPS/eip-7211068/// @dev the ERC-165 identifier for this interface is 0x780e9d631069contract ERC721Enumerable is Dummy, ERC165 {1070 /// @notice Enumerate valid NFTs1071 /// @param index A counter less than `totalSupply()`1072 /// @return The token identifier for the `index`th NFT,1073 /// (sort order not specified)1074 /// @dev EVM selector for this function is: 0x4f6ccce7,1075 /// or in textual repr: tokenByIndex(uint256)1076 function tokenByIndex(uint256 index) public view returns (uint256) {1077 require(false, stub_error);1078 index;1079 dummy;1080 return 0;1081 }10821083 /// @dev Not implemented1084 /// @dev EVM selector for this function is: 0x2f745c59,1085 /// or in textual repr: tokenOfOwnerByIndex(address,uint256)1086 function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {1087 require(false, stub_error);1088 owner;1089 index;1090 dummy;1091 return 0;1092 }10931094 /// @notice Count NFTs tracked by this contract1095 /// @return A count of valid NFTs tracked by this contract, where each one of1096 /// them has an assigned and queryable owner not equal to the zero address1097 /// @dev EVM selector for this function is: 0x18160ddd,1098 /// or in textual repr: totalSupply()1099 function totalSupply() public view returns (uint256) {1100 require(false, stub_error);1101 dummy;1102 return 0;1103 }1104}11051106/// @dev inlined interface1107contract ERC721Events {1108 event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);1109 event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);1110 event ApprovalForAll(address indexed owner, address indexed operator, bool approved);1111}11121113/// @title ERC-721 Non-Fungible Token Standard1114/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md1115/// @dev the ERC-165 identifier for this interface is 0x80ac58cd1116contract ERC721 is Dummy, ERC165, ERC721Events {1117 /// @notice Count all NFTs assigned to an owner1118 /// @dev NFTs assigned to the zero address are considered invalid, and this1119 /// function throws for queries about the zero address.1120 /// @param owner An address for whom to query the balance1121 /// @return The number of NFTs owned by `owner`, possibly zero1122 /// @dev EVM selector for this function is: 0x70a08231,1123 /// or in textual repr: balanceOf(address)1124 function balanceOf(address owner) public view returns (uint256) {1125 require(false, stub_error);1126 owner;1127 dummy;1128 return 0;1129 }11301131 /// @notice Find the owner of an NFT1132 /// @dev NFTs assigned to zero address are considered invalid, and queries1133 /// about them do throw.1134 /// @param tokenId The identifier for an NFT1135 /// @return The address of the owner of the NFT1136 /// @dev EVM selector for this function is: 0x6352211e,1137 /// or in textual repr: ownerOf(uint256)1138 function ownerOf(uint256 tokenId) public view returns (address) {1139 require(false, stub_error);1140 tokenId;1141 dummy;1142 return 0x0000000000000000000000000000000000000000;1143 }11441145 /// @dev Not implemented1146 /// @dev EVM selector for this function is: 0xb88d4fde,1147 /// or in textual repr: safeTransferFrom(address,address,uint256,bytes)1148 function safeTransferFrom(1149 address from,1150 address to,1151 uint256 tokenId,1152 bytes memory data1153 ) public {1154 require(false, stub_error);1155 from;1156 to;1157 tokenId;1158 data;1159 dummy = 0;1160 }11611162 /// @dev Not implemented1163 /// @dev EVM selector for this function is: 0x42842e0e,1164 /// or in textual repr: safeTransferFrom(address,address,uint256)1165 function safeTransferFrom(1166 address from,1167 address to,1168 uint256 tokenId1169 ) public {1170 require(false, stub_error);1171 from;1172 to;1173 tokenId;1174 dummy = 0;1175 }11761177 /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE1178 /// TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE1179 /// THEY MAY BE PERMANENTLY LOST1180 /// @dev Throws unless `msg.sender` is the current owner or an authorized1181 /// operator for this NFT. Throws if `from` is not the current owner. Throws1182 /// if `to` is the zero address. Throws if `tokenId` is not a valid NFT.1183 /// @param from The current owner of the NFT1184 /// @param to The new owner1185 /// @param tokenId The NFT to transfer1186 /// @dev EVM selector for this function is: 0x23b872dd,1187 /// or in textual repr: transferFrom(address,address,uint256)1188 function transferFrom(1189 address from,1190 address to,1191 uint256 tokenId1192 ) public {1193 require(false, stub_error);1194 from;1195 to;1196 tokenId;1197 dummy = 0;1198 }11991200 /// @notice Set or reaffirm the approved address for an NFT1201 /// @dev The zero address indicates there is no approved address.1202 /// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized1203 /// operator of the current owner.1204 /// @param approved The new approved NFT controller1205 /// @param tokenId The NFT to approve1206 /// @dev EVM selector for this function is: 0x095ea7b3,1207 /// or in textual repr: approve(address,uint256)1208 function approve(address approved, uint256 tokenId) public {1209 require(false, stub_error);1210 approved;1211 tokenId;1212 dummy = 0;1213 }12141215 /// @notice Sets or unsets the approval of a given operator.1216 /// The `operator` is allowed to transfer all tokens of the `caller` on their behalf.1217 /// @param operator Operator1218 /// @param approved Should operator status be granted or revoked?1219 /// @dev EVM selector for this function is: 0xa22cb465,1220 /// or in textual repr: setApprovalForAll(address,bool)1221 function setApprovalForAll(address operator, bool approved) public {1222 require(false, stub_error);1223 operator;1224 approved;1225 dummy = 0;1226 }12271228 /// @notice Get the approved address for a single NFT1229 /// @dev Throws if `tokenId` is not a valid NFT1230 /// @param tokenId The NFT to find the approved address for1231 /// @return The approved address for this NFT, or the zero address if there is none1232 /// @dev EVM selector for this function is: 0x081812fc,1233 /// or in textual repr: getApproved(uint256)1234 function getApproved(uint256 tokenId) public view returns (address) {1235 require(false, stub_error);1236 tokenId;1237 dummy;1238 return 0x0000000000000000000000000000000000000000;1239 }12401241 /// @notice Tells whether the given `owner` approves the `operator`.1242 /// @dev EVM selector for this function is: 0xe985e9c5,1243 /// or in textual repr: isApprovedForAll(address,address)1244 function isApprovedForAll(address owner, address operator) public view returns (bool) {1245 require(false, stub_error);1246 owner;1247 operator;1248 dummy;1249 return false;1250 }1251}12521253contract UniqueNFT is1254 Dummy,1255 ERC165,1256 ERC721,1257 ERC721Enumerable,1258 ERC721UniqueExtensions,1259 ERC721UniqueMintable,1260 ERC721Burnable,1261 ERC721Metadata,1262 Collection,1263 TokenProperties1264{}