git.delta.rocks / unique-network / refs/commits / 0a5eeb039c86

difftreelog

source

tests/src/eth/api/UniqueFungible.sol11.0 KiBsourcehistory
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56// Anonymous struct7struct Tuple0 {8	address field_0;9	uint256 field_1;10}1112// Common stubs holder13interface Dummy {1415}1617interface ERC165 is Dummy {18	function supportsInterface(bytes4 interfaceID) external view returns (bool);19}2021// Inline22interface ERC20Events {23	event Transfer(address indexed from, address indexed to, uint256 value);24	event Approval(25		address indexed owner,26		address indexed spender,27		uint256 value28	);29}3031// Selector: 40c10f1932interface ERC20Mintable is Dummy, ERC165 {33	// Selector: mint(address,uint256) 40c10f1934	function mint(address to, uint256 amount) external returns (bool);35}3637// Selector: 63034ac538interface ERC20UniqueExtensions is Dummy, ERC165 {39	// Selector: burnFrom(address,uint256) 79cc679040	function burnFrom(address from, uint256 amount) external returns (bool);4142	// Selector: mintBulk((address,uint256)[]) 1acf2d5543	function mintBulk(Tuple0[] memory amounts) external returns (bool);44}4546// Selector: 6cf113cd47interface Collection is Dummy, ERC165 {48	/// Set collection property.49	///50	/// @param key Property key.51	/// @param value Propery value.52	/// @dev EVM selector for this function is: 0x2f073f66,53	///  or in textual repr: setCollectionProperty(string,bytes)54	function setCollectionProperty(string memory key, bytes memory value)55		external;5657	/// Delete collection property.58	///59	/// @param key Property key.60	/// @dev EVM selector for this function is: 0x7b7debce,61	///  or in textual repr: deleteCollectionProperty(string)62	function deleteCollectionProperty(string memory key) external;6364	/// Get collection property.65	///66	/// @dev Throws error if key not found.67	///68	/// @param key Property key.69	/// @return bytes The property corresponding to the key.70	/// @dev EVM selector for this function is: 0xcf24fd6d,71	///  or in textual repr: collectionProperty(string)72	function collectionProperty(string memory key)73		external74		view75		returns (bytes memory);7677	/// Set the sponsor of the collection.78	///79	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.80	///81	/// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.82	/// @dev EVM selector for this function is: 0x7623402e,83	///  or in textual repr: setCollectionSponsor(address)84	function setCollectionSponsor(address sponsor) external;8586	/// Set the substrate sponsor of the collection.87	///88	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.89	///90	/// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.91	/// @dev EVM selector for this function is: 0xc74d6751,92	///  or in textual repr: setCollectionSponsorSubstrate(uint256)93	function setCollectionSponsorSubstrate(uint256 sponsor) external;9495	/// @dev EVM selector for this function is: 0x058ac185,96	///  or in textual repr: hasCollectionPendingSponsor()97	function hasCollectionPendingSponsor() external view returns (bool);9899	/// Collection sponsorship confirmation.100	///101	/// @dev After setting the sponsor for the collection, it must be confirmed with this function.102	/// @dev EVM selector for this function is: 0x3c50e97a,103	///  or in textual repr: confirmCollectionSponsorship()104	function confirmCollectionSponsorship() external;105106	/// Remove collection sponsor.107	/// @dev EVM selector for this function is: 0x6e0326a3,108	///  or in textual repr: removeCollectionSponsor()109	function removeCollectionSponsor() external;110111	/// Get current sponsor.112	///113	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.114	/// @dev EVM selector for this function is: 0xb66bbc14,115	///  or in textual repr: getCollectionSponsor()116	function getCollectionSponsor() external view returns (Tuple6 memory);117118	/// Set limits for the collection.119	/// @dev Throws error if limit not found.120	/// @param limit Name of the limit. Valid names:121	/// 	"accountTokenOwnershipLimit",122	/// 	"sponsoredDataSize",123	/// 	"sponsoredDataRateLimit",124	/// 	"tokenLimit",125	/// 	"sponsorTransferTimeout",126	/// 	"sponsorApproveTimeout"127	/// @param value Value of the limit.128	/// @dev EVM selector for this function is: 0x6a3841db,129	///  or in textual repr: setCollectionLimit(string,uint32)130	function setCollectionLimit(string memory limit, uint32 value) external;131132	/// Set limits for the collection.133	/// @dev Throws error if limit not found.134	/// @param limit Name of the limit. Valid names:135	/// 	"ownerCanTransfer",136	/// 	"ownerCanDestroy",137	/// 	"transfersEnabled"138	/// @param value Value of the limit.139	/// @dev EVM selector for this function is: 0x993b7fba,140	///  or in textual repr: setCollectionLimit(string,bool)141	function setCollectionLimit(string memory limit, bool value) external;142143	/// Get contract address.144	/// @dev EVM selector for this function is: 0xf6b4dfb4,145	///  or in textual repr: contractAddress()146	function contractAddress() external view returns (address);147148	/// Add collection admin by substrate address.149	/// @param newAdmin Substrate administrator address.150	/// @dev EVM selector for this function is: 0x5730062b,151	///  or in textual repr: addCollectionAdminSubstrate(uint256)152	function addCollectionAdminSubstrate(uint256 newAdmin) external;153154	/// Remove collection admin by substrate address.155	/// @param admin Substrate administrator address.156	/// @dev EVM selector for this function is: 0x4048fcf9,157	///  or in textual repr: removeCollectionAdminSubstrate(uint256)158	function removeCollectionAdminSubstrate(uint256 admin) external;159160	/// Add collection admin.161	/// @param newAdmin Address of the added administrator.162	/// @dev EVM selector for this function is: 0x92e462c7,163	///  or in textual repr: addCollectionAdmin(address)164	function addCollectionAdmin(address newAdmin) external;165166	/// Remove collection admin.167	///168	/// @param admin Address of the removed administrator.169	/// @dev EVM selector for this function is: 0xfafd7b42,170	///  or in textual repr: removeCollectionAdmin(address)171	function removeCollectionAdmin(address admin) external;172173	/// Toggle accessibility of collection nesting.174	///175	/// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'176	/// @dev EVM selector for this function is: 0x112d4586,177	///  or in textual repr: setCollectionNesting(bool)178	function setCollectionNesting(bool enable) external;179180	/// Toggle accessibility of collection nesting.181	///182	/// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'183	/// @param collections Addresses of collections that will be available for nesting.184	/// @dev EVM selector for this function is: 0x64872396,185	///  or in textual repr: setCollectionNesting(bool,address[])186	function setCollectionNesting(bool enable, address[] memory collections)187		external;188189	/// Set the collection access method.190	/// @param mode Access mode191	/// 	0 for Normal192	/// 	1 for AllowList193	/// @dev EVM selector for this function is: 0x41835d4c,194	///  or in textual repr: setCollectionAccess(uint8)195	function setCollectionAccess(uint8 mode) external;196197	/// Add the user to the allowed list.198	///199	/// @param user Address of a trusted user.200	/// @dev EVM selector for this function is: 0x67844fe6,201	///  or in textual repr: addToCollectionAllowList(address)202	function addToCollectionAllowList(address user) external;203204	/// Remove the user from the allowed list.205	///206	/// @param user Address of a removed user.207	/// @dev EVM selector for this function is: 0x85c51acb,208	///  or in textual repr: removeFromCollectionAllowList(address)209	function removeFromCollectionAllowList(address user) external;210211	/// Switch permission for minting.212	///213	/// @param mode Enable if "true".214	/// @dev EVM selector for this function is: 0x00018e84,215	///  or in textual repr: setCollectionMintMode(bool)216	function setCollectionMintMode(bool mode) external;217218	/// Check that account is the owner or admin of the collection219	///220	/// @param user account to verify221	/// @return "true" if account is the owner or admin222	/// @dev EVM selector for this function is: 0x9811b0c7,223	///  or in textual repr: isOwnerOrAdmin(address)224	function isOwnerOrAdmin(address user) external view returns (bool);225226	/// Check that substrate account is the owner or admin of the collection227	///228	/// @param user account to verify229	/// @return "true" if account is the owner or admin230	/// @dev EVM selector for this function is: 0x68910e00,231	///  or in textual repr: isOwnerOrAdminSubstrate(uint256)232	function isOwnerOrAdminSubstrate(uint256 user) external view returns (bool);233234	/// Returns collection type235	///236	/// @return `Fungible` or `NFT` or `ReFungible`237	/// @dev EVM selector for this function is: 0xd34b55b8,238	///  or in textual repr: uniqueCollectionType()239	function uniqueCollectionType() external returns (string memory);240}241242/// @dev the ERC-165 identifier for this interface is 0x79cc6790243interface ERC20UniqueExtensions is Dummy, ERC165 {244	/// @dev EVM selector for this function is: 0x79cc6790,245	///  or in textual repr: burnFrom(address,uint256)246	function burnFrom(address from, uint256 amount) external returns (bool);247}248249/// @dev inlined interface250interface ERC20Events {251	event Transfer(address indexed from, address indexed to, uint256 value);252	event Approval(253		address indexed owner,254		address indexed spender,255		uint256 value256	);257}258259/// @dev the ERC-165 identifier for this interface is 0x942e8b22260interface ERC20 is Dummy, ERC165, ERC20Events {261	/// @dev EVM selector for this function is: 0x06fdde03,262	///  or in textual repr: name()263	function name() external view returns (string memory);264265	/// @dev EVM selector for this function is: 0x95d89b41,266	///  or in textual repr: symbol()267	function symbol() external view returns (string memory);268269	/// @dev EVM selector for this function is: 0x18160ddd,270	///  or in textual repr: totalSupply()271	function totalSupply() external view returns (uint256);272273	/// @dev EVM selector for this function is: 0x313ce567,274	///  or in textual repr: decimals()275	function decimals() external view returns (uint8);276277	/// @dev EVM selector for this function is: 0x70a08231,278	///  or in textual repr: balanceOf(address)279	function balanceOf(address owner) external view returns (uint256);280281	/// @dev EVM selector for this function is: 0xa9059cbb,282	///  or in textual repr: transfer(address,uint256)283	function transfer(address to, uint256 amount) external returns (bool);284285	/// @dev EVM selector for this function is: 0x23b872dd,286	///  or in textual repr: transferFrom(address,address,uint256)287	function transferFrom(288		address from,289		address to,290		uint256 amount291	) external returns (bool);292293	/// @dev EVM selector for this function is: 0x095ea7b3,294	///  or in textual repr: approve(address,uint256)295	function approve(address spender, uint256 amount) external returns (bool);296297	/// @dev EVM selector for this function is: 0xdd62ed3e,298	///  or in textual repr: allowance(address,address)299	function allowance(address owner, address spender)300		external301		view302		returns (uint256);303}304305interface UniqueFungible is306	Dummy,307	ERC165,308	ERC20,309	ERC20Mintable,310	ERC20UniqueExtensions,311	Collection312{}