git.delta.rocks / unique-network / refs/commits / dfb31491c2fc

difftreelog

source

tests/src/eth/api/UniqueFungible.sol6.9 KiBsourcehistory
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56// Common stubs holder7interface Dummy {89}1011interface ERC165 is Dummy {12	function supportsInterface(bytes4 interfaceID) external view returns (bool);13}1415// Inline16interface ERC20Events {17	event Transfer(address indexed from, address indexed to, uint256 value);18	event Approval(19		address indexed owner,20		address indexed spender,21		uint256 value22	);23}2425// Selector: 6cf113cd26interface Collection is Dummy, ERC165 {27	// Set collection property.28	//29	// @param key Property key.30	// @param value Propery value.31	//32	// Selector: setCollectionProperty(string,bytes) 2f073f6633	function setCollectionProperty(string memory key, bytes memory value)34		external;3536	// Delete collection property.37	//38	// @param key Property key.39	//40	// Selector: deleteCollectionProperty(string) 7b7debce41	function deleteCollectionProperty(string memory key) external;4243	// Get collection property.44	//45	// @dev Throws error if key not found.46	//47	// @param key Property key.48	// @return bytes The property corresponding to the key.49	//50	// Selector: collectionProperty(string) cf24fd6d51	function collectionProperty(string memory key)52		external53		view54		returns (bytes memory);5556	// Set the sponsor of the collection.57	//58	// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.59	//60	// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.61	//62	// Selector: setCollectionSponsor(address) 7623402e63	function setCollectionSponsor(address sponsor) external;6465	// Collection sponsorship confirmation.66	//67	// @dev After setting the sponsor for the collection, it must be confirmed with this function.68	//69	// Selector: confirmCollectionSponsorship() 3c50e97a70	function confirmCollectionSponsorship() external;7172	// Set limits for the collection.73	// @dev Throws error if limit not found.74	// @param limit Name of the limit. Valid names:75	// 	"accountTokenOwnershipLimit",76	// 	"sponsoredDataSize",77	// 	"sponsoredDataRateLimit",78	// 	"tokenLimit",79	// 	"sponsorTransferTimeout",80	// 	"sponsorApproveTimeout"81	// @param value Value of the limit.82	//83	// Selector: setCollectionLimit(string,uint32) 6a3841db84	function setCollectionLimit(string memory limit, uint32 value) external;8586	// Set limits for the collection.87	// @dev Throws error if limit not found.88	// @param limit Name of the limit. Valid names:89	// 	"ownerCanTransfer",90	// 	"ownerCanDestroy",91	// 	"transfersEnabled"92	// @param value Value of the limit.93	//94	// Selector: setCollectionLimit(string,bool) 993b7fba95	function setCollectionLimit(string memory limit, bool value) external;9697	// Get contract address.98	//99	// Selector: contractAddress() f6b4dfb4100	function contractAddress() external view returns (address);101102	// Add collection admin by substrate address.103	// @param new_admin Substrate administrator address.104	//105	// Selector: addCollectionAdminSubstrate(uint256) 5730062b106	function addCollectionAdminSubstrate(uint256 newAdmin) external;107108	// Remove collection admin by substrate address.109	// @param admin Substrate administrator address.110	//111	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9112	function removeCollectionAdminSubstrate(uint256 admin) external;113114	// Add collection admin.115	// @param new_admin Address of the added administrator.116	//117	// Selector: addCollectionAdmin(address) 92e462c7118	function addCollectionAdmin(address newAdmin) external;119120	// Remove collection admin.121	//122	// @param new_admin Address of the removed administrator.123	//124	// Selector: removeCollectionAdmin(address) fafd7b42125	function removeCollectionAdmin(address admin) external;126127	// Toggle accessibility of collection nesting.128	//129	// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'130	//131	// Selector: setCollectionNesting(bool) 112d4586132	function setCollectionNesting(bool enable) external;133134	// Toggle accessibility of collection nesting.135	//136	// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'137	// @param collections Addresses of collections that will be available for nesting.138	//139	// Selector: setCollectionNesting(bool,address[]) 64872396140	function setCollectionNesting(bool enable, address[] memory collections)141		external;142143	// Set the collection access method.144	// @param mode Access mode145	// 	0 for Normal146	// 	1 for AllowList147	//148	// Selector: setCollectionAccess(uint8) 41835d4c149	function setCollectionAccess(uint8 mode) external;150151	// Add the user to the allowed list.152	//153	// @param user Address of a trusted user.154	//155	// Selector: addToCollectionAllowList(address) 67844fe6156	function addToCollectionAllowList(address user) external;157158	// Remove the user from the allowed list.159	//160	// @param user Address of a removed user.161	//162	// Selector: removeFromCollectionAllowList(address) 85c51acb163	function removeFromCollectionAllowList(address user) external;164165	// Switch permission for minting.166	//167	// @param mode Enable if "true".168	//169	// Selector: setCollectionMintMode(bool) 00018e84170	function setCollectionMintMode(bool mode) external;171172	// Check that account is the owner or admin of the collection173	//174	// @param user account to verify175	// @return "true" if account is the owner or admin176	//177	// Selector: verifyOwnerOrAdmin(address) c2282493178	function verifyOwnerOrAdmin(address user) external view returns (bool);179180	// Returns collection type181	//182	// @return `Fungible` or `NFT` or `ReFungible`183	//184	// Selector: uniqueCollectionType() d34b55b8185	function uniqueCollectionType() external returns (string memory);186}187188// Selector: 79cc6790189interface ERC20UniqueExtensions is Dummy, ERC165 {190	// Selector: burnFrom(address,uint256) 79cc6790191	function burnFrom(address from, uint256 amount) external returns (bool);192}193194// Selector: 942e8b22195interface ERC20 is Dummy, ERC165, ERC20Events {196	// Selector: name() 06fdde03197	function name() external view returns (string memory);198199	// Selector: symbol() 95d89b41200	function symbol() external view returns (string memory);201202	// Selector: totalSupply() 18160ddd203	function totalSupply() external view returns (uint256);204205	// Selector: decimals() 313ce567206	function decimals() external view returns (uint8);207208	// Selector: balanceOf(address) 70a08231209	function balanceOf(address owner) external view returns (uint256);210211	// Selector: transfer(address,uint256) a9059cbb212	function transfer(address to, uint256 amount) external returns (bool);213214	// Selector: transferFrom(address,address,uint256) 23b872dd215	function transferFrom(216		address from,217		address to,218		uint256 amount219	) external returns (bool);220221	// Selector: approve(address,uint256) 095ea7b3222	function approve(address spender, uint256 amount) external returns (bool);223224	// Selector: allowance(address,address) dd62ed3e225	function allowance(address owner, address spender)226		external227		view228		returns (uint256);229}230231interface UniqueFungible is232	Dummy,233	ERC165,234	ERC20,235	ERC20UniqueExtensions,236	Collection237{}