git.delta.rocks / unique-network / refs/commits / 4e55e3985dac

difftreelog

source

pallets/fungible/src/stubs/UniqueFungible.sol16.0 KiBsourcehistory
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56/// @dev common stubs holder7contract Dummy {8	uint8 dummy;9	string stub_error = "this contract is implemented in native";10}1112contract ERC165 is Dummy {13	function supportsInterface(bytes4 interfaceID) external view returns (bool) {14		require(false, stub_error);15		interfaceID;16		return true;17	}18}1920/// @title A contract that allows you to work with collections.21/// @dev the ERC-165 identifier for this interface is 0x47dbc10522contract Collection is Dummy, ERC165 {23	/// Set collection property.24	///25	/// @param key Property key.26	/// @param value Propery value.27	/// @dev EVM selector for this function is: 0x2f073f66,28	///  or in textual repr: setCollectionProperty(string,bytes)29	function setCollectionProperty(string memory key, bytes memory value) public {30		require(false, stub_error);31		key;32		value;33		dummy = 0;34	}3536	/// Delete collection property.37	///38	/// @param key Property key.39	/// @dev EVM selector for this function is: 0x7b7debce,40	///  or in textual repr: deleteCollectionProperty(string)41	function deleteCollectionProperty(string memory key) public {42		require(false, stub_error);43		key;44		dummy = 0;45	}4647	/// Get collection property.48	///49	/// @dev Throws error if key not found.50	///51	/// @param key Property key.52	/// @return bytes The property corresponding to the key.53	/// @dev EVM selector for this function is: 0xcf24fd6d,54	///  or in textual repr: collectionProperty(string)55	function collectionProperty(string memory key) public view returns (bytes memory) {56		require(false, stub_error);57		key;58		dummy;59		return hex"";60	}6162	/// Set the sponsor of the collection.63	///64	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.65	///66	/// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.67	/// @dev EVM selector for this function is: 0x7623402e,68	///  or in textual repr: setCollectionSponsor(address)69	function setCollectionSponsor(address sponsor) public {70		require(false, stub_error);71		sponsor;72		dummy = 0;73	}7475	/// Set the substrate sponsor of the collection.76	///77	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.78	///79	/// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.80	/// @dev EVM selector for this function is: 0xc74d6751,81	///  or in textual repr: setCollectionSponsorSubstrate(uint256)82	function setCollectionSponsorSubstrate(uint256 sponsor) public {83		require(false, stub_error);84		sponsor;85		dummy = 0;86	}8788	/// Whether there is a pending sponsor.89	/// @dev EVM selector for this function is: 0x058ac185,90	///  or in textual repr: hasCollectionPendingSponsor()91	function hasCollectionPendingSponsor() public view returns (bool) {92		require(false, stub_error);93		dummy;94		return false;95	}9697	/// Collection sponsorship confirmation.98	///99	/// @dev After setting the sponsor for the collection, it must be confirmed with this function.100	/// @dev EVM selector for this function is: 0x3c50e97a,101	///  or in textual repr: confirmCollectionSponsorship()102	function confirmCollectionSponsorship() public {103		require(false, stub_error);104		dummy = 0;105	}106107	/// Remove collection sponsor.108	/// @dev EVM selector for this function is: 0x6e0326a3,109	///  or in textual repr: removeCollectionSponsor()110	function removeCollectionSponsor() public {111		require(false, stub_error);112		dummy = 0;113	}114115	/// Get current sponsor.116	///117	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.118	/// @dev EVM selector for this function is: 0x6ec0a9f1,119	///  or in textual repr: collectionSponsor()120	function collectionSponsor() public view returns (Tuple6 memory) {121		require(false, stub_error);122		dummy;123		return Tuple6(0x0000000000000000000000000000000000000000, 0);124	}125126	/// Set limits for the collection.127	/// @dev Throws error if limit not found.128	/// @param limit Name of the limit. Valid names:129	/// 	"accountTokenOwnershipLimit",130	/// 	"sponsoredDataSize",131	/// 	"sponsoredDataRateLimit",132	/// 	"tokenLimit",133	/// 	"sponsorTransferTimeout",134	/// 	"sponsorApproveTimeout"135	/// @param value Value of the limit.136	/// @dev EVM selector for this function is: 0x6a3841db,137	///  or in textual repr: setCollectionLimit(string,uint32)138	function setCollectionLimit(string memory limit, uint32 value) public {139		require(false, stub_error);140		limit;141		value;142		dummy = 0;143	}144145	/// Set limits for the collection.146	/// @dev Throws error if limit not found.147	/// @param limit Name of the limit. Valid names:148	/// 	"ownerCanTransfer",149	/// 	"ownerCanDestroy",150	/// 	"transfersEnabled"151	/// @param value Value of the limit.152	/// @dev EVM selector for this function is: 0x993b7fba,153	///  or in textual repr: setCollectionLimit(string,bool)154	function setCollectionLimit(string memory limit, bool value) public {155		require(false, stub_error);156		limit;157		value;158		dummy = 0;159	}160161	/// Get contract address.162	/// @dev EVM selector for this function is: 0xf6b4dfb4,163	///  or in textual repr: contractAddress()164	function contractAddress() public view returns (address) {165		require(false, stub_error);166		dummy;167		return 0x0000000000000000000000000000000000000000;168	}169170	/// Add collection admin by substrate address.171	/// @param newAdmin Substrate administrator address.172	/// @dev EVM selector for this function is: 0x5730062b,173	///  or in textual repr: addCollectionAdminSubstrate(uint256)174	function addCollectionAdminSubstrate(uint256 newAdmin) public {175		require(false, stub_error);176		newAdmin;177		dummy = 0;178	}179180	/// Remove collection admin by substrate address.181	/// @param admin Substrate administrator address.182	/// @dev EVM selector for this function is: 0x4048fcf9,183	///  or in textual repr: removeCollectionAdminSubstrate(uint256)184	function removeCollectionAdminSubstrate(uint256 admin) public {185		require(false, stub_error);186		admin;187		dummy = 0;188	}189190	/// Add collection admin.191	/// @param newAdmin Address of the added administrator.192	/// @dev EVM selector for this function is: 0x92e462c7,193	///  or in textual repr: addCollectionAdmin(address)194	function addCollectionAdmin(address newAdmin) public {195		require(false, stub_error);196		newAdmin;197		dummy = 0;198	}199200	/// Remove collection admin.201	///202	/// @param admin Address of the removed administrator.203	/// @dev EVM selector for this function is: 0xfafd7b42,204	///  or in textual repr: removeCollectionAdmin(address)205	function removeCollectionAdmin(address admin) public {206		require(false, stub_error);207		admin;208		dummy = 0;209	}210211	/// Toggle accessibility of collection nesting.212	///213	/// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'214	/// @dev EVM selector for this function is: 0x112d4586,215	///  or in textual repr: setCollectionNesting(bool)216	function setCollectionNesting(bool enable) public {217		require(false, stub_error);218		enable;219		dummy = 0;220	}221222	/// Toggle accessibility of collection nesting.223	///224	/// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'225	/// @param collections Addresses of collections that will be available for nesting.226	/// @dev EVM selector for this function is: 0x64872396,227	///  or in textual repr: setCollectionNesting(bool,address[])228	function setCollectionNesting(bool enable, address[] memory collections) public {229		require(false, stub_error);230		enable;231		collections;232		dummy = 0;233	}234235	/// Set the collection access method.236	/// @param mode Access mode237	/// 	0 for Normal238	/// 	1 for AllowList239	/// @dev EVM selector for this function is: 0x41835d4c,240	///  or in textual repr: setCollectionAccess(uint8)241	function setCollectionAccess(uint8 mode) public {242		require(false, stub_error);243		mode;244		dummy = 0;245	}246247	/// Checks that user allowed to operate with collection.248	///249	/// @param user User address to check.250	/// @dev EVM selector for this function is: 0xd63a8e11,251	///  or in textual repr: allowed(address)252	function allowed(address user) public view returns (bool) {253		require(false, stub_error);254		user;255		dummy;256		return false;257	}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) public {265		require(false, stub_error);266		user;267		dummy = 0;268	}269270	/// Add substrate user to allowed list.271	///272	/// @param user User substrate address.273	/// @dev EVM selector for this function is: 0xd06ad267,274	///  or in textual repr: addToCollectionAllowListSubstrate(uint256)275	function addToCollectionAllowListSubstrate(uint256 user) public {276		require(false, stub_error);277		user;278		dummy = 0;279	}280281	/// Remove the user from the allowed list.282	///283	/// @param user Address of a removed user.284	/// @dev EVM selector for this function is: 0x85c51acb,285	///  or in textual repr: removeFromCollectionAllowList(address)286	function removeFromCollectionAllowList(address user) public {287		require(false, stub_error);288		user;289		dummy = 0;290	}291292	/// Remove substrate user from allowed list.293	///294	/// @param user User substrate address.295	/// @dev EVM selector for this function is: 0xa31913ed,296	///  or in textual repr: removeFromCollectionAllowListSubstrate(uint256)297	function removeFromCollectionAllowListSubstrate(uint256 user) public {298		require(false, stub_error);299		user;300		dummy = 0;301	}302303	/// Switch permission for minting.304	///305	/// @param mode Enable if "true".306	/// @dev EVM selector for this function is: 0x00018e84,307	///  or in textual repr: setCollectionMintMode(bool)308	function setCollectionMintMode(bool mode) public {309		require(false, stub_error);310		mode;311		dummy = 0;312	}313314	/// Check that account is the owner or admin of the collection315	///316	/// @param user account to verify317	/// @return "true" if account is the owner or admin318	/// @dev EVM selector for this function is: 0x9811b0c7,319	///  or in textual repr: isOwnerOrAdmin(address)320	function isOwnerOrAdmin(address user) public view returns (bool) {321		require(false, stub_error);322		user;323		dummy;324		return false;325	}326327	/// Check that substrate account is the owner or admin of the collection328	///329	/// @param user account to verify330	/// @return "true" if account is the owner or admin331	/// @dev EVM selector for this function is: 0x68910e00,332	///  or in textual repr: isOwnerOrAdminSubstrate(uint256)333	function isOwnerOrAdminSubstrate(uint256 user) public view returns (bool) {334		require(false, stub_error);335		user;336		dummy;337		return false;338	}339340	/// Returns collection type341	///342	/// @return `Fungible` or `NFT` or `ReFungible`343	/// @dev EVM selector for this function is: 0xd34b55b8,344	///  or in textual repr: uniqueCollectionType()345	function uniqueCollectionType() public view returns (string memory) {346		require(false, stub_error);347		dummy;348		return "";349	}350351	/// Get collection owner.352	///353	/// @return Tuble with sponsor address and his substrate mirror.354	/// If address is canonical then substrate mirror is zero and vice versa.355	/// @dev EVM selector for this function is: 0xdf727d3b,356	///  or in textual repr: collectionOwner()357	function collectionOwner() public view returns (Tuple6 memory) {358		require(false, stub_error);359		dummy;360		return Tuple6(0x0000000000000000000000000000000000000000, 0);361	}362363	/// Changes collection owner to another account364	///365	/// @dev Owner can be changed only by current owner366	/// @param newOwner new owner account367	/// @dev EVM selector for this function is: 0x13af4035,368	///  or in textual repr: setOwner(address)369	function setOwner(address newOwner) public {370		require(false, stub_error);371		newOwner;372		dummy = 0;373	}374375	/// Changes collection owner to another substrate account376	///377	/// @dev Owner can be changed only by current owner378	/// @param newOwner new owner substrate account379	/// @dev EVM selector for this function is: 0xb212138f,380	///  or in textual repr: setOwnerSubstrate(uint256)381	function setOwnerSubstrate(uint256 newOwner) public {382		require(false, stub_error);383		newOwner;384		dummy = 0;385	}386}387388/// @dev the ERC-165 identifier for this interface is 0x63034ac5389contract ERC20UniqueExtensions is Dummy, ERC165 {390	/// Burn tokens from account391	/// @dev Function that burns an `amount` of the tokens of a given account,392	/// deducting from the sender's allowance for said account.393	/// @param from The account whose tokens will be burnt.394	/// @param amount The amount that will be burnt.395	/// @dev EVM selector for this function is: 0x79cc6790,396	///  or in textual repr: burnFrom(address,uint256)397	function burnFrom(address from, uint256 amount) public returns (bool) {398		require(false, stub_error);399		from;400		amount;401		dummy = 0;402		return false;403	}404405	/// Mint tokens for multiple accounts.406	/// @param amounts array of pairs of account address and amount407	/// @dev EVM selector for this function is: 0x1acf2d55,408	///  or in textual repr: mintBulk((address,uint256)[])409	function mintBulk(Tuple6[] memory amounts) public returns (bool) {410		require(false, stub_error);411		amounts;412		dummy = 0;413		return false;414	}415}416417/// @dev anonymous struct418struct Tuple6 {419	address field_0;420	uint256 field_1;421}422423/// @dev the ERC-165 identifier for this interface is 0x40c10f19424contract ERC20Mintable is Dummy, ERC165 {425	/// Mint tokens for `to` account.426	/// @param to account that will receive minted tokens427	/// @param amount amount of tokens to mint428	/// @dev EVM selector for this function is: 0x40c10f19,429	///  or in textual repr: mint(address,uint256)430	function mint(address to, uint256 amount) public returns (bool) {431		require(false, stub_error);432		to;433		amount;434		dummy = 0;435		return false;436	}437}438439/// @dev inlined interface440contract ERC20Events {441	event Transfer(address indexed from, address indexed to, uint256 value);442	event Approval(address indexed owner, address indexed spender, uint256 value);443}444445/// @dev the ERC-165 identifier for this interface is 0x942e8b22446contract ERC20 is Dummy, ERC165, ERC20Events {447	/// @dev EVM selector for this function is: 0x06fdde03,448	///  or in textual repr: name()449	function name() public view returns (string memory) {450		require(false, stub_error);451		dummy;452		return "";453	}454455	/// @dev EVM selector for this function is: 0x95d89b41,456	///  or in textual repr: symbol()457	function symbol() public view returns (string memory) {458		require(false, stub_error);459		dummy;460		return "";461	}462463	/// @dev EVM selector for this function is: 0x18160ddd,464	///  or in textual repr: totalSupply()465	function totalSupply() public view returns (uint256) {466		require(false, stub_error);467		dummy;468		return 0;469	}470471	/// @dev EVM selector for this function is: 0x313ce567,472	///  or in textual repr: decimals()473	function decimals() public view returns (uint8) {474		require(false, stub_error);475		dummy;476		return 0;477	}478479	/// @dev EVM selector for this function is: 0x70a08231,480	///  or in textual repr: balanceOf(address)481	function balanceOf(address owner) public view returns (uint256) {482		require(false, stub_error);483		owner;484		dummy;485		return 0;486	}487488	/// @dev EVM selector for this function is: 0xa9059cbb,489	///  or in textual repr: transfer(address,uint256)490	function transfer(address to, uint256 amount) public returns (bool) {491		require(false, stub_error);492		to;493		amount;494		dummy = 0;495		return false;496	}497498	/// @dev EVM selector for this function is: 0x23b872dd,499	///  or in textual repr: transferFrom(address,address,uint256)500	function transferFrom(501		address from,502		address to,503		uint256 amount504	) public returns (bool) {505		require(false, stub_error);506		from;507		to;508		amount;509		dummy = 0;510		return false;511	}512513	/// @dev EVM selector for this function is: 0x095ea7b3,514	///  or in textual repr: approve(address,uint256)515	function approve(address spender, uint256 amount) public returns (bool) {516		require(false, stub_error);517		spender;518		amount;519		dummy = 0;520		return false;521	}522523	/// @dev EVM selector for this function is: 0xdd62ed3e,524	///  or in textual repr: allowance(address,address)525	function allowance(address owner, address spender) public view returns (uint256) {526		require(false, stub_error);527		owner;528		spender;529		dummy;530		return 0;531	}532}533534contract UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}