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

difftreelog

source

pallets/fungible/src/stubs/UniqueFungible.sol11.9 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)14		external15		view16		returns (bool)17	{18		require(false, stub_error);19		interfaceID;20		return true;21	}22}2324/// @title A contract that allows you to work with collections.25/// @dev the ERC-165 identifier for this interface is 0xffe4da2326contract Collection is Dummy, ERC165 {27	/// Set collection property.28	///29	/// @param key Property key.30	/// @param value Propery value.31	/// @dev EVM selector for this function is: 0x2f073f66,32	///  or in textual repr: setCollectionProperty(string,bytes)33	function setCollectionProperty(string memory key, bytes memory value)34		public35	{36		require(false, stub_error);37		key;38		value;39		dummy = 0;40	}4142	/// Delete collection property.43	///44	/// @param key Property key.45	/// @dev EVM selector for this function is: 0x7b7debce,46	///  or in textual repr: deleteCollectionProperty(string)47	function deleteCollectionProperty(string memory key) public {48		require(false, stub_error);49		key;50		dummy = 0;51	}5253	/// Get collection property.54	///55	/// @dev Throws error if key not found.56	///57	/// @param key Property key.58	/// @return bytes The property corresponding to the key.59	/// @dev EVM selector for this function is: 0xcf24fd6d,60	///  or in textual repr: collectionProperty(string)61	function collectionProperty(string memory key)62		public63		view64		returns (bytes memory)65	{66		require(false, stub_error);67		key;68		dummy;69		return hex"";70	}7172	/// Set the sponsor of the collection.73	///74	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.75	///76	/// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.77	/// @dev EVM selector for this function is: 0x7623402e,78	///  or in textual repr: setCollectionSponsor(address)79	function setCollectionSponsor(address sponsor) public {80		require(false, stub_error);81		sponsor;82		dummy = 0;83	}8485	/// Collection sponsorship confirmation.86	///87	/// @dev After setting the sponsor for the collection, it must be confirmed with this function.88	/// @dev EVM selector for this function is: 0x3c50e97a,89	///  or in textual repr: confirmCollectionSponsorship()90	function confirmCollectionSponsorship() public {91		require(false, stub_error);92		dummy = 0;93	}9495	/// Set limits for the collection.96	/// @dev Throws error if limit not found.97	/// @param limit Name of the limit. Valid names:98	/// 	"accountTokenOwnershipLimit",99	/// 	"sponsoredDataSize",100	/// 	"sponsoredDataRateLimit",101	/// 	"tokenLimit",102	/// 	"sponsorTransferTimeout",103	/// 	"sponsorApproveTimeout"104	/// @param value Value of the limit.105	/// @dev EVM selector for this function is: 0x6a3841db,106	///  or in textual repr: setCollectionLimit(string,uint32)107	function setCollectionLimit(string memory limit, uint32 value) public {108		require(false, stub_error);109		limit;110		value;111		dummy = 0;112	}113114	/// Set limits for the collection.115	/// @dev Throws error if limit not found.116	/// @param limit Name of the limit. Valid names:117	/// 	"ownerCanTransfer",118	/// 	"ownerCanDestroy",119	/// 	"transfersEnabled"120	/// @param value Value of the limit.121	/// @dev EVM selector for this function is: 0x993b7fba,122	///  or in textual repr: setCollectionLimit(string,bool)123	function setCollectionLimit(string memory limit, bool value) public {124		require(false, stub_error);125		limit;126		value;127		dummy = 0;128	}129130	/// Get contract address.131	/// @dev EVM selector for this function is: 0xf6b4dfb4,132	///  or in textual repr: contractAddress()133	function contractAddress() public view returns (address) {134		require(false, stub_error);135		dummy;136		return 0x0000000000000000000000000000000000000000;137	}138139	/// Add collection admin by substrate address.140	/// @param newAdmin Substrate administrator address.141	/// @dev EVM selector for this function is: 0x5730062b,142	///  or in textual repr: addCollectionAdminSubstrate(uint256)143	function addCollectionAdminSubstrate(uint256 newAdmin) public {144		require(false, stub_error);145		newAdmin;146		dummy = 0;147	}148149	/// Remove collection admin by substrate address.150	/// @param admin Substrate administrator address.151	/// @dev EVM selector for this function is: 0x4048fcf9,152	///  or in textual repr: removeCollectionAdminSubstrate(uint256)153	function removeCollectionAdminSubstrate(uint256 admin) public {154		require(false, stub_error);155		admin;156		dummy = 0;157	}158159	/// Add collection admin.160	/// @param newAdmin Address of the added administrator.161	/// @dev EVM selector for this function is: 0x92e462c7,162	///  or in textual repr: addCollectionAdmin(address)163	function addCollectionAdmin(address newAdmin) public {164		require(false, stub_error);165		newAdmin;166		dummy = 0;167	}168169	/// Remove collection admin.170	///171	/// @param admin Address of the removed administrator.172	/// @dev EVM selector for this function is: 0xfafd7b42,173	///  or in textual repr: removeCollectionAdmin(address)174	function removeCollectionAdmin(address admin) public {175		require(false, stub_error);176		admin;177		dummy = 0;178	}179180	/// Toggle accessibility of collection nesting.181	///182	/// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'183	/// @dev EVM selector for this function is: 0x112d4586,184	///  or in textual repr: setCollectionNesting(bool)185	function setCollectionNesting(bool enable) public {186		require(false, stub_error);187		enable;188		dummy = 0;189	}190191	/// Toggle accessibility of collection nesting.192	///193	/// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'194	/// @param collections Addresses of collections that will be available for nesting.195	/// @dev EVM selector for this function is: 0x64872396,196	///  or in textual repr: setCollectionNesting(bool,address[])197	function setCollectionNesting(bool enable, address[] memory collections)198		public199	{200		require(false, stub_error);201		enable;202		collections;203		dummy = 0;204	}205206	/// Set the collection access method.207	/// @param mode Access mode208	/// 	0 for Normal209	/// 	1 for AllowList210	/// @dev EVM selector for this function is: 0x41835d4c,211	///  or in textual repr: setCollectionAccess(uint8)212	function setCollectionAccess(uint8 mode) public {213		require(false, stub_error);214		mode;215		dummy = 0;216	}217218	/// Add the user to the allowed list.219	///220	/// @param user Address of a trusted user.221	/// @dev EVM selector for this function is: 0x67844fe6,222	///  or in textual repr: addToCollectionAllowList(address)223	function addToCollectionAllowList(address user) public {224		require(false, stub_error);225		user;226		dummy = 0;227	}228229	/// Remove the user from the allowed list.230	///231	/// @param user Address of a removed user.232	/// @dev EVM selector for this function is: 0x85c51acb,233	///  or in textual repr: removeFromCollectionAllowList(address)234	function removeFromCollectionAllowList(address user) public {235		require(false, stub_error);236		user;237		dummy = 0;238	}239240	/// Switch permission for minting.241	///242	/// @param mode Enable if "true".243	/// @dev EVM selector for this function is: 0x00018e84,244	///  or in textual repr: setCollectionMintMode(bool)245	function setCollectionMintMode(bool mode) public {246		require(false, stub_error);247		mode;248		dummy = 0;249	}250251	/// Check that account is the owner or admin of the collection252	///253	/// @param user account to verify254	/// @return "true" if account is the owner or admin255	/// @dev EVM selector for this function is: 0x9811b0c7,256	///  or in textual repr: isOwnerOrAdmin(address)257	function isOwnerOrAdmin(address user) public view returns (bool) {258		require(false, stub_error);259		user;260		dummy;261		return false;262	}263264	/// Check that substrate account is the owner or admin of the collection265	///266	/// @param user account to verify267	/// @return "true" if account is the owner or admin268	/// @dev EVM selector for this function is: 0x68910e00,269	///  or in textual repr: isOwnerOrAdminSubstrate(uint256)270	function isOwnerOrAdminSubstrate(uint256 user) public view returns (bool) {271		require(false, stub_error);272		user;273		dummy;274		return false;275	}276277	/// Returns collection type278	///279	/// @return `Fungible` or `NFT` or `ReFungible`280	/// @dev EVM selector for this function is: 0xd34b55b8,281	///  or in textual repr: uniqueCollectionType()282	function uniqueCollectionType() public returns (string memory) {283		require(false, stub_error);284		dummy = 0;285		return "";286	}287288	/// Changes collection owner to another account289	///290	/// @dev Owner can be changed only by current owner291	/// @param newOwner new owner account292	/// @dev EVM selector for this function is: 0x13af4035,293	///  or in textual repr: setOwner(address)294	function setOwner(address newOwner) public {295		require(false, stub_error);296		newOwner;297		dummy = 0;298	}299300	/// Changes collection owner to another substrate account301	///302	/// @dev Owner can be changed only by current owner303	/// @param newOwner new owner substrate account304	/// @dev EVM selector for this function is: 0xb212138f,305	///  or in textual repr: setOwnerSubstrate(uint256)306	function setOwnerSubstrate(uint256 newOwner) public {307		require(false, stub_error);308		newOwner;309		dummy = 0;310	}311}312313/// @dev the ERC-165 identifier for this interface is 0x79cc6790314contract ERC20UniqueExtensions is Dummy, ERC165 {315	/// @dev EVM selector for this function is: 0x79cc6790,316	///  or in textual repr: burnFrom(address,uint256)317	function burnFrom(address from, uint256 amount) public returns (bool) {318		require(false, stub_error);319		from;320		amount;321		dummy = 0;322		return false;323	}324}325326/// @dev inlined interface327contract ERC20Events {328	event Transfer(address indexed from, address indexed to, uint256 value);329	event Approval(330		address indexed owner,331		address indexed spender,332		uint256 value333	);334}335336/// @dev the ERC-165 identifier for this interface is 0x942e8b22337contract ERC20 is Dummy, ERC165, ERC20Events {338	/// @dev EVM selector for this function is: 0x06fdde03,339	///  or in textual repr: name()340	function name() public view returns (string memory) {341		require(false, stub_error);342		dummy;343		return "";344	}345346	/// @dev EVM selector for this function is: 0x95d89b41,347	///  or in textual repr: symbol()348	function symbol() public view returns (string memory) {349		require(false, stub_error);350		dummy;351		return "";352	}353354	/// @dev EVM selector for this function is: 0x18160ddd,355	///  or in textual repr: totalSupply()356	function totalSupply() public view returns (uint256) {357		require(false, stub_error);358		dummy;359		return 0;360	}361362	/// @dev EVM selector for this function is: 0x313ce567,363	///  or in textual repr: decimals()364	function decimals() public view returns (uint8) {365		require(false, stub_error);366		dummy;367		return 0;368	}369370	/// @dev EVM selector for this function is: 0x70a08231,371	///  or in textual repr: balanceOf(address)372	function balanceOf(address owner) public view returns (uint256) {373		require(false, stub_error);374		owner;375		dummy;376		return 0;377	}378379	/// @dev EVM selector for this function is: 0xa9059cbb,380	///  or in textual repr: transfer(address,uint256)381	function transfer(address to, uint256 amount) public returns (bool) {382		require(false, stub_error);383		to;384		amount;385		dummy = 0;386		return false;387	}388389	/// @dev EVM selector for this function is: 0x23b872dd,390	///  or in textual repr: transferFrom(address,address,uint256)391	function transferFrom(392		address from,393		address to,394		uint256 amount395	) public returns (bool) {396		require(false, stub_error);397		from;398		to;399		amount;400		dummy = 0;401		return false;402	}403404	/// @dev EVM selector for this function is: 0x095ea7b3,405	///  or in textual repr: approve(address,uint256)406	function approve(address spender, uint256 amount) public returns (bool) {407		require(false, stub_error);408		spender;409		amount;410		dummy = 0;411		return false;412	}413414	/// @dev EVM selector for this function is: 0xdd62ed3e,415	///  or in textual repr: allowance(address,address)416	function allowance(address owner, address spender)417		public418		view419		returns (uint256)420	{421		require(false, stub_error);422		owner;423		spender;424		dummy;425		return 0;426	}427}428429contract UniqueFungible is430	Dummy,431	ERC165,432	ERC20,433	ERC20UniqueExtensions,434	Collection435{}