git.delta.rocks / unique-network / refs/commits / 6a7d5b108992

difftreelog

source

pallets/refungible/src/stubs/UniqueRefungible.sol19.5 KiBsourcehistory
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56// Anonymous struct7struct Tuple0 {8	uint256 field_0;9	string field_1;10}1112// Common stubs holder13contract Dummy {14	uint8 dummy;15	string stub_error = "this contract is implemented in native";16}1718contract ERC165 is Dummy {19	function supportsInterface(bytes4 interfaceID)20		external21		view22		returns (bool)23	{24		require(false, stub_error);25		interfaceID;26		return true;27	}28}2930// Inline31contract ERC721Events {32	event Transfer(33		address indexed from,34		address indexed to,35		uint256 indexed tokenId36	);37	event Approval(38		address indexed owner,39		address indexed approved,40		uint256 indexed tokenId41	);42	event ApprovalForAll(43		address indexed owner,44		address indexed operator,45		bool approved46	);47}4849// Inline50contract ERC721MintableEvents {51	event MintingFinished();52}5354// Selector: 4136937755contract TokenProperties is Dummy, ERC165 {56	// @notice Set permissions for token property.57	// @dev Throws error if `msg.sender` is not admin or owner of the collection.58	// @param key Property key.59	// @param is_mutable Permission to mutate property.60	// @param collection_admin Permission to mutate property by collection admin if property is mutable.61	// @param token_owner Permission to mutate property by token owner if property is mutable.62	//63	// Selector: setTokenPropertyPermission(string,bool,bool,bool) 222d97fa64	function setTokenPropertyPermission(65		string memory key,66		bool isMutable,67		bool collectionAdmin,68		bool tokenOwner69	) public {70		require(false, stub_error);71		key;72		isMutable;73		collectionAdmin;74		tokenOwner;75		dummy = 0;76	}7778	// @notice Set token property value.79	// @dev Throws error if `msg.sender` has no permission to edit the property.80	// @param tokenId ID of the token.81	// @param key Property key.82	// @param value Property value.83	//84	// Selector: setProperty(uint256,string,bytes) 1752d67b85	function setProperty(86		uint256 tokenId,87		string memory key,88		bytes memory value89	) public {90		require(false, stub_error);91		tokenId;92		key;93		value;94		dummy = 0;95	}9697	// @notice Delete token property value.98	// @dev Throws error if `msg.sender` has no permission to edit the property.99	// @param tokenId ID of the token.100	// @param key Property key.101	//102	// Selector: deleteProperty(uint256,string) 066111d1103	function deleteProperty(uint256 tokenId, string memory key) public {104		require(false, stub_error);105		tokenId;106		key;107		dummy = 0;108	}109110	// @notice Get token property value.111	// @dev Throws error if key not found112	// @param tokenId ID of the token.113	// @param key Property key.114	// @return Property value bytes115	//116	// Selector: property(uint256,string) 7228c327117	function property(uint256 tokenId, string memory key)118		public119		view120		returns (bytes memory)121	{122		require(false, stub_error);123		tokenId;124		key;125		dummy;126		return hex"";127	}128}129130// Selector: 42966c68131contract ERC721Burnable is Dummy, ERC165 {132	// @notice Burns a specific ERC721 token.133	// @dev Throws unless `msg.sender` is the current RFT owner, or an authorized134	//  operator of the current owner.135	// @param tokenId The RFT to approve136	//137	// Selector: burn(uint256) 42966c68138	function burn(uint256 tokenId) public {139		require(false, stub_error);140		tokenId;141		dummy = 0;142	}143}144145// Selector: 58800161146contract ERC721 is Dummy, ERC165, ERC721Events {147	// @notice Count all RFTs assigned to an owner148	// @dev RFTs assigned to the zero address are considered invalid, and this149	//  function throws for queries about the zero address.150	// @param owner An address for whom to query the balance151	// @return The number of RFTs owned by `owner`, possibly zero152	//153	// Selector: balanceOf(address) 70a08231154	function balanceOf(address owner) public view returns (uint256) {155		require(false, stub_error);156		owner;157		dummy;158		return 0;159	}160161	// @notice Find the owner of an RFT162	// @dev RFTs assigned to zero address are considered invalid, and queries163	//  about them do throw.164	//  Returns special 0xffffffffffffffffffffffffffffffffffffffff address for165	//  the tokens that are partially owned.166	// @param tokenId The identifier for an RFT167	// @return The address of the owner of the RFT168	//169	// Selector: ownerOf(uint256) 6352211e170	function ownerOf(uint256 tokenId) public view returns (address) {171		require(false, stub_error);172		tokenId;173		dummy;174		return 0x0000000000000000000000000000000000000000;175	}176177	// @dev Not implemented178	//179	// Selector: safeTransferFromWithData(address,address,uint256,bytes) 60a11672180	function safeTransferFromWithData(181		address from,182		address to,183		uint256 tokenId,184		bytes memory data185	) public {186		require(false, stub_error);187		from;188		to;189		tokenId;190		data;191		dummy = 0;192	}193194	// @dev Not implemented195	//196	// Selector: safeTransferFrom(address,address,uint256) 42842e0e197	function safeTransferFrom(198		address from,199		address to,200		uint256 tokenId201	) public {202		require(false, stub_error);203		from;204		to;205		tokenId;206		dummy = 0;207	}208209	// @notice Transfer ownership of an RFT -- THE CALLER IS RESPONSIBLE210	//  TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE211	//  THEY MAY BE PERMANENTLY LOST212	// @dev Throws unless `msg.sender` is the current owner or an authorized213	//  operator for this RFT. Throws if `from` is not the current owner. Throws214	//  if `to` is the zero address. Throws if `tokenId` is not a valid RFT.215	//  Throws if RFT pieces have multiple owners.216	// @param from The current owner of the NFT217	// @param to The new owner218	// @param tokenId The NFT to transfer219	// @param _value Not used for an NFT220	//221	// Selector: transferFrom(address,address,uint256) 23b872dd222	function transferFrom(223		address from,224		address to,225		uint256 tokenId226	) public {227		require(false, stub_error);228		from;229		to;230		tokenId;231		dummy = 0;232	}233234	// @dev Not implemented235	//236	// Selector: approve(address,uint256) 095ea7b3237	function approve(address approved, uint256 tokenId) public {238		require(false, stub_error);239		approved;240		tokenId;241		dummy = 0;242	}243244	// @dev Not implemented245	//246	// Selector: setApprovalForAll(address,bool) a22cb465247	function setApprovalForAll(address operator, bool approved) public {248		require(false, stub_error);249		operator;250		approved;251		dummy = 0;252	}253254	// @dev Not implemented255	//256	// Selector: getApproved(uint256) 081812fc257	function getApproved(uint256 tokenId) public view returns (address) {258		require(false, stub_error);259		tokenId;260		dummy;261		return 0x0000000000000000000000000000000000000000;262	}263264	// @dev Not implemented265	//266	// Selector: isApprovedForAll(address,address) e985e9c5267	function isApprovedForAll(address owner, address operator)268		public269		view270		returns (address)271	{272		require(false, stub_error);273		owner;274		operator;275		dummy;276		return 0x0000000000000000000000000000000000000000;277	}278}279280// Selector: 5b5e139f281contract ERC721Metadata is Dummy, ERC165 {282	// @notice A descriptive name for a collection of RFTs in this contract283	//284	// Selector: name() 06fdde03285	function name() public view returns (string memory) {286		require(false, stub_error);287		dummy;288		return "";289	}290291	// @notice An abbreviated name for RFTs in this contract292	//293	// Selector: symbol() 95d89b41294	function symbol() public view returns (string memory) {295		require(false, stub_error);296		dummy;297		return "";298	}299300	// @notice A distinct Uniform Resource Identifier (URI) for a given asset.301	//302	// @dev If the token has a `url` property and it is not empty, it is returned.303	//  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`.304	//  If the collection property `baseURI` is empty or absent, return "" (empty string)305	//  otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix306	//  otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).307	//308	// @return token's const_metadata309	//310	// Selector: tokenURI(uint256) c87b56dd311	function tokenURI(uint256 tokenId) public view returns (string memory) {312		require(false, stub_error);313		tokenId;314		dummy;315		return "";316	}317}318319// Selector: 68ccfe89320contract ERC721Mintable is Dummy, ERC165, ERC721MintableEvents {321	// Selector: mintingFinished() 05d2035b322	function mintingFinished() public view returns (bool) {323		require(false, stub_error);324		dummy;325		return false;326	}327328	// @notice Function to mint token.329	// @dev `tokenId` should be obtained with `nextTokenId` method,330	//  unlike standard, you can't specify it manually331	// @param to The new owner332	// @param tokenId ID of the minted RFT333	//334	// Selector: mint(address,uint256) 40c10f19335	function mint(address to, uint256 tokenId) public returns (bool) {336		require(false, stub_error);337		to;338		tokenId;339		dummy = 0;340		return false;341	}342343	// @notice Function to mint token with the given tokenUri.344	// @dev `tokenId` should be obtained with `nextTokenId` method,345	//  unlike standard, you can't specify it manually346	// @param to The new owner347	// @param tokenId ID of the minted RFT348	// @param tokenUri Token URI that would be stored in the RFT properties349	//350	// Selector: mintWithTokenURI(address,uint256,string) 50bb4e7f351	function mintWithTokenURI(352		address to,353		uint256 tokenId,354		string memory tokenUri355	) public returns (bool) {356		require(false, stub_error);357		to;358		tokenId;359		tokenUri;360		dummy = 0;361		return false;362	}363364	// @dev Not implemented365	//366	// Selector: finishMinting() 7d64bcb4367	function finishMinting() public returns (bool) {368		require(false, stub_error);369		dummy = 0;370		return false;371	}372}373374// Selector: 6cf113cd375contract Collection is Dummy, ERC165 {376	// Set collection property.377	//378	// @param key Property key.379	// @param value Propery value.380	//381	// Selector: setCollectionProperty(string,bytes) 2f073f66382	function setCollectionProperty(string memory key, bytes memory value)383		public384	{385		require(false, stub_error);386		key;387		value;388		dummy = 0;389	}390391	// Delete collection property.392	//393	// @param key Property key.394	//395	// Selector: deleteCollectionProperty(string) 7b7debce396	function deleteCollectionProperty(string memory key) public {397		require(false, stub_error);398		key;399		dummy = 0;400	}401402	// Get collection property.403	//404	// @dev Throws error if key not found.405	//406	// @param key Property key.407	// @return bytes The property corresponding to the key.408	//409	// Selector: collectionProperty(string) cf24fd6d410	function collectionProperty(string memory key)411		public412		view413		returns (bytes memory)414	{415		require(false, stub_error);416		key;417		dummy;418		return hex"";419	}420421	// Set the sponsor of the collection.422	//423	// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.424	//425	// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.426	//427	// Selector: setCollectionSponsor(address) 7623402e428	function setCollectionSponsor(address sponsor) public {429		require(false, stub_error);430		sponsor;431		dummy = 0;432	}433434	// Collection sponsorship confirmation.435	//436	// @dev After setting the sponsor for the collection, it must be confirmed with this function.437	//438	// Selector: confirmCollectionSponsorship() 3c50e97a439	function confirmCollectionSponsorship() public {440		require(false, stub_error);441		dummy = 0;442	}443444	// Set limits for the collection.445	// @dev Throws error if limit not found.446	// @param limit Name of the limit. Valid names:447	// 	"accountTokenOwnershipLimit",448	// 	"sponsoredDataSize",449	// 	"sponsoredDataRateLimit",450	// 	"tokenLimit",451	// 	"sponsorTransferTimeout",452	// 	"sponsorApproveTimeout"453	// @param value Value of the limit.454	//455	// Selector: setCollectionLimit(string,uint32) 6a3841db456	function setCollectionLimit(string memory limit, uint32 value) public {457		require(false, stub_error);458		limit;459		value;460		dummy = 0;461	}462463	// Set limits for the collection.464	// @dev Throws error if limit not found.465	// @param limit Name of the limit. Valid names:466	// 	"ownerCanTransfer",467	// 	"ownerCanDestroy",468	// 	"transfersEnabled"469	// @param value Value of the limit.470	//471	// Selector: setCollectionLimit(string,bool) 993b7fba472	function setCollectionLimit(string memory limit, bool value) public {473		require(false, stub_error);474		limit;475		value;476		dummy = 0;477	}478479	// Get contract address.480	//481	// Selector: contractAddress() f6b4dfb4482	function contractAddress() public view returns (address) {483		require(false, stub_error);484		dummy;485		return 0x0000000000000000000000000000000000000000;486	}487488	// Add collection admin by substrate address.489	// @param new_admin Substrate administrator address.490	//491	// Selector: addCollectionAdminSubstrate(uint256) 5730062b492	function addCollectionAdminSubstrate(uint256 newAdmin) public {493		require(false, stub_error);494		newAdmin;495		dummy = 0;496	}497498	// Remove collection admin by substrate address.499	// @param admin Substrate administrator address.500	//501	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9502	function removeCollectionAdminSubstrate(uint256 admin) public {503		require(false, stub_error);504		admin;505		dummy = 0;506	}507508	// Add collection admin.509	// @param new_admin Address of the added administrator.510	//511	// Selector: addCollectionAdmin(address) 92e462c7512	function addCollectionAdmin(address newAdmin) public {513		require(false, stub_error);514		newAdmin;515		dummy = 0;516	}517518	// Remove collection admin.519	//520	// @param new_admin Address of the removed administrator.521	//522	// Selector: removeCollectionAdmin(address) fafd7b42523	function removeCollectionAdmin(address admin) public {524		require(false, stub_error);525		admin;526		dummy = 0;527	}528529	// Toggle accessibility of collection nesting.530	//531	// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'532	//533	// Selector: setCollectionNesting(bool) 112d4586534	function setCollectionNesting(bool enable) public {535		require(false, stub_error);536		enable;537		dummy = 0;538	}539540	// Toggle accessibility of collection nesting.541	//542	// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'543	// @param collections Addresses of collections that will be available for nesting.544	//545	// Selector: setCollectionNesting(bool,address[]) 64872396546	function setCollectionNesting(bool enable, address[] memory collections)547		public548	{549		require(false, stub_error);550		enable;551		collections;552		dummy = 0;553	}554555	// Set the collection access method.556	// @param mode Access mode557	// 	0 for Normal558	// 	1 for AllowList559	//560	// Selector: setCollectionAccess(uint8) 41835d4c561	function setCollectionAccess(uint8 mode) public {562		require(false, stub_error);563		mode;564		dummy = 0;565	}566567	// Add the user to the allowed list.568	//569	// @param user Address of a trusted user.570	//571	// Selector: addToCollectionAllowList(address) 67844fe6572	function addToCollectionAllowList(address user) public {573		require(false, stub_error);574		user;575		dummy = 0;576	}577578	// Remove the user from the allowed list.579	//580	// @param user Address of a removed user.581	//582	// Selector: removeFromCollectionAllowList(address) 85c51acb583	function removeFromCollectionAllowList(address user) public {584		require(false, stub_error);585		user;586		dummy = 0;587	}588589	// Switch permission for minting.590	//591	// @param mode Enable if "true".592	//593	// Selector: setCollectionMintMode(bool) 00018e84594	function setCollectionMintMode(bool mode) public {595		require(false, stub_error);596		mode;597		dummy = 0;598	}599600	// Check that account is the owner or admin of the collection601	//602	// @param user account to verify603	// @return "true" if account is the owner or admin604	//605	// Selector: verifyOwnerOrAdmin(address) c2282493606	function verifyOwnerOrAdmin(address user) public view returns (bool) {607		require(false, stub_error);608		user;609		dummy;610		return false;611	}612613	// Returns collection type614	//615	// @return `Fungible` or `NFT` or `ReFungible`616	//617	// Selector: uniqueCollectionType() d34b55b8618	function uniqueCollectionType() public returns (string memory) {619		require(false, stub_error);620		dummy = 0;621		return "";622	}623}624625// Selector: 780e9d63626contract ERC721Enumerable is Dummy, ERC165 {627	// @notice Enumerate valid RFTs628	// @param index A counter less than `totalSupply()`629	// @return The token identifier for the `index`th NFT,630	//  (sort order not specified)631	//632	// Selector: tokenByIndex(uint256) 4f6ccce7633	function tokenByIndex(uint256 index) public view returns (uint256) {634		require(false, stub_error);635		index;636		dummy;637		return 0;638	}639640	// Not implemented641	//642	// Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59643	function tokenOfOwnerByIndex(address owner, uint256 index)644		public645		view646		returns (uint256)647	{648		require(false, stub_error);649		owner;650		index;651		dummy;652		return 0;653	}654655	// @notice Count RFTs tracked by this contract656	// @return A count of valid RFTs tracked by this contract, where each one of657	//  them has an assigned and queryable owner not equal to the zero address658	//659	// Selector: totalSupply() 18160ddd660	function totalSupply() public view returns (uint256) {661		require(false, stub_error);662		dummy;663		return 0;664	}665}666667// Selector: 7c3bef89668contract ERC721UniqueExtensions is Dummy, ERC165 {669	// @notice Transfer ownership of an RFT670	// @dev Throws unless `msg.sender` is the current owner. Throws if `to`671	//  is the zero address. Throws if `tokenId` is not a valid RFT.672	//  Throws if RFT pieces have multiple owners.673	// @param to The new owner674	// @param tokenId The RFT to transfer675	// @param _value Not used for an RFT676	//677	// Selector: transfer(address,uint256) a9059cbb678	function transfer(address to, uint256 tokenId) public {679		require(false, stub_error);680		to;681		tokenId;682		dummy = 0;683	}684685	// @notice Burns a specific ERC721 token.686	// @dev Throws unless `msg.sender` is the current owner or an authorized687	//  operator for this RFT. Throws if `from` is not the current owner. Throws688	//  if `to` is the zero address. Throws if `tokenId` is not a valid RFT.689	//  Throws if RFT pieces have multiple owners.690	// @param from The current owner of the RFT691	// @param tokenId The RFT to transfer692	// @param _value Not used for an RFT693	//694	// Selector: burnFrom(address,uint256) 79cc6790695	function burnFrom(address from, uint256 tokenId) public {696		require(false, stub_error);697		from;698		tokenId;699		dummy = 0;700	}701702	// @notice Returns next free RFT ID.703	//704	// Selector: nextTokenId() 75794a3c705	function nextTokenId() public view returns (uint256) {706		require(false, stub_error);707		dummy;708		return 0;709	}710711	// @notice Function to mint multiple tokens.712	// @dev `tokenIds` should be an array of consecutive numbers and first number713	//  should be obtained with `nextTokenId` method714	// @param to The new owner715	// @param tokenIds IDs of the minted RFTs716	//717	// Selector: mintBulk(address,uint256[]) 44a9945e718	function mintBulk(address to, uint256[] memory tokenIds)719		public720		returns (bool)721	{722		require(false, stub_error);723		to;724		tokenIds;725		dummy = 0;726		return false;727	}728729	// @notice Function to mint multiple tokens with the given tokenUris.730	// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive731	//  numbers and first number should be obtained with `nextTokenId` method732	// @param to The new owner733	// @param tokens array of pairs of token ID and token URI for minted tokens734	//735	// Selector: mintBulkWithTokenURI(address,(uint256,string)[]) 36543006736	function mintBulkWithTokenURI(address to, Tuple0[] memory tokens)737		public738		returns (bool)739	{740		require(false, stub_error);741		to;742		tokens;743		dummy = 0;744		return false;745	}746747	// Returns EVM address for refungible token748	//749	// @param token ID of the token750	//751	// Selector: tokenContractAddress(uint256) ab76fac6752	function tokenContractAddress(uint256 token) public view returns (address) {753		require(false, stub_error);754		token;755		dummy;756		return 0x0000000000000000000000000000000000000000;757	}758}759760contract UniqueRefungible is761	Dummy,762	ERC165,763	ERC721,764	ERC721Metadata,765	ERC721Enumerable,766	ERC721UniqueExtensions,767	ERC721Mintable,768	ERC721Burnable,769	Collection,770	TokenProperties771{}