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

difftreelog

source

tests/src/eth/api/UniqueFungible.sol10.9 KiBsourcehistory
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56/// @dev common stubs holder7interface Dummy {89}1011interface ERC165 is Dummy {12	function supportsInterface(bytes4 interfaceID) external view returns (bool);13}1415/// @title A contract that allows you to work with collections.16/// @dev the ERC-165 identifier for this interface is 0x3e1e808317interface Collection is Dummy, ERC165 {18	/// Set collection property.19	///20	/// @param key Property key.21	/// @param value Propery value.22	/// @dev EVM selector for this function is: 0x2f073f66,23	///  or in textual repr: setCollectionProperty(string,bytes)24	function setCollectionProperty(string memory key, bytes memory value) external;2526	/// Delete collection property.27	///28	/// @param key Property key.29	/// @dev EVM selector for this function is: 0x7b7debce,30	///  or in textual repr: deleteCollectionProperty(string)31	function deleteCollectionProperty(string memory key) external;3233	/// Get collection property.34	///35	/// @dev Throws error if key not found.36	///37	/// @param key Property key.38	/// @return bytes The property corresponding to the key.39	/// @dev EVM selector for this function is: 0xcf24fd6d,40	///  or in textual repr: collectionProperty(string)41	function collectionProperty(string memory key) external view returns (bytes memory);4243	/// Set the sponsor of the collection.44	///45	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.46	///47	/// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.48	/// @dev EVM selector for this function is: 0x7623402e,49	///  or in textual repr: setCollectionSponsor(address)50	function setCollectionSponsor(address sponsor) external;5152	/// Whether there is a pending sponsor.53	/// @dev EVM selector for this function is: 0x058ac185,54	///  or in textual repr: hasCollectionPendingSponsor()55	function hasCollectionPendingSponsor() external view returns (bool);5657	/// Collection sponsorship confirmation.58	///59	/// @dev After setting the sponsor for the collection, it must be confirmed with this function.60	/// @dev EVM selector for this function is: 0x3c50e97a,61	///  or in textual repr: confirmCollectionSponsorship()62	function confirmCollectionSponsorship() external;6364	/// Remove collection sponsor.65	/// @dev EVM selector for this function is: 0x6e0326a3,66	///  or in textual repr: removeCollectionSponsor()67	function removeCollectionSponsor() external;6869	/// Get current sponsor.70	///71	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.72	/// @dev EVM selector for this function is: 0x6ec0a9f1,73	///  or in textual repr: collectionSponsor()74	function collectionSponsor() external view returns (Tuple6 memory);7576	/// Set limits for the collection.77	/// @dev Throws error if limit not found.78	/// @param limit Name of the limit. Valid names:79	/// 	"accountTokenOwnershipLimit",80	/// 	"sponsoredDataSize",81	/// 	"sponsoredDataRateLimit",82	/// 	"tokenLimit",83	/// 	"sponsorTransferTimeout",84	/// 	"sponsorApproveTimeout"85	/// @param value Value of the limit.86	/// @dev EVM selector for this function is: 0x6a3841db,87	///  or in textual repr: setCollectionLimit(string,uint32)88	function setCollectionLimit(string memory limit, uint32 value) external;8990	/// Set limits for the collection.91	/// @dev Throws error if limit not found.92	/// @param limit Name of the limit. Valid names:93	/// 	"ownerCanTransfer",94	/// 	"ownerCanDestroy",95	/// 	"transfersEnabled"96	/// @param value Value of the limit.97	/// @dev EVM selector for this function is: 0x993b7fba,98	///  or in textual repr: setCollectionLimit(string,bool)99	function setCollectionLimit(string memory limit, bool value) external;100101	/// Get contract address.102	/// @dev EVM selector for this function is: 0xf6b4dfb4,103	///  or in textual repr: contractAddress()104	function contractAddress() external view returns (address);105106	/// Add collection admin.107	/// @param newAdmin Address of the added administrator.108	/// @dev EVM selector for this function is: 0x92e462c7,109	///  or in textual repr: addCollectionAdmin(address)110	function addCollectionAdmin(address newAdmin) external;111112	/// Remove collection admin.113	///114	/// @param admin Address of the removed administrator.115	/// @dev EVM selector for this function is: 0xfafd7b42,116	///  or in textual repr: removeCollectionAdmin(address)117	function removeCollectionAdmin(address admin) external;118119	/// Toggle accessibility of collection nesting.120	///121	/// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'122	/// @dev EVM selector for this function is: 0x112d4586,123	///  or in textual repr: setCollectionNesting(bool)124	function setCollectionNesting(bool enable) external;125126	/// Toggle accessibility of collection nesting.127	///128	/// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'129	/// @param collections Addresses of collections that will be available for nesting.130	/// @dev EVM selector for this function is: 0x64872396,131	///  or in textual repr: setCollectionNesting(bool,address[])132	function setCollectionNesting(bool enable, address[] memory collections) external;133134	/// Set the collection access method.135	/// @param mode Access mode136	/// 	0 for Normal137	/// 	1 for AllowList138	/// @dev EVM selector for this function is: 0x41835d4c,139	///  or in textual repr: setCollectionAccess(uint8)140	function setCollectionAccess(uint8 mode) external;141142	/// Checks that user allowed to operate with collection.143	///144	/// @param user User address to check.145	/// @dev EVM selector for this function is: 0xd63a8e11,146	///  or in textual repr: allowed(address)147	function allowed(address user) external view returns (bool);148149	/// Add the user to the allowed list.150	///151	/// @param user Address of a trusted user.152	/// @dev EVM selector for this function is: 0x67844fe6,153	///  or in textual repr: addToCollectionAllowList(address)154	function addToCollectionAllowList(address user) external;155156	/// Remove the user from the allowed list.157	///158	/// @param user Address of a removed user.159	/// @dev EVM selector for this function is: 0x85c51acb,160	///  or in textual repr: removeFromCollectionAllowList(address)161	function removeFromCollectionAllowList(address user) external;162163	/// Switch permission for minting.164	///165	/// @param mode Enable if "true".166	/// @dev EVM selector for this function is: 0x00018e84,167	///  or in textual repr: setCollectionMintMode(bool)168	function setCollectionMintMode(bool mode) external;169170	/// Check that account is the owner or admin of the collection171	///172	/// @param user account to verify173	/// @return "true" if account is the owner or admin174	/// @dev EVM selector for this function is: 0x9811b0c7,175	///  or in textual repr: isOwnerOrAdmin(address)176	function isOwnerOrAdmin(address user) external view returns (bool);177178	/// Returns collection type179	///180	/// @return `Fungible` or `NFT` or `ReFungible`181	/// @dev EVM selector for this function is: 0xd34b55b8,182	///  or in textual repr: uniqueCollectionType()183	function uniqueCollectionType() external view returns (string memory);184185	/// Get collection owner.186	///187	/// @return Tuble with sponsor address and his substrate mirror.188	/// If address is canonical then substrate mirror is zero and vice versa.189	/// @dev EVM selector for this function is: 0xdf727d3b,190	///  or in textual repr: collectionOwner()191	function collectionOwner() external view returns (Tuple6 memory);192193	/// Changes collection owner to another account194	///195	/// @dev Owner can be changed only by current owner196	/// @param newOwner new owner account197	/// @dev EVM selector for this function is: 0x13af4035,198	///  or in textual repr: setOwner(address)199	function setOwner(address newOwner) external;200}201202/// @dev the ERC-165 identifier for this interface is 0x63034ac5203interface ERC20UniqueExtensions is Dummy, ERC165 {204	/// Burn tokens from account205	/// @dev Function that burns an `amount` of the tokens of a given account,206	/// deducting from the sender's allowance for said account.207	/// @param from The account whose tokens will be burnt.208	/// @param amount The amount that will be burnt.209	/// @dev EVM selector for this function is: 0x79cc6790,210	///  or in textual repr: burnFrom(address,uint256)211	function burnFrom(address from, uint256 amount) external returns (bool);212213	/// Mint tokens for multiple accounts.214	/// @param amounts array of pairs of account address and amount215	/// @dev EVM selector for this function is: 0x1acf2d55,216	///  or in textual repr: mintBulk((address,uint256)[])217	function mintBulk(Tuple6[] memory amounts) external returns (bool);218}219220/// @dev anonymous struct221struct Tuple6 {222	address field_0;223	uint256 field_1;224}225226/// @dev the ERC-165 identifier for this interface is 0x40c10f19227interface ERC20Mintable is Dummy, ERC165 {228	/// Mint tokens for `to` account.229	/// @param to account that will receive minted tokens230	/// @param amount amount of tokens to mint231	/// @dev EVM selector for this function is: 0x40c10f19,232	///  or in textual repr: mint(address,uint256)233	function mint(address to, uint256 amount) external returns (bool);234}235236/// @dev inlined interface237interface ERC20Events {238	event Transfer(address indexed from, address indexed to, uint256 value);239	event Approval(address indexed owner, address indexed spender, uint256 value);240}241242/// @dev the ERC-165 identifier for this interface is 0x942e8b22243interface ERC20 is Dummy, ERC165, ERC20Events {244	/// @dev EVM selector for this function is: 0x06fdde03,245	///  or in textual repr: name()246	function name() external view returns (string memory);247248	/// @dev EVM selector for this function is: 0x95d89b41,249	///  or in textual repr: symbol()250	function symbol() external view returns (string memory);251252	/// @dev EVM selector for this function is: 0x18160ddd,253	///  or in textual repr: totalSupply()254	function totalSupply() external view returns (uint256);255256	/// @dev EVM selector for this function is: 0x313ce567,257	///  or in textual repr: decimals()258	function decimals() external view returns (uint8);259260	/// @dev EVM selector for this function is: 0x70a08231,261	///  or in textual repr: balanceOf(address)262	function balanceOf(address owner) external view returns (uint256);263264	/// @dev EVM selector for this function is: 0xa9059cbb,265	///  or in textual repr: transfer(address,uint256)266	function transfer(address to, uint256 amount) external returns (bool);267268	/// @dev EVM selector for this function is: 0x23b872dd,269	///  or in textual repr: transferFrom(address,address,uint256)270	function transferFrom(271		address from,272		address to,273		uint256 amount274	) external returns (bool);275276	/// @dev EVM selector for this function is: 0x095ea7b3,277	///  or in textual repr: approve(address,uint256)278	function approve(address spender, uint256 amount) external returns (bool);279280	/// @dev EVM selector for this function is: 0xdd62ed3e,281	///  or in textual repr: allowance(address,address)282	function allowance(address owner, address spender) external view returns (uint256);283}284285interface UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}