difftreelog
chore regenerate stubs
in: master
8 files changed
pallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterbothbinary blob — no preview
pallets/nonfungible/src/stubs/UniqueNFT.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 ERC-721 Non-Fungible Token Standard, optional metadata extension21/// @dev See https://eips.ethereum.org/EIPS/eip-72122/// @dev the ERC-165 identifier for this interface is 0x5b5e139f23contract ERC721Metadata is Dummy, ERC165 {24 // /// @notice A descriptive name for a collection of NFTs in this contract25 // /// @dev real implementation of this function lies in `ERC721UniqueExtensions`26 // /// @dev EVM selector for this function is: 0x06fdde03,27 // /// or in textual repr: name()28 // function name() public view returns (string memory) {29 // require(false, stub_error);30 // dummy;31 // return "";32 // }3334 // /// @notice An abbreviated name for NFTs in this contract35 // /// @dev real implementation of this function lies in `ERC721UniqueExtensions`36 // /// @dev EVM selector for this function is: 0x95d89b41,37 // /// or in textual repr: symbol()38 // function symbol() public view returns (string memory) {39 // require(false, stub_error);40 // dummy;41 // return "";42 // }4344 /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.45 ///46 /// @dev If the token has a `url` property and it is not empty, it is returned.47 /// 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`.48 /// If the collection property `baseURI` is empty or absent, return "" (empty string)49 /// otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix50 /// otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).51 ///52 /// @return token's const_metadata53 /// @dev EVM selector for this function is: 0xc87b56dd,54 /// or in textual repr: tokenURI(uint256)55 function tokenURI(uint256 tokenId) public view returns (string memory) {56 require(false, stub_error);57 tokenId;58 dummy;59 return "";60 }61}6263/// @title A contract that allows to set and delete token properties and change token property permissions.64/// @dev the ERC-165 identifier for this interface is 0x4136937765contract TokenProperties is Dummy, ERC165 {66 /// @notice Set permissions for token property.67 /// @dev Throws error if `msg.sender` is not admin or owner of the collection.68 /// @param key Property key.69 /// @param isMutable Permission to mutate property.70 /// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.71 /// @param tokenOwner Permission to mutate property by token owner if property is mutable.72 /// @dev EVM selector for this function is: 0x222d97fa,73 /// or in textual repr: setTokenPropertyPermission(string,bool,bool,bool)74 function setTokenPropertyPermission(75 string memory key,76 bool isMutable,77 bool collectionAdmin,78 bool tokenOwner79 ) public {80 require(false, stub_error);81 key;82 isMutable;83 collectionAdmin;84 tokenOwner;85 dummy = 0;86 }8788 /// @notice Set token property value.89 /// @dev Throws error if `msg.sender` has no permission to edit the property.90 /// @param tokenId ID of the token.91 /// @param key Property key.92 /// @param value Property value.93 /// @dev EVM selector for this function is: 0x1752d67b,94 /// or in textual repr: setProperty(uint256,string,bytes)95 function setProperty(96 uint256 tokenId,97 string memory key,98 bytes memory value99 ) public {100 require(false, stub_error);101 tokenId;102 key;103 value;104 dummy = 0;105 }106107 /// @notice Delete token property value.108 /// @dev Throws error if `msg.sender` has no permission to edit the property.109 /// @param tokenId ID of the token.110 /// @param key Property key.111 /// @dev EVM selector for this function is: 0x066111d1,112 /// or in textual repr: deleteProperty(uint256,string)113 function deleteProperty(uint256 tokenId, string memory key) public {114 require(false, stub_error);115 tokenId;116 key;117 dummy = 0;118 }119120 /// @notice Get token property value.121 /// @dev Throws error if key not found122 /// @param tokenId ID of the token.123 /// @param key Property key.124 /// @return Property value bytes125 /// @dev EVM selector for this function is: 0x7228c327,126 /// or in textual repr: property(uint256,string)127 function property(uint256 tokenId, string memory key) public view returns (bytes memory) {128 require(false, stub_error);129 tokenId;130 key;131 dummy;132 return hex"";133 }134}135136/// @title A contract that allows you to work with collections.137/// @dev the ERC-165 identifier for this interface is 0x3e1e8083138contract Collection is Dummy, ERC165 {139 /// Set collection property.140 ///141 /// @param key Property key.142 /// @param value Propery value.143 /// @dev EVM selector for this function is: 0x2f073f66,144 /// or in textual repr: setCollectionProperty(string,bytes)145 function setCollectionProperty(string memory key, bytes memory value) public {146 require(false, stub_error);147 key;148 value;149 dummy = 0;150 }151152 /// Delete collection property.153 ///154 /// @param key Property key.155 /// @dev EVM selector for this function is: 0x7b7debce,156 /// or in textual repr: deleteCollectionProperty(string)157 function deleteCollectionProperty(string memory key) public {158 require(false, stub_error);159 key;160 dummy = 0;161 }162163 /// Get collection property.164 ///165 /// @dev Throws error if key not found.166 ///167 /// @param key Property key.168 /// @return bytes The property corresponding to the key.169 /// @dev EVM selector for this function is: 0xcf24fd6d,170 /// or in textual repr: collectionProperty(string)171 function collectionProperty(string memory key) public view returns (bytes memory) {172 require(false, stub_error);173 key;174 dummy;175 return hex"";176 }177178 /// Set the sponsor of the collection.179 ///180 /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.181 ///182 /// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.183 /// @dev EVM selector for this function is: 0x7623402e,184 /// or in textual repr: setCollectionSponsor(address)185 function setCollectionSponsor(address sponsor) public {186 require(false, stub_error);187 sponsor;188 dummy = 0;189 }190191 /// Whether there is a pending sponsor.192 /// @dev EVM selector for this function is: 0x058ac185,193 /// or in textual repr: hasCollectionPendingSponsor()194 function hasCollectionPendingSponsor() public view returns (bool) {195 require(false, stub_error);196 dummy;197 return false;198 }199200 /// Collection sponsorship confirmation.201 ///202 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.203 /// @dev EVM selector for this function is: 0x3c50e97a,204 /// or in textual repr: confirmCollectionSponsorship()205 function confirmCollectionSponsorship() public {206 require(false, stub_error);207 dummy = 0;208 }209210 /// Remove collection sponsor.211 /// @dev EVM selector for this function is: 0x6e0326a3,212 /// or in textual repr: removeCollectionSponsor()213 function removeCollectionSponsor() public {214 require(false, stub_error);215 dummy = 0;216 }217218 /// Get current sponsor.219 ///220 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.221 /// @dev EVM selector for this function is: 0x6ec0a9f1,222 /// or in textual repr: collectionSponsor()223 function collectionSponsor() public view returns (Tuple15 memory) {224 require(false, stub_error);225 dummy;226 return Tuple15(0x0000000000000000000000000000000000000000, 0);227 }228229 /// Set limits for the collection.230 /// @dev Throws error if limit not found.231 /// @param limit Name of the limit. Valid names:232 /// "accountTokenOwnershipLimit",233 /// "sponsoredDataSize",234 /// "sponsoredDataRateLimit",235 /// "tokenLimit",236 /// "sponsorTransferTimeout",237 /// "sponsorApproveTimeout"238 /// @param value Value of the limit.239 /// @dev EVM selector for this function is: 0x6a3841db,240 /// or in textual repr: setCollectionLimit(string,uint32)241 function setCollectionLimit(string memory limit, uint32 value) public {242 require(false, stub_error);243 limit;244 value;245 dummy = 0;246 }247248 /// Set limits for the collection.249 /// @dev Throws error if limit not found.250 /// @param limit Name of the limit. Valid names:251 /// "ownerCanTransfer",252 /// "ownerCanDestroy",253 /// "transfersEnabled"254 /// @param value Value of the limit.255 /// @dev EVM selector for this function is: 0x993b7fba,256 /// or in textual repr: setCollectionLimit(string,bool)257 function setCollectionLimit(string memory limit, bool value) public {258 require(false, stub_error);259 limit;260 value;261 dummy = 0;262 }263264 /// Get contract address.265 /// @dev EVM selector for this function is: 0xf6b4dfb4,266 /// or in textual repr: contractAddress()267 function contractAddress() public view returns (address) {268 require(false, stub_error);269 dummy;270 return 0x0000000000000000000000000000000000000000;271 }272273 /// Add collection admin.274 /// @param newAdmin Address of the added administrator.275 /// @dev EVM selector for this function is: 0x92e462c7,276 /// or in textual repr: addCollectionAdmin(address)277 function addCollectionAdmin(address newAdmin) public {278 require(false, stub_error);279 newAdmin;280 dummy = 0;281 }282283 /// Remove collection admin.284 ///285 /// @param admin Address of the removed administrator.286 /// @dev EVM selector for this function is: 0xfafd7b42,287 /// or in textual repr: removeCollectionAdmin(address)288 function removeCollectionAdmin(address admin) public {289 require(false, stub_error);290 admin;291 dummy = 0;292 }293294 /// Toggle accessibility of collection nesting.295 ///296 /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'297 /// @dev EVM selector for this function is: 0x112d4586,298 /// or in textual repr: setCollectionNesting(bool)299 function setCollectionNesting(bool enable) public {300 require(false, stub_error);301 enable;302 dummy = 0;303 }304305 /// Toggle accessibility of collection nesting.306 ///307 /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'308 /// @param collections Addresses of collections that will be available for nesting.309 /// @dev EVM selector for this function is: 0x64872396,310 /// or in textual repr: setCollectionNesting(bool,address[])311 function setCollectionNesting(bool enable, address[] memory collections) public {312 require(false, stub_error);313 enable;314 collections;315 dummy = 0;316 }317318 /// Set the collection access method.319 /// @param mode Access mode320 /// 0 for Normal321 /// 1 for AllowList322 /// @dev EVM selector for this function is: 0x41835d4c,323 /// or in textual repr: setCollectionAccess(uint8)324 function setCollectionAccess(uint8 mode) public {325 require(false, stub_error);326 mode;327 dummy = 0;328 }329330 /// Checks that user allowed to operate with collection.331 ///332 /// @param user User address to check.333 /// @dev EVM selector for this function is: 0xd63a8e11,334 /// or in textual repr: allowed(address)335 function allowed(address user) public view returns (bool) {336 require(false, stub_error);337 user;338 dummy;339 return false;340 }341342 /// Add the user to the allowed list.343 ///344 /// @param user Address of a trusted user.345 /// @dev EVM selector for this function is: 0x67844fe6,346 /// or in textual repr: addToCollectionAllowList(address)347 function addToCollectionAllowList(address user) public {348 require(false, stub_error);349 user;350 dummy = 0;351 }352353 /// Remove the user from the allowed list.354 ///355 /// @param user Address of a removed user.356 /// @dev EVM selector for this function is: 0x85c51acb,357 /// or in textual repr: removeFromCollectionAllowList(address)358 function removeFromCollectionAllowList(address user) public {359 require(false, stub_error);360 user;361 dummy = 0;362 }363364 /// Switch permission for minting.365 ///366 /// @param mode Enable if "true".367 /// @dev EVM selector for this function is: 0x00018e84,368 /// or in textual repr: setCollectionMintMode(bool)369 function setCollectionMintMode(bool mode) public {370 require(false, stub_error);371 mode;372 dummy = 0;373 }374375 /// Check that account is the owner or admin of the collection376 ///377 /// @param user account to verify378 /// @return "true" if account is the owner or admin379 /// @dev EVM selector for this function is: 0x9811b0c7,380 /// or in textual repr: isOwnerOrAdmin(address)381 function isOwnerOrAdmin(address user) public view returns (bool) {382 require(false, stub_error);383 user;384 dummy;385 return false;386 }387388 /// Returns collection type389 ///390 /// @return `Fungible` or `NFT` or `ReFungible`391 /// @dev EVM selector for this function is: 0xd34b55b8,392 /// or in textual repr: uniqueCollectionType()393 function uniqueCollectionType() public view returns (string memory) {394 require(false, stub_error);395 dummy;396 return "";397 }398399 /// Get collection owner.400 ///401 /// @return Tuble with sponsor address and his substrate mirror.402 /// If address is canonical then substrate mirror is zero and vice versa.403 /// @dev EVM selector for this function is: 0xdf727d3b,404 /// or in textual repr: collectionOwner()405 function collectionOwner() public view returns (Tuple15 memory) {406 require(false, stub_error);407 dummy;408 return Tuple15(0x0000000000000000000000000000000000000000, 0);409 }410411 /// Changes collection owner to another account412 ///413 /// @dev Owner can be changed only by current owner414 /// @param newOwner new owner account415 /// @dev EVM selector for this function is: 0x13af4035,416 /// or in textual repr: setOwner(address)417 function setOwner(address newOwner) public {418 require(false, stub_error);419 newOwner;420 dummy = 0;421 }422}423424/// @dev anonymous struct425struct Tuple15 {426 address field_0;427 uint256 field_1;428}429430/// @title ERC721 Token that can be irreversibly burned (destroyed).431/// @dev the ERC-165 identifier for this interface is 0x42966c68432contract ERC721Burnable is Dummy, ERC165 {433 /// @notice Burns a specific ERC721 token.434 /// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized435 /// operator of the current owner.436 /// @param tokenId The NFT to approve437 /// @dev EVM selector for this function is: 0x42966c68,438 /// or in textual repr: burn(uint256)439 function burn(uint256 tokenId) public {440 require(false, stub_error);441 tokenId;442 dummy = 0;443 }444}445446/// @dev inlined interface447contract ERC721MintableEvents {448 event MintingFinished();449}450451/// @title ERC721 minting logic.452/// @dev the ERC-165 identifier for this interface is 0x68ccfe89453contract ERC721Mintable is Dummy, ERC165, ERC721MintableEvents {454 /// @dev EVM selector for this function is: 0x05d2035b,455 /// or in textual repr: mintingFinished()456 function mintingFinished() public view returns (bool) {457 require(false, stub_error);458 dummy;459 return false;460 }461462 /// @notice Function to mint token.463 /// @dev `tokenId` should be obtained with `nextTokenId` method,464 /// unlike standard, you can't specify it manually465 /// @param to The new owner466 /// @param tokenId ID of the minted NFT467 /// @dev EVM selector for this function is: 0x40c10f19,468 /// or in textual repr: mint(address,uint256)469 function mint(address to, uint256 tokenId) public returns (bool) {470 require(false, stub_error);471 to;472 tokenId;473 dummy = 0;474 return false;475 }476477 /// @notice Function to mint token with the given tokenUri.478 /// @dev `tokenId` should be obtained with `nextTokenId` method,479 /// unlike standard, you can't specify it manually480 /// @param to The new owner481 /// @param tokenId ID of the minted NFT482 /// @param tokenUri Token URI that would be stored in the NFT properties483 /// @dev EVM selector for this function is: 0x50bb4e7f,484 /// or in textual repr: mintWithTokenURI(address,uint256,string)485 function mintWithTokenURI(486 address to,487 uint256 tokenId,488 string memory tokenUri489 ) public returns (bool) {490 require(false, stub_error);491 to;492 tokenId;493 tokenUri;494 dummy = 0;495 return false;496 }497498 /// @dev Not implemented499 /// @dev EVM selector for this function is: 0x7d64bcb4,500 /// or in textual repr: finishMinting()501 function finishMinting() public returns (bool) {502 require(false, stub_error);503 dummy = 0;504 return false;505 }506}507508/// @title Unique extensions for ERC721.509/// @dev the ERC-165 identifier for this interface is 0x4468500d510contract ERC721UniqueExtensions is Dummy, ERC165 {511 /// @notice A descriptive name for a collection of NFTs in this contract512 /// @dev EVM selector for this function is: 0x06fdde03,513 /// or in textual repr: name()514 function name() public view returns (string memory) {515 require(false, stub_error);516 dummy;517 return "";518 }519520 /// @notice An abbreviated name for NFTs in this contract521 /// @dev EVM selector for this function is: 0x95d89b41,522 /// or in textual repr: symbol()523 function symbol() public view returns (string memory) {524 require(false, stub_error);525 dummy;526 return "";527 }528529 /// @notice Transfer ownership of an NFT530 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`531 /// is the zero address. Throws if `tokenId` is not a valid NFT.532 /// @param to The new owner533 /// @param tokenId The NFT to transfer534 /// @dev EVM selector for this function is: 0xa9059cbb,535 /// or in textual repr: transfer(address,uint256)536 function transfer(address to, uint256 tokenId) public {537 require(false, stub_error);538 to;539 tokenId;540 dummy = 0;541 }542543 /// @notice Burns a specific ERC721 token.544 /// @dev Throws unless `msg.sender` is the current owner or an authorized545 /// operator for this NFT. Throws if `from` is not the current owner. Throws546 /// if `to` is the zero address. Throws if `tokenId` is not a valid NFT.547 /// @param from The current owner of the NFT548 /// @param tokenId The NFT to transfer549 /// @dev EVM selector for this function is: 0x79cc6790,550 /// or in textual repr: burnFrom(address,uint256)551 function burnFrom(address from, uint256 tokenId) public {552 require(false, stub_error);553 from;554 tokenId;555 dummy = 0;556 }557558 /// @notice Returns next free NFT ID.559 /// @dev EVM selector for this function is: 0x75794a3c,560 /// or in textual repr: nextTokenId()561 function nextTokenId() public view returns (uint256) {562 require(false, stub_error);563 dummy;564 return 0;565 }566567 /// @notice Function to mint multiple tokens.568 /// @dev `tokenIds` should be an array of consecutive numbers and first number569 /// should be obtained with `nextTokenId` method570 /// @param to The new owner571 /// @param tokenIds IDs of the minted NFTs572 /// @dev EVM selector for this function is: 0x44a9945e,573 /// or in textual repr: mintBulk(address,uint256[])574 function mintBulk(address to, uint256[] memory tokenIds) public returns (bool) {575 require(false, stub_error);576 to;577 tokenIds;578 dummy = 0;579 return false;580 }581582 /// @notice Function to mint multiple tokens with the given tokenUris.583 /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive584 /// numbers and first number should be obtained with `nextTokenId` method585 /// @param to The new owner586 /// @param tokens array of pairs of token ID and token URI for minted tokens587 /// @dev EVM selector for this function is: 0x36543006,588 /// or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])589 function mintBulkWithTokenURI(address to, Tuple6[] memory tokens) public returns (bool) {590 require(false, stub_error);591 to;592 tokens;593 dummy = 0;594 return false;595 }596}597598/// @dev anonymous struct599struct Tuple6 {600 uint256 field_0;601 string field_1;602}603604/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension605/// @dev See https://eips.ethereum.org/EIPS/eip-721606/// @dev the ERC-165 identifier for this interface is 0x780e9d63607contract ERC721Enumerable is Dummy, ERC165 {608 /// @notice Enumerate valid NFTs609 /// @param index A counter less than `totalSupply()`610 /// @return The token identifier for the `index`th NFT,611 /// (sort order not specified)612 /// @dev EVM selector for this function is: 0x4f6ccce7,613 /// or in textual repr: tokenByIndex(uint256)614 function tokenByIndex(uint256 index) public view returns (uint256) {615 require(false, stub_error);616 index;617 dummy;618 return 0;619 }620621 /// @dev Not implemented622 /// @dev EVM selector for this function is: 0x2f745c59,623 /// or in textual repr: tokenOfOwnerByIndex(address,uint256)624 function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {625 require(false, stub_error);626 owner;627 index;628 dummy;629 return 0;630 }631632 /// @notice Count NFTs tracked by this contract633 /// @return A count of valid NFTs tracked by this contract, where each one of634 /// them has an assigned and queryable owner not equal to the zero address635 /// @dev EVM selector for this function is: 0x18160ddd,636 /// or in textual repr: totalSupply()637 function totalSupply() public view returns (uint256) {638 require(false, stub_error);639 dummy;640 return 0;641 }642}643644/// @dev inlined interface645contract ERC721Events {646 event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);647 event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);648 event ApprovalForAll(address indexed owner, address indexed operator, bool approved);649}650651/// @title ERC-721 Non-Fungible Token Standard652/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md653/// @dev the ERC-165 identifier for this interface is 0x80ac58cd654contract ERC721 is Dummy, ERC165, ERC721Events {655 /// @notice Count all NFTs assigned to an owner656 /// @dev NFTs assigned to the zero address are considered invalid, and this657 /// function throws for queries about the zero address.658 /// @param owner An address for whom to query the balance659 /// @return The number of NFTs owned by `owner`, possibly zero660 /// @dev EVM selector for this function is: 0x70a08231,661 /// or in textual repr: balanceOf(address)662 function balanceOf(address owner) public view returns (uint256) {663 require(false, stub_error);664 owner;665 dummy;666 return 0;667 }668669 /// @notice Find the owner of an NFT670 /// @dev NFTs assigned to zero address are considered invalid, and queries671 /// about them do throw.672 /// @param tokenId The identifier for an NFT673 /// @return The address of the owner of the NFT674 /// @dev EVM selector for this function is: 0x6352211e,675 /// or in textual repr: ownerOf(uint256)676 function ownerOf(uint256 tokenId) public view returns (address) {677 require(false, stub_error);678 tokenId;679 dummy;680 return 0x0000000000000000000000000000000000000000;681 }682683 /// @dev Not implemented684 /// @dev EVM selector for this function is: 0xb88d4fde,685 /// or in textual repr: safeTransferFrom(address,address,uint256,bytes)686 function safeTransferFrom(687 address from,688 address to,689 uint256 tokenId,690 bytes memory data691 ) public {692 require(false, stub_error);693 from;694 to;695 tokenId;696 data;697 dummy = 0;698 }699700 /// @dev Not implemented701 /// @dev EVM selector for this function is: 0x42842e0e,702 /// or in textual repr: safeTransferFrom(address,address,uint256)703 function safeTransferFrom(704 address from,705 address to,706 uint256 tokenId707 ) public {708 require(false, stub_error);709 from;710 to;711 tokenId;712 dummy = 0;713 }714715 /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE716 /// TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE717 /// THEY MAY BE PERMANENTLY LOST718 /// @dev Throws unless `msg.sender` is the current owner or an authorized719 /// operator for this NFT. Throws if `from` is not the current owner. Throws720 /// if `to` is the zero address. Throws if `tokenId` is not a valid NFT.721 /// @param from The current owner of the NFT722 /// @param to The new owner723 /// @param tokenId The NFT to transfer724 /// @dev EVM selector for this function is: 0x23b872dd,725 /// or in textual repr: transferFrom(address,address,uint256)726 function transferFrom(727 address from,728 address to,729 uint256 tokenId730 ) public {731 require(false, stub_error);732 from;733 to;734 tokenId;735 dummy = 0;736 }737738 /// @notice Set or reaffirm the approved address for an NFT739 /// @dev The zero address indicates there is no approved address.740 /// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized741 /// operator of the current owner.742 /// @param approved The new approved NFT controller743 /// @param tokenId The NFT to approve744 /// @dev EVM selector for this function is: 0x095ea7b3,745 /// or in textual repr: approve(address,uint256)746 function approve(address approved, uint256 tokenId) public {747 require(false, stub_error);748 approved;749 tokenId;750 dummy = 0;751 }752753 /// @dev Not implemented754 /// @dev EVM selector for this function is: 0xa22cb465,755 /// or in textual repr: setApprovalForAll(address,bool)756 function setApprovalForAll(address operator, bool approved) public {757 require(false, stub_error);758 operator;759 approved;760 dummy = 0;761 }762763 /// @dev Not implemented764 /// @dev EVM selector for this function is: 0x081812fc,765 /// or in textual repr: getApproved(uint256)766 function getApproved(uint256 tokenId) public view returns (address) {767 require(false, stub_error);768 tokenId;769 dummy;770 return 0x0000000000000000000000000000000000000000;771 }772773 /// @dev Not implemented774 /// @dev EVM selector for this function is: 0xe985e9c5,775 /// or in textual repr: isApprovedForAll(address,address)776 function isApprovedForAll(address owner, address operator) public view returns (address) {777 require(false, stub_error);778 owner;779 operator;780 dummy;781 return 0x0000000000000000000000000000000000000000;782 }783}784785contract UniqueNFT is786 Dummy,787 ERC165,788 ERC721,789 ERC721Enumerable,790 ERC721UniqueExtensions,791 ERC721Mintable,792 ERC721Burnable,793 Collection,794 TokenProperties,795 ERC721Metadata796{}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 to set and delete token properties and change token property permissions.21/// @dev the ERC-165 identifier for this interface is 0x4136937722contract TokenProperties is Dummy, ERC165 {23 /// @notice Set permissions for token property.24 /// @dev Throws error if `msg.sender` is not admin or owner of the collection.25 /// @param key Property key.26 /// @param isMutable Permission to mutate property.27 /// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.28 /// @param tokenOwner Permission to mutate property by token owner if property is mutable.29 /// @dev EVM selector for this function is: 0x222d97fa,30 /// or in textual repr: setTokenPropertyPermission(string,bool,bool,bool)31 function setTokenPropertyPermission(32 string memory key,33 bool isMutable,34 bool collectionAdmin,35 bool tokenOwner36 ) public {37 require(false, stub_error);38 key;39 isMutable;40 collectionAdmin;41 tokenOwner;42 dummy = 0;43 }4445 /// @notice Set token property value.46 /// @dev Throws error if `msg.sender` has no permission to edit the property.47 /// @param tokenId ID of the token.48 /// @param key Property key.49 /// @param value Property value.50 /// @dev EVM selector for this function is: 0x1752d67b,51 /// or in textual repr: setProperty(uint256,string,bytes)52 function setProperty(53 uint256 tokenId,54 string memory key,55 bytes memory value56 ) public {57 require(false, stub_error);58 tokenId;59 key;60 value;61 dummy = 0;62 }6364 /// @notice Delete token property value.65 /// @dev Throws error if `msg.sender` has no permission to edit the property.66 /// @param tokenId ID of the token.67 /// @param key Property key.68 /// @dev EVM selector for this function is: 0x066111d1,69 /// or in textual repr: deleteProperty(uint256,string)70 function deleteProperty(uint256 tokenId, string memory key) public {71 require(false, stub_error);72 tokenId;73 key;74 dummy = 0;75 }7677 /// @notice Get token property value.78 /// @dev Throws error if key not found79 /// @param tokenId ID of the token.80 /// @param key Property key.81 /// @return Property value bytes82 /// @dev EVM selector for this function is: 0x7228c327,83 /// or in textual repr: property(uint256,string)84 function property(uint256 tokenId, string memory key) public view returns (bytes memory) {85 require(false, stub_error);86 tokenId;87 key;88 dummy;89 return hex"";90 }91}9293/// @title A contract that allows you to work with collections.94/// @dev the ERC-165 identifier for this interface is 0x3e1e808395contract Collection is Dummy, ERC165 {96 /// Set collection property.97 ///98 /// @param key Property key.99 /// @param value Propery value.100 /// @dev EVM selector for this function is: 0x2f073f66,101 /// or in textual repr: setCollectionProperty(string,bytes)102 function setCollectionProperty(string memory key, bytes memory value) public {103 require(false, stub_error);104 key;105 value;106 dummy = 0;107 }108109 /// Delete collection property.110 ///111 /// @param key Property key.112 /// @dev EVM selector for this function is: 0x7b7debce,113 /// or in textual repr: deleteCollectionProperty(string)114 function deleteCollectionProperty(string memory key) public {115 require(false, stub_error);116 key;117 dummy = 0;118 }119120 /// Get collection property.121 ///122 /// @dev Throws error if key not found.123 ///124 /// @param key Property key.125 /// @return bytes The property corresponding to the key.126 /// @dev EVM selector for this function is: 0xcf24fd6d,127 /// or in textual repr: collectionProperty(string)128 function collectionProperty(string memory key) public view returns (bytes memory) {129 require(false, stub_error);130 key;131 dummy;132 return hex"";133 }134135 /// Set the sponsor of the collection.136 ///137 /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.138 ///139 /// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.140 /// @dev EVM selector for this function is: 0x7623402e,141 /// or in textual repr: setCollectionSponsor(address)142 function setCollectionSponsor(address sponsor) public {143 require(false, stub_error);144 sponsor;145 dummy = 0;146 }147148 /// Whether there is a pending sponsor.149 /// @dev EVM selector for this function is: 0x058ac185,150 /// or in textual repr: hasCollectionPendingSponsor()151 function hasCollectionPendingSponsor() public view returns (bool) {152 require(false, stub_error);153 dummy;154 return false;155 }156157 /// Collection sponsorship confirmation.158 ///159 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.160 /// @dev EVM selector for this function is: 0x3c50e97a,161 /// or in textual repr: confirmCollectionSponsorship()162 function confirmCollectionSponsorship() public {163 require(false, stub_error);164 dummy = 0;165 }166167 /// Remove collection sponsor.168 /// @dev EVM selector for this function is: 0x6e0326a3,169 /// or in textual repr: removeCollectionSponsor()170 function removeCollectionSponsor() public {171 require(false, stub_error);172 dummy = 0;173 }174175 /// Get current sponsor.176 ///177 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.178 /// @dev EVM selector for this function is: 0x6ec0a9f1,179 /// or in textual repr: collectionSponsor()180 function collectionSponsor() public view returns (Tuple17 memory) {181 require(false, stub_error);182 dummy;183 return Tuple17(0x0000000000000000000000000000000000000000, 0);184 }185186 /// Set limits for the collection.187 /// @dev Throws error if limit not found.188 /// @param limit Name of the limit. Valid names:189 /// "accountTokenOwnershipLimit",190 /// "sponsoredDataSize",191 /// "sponsoredDataRateLimit",192 /// "tokenLimit",193 /// "sponsorTransferTimeout",194 /// "sponsorApproveTimeout"195 /// @param value Value of the limit.196 /// @dev EVM selector for this function is: 0x6a3841db,197 /// or in textual repr: setCollectionLimit(string,uint32)198 function setCollectionLimit(string memory limit, uint32 value) public {199 require(false, stub_error);200 limit;201 value;202 dummy = 0;203 }204205 /// Set limits for the collection.206 /// @dev Throws error if limit not found.207 /// @param limit Name of the limit. Valid names:208 /// "ownerCanTransfer",209 /// "ownerCanDestroy",210 /// "transfersEnabled"211 /// @param value Value of the limit.212 /// @dev EVM selector for this function is: 0x993b7fba,213 /// or in textual repr: setCollectionLimit(string,bool)214 function setCollectionLimit(string memory limit, bool value) public {215 require(false, stub_error);216 limit;217 value;218 dummy = 0;219 }220221 /// Get contract address.222 /// @dev EVM selector for this function is: 0xf6b4dfb4,223 /// or in textual repr: contractAddress()224 function contractAddress() public view returns (address) {225 require(false, stub_error);226 dummy;227 return 0x0000000000000000000000000000000000000000;228 }229230 /// Add collection admin.231 /// @param newAdmin Address of the added administrator.232 /// @dev EVM selector for this function is: 0x92e462c7,233 /// or in textual repr: addCollectionAdmin(address)234 function addCollectionAdmin(address newAdmin) public {235 require(false, stub_error);236 newAdmin;237 dummy = 0;238 }239240 /// Remove collection admin.241 ///242 /// @param admin Address of the removed administrator.243 /// @dev EVM selector for this function is: 0xfafd7b42,244 /// or in textual repr: removeCollectionAdmin(address)245 function removeCollectionAdmin(address admin) public {246 require(false, stub_error);247 admin;248 dummy = 0;249 }250251 /// Toggle accessibility of collection nesting.252 ///253 /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'254 /// @dev EVM selector for this function is: 0x112d4586,255 /// or in textual repr: setCollectionNesting(bool)256 function setCollectionNesting(bool enable) public {257 require(false, stub_error);258 enable;259 dummy = 0;260 }261262 /// Toggle accessibility of collection nesting.263 ///264 /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'265 /// @param collections Addresses of collections that will be available for nesting.266 /// @dev EVM selector for this function is: 0x64872396,267 /// or in textual repr: setCollectionNesting(bool,address[])268 function setCollectionNesting(bool enable, address[] memory collections) public {269 require(false, stub_error);270 enable;271 collections;272 dummy = 0;273 }274275 /// Set the collection access method.276 /// @param mode Access mode277 /// 0 for Normal278 /// 1 for AllowList279 /// @dev EVM selector for this function is: 0x41835d4c,280 /// or in textual repr: setCollectionAccess(uint8)281 function setCollectionAccess(uint8 mode) public {282 require(false, stub_error);283 mode;284 dummy = 0;285 }286287 /// Checks that user allowed to operate with collection.288 ///289 /// @param user User address to check.290 /// @dev EVM selector for this function is: 0xd63a8e11,291 /// or in textual repr: allowed(address)292 function allowed(address user) public view returns (bool) {293 require(false, stub_error);294 user;295 dummy;296 return false;297 }298299 /// Add the user to the allowed list.300 ///301 /// @param user Address of a trusted user.302 /// @dev EVM selector for this function is: 0x67844fe6,303 /// or in textual repr: addToCollectionAllowList(address)304 function addToCollectionAllowList(address user) public {305 require(false, stub_error);306 user;307 dummy = 0;308 }309310 /// Remove the user from the allowed list.311 ///312 /// @param user Address of a removed user.313 /// @dev EVM selector for this function is: 0x85c51acb,314 /// or in textual repr: removeFromCollectionAllowList(address)315 function removeFromCollectionAllowList(address user) public {316 require(false, stub_error);317 user;318 dummy = 0;319 }320321 /// Switch permission for minting.322 ///323 /// @param mode Enable if "true".324 /// @dev EVM selector for this function is: 0x00018e84,325 /// or in textual repr: setCollectionMintMode(bool)326 function setCollectionMintMode(bool mode) public {327 require(false, stub_error);328 mode;329 dummy = 0;330 }331332 /// Check that account is the owner or admin of the collection333 ///334 /// @param user account to verify335 /// @return "true" if account is the owner or admin336 /// @dev EVM selector for this function is: 0x9811b0c7,337 /// or in textual repr: isOwnerOrAdmin(address)338 function isOwnerOrAdmin(address user) public view returns (bool) {339 require(false, stub_error);340 user;341 dummy;342 return false;343 }344345 /// Returns collection type346 ///347 /// @return `Fungible` or `NFT` or `ReFungible`348 /// @dev EVM selector for this function is: 0xd34b55b8,349 /// or in textual repr: uniqueCollectionType()350 function uniqueCollectionType() public view returns (string memory) {351 require(false, stub_error);352 dummy;353 return "";354 }355356 /// Get collection owner.357 ///358 /// @return Tuble with sponsor address and his substrate mirror.359 /// If address is canonical then substrate mirror is zero and vice versa.360 /// @dev EVM selector for this function is: 0xdf727d3b,361 /// or in textual repr: collectionOwner()362 function collectionOwner() public view returns (Tuple17 memory) {363 require(false, stub_error);364 dummy;365 return Tuple17(0x0000000000000000000000000000000000000000, 0);366 }367368 /// Changes collection owner to another account369 ///370 /// @dev Owner can be changed only by current owner371 /// @param newOwner new owner account372 /// @dev EVM selector for this function is: 0x13af4035,373 /// or in textual repr: setOwner(address)374 function setOwner(address newOwner) public {375 require(false, stub_error);376 newOwner;377 dummy = 0;378 }379}380381/// @dev anonymous struct382struct Tuple17 {383 address field_0;384 uint256 field_1;385}386387/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension388/// @dev See https://eips.ethereum.org/EIPS/eip-721389/// @dev the ERC-165 identifier for this interface is 0x5b5e139f390contract ERC721Metadata is Dummy, ERC165 {391 // /// @notice A descriptive name for a collection of NFTs in this contract392 // /// @dev real implementation of this function lies in `ERC721UniqueExtensions`393 // /// @dev EVM selector for this function is: 0x06fdde03,394 // /// or in textual repr: name()395 // function name() public view returns (string memory) {396 // require(false, stub_error);397 // dummy;398 // return "";399 // }400401 // /// @notice An abbreviated name for NFTs in this contract402 // /// @dev real implementation of this function lies in `ERC721UniqueExtensions`403 // /// @dev EVM selector for this function is: 0x95d89b41,404 // /// or in textual repr: symbol()405 // function symbol() public view returns (string memory) {406 // require(false, stub_error);407 // dummy;408 // return "";409 // }410411 /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.412 ///413 /// @dev If the token has a `url` property and it is not empty, it is returned.414 /// 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`.415 /// If the collection property `baseURI` is empty or absent, return "" (empty string)416 /// otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix417 /// otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).418 ///419 /// @return token's const_metadata420 /// @dev EVM selector for this function is: 0xc87b56dd,421 /// or in textual repr: tokenURI(uint256)422 function tokenURI(uint256 tokenId) public view returns (string memory) {423 require(false, stub_error);424 tokenId;425 dummy;426 return "";427 }428}429430/// @title ERC721 Token that can be irreversibly burned (destroyed).431/// @dev the ERC-165 identifier for this interface is 0x42966c68432contract ERC721Burnable is Dummy, ERC165 {433 /// @notice Burns a specific ERC721 token.434 /// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized435 /// operator of the current owner.436 /// @param tokenId The NFT to approve437 /// @dev EVM selector for this function is: 0x42966c68,438 /// or in textual repr: burn(uint256)439 function burn(uint256 tokenId) public {440 require(false, stub_error);441 tokenId;442 dummy = 0;443 }444}445446/// @dev inlined interface447contract ERC721MintableEvents {448 event MintingFinished();449}450451/// @title ERC721 minting logic.452/// @dev the ERC-165 identifier for this interface is 0x68ccfe89453contract ERC721Mintable is Dummy, ERC165, ERC721MintableEvents {454 /// @dev EVM selector for this function is: 0x05d2035b,455 /// or in textual repr: mintingFinished()456 function mintingFinished() public view returns (bool) {457 require(false, stub_error);458 dummy;459 return false;460 }461462 /// @notice Function to mint token.463 /// @dev `tokenId` should be obtained with `nextTokenId` method,464 /// unlike standard, you can't specify it manually465 /// @param to The new owner466 /// @param tokenId ID of the minted NFT467 /// @dev EVM selector for this function is: 0x40c10f19,468 /// or in textual repr: mint(address,uint256)469 function mint(address to, uint256 tokenId) public returns (bool) {470 require(false, stub_error);471 to;472 tokenId;473 dummy = 0;474 return false;475 }476477 /// @notice Function to mint token with the given tokenUri.478 /// @dev `tokenId` should be obtained with `nextTokenId` method,479 /// unlike standard, you can't specify it manually480 /// @param to The new owner481 /// @param tokenId ID of the minted NFT482 /// @param tokenUri Token URI that would be stored in the NFT properties483 /// @dev EVM selector for this function is: 0x50bb4e7f,484 /// or in textual repr: mintWithTokenURI(address,uint256,string)485 function mintWithTokenURI(486 address to,487 uint256 tokenId,488 string memory tokenUri489 ) public returns (bool) {490 require(false, stub_error);491 to;492 tokenId;493 tokenUri;494 dummy = 0;495 return false;496 }497498 /// @dev Not implemented499 /// @dev EVM selector for this function is: 0x7d64bcb4,500 /// or in textual repr: finishMinting()501 function finishMinting() public returns (bool) {502 require(false, stub_error);503 dummy = 0;504 return false;505 }506}507508/// @title Unique extensions for ERC721.509/// @dev the ERC-165 identifier for this interface is 0x4468500d510contract ERC721UniqueExtensions is Dummy, ERC165 {511 /// @notice A descriptive name for a collection of NFTs in this contract512 /// @dev EVM selector for this function is: 0x06fdde03,513 /// or in textual repr: name()514 function name() public view returns (string memory) {515 require(false, stub_error);516 dummy;517 return "";518 }519520 /// @notice An abbreviated name for NFTs in this contract521 /// @dev EVM selector for this function is: 0x95d89b41,522 /// or in textual repr: symbol()523 function symbol() public view returns (string memory) {524 require(false, stub_error);525 dummy;526 return "";527 }528529 /// @notice Transfer ownership of an NFT530 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`531 /// is the zero address. Throws if `tokenId` is not a valid NFT.532 /// @param to The new owner533 /// @param tokenId The NFT to transfer534 /// @dev EVM selector for this function is: 0xa9059cbb,535 /// or in textual repr: transfer(address,uint256)536 function transfer(address to, uint256 tokenId) public {537 require(false, stub_error);538 to;539 tokenId;540 dummy = 0;541 }542543 /// @notice Burns a specific ERC721 token.544 /// @dev Throws unless `msg.sender` is the current owner or an authorized545 /// operator for this NFT. Throws if `from` is not the current owner. Throws546 /// if `to` is the zero address. Throws if `tokenId` is not a valid NFT.547 /// @param from The current owner of the NFT548 /// @param tokenId The NFT to transfer549 /// @dev EVM selector for this function is: 0x79cc6790,550 /// or in textual repr: burnFrom(address,uint256)551 function burnFrom(address from, uint256 tokenId) public {552 require(false, stub_error);553 from;554 tokenId;555 dummy = 0;556 }557558 /// @notice Returns next free NFT ID.559 /// @dev EVM selector for this function is: 0x75794a3c,560 /// or in textual repr: nextTokenId()561 function nextTokenId() public view returns (uint256) {562 require(false, stub_error);563 dummy;564 return 0;565 }566567 /// @notice Function to mint multiple tokens.568 /// @dev `tokenIds` should be an array of consecutive numbers and first number569 /// should be obtained with `nextTokenId` method570 /// @param to The new owner571 /// @param tokenIds IDs of the minted NFTs572 /// @dev EVM selector for this function is: 0x44a9945e,573 /// or in textual repr: mintBulk(address,uint256[])574 function mintBulk(address to, uint256[] memory tokenIds) public returns (bool) {575 require(false, stub_error);576 to;577 tokenIds;578 dummy = 0;579 return false;580 }581582 /// @notice Function to mint multiple tokens with the given tokenUris.583 /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive584 /// numbers and first number should be obtained with `nextTokenId` method585 /// @param to The new owner586 /// @param tokens array of pairs of token ID and token URI for minted tokens587 /// @dev EVM selector for this function is: 0x36543006,588 /// or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])589 function mintBulkWithTokenURI(address to, Tuple6[] memory tokens) public returns (bool) {590 require(false, stub_error);591 to;592 tokens;593 dummy = 0;594 return false;595 }596}597598/// @dev anonymous struct599struct Tuple6 {600 uint256 field_0;601 string field_1;602}603604/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension605/// @dev See https://eips.ethereum.org/EIPS/eip-721606/// @dev the ERC-165 identifier for this interface is 0x780e9d63607contract ERC721Enumerable is Dummy, ERC165 {608 /// @notice Enumerate valid NFTs609 /// @param index A counter less than `totalSupply()`610 /// @return The token identifier for the `index`th NFT,611 /// (sort order not specified)612 /// @dev EVM selector for this function is: 0x4f6ccce7,613 /// or in textual repr: tokenByIndex(uint256)614 function tokenByIndex(uint256 index) public view returns (uint256) {615 require(false, stub_error);616 index;617 dummy;618 return 0;619 }620621 /// @dev Not implemented622 /// @dev EVM selector for this function is: 0x2f745c59,623 /// or in textual repr: tokenOfOwnerByIndex(address,uint256)624 function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {625 require(false, stub_error);626 owner;627 index;628 dummy;629 return 0;630 }631632 /// @notice Count NFTs tracked by this contract633 /// @return A count of valid NFTs tracked by this contract, where each one of634 /// them has an assigned and queryable owner not equal to the zero address635 /// @dev EVM selector for this function is: 0x18160ddd,636 /// or in textual repr: totalSupply()637 function totalSupply() public view returns (uint256) {638 require(false, stub_error);639 dummy;640 return 0;641 }642}643644/// @dev inlined interface645contract ERC721Events {646 event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);647 event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);648 event ApprovalForAll(address indexed owner, address indexed operator, bool approved);649}650651/// @title ERC-721 Non-Fungible Token Standard652/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md653/// @dev the ERC-165 identifier for this interface is 0x80ac58cd654contract ERC721 is Dummy, ERC165, ERC721Events {655 /// @notice Count all NFTs assigned to an owner656 /// @dev NFTs assigned to the zero address are considered invalid, and this657 /// function throws for queries about the zero address.658 /// @param owner An address for whom to query the balance659 /// @return The number of NFTs owned by `owner`, possibly zero660 /// @dev EVM selector for this function is: 0x70a08231,661 /// or in textual repr: balanceOf(address)662 function balanceOf(address owner) public view returns (uint256) {663 require(false, stub_error);664 owner;665 dummy;666 return 0;667 }668669 /// @notice Find the owner of an NFT670 /// @dev NFTs assigned to zero address are considered invalid, and queries671 /// about them do throw.672 /// @param tokenId The identifier for an NFT673 /// @return The address of the owner of the NFT674 /// @dev EVM selector for this function is: 0x6352211e,675 /// or in textual repr: ownerOf(uint256)676 function ownerOf(uint256 tokenId) public view returns (address) {677 require(false, stub_error);678 tokenId;679 dummy;680 return 0x0000000000000000000000000000000000000000;681 }682683 /// @dev Not implemented684 /// @dev EVM selector for this function is: 0xb88d4fde,685 /// or in textual repr: safeTransferFrom(address,address,uint256,bytes)686 function safeTransferFrom(687 address from,688 address to,689 uint256 tokenId,690 bytes memory data691 ) public {692 require(false, stub_error);693 from;694 to;695 tokenId;696 data;697 dummy = 0;698 }699700 /// @dev Not implemented701 /// @dev EVM selector for this function is: 0x42842e0e,702 /// or in textual repr: safeTransferFrom(address,address,uint256)703 function safeTransferFrom(704 address from,705 address to,706 uint256 tokenId707 ) public {708 require(false, stub_error);709 from;710 to;711 tokenId;712 dummy = 0;713 }714715 /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE716 /// TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE717 /// THEY MAY BE PERMANENTLY LOST718 /// @dev Throws unless `msg.sender` is the current owner or an authorized719 /// operator for this NFT. Throws if `from` is not the current owner. Throws720 /// if `to` is the zero address. Throws if `tokenId` is not a valid NFT.721 /// @param from The current owner of the NFT722 /// @param to The new owner723 /// @param tokenId The NFT to transfer724 /// @dev EVM selector for this function is: 0x23b872dd,725 /// or in textual repr: transferFrom(address,address,uint256)726 function transferFrom(727 address from,728 address to,729 uint256 tokenId730 ) public {731 require(false, stub_error);732 from;733 to;734 tokenId;735 dummy = 0;736 }737738 /// @notice Set or reaffirm the approved address for an NFT739 /// @dev The zero address indicates there is no approved address.740 /// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized741 /// operator of the current owner.742 /// @param approved The new approved NFT controller743 /// @param tokenId The NFT to approve744 /// @dev EVM selector for this function is: 0x095ea7b3,745 /// or in textual repr: approve(address,uint256)746 function approve(address approved, uint256 tokenId) public {747 require(false, stub_error);748 approved;749 tokenId;750 dummy = 0;751 }752753 /// @dev Not implemented754 /// @dev EVM selector for this function is: 0xa22cb465,755 /// or in textual repr: setApprovalForAll(address,bool)756 function setApprovalForAll(address operator, bool approved) public {757 require(false, stub_error);758 operator;759 approved;760 dummy = 0;761 }762763 /// @dev Not implemented764 /// @dev EVM selector for this function is: 0x081812fc,765 /// or in textual repr: getApproved(uint256)766 function getApproved(uint256 tokenId) public view returns (address) {767 require(false, stub_error);768 tokenId;769 dummy;770 return 0x0000000000000000000000000000000000000000;771 }772773 /// @dev Not implemented774 /// @dev EVM selector for this function is: 0xe985e9c5,775 /// or in textual repr: isApprovedForAll(address,address)776 function isApprovedForAll(address owner, address operator) public view returns (address) {777 require(false, stub_error);778 owner;779 operator;780 dummy;781 return 0x0000000000000000000000000000000000000000;782 }783}784785contract UniqueNFT is786 Dummy,787 ERC165,788 ERC721,789 ERC721Enumerable,790 ERC721UniqueExtensions,791 ERC721Mintable,792 ERC721Burnable,793 ERC721Metadata,794 Collection,795 TokenProperties796{}pallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth--- a/pallets/refungible/src/stubs/UniqueRefungible.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungible.sol
@@ -17,45 +17,6 @@
}
}
-/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
-contract ERC721Metadata is Dummy, ERC165 {
- /// @notice A descriptive name for a collection of RFTs in this contract
- /// @dev EVM selector for this function is: 0x06fdde03,
- /// or in textual repr: name()
- function name() public view returns (string memory) {
- require(false, stub_error);
- dummy;
- return "";
- }
-
- /// @notice An abbreviated name for RFTs in this contract
- /// @dev EVM selector for this function is: 0x95d89b41,
- /// or in textual repr: symbol()
- function symbol() public view returns (string memory) {
- require(false, stub_error);
- dummy;
- return "";
- }
-
- /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
- ///
- /// @dev If the token has a `url` property and it is not empty, it is returned.
- /// 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`.
- /// If the collection property `baseURI` is empty or absent, return "" (empty string)
- /// otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix
- /// otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).
- ///
- /// @return token's const_metadata
- /// @dev EVM selector for this function is: 0xc87b56dd,
- /// or in textual repr: tokenURI(uint256)
- function tokenURI(uint256 tokenId) public view returns (string memory) {
- require(false, stub_error);
- tokenId;
- dummy;
- return "";
- }
-}
-
/// @title A contract that allows to set and delete token properties and change token property permissions.
/// @dev the ERC-165 identifier for this interface is 0x41369377
contract TokenProperties is Dummy, ERC165 {
@@ -216,10 +177,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 (Tuple15 memory) {
+ function collectionSponsor() public view returns (Tuple17 memory) {
require(false, stub_error);
dummy;
- return Tuple15(0x0000000000000000000000000000000000000000, 0);
+ return Tuple17(0x0000000000000000000000000000000000000000, 0);
}
/// Set limits for the collection.
@@ -398,10 +359,10 @@
/// If address is canonical then substrate mirror is zero and vice versa.
/// @dev EVM selector for this function is: 0xdf727d3b,
/// or in textual repr: collectionOwner()
- function collectionOwner() public view returns (Tuple15 memory) {
+ function collectionOwner() public view returns (Tuple17 memory) {
require(false, stub_error);
dummy;
- return Tuple15(0x0000000000000000000000000000000000000000, 0);
+ return Tuple17(0x0000000000000000000000000000000000000000, 0);
}
/// Changes collection owner to another account
@@ -418,11 +379,52 @@
}
/// @dev anonymous struct
-struct Tuple15 {
+struct Tuple17 {
address field_0;
uint256 field_1;
}
+/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
+contract ERC721Metadata is Dummy, ERC165 {
+ // /// @notice A descriptive name for a collection of NFTs in this contract
+ // /// @dev real implementation of this function lies in `ERC721UniqueExtensions`
+ // /// @dev EVM selector for this function is: 0x06fdde03,
+ // /// or in textual repr: name()
+ // function name() public view returns (string memory) {
+ // require(false, stub_error);
+ // dummy;
+ // return "";
+ // }
+
+ // /// @notice An abbreviated name for NFTs in this contract
+ // /// @dev real implementation of this function lies in `ERC721UniqueExtensions`
+ // /// @dev EVM selector for this function is: 0x95d89b41,
+ // /// or in textual repr: symbol()
+ // function symbol() public view returns (string memory) {
+ // require(false, stub_error);
+ // dummy;
+ // return "";
+ // }
+
+ /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
+ ///
+ /// @dev If the token has a `url` property and it is not empty, it is returned.
+ /// 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`.
+ /// If the collection property `baseURI` is empty or absent, return "" (empty string)
+ /// otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix
+ /// otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).
+ ///
+ /// @return token's const_metadata
+ /// @dev EVM selector for this function is: 0xc87b56dd,
+ /// or in textual repr: tokenURI(uint256)
+ function tokenURI(uint256 tokenId) public view returns (string memory) {
+ require(false, stub_error);
+ tokenId;
+ dummy;
+ return "";
+ }
+}
+
/// @title ERC721 Token that can be irreversibly burned (destroyed).
/// @dev the ERC-165 identifier for this interface is 0x42966c68
contract ERC721Burnable is Dummy, ERC165 {
@@ -502,8 +504,26 @@
}
/// @title Unique extensions for ERC721.
-/// @dev the ERC-165 identifier for this interface is 0x7c3bef89
+/// @dev the ERC-165 identifier for this interface is 0xef1eaacb
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,
+ /// or in textual repr: name()
+ function name() public view returns (string memory) {
+ require(false, stub_error);
+ dummy;
+ return "";
+ }
+
+ /// @notice An abbreviated name for NFTs in this contract
+ /// @dev EVM selector for this function is: 0x95d89b41,
+ /// or in textual repr: symbol()
+ function symbol() public view returns (string memory) {
+ require(false, stub_error);
+ dummy;
+ return "";
+ }
+
/// @notice Transfer ownership of an RFT
/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
/// is the zero address. Throws if `tokenId` is not a valid RFT.
@@ -780,7 +800,7 @@
ERC721UniqueExtensions,
ERC721Mintable,
ERC721Burnable,
+ ERC721Metadata,
Collection,
- TokenProperties,
- ERC721Metadata
+ TokenProperties
{}
tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -12,36 +12,6 @@
function supportsInterface(bytes4 interfaceID) external view returns (bool);
}
-/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
-/// @dev See https://eips.ethereum.org/EIPS/eip-721
-/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
-interface ERC721Metadata is Dummy, ERC165 {
- // /// @notice A descriptive name for a collection of NFTs in this contract
- // /// @dev real implementation of this function lies in `ERC721UniqueExtensions`
- // /// @dev EVM selector for this function is: 0x06fdde03,
- // /// or in textual repr: name()
- // function name() external view returns (string memory);
-
- // /// @notice An abbreviated name for NFTs in this contract
- // /// @dev real implementation of this function lies in `ERC721UniqueExtensions`
- // /// @dev EVM selector for this function is: 0x95d89b41,
- // /// or in textual repr: symbol()
- // function symbol() external view returns (string memory);
-
- /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
- ///
- /// @dev If the token has a `url` property and it is not empty, it is returned.
- /// 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`.
- /// If the collection property `baseURI` is empty or absent, return "" (empty string)
- /// otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix
- /// otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).
- ///
- /// @return token's const_metadata
- /// @dev EVM selector for this function is: 0xc87b56dd,
- /// or in textual repr: tokenURI(uint256)
- function tokenURI(uint256 tokenId) external view returns (string memory);
-}
-
/// @title A contract that allows to set and delete token properties and change token property permissions.
/// @dev the ERC-165 identifier for this interface is 0x41369377
interface TokenProperties is Dummy, ERC165 {
@@ -150,7 +120,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 (Tuple15 memory);
+ function collectionSponsor() external view returns (Tuple17 memory);
/// Set limits for the collection.
/// @dev Throws error if limit not found.
@@ -267,7 +237,7 @@
/// If address is canonical then substrate mirror is zero and vice versa.
/// @dev EVM selector for this function is: 0xdf727d3b,
/// or in textual repr: collectionOwner()
- function collectionOwner() external view returns (Tuple15 memory);
+ function collectionOwner() external view returns (Tuple17 memory);
/// Changes collection owner to another account
///
@@ -279,11 +249,41 @@
}
/// @dev anonymous struct
-struct Tuple15 {
+struct Tuple17 {
address field_0;
uint256 field_1;
}
+/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
+/// @dev See https://eips.ethereum.org/EIPS/eip-721
+/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
+interface ERC721Metadata is Dummy, ERC165 {
+ // /// @notice A descriptive name for a collection of NFTs in this contract
+ // /// @dev real implementation of this function lies in `ERC721UniqueExtensions`
+ // /// @dev EVM selector for this function is: 0x06fdde03,
+ // /// or in textual repr: name()
+ // function name() external view returns (string memory);
+
+ // /// @notice An abbreviated name for NFTs in this contract
+ // /// @dev real implementation of this function lies in `ERC721UniqueExtensions`
+ // /// @dev EVM selector for this function is: 0x95d89b41,
+ // /// or in textual repr: symbol()
+ // function symbol() external view returns (string memory);
+
+ /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
+ ///
+ /// @dev If the token has a `url` property and it is not empty, it is returned.
+ /// 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`.
+ /// If the collection property `baseURI` is empty or absent, return "" (empty string)
+ /// otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix
+ /// otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).
+ ///
+ /// @return token's const_metadata
+ /// @dev EVM selector for this function is: 0xc87b56dd,
+ /// or in textual repr: tokenURI(uint256)
+ function tokenURI(uint256 tokenId) external view returns (string memory);
+}
+
/// @title ERC721 Token that can be irreversibly burned (destroyed).
/// @dev the ERC-165 identifier for this interface is 0x42966c68
interface ERC721Burnable is Dummy, ERC165 {
@@ -523,7 +523,7 @@
ERC721UniqueExtensions,
ERC721Mintable,
ERC721Burnable,
+ ERC721Metadata,
Collection,
- TokenProperties,
- ERC721Metadata
+ TokenProperties
{}
tests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -12,32 +12,6 @@
function supportsInterface(bytes4 interfaceID) external view returns (bool);
}
-/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
-interface ERC721Metadata is Dummy, ERC165 {
- /// @notice A descriptive name for a collection of RFTs in this contract
- /// @dev EVM selector for this function is: 0x06fdde03,
- /// or in textual repr: name()
- function name() external view returns (string memory);
-
- /// @notice An abbreviated name for RFTs in this contract
- /// @dev EVM selector for this function is: 0x95d89b41,
- /// or in textual repr: symbol()
- function symbol() external view returns (string memory);
-
- /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
- ///
- /// @dev If the token has a `url` property and it is not empty, it is returned.
- /// 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`.
- /// If the collection property `baseURI` is empty or absent, return "" (empty string)
- /// otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix
- /// otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).
- ///
- /// @return token's const_metadata
- /// @dev EVM selector for this function is: 0xc87b56dd,
- /// or in textual repr: tokenURI(uint256)
- function tokenURI(uint256 tokenId) external view returns (string memory);
-}
-
/// @title A contract that allows to set and delete token properties and change token property permissions.
/// @dev the ERC-165 identifier for this interface is 0x41369377
interface TokenProperties is Dummy, ERC165 {
@@ -146,7 +120,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 (Tuple15 memory);
+ function collectionSponsor() external view returns (Tuple17 memory);
/// Set limits for the collection.
/// @dev Throws error if limit not found.
@@ -263,7 +237,7 @@
/// If address is canonical then substrate mirror is zero and vice versa.
/// @dev EVM selector for this function is: 0xdf727d3b,
/// or in textual repr: collectionOwner()
- function collectionOwner() external view returns (Tuple15 memory);
+ function collectionOwner() external view returns (Tuple17 memory);
/// Changes collection owner to another account
///
@@ -275,11 +249,39 @@
}
/// @dev anonymous struct
-struct Tuple15 {
+struct Tuple17 {
address field_0;
uint256 field_1;
}
+/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
+interface ERC721Metadata is Dummy, ERC165 {
+ // /// @notice A descriptive name for a collection of NFTs in this contract
+ // /// @dev real implementation of this function lies in `ERC721UniqueExtensions`
+ // /// @dev EVM selector for this function is: 0x06fdde03,
+ // /// or in textual repr: name()
+ // function name() external view returns (string memory);
+
+ // /// @notice An abbreviated name for NFTs in this contract
+ // /// @dev real implementation of this function lies in `ERC721UniqueExtensions`
+ // /// @dev EVM selector for this function is: 0x95d89b41,
+ // /// or in textual repr: symbol()
+ // function symbol() external view returns (string memory);
+
+ /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
+ ///
+ /// @dev If the token has a `url` property and it is not empty, it is returned.
+ /// 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`.
+ /// If the collection property `baseURI` is empty or absent, return "" (empty string)
+ /// otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix
+ /// otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).
+ ///
+ /// @return token's const_metadata
+ /// @dev EVM selector for this function is: 0xc87b56dd,
+ /// or in textual repr: tokenURI(uint256)
+ function tokenURI(uint256 tokenId) external view returns (string memory);
+}
+
/// @title ERC721 Token that can be irreversibly burned (destroyed).
/// @dev the ERC-165 identifier for this interface is 0x42966c68
interface ERC721Burnable is Dummy, ERC165 {
@@ -334,8 +336,18 @@
}
/// @title Unique extensions for ERC721.
-/// @dev the ERC-165 identifier for this interface is 0x7c3bef89
+/// @dev the ERC-165 identifier for this interface is 0xef1eaacb
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,
+ /// or in textual repr: name()
+ function name() external view returns (string memory);
+
+ /// @notice An abbreviated name for NFTs in this contract
+ /// @dev EVM selector for this function is: 0x95d89b41,
+ /// or in textual repr: symbol()
+ function symbol() external view returns (string memory);
+
/// @notice Transfer ownership of an RFT
/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
/// is the zero address. Throws if `tokenId` is not a valid RFT.
@@ -516,7 +528,7 @@
ERC721UniqueExtensions,
ERC721Mintable,
ERC721Burnable,
+ ERC721Metadata,
Collection,
- TokenProperties,
- ERC721Metadata
+ TokenProperties
{}
tests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/nonFungibleAbi.json
+++ b/tests/src/eth/nonFungibleAbi.json
@@ -154,7 +154,7 @@
{ "internalType": "address", "name": "field_0", "type": "address" },
{ "internalType": "uint256", "name": "field_1", "type": "uint256" }
],
- "internalType": "struct Tuple15",
+ "internalType": "struct Tuple17",
"name": "",
"type": "tuple"
}
@@ -178,7 +178,7 @@
{ "internalType": "address", "name": "field_0", "type": "address" },
{ "internalType": "uint256", "name": "field_1", "type": "uint256" }
],
- "internalType": "struct Tuple15",
+ "internalType": "struct Tuple17",
"name": "",
"type": "tuple"
}
tests/src/eth/reFungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/reFungibleAbi.json
+++ b/tests/src/eth/reFungibleAbi.json
@@ -154,7 +154,7 @@
{ "internalType": "address", "name": "field_0", "type": "address" },
{ "internalType": "uint256", "name": "field_1", "type": "uint256" }
],
- "internalType": "struct Tuple15",
+ "internalType": "struct Tuple17",
"name": "",
"type": "tuple"
}
@@ -178,7 +178,7 @@
{ "internalType": "address", "name": "field_0", "type": "address" },
{ "internalType": "uint256", "name": "field_1", "type": "uint256" }
],
- "internalType": "struct Tuple15",
+ "internalType": "struct Tuple17",
"name": "",
"type": "tuple"
}