git.delta.rocks / unique-network / refs/commits / 41b5a1d1099f

difftreelog

source

tests/src/eth/api/UniqueFungible.sol13.2 KiBsourcehistory
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56<<<<<<< HEAD7/// @dev common stubs holder8=======9// Anonymous struct10struct Tuple0 {11	address field_0;12	uint256 field_1;13}1415// Common stubs holder16>>>>>>> misk: Update stubs17interface Dummy {1819}2021interface ERC165 is Dummy {22	function supportsInterface(bytes4 interfaceID) external view returns (bool);23}2425<<<<<<< HEAD26/// @title A contract that allows you to work with collections.27/// @dev the ERC-165 identifier for this interface is 0xffe4da2328=======29// Inline30interface ERC20Events {31	event Transfer(address indexed from, address indexed to, uint256 value);32	event Approval(33		address indexed owner,34		address indexed spender,35		uint256 value36	);37}3839<<<<<<< HEAD40// Selector: 79cc679041interface ERC20UniqueExtensions is Dummy, ERC165 {42	// Selector: burnFrom(address,uint256) 79cc679043	function burnFrom(address from, uint256 amount) external returns (bool);44}4546// Selector: 942e8b2247interface ERC20 is Dummy, ERC165, ERC20Events {48	// Selector: name() 06fdde0349	function name() external view returns (string memory);5051	// Selector: symbol() 95d89b4152	function symbol() external view returns (string memory);5354	// Selector: totalSupply() 18160ddd55	function totalSupply() external view returns (uint256);5657	// Selector: decimals() 313ce56758	function decimals() external view returns (uint8);5960	// Selector: balanceOf(address) 70a0823161	function balanceOf(address owner) external view returns (uint256);6263	// Selector: transfer(address,uint256) a9059cbb64	function transfer(address to, uint256 amount) external returns (bool);6566	// Selector: transferFrom(address,address,uint256) 23b872dd67	function transferFrom(68		address from,69		address to,70		uint256 amount71	) external returns (bool);7273	// Selector: approve(address,uint256) 095ea7b374	function approve(address spender, uint256 amount) external returns (bool);7576	// Selector: allowance(address,address) dd62ed3e77	function allowance(address owner, address spender)78		external79		view80		returns (uint256);81}8283// Selector: ffe4da2384=======85// Selector: 765e2fae86>>>>>>> misk: Update stubs87>>>>>>> misk: Update stubs88interface Collection is Dummy, ERC165 {89	/// Set collection property.90	///91	/// @param key Property key.92	/// @param value Propery value.93	/// @dev EVM selector for this function is: 0x2f073f66,94	///  or in textual repr: setCollectionProperty(string,bytes)95	function setCollectionProperty(string memory key, bytes memory value)96		external;9798	/// Delete collection property.99	///100	/// @param key Property key.101	/// @dev EVM selector for this function is: 0x7b7debce,102	///  or in textual repr: deleteCollectionProperty(string)103	function deleteCollectionProperty(string memory key) external;104105	/// Get collection property.106	///107	/// @dev Throws error if key not found.108	///109	/// @param key Property key.110	/// @return bytes The property corresponding to the key.111	/// @dev EVM selector for this function is: 0xcf24fd6d,112	///  or in textual repr: collectionProperty(string)113	function collectionProperty(string memory key)114		external115		view116		returns (bytes memory);117118	/// Set the sponsor of the collection.119	///120	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.121	///122	/// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.123	/// @dev EVM selector for this function is: 0x7623402e,124	///  or in textual repr: setCollectionSponsor(address)125	function setCollectionSponsor(address sponsor) external;126127<<<<<<< HEAD128	/// Collection sponsorship confirmation.129	///130	/// @dev After setting the sponsor for the collection, it must be confirmed with this function.131	/// @dev EVM selector for this function is: 0x3c50e97a,132	///  or in textual repr: confirmCollectionSponsorship()133	function confirmCollectionSponsorship() external;134135	/// Set limits for the collection.136	/// @dev Throws error if limit not found.137	/// @param limit Name of the limit. Valid names:138	/// 	"accountTokenOwnershipLimit",139	/// 	"sponsoredDataSize",140	/// 	"sponsoredDataRateLimit",141	/// 	"tokenLimit",142	/// 	"sponsorTransferTimeout",143	/// 	"sponsorApproveTimeout"144	/// @param value Value of the limit.145	/// @dev EVM selector for this function is: 0x6a3841db,146	///  or in textual repr: setCollectionLimit(string,uint32)147=======148	// Set the substrate sponsor of the collection.149	//150	// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.151	//152	// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.153	//154	// Selector: setCollectionSponsorSubstrate(uint256) c74d6751155	function setCollectionSponsorSubstrate(uint256 sponsor) external;156157	// Selector: hasCollectionPendingSponsor() 058ac185158	function hasCollectionPendingSponsor() external view returns (bool);159160	// Collection sponsorship confirmation.161	//162	// @dev After setting the sponsor for the collection, it must be confirmed with this function.163	//164	// Selector: confirmCollectionSponsorship() 3c50e97a165	function confirmCollectionSponsorship() external;166167	// Remove collection sponsor.168	//169	// Selector: removeCollectionSponsor() 6e0326a3170	function removeCollectionSponsor() external;171172	// Get current sponsor.173	//174	// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.175	//176	// Selector: getCollectionSponsor() b66bbc14177	function getCollectionSponsor() external view returns (Tuple0 memory);178179	// Set limits for the collection.180	// @dev Throws error if limit not found.181	// @param limit Name of the limit. Valid names:182	// 	"accountTokenOwnershipLimit",183	// 	"sponsoredDataSize",184	// 	"sponsoredDataRateLimit",185	// 	"tokenLimit",186	// 	"sponsorTransferTimeout",187	// 	"sponsorApproveTimeout"188	// @param value Value of the limit.189	//190	// Selector: setCollectionLimit(string,uint32) 6a3841db191>>>>>>> misk: Update stubs192	function setCollectionLimit(string memory limit, uint32 value) external;193194	/// Set limits for the collection.195	/// @dev Throws error if limit not found.196	/// @param limit Name of the limit. Valid names:197	/// 	"ownerCanTransfer",198	/// 	"ownerCanDestroy",199	/// 	"transfersEnabled"200	/// @param value Value of the limit.201	/// @dev EVM selector for this function is: 0x993b7fba,202	///  or in textual repr: setCollectionLimit(string,bool)203	function setCollectionLimit(string memory limit, bool value) external;204205	/// Get contract address.206	/// @dev EVM selector for this function is: 0xf6b4dfb4,207	///  or in textual repr: contractAddress()208	function contractAddress() external view returns (address);209210	/// Add collection admin by substrate address.211	/// @param newAdmin Substrate administrator address.212	/// @dev EVM selector for this function is: 0x5730062b,213	///  or in textual repr: addCollectionAdminSubstrate(uint256)214	function addCollectionAdminSubstrate(uint256 newAdmin) external;215216	/// Remove collection admin by substrate address.217	/// @param admin Substrate administrator address.218	/// @dev EVM selector for this function is: 0x4048fcf9,219	///  or in textual repr: removeCollectionAdminSubstrate(uint256)220	function removeCollectionAdminSubstrate(uint256 admin) external;221222	/// Add collection admin.223	/// @param newAdmin Address of the added administrator.224	/// @dev EVM selector for this function is: 0x92e462c7,225	///  or in textual repr: addCollectionAdmin(address)226	function addCollectionAdmin(address newAdmin) external;227228	/// Remove collection admin.229	///230	/// @param admin Address of the removed administrator.231	/// @dev EVM selector for this function is: 0xfafd7b42,232	///  or in textual repr: removeCollectionAdmin(address)233	function removeCollectionAdmin(address admin) external;234235	/// Toggle accessibility of collection nesting.236	///237	/// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'238	/// @dev EVM selector for this function is: 0x112d4586,239	///  or in textual repr: setCollectionNesting(bool)240	function setCollectionNesting(bool enable) external;241242	/// Toggle accessibility of collection nesting.243	///244	/// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'245	/// @param collections Addresses of collections that will be available for nesting.246	/// @dev EVM selector for this function is: 0x64872396,247	///  or in textual repr: setCollectionNesting(bool,address[])248	function setCollectionNesting(bool enable, address[] memory collections)249		external;250251	/// Set the collection access method.252	/// @param mode Access mode253	/// 	0 for Normal254	/// 	1 for AllowList255	/// @dev EVM selector for this function is: 0x41835d4c,256	///  or in textual repr: setCollectionAccess(uint8)257	function setCollectionAccess(uint8 mode) external;258259	/// Add the user to the allowed list.260	///261	/// @param user Address of a trusted user.262	/// @dev EVM selector for this function is: 0x67844fe6,263	///  or in textual repr: addToCollectionAllowList(address)264	function addToCollectionAllowList(address user) external;265266	/// Remove the user from the allowed list.267	///268	/// @param user Address of a removed user.269	/// @dev EVM selector for this function is: 0x85c51acb,270	///  or in textual repr: removeFromCollectionAllowList(address)271	function removeFromCollectionAllowList(address user) external;272273	/// Switch permission for minting.274	///275	/// @param mode Enable if "true".276	/// @dev EVM selector for this function is: 0x00018e84,277	///  or in textual repr: setCollectionMintMode(bool)278	function setCollectionMintMode(bool mode) external;279280	/// Check that account is the owner or admin of the collection281	///282	/// @param user account to verify283	/// @return "true" if account is the owner or admin284	/// @dev EVM selector for this function is: 0x9811b0c7,285	///  or in textual repr: isOwnerOrAdmin(address)286	function isOwnerOrAdmin(address user) external view returns (bool);287288	/// Check that substrate account is the owner or admin of the collection289	///290	/// @param user account to verify291	/// @return "true" if account is the owner or admin292	/// @dev EVM selector for this function is: 0x68910e00,293	///  or in textual repr: isOwnerOrAdminSubstrate(uint256)294	function isOwnerOrAdminSubstrate(uint256 user) external view returns (bool);295296	/// Returns collection type297	///298	/// @return `Fungible` or `NFT` or `ReFungible`299	/// @dev EVM selector for this function is: 0xd34b55b8,300	///  or in textual repr: uniqueCollectionType()301	function uniqueCollectionType() external returns (string memory);302303	/// Changes collection owner to another account304	///305	/// @dev Owner can be changed only by current owner306	/// @param newOwner new owner account307	/// @dev EVM selector for this function is: 0x13af4035,308	///  or in textual repr: setOwner(address)309	function setOwner(address newOwner) external;310311	/// Changes collection owner to another substrate account312	///313	/// @dev Owner can be changed only by current owner314	/// @param newOwner new owner substrate account315	/// @dev EVM selector for this function is: 0xb212138f,316	///  or in textual repr: setOwnerSubstrate(uint256)317	function setOwnerSubstrate(uint256 newOwner) external;318}319320/// @dev the ERC-165 identifier for this interface is 0x79cc6790321interface ERC20UniqueExtensions is Dummy, ERC165 {322	/// @dev EVM selector for this function is: 0x79cc6790,323	///  or in textual repr: burnFrom(address,uint256)324	function burnFrom(address from, uint256 amount) external returns (bool);325}326327/// @dev inlined interface328interface ERC20Events {329	event Transfer(address indexed from, address indexed to, uint256 value);330	event Approval(331		address indexed owner,332		address indexed spender,333		uint256 value334	);335}336337/// @dev the ERC-165 identifier for this interface is 0x942e8b22338interface ERC20 is Dummy, ERC165, ERC20Events {339	/// @dev EVM selector for this function is: 0x06fdde03,340	///  or in textual repr: name()341	function name() external view returns (string memory);342343	/// @dev EVM selector for this function is: 0x95d89b41,344	///  or in textual repr: symbol()345	function symbol() external view returns (string memory);346347	/// @dev EVM selector for this function is: 0x18160ddd,348	///  or in textual repr: totalSupply()349	function totalSupply() external view returns (uint256);350351	/// @dev EVM selector for this function is: 0x313ce567,352	///  or in textual repr: decimals()353	function decimals() external view returns (uint8);354355	/// @dev EVM selector for this function is: 0x70a08231,356	///  or in textual repr: balanceOf(address)357	function balanceOf(address owner) external view returns (uint256);358359	/// @dev EVM selector for this function is: 0xa9059cbb,360	///  or in textual repr: transfer(address,uint256)361	function transfer(address to, uint256 amount) external returns (bool);362363	/// @dev EVM selector for this function is: 0x23b872dd,364	///  or in textual repr: transferFrom(address,address,uint256)365	function transferFrom(366		address from,367		address to,368		uint256 amount369	) external returns (bool);370371	/// @dev EVM selector for this function is: 0x095ea7b3,372	///  or in textual repr: approve(address,uint256)373	function approve(address spender, uint256 amount) external returns (bool);374375	/// @dev EVM selector for this function is: 0xdd62ed3e,376	///  or in textual repr: allowance(address,address)377	function allowance(address owner, address spender)378		external379		view380		returns (uint256);381}382383interface UniqueFungible is384	Dummy,385	ERC165,386	ERC20,387	ERC20UniqueExtensions,388	Collection389{}