git.delta.rocks / unique-network / refs/commits / 3fa58894bbf0

difftreelog

source

pallets/fungible/src/stubs/UniqueFungible.sol8.3 KiBsourcehistory
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56// 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// Inline25contract ERC20Events {26	event Transfer(address indexed from, address indexed to, uint256 value);27	event Approval(28		address indexed owner,29		address indexed spender,30		uint256 value31	);32}3334// Selector: 79cc679035contract ERC20UniqueExtensions is Dummy, ERC165 {36	// Selector: burnFrom(address,uint256) 79cc679037	function burnFrom(address from, uint256 amount) public returns (bool) {38		require(false, stub_error);39		from;40		amount;41		dummy = 0;42		return false;43	}44}4546// Selector: 7d9262e647contract Collection is Dummy, ERC165 {48	// Set collection property.49	//50	// @param key Property key.51	// @param value Propery value.52	//53	// Selector: setCollectionProperty(string,bytes) 2f073f6654	function setCollectionProperty(string memory key, bytes memory value)55		public56	{57		require(false, stub_error);58		key;59		value;60		dummy = 0;61	}6263	// Delete collection property.64	//65	// @param key Property key.66	//67	// Selector: deleteCollectionProperty(string) 7b7debce68	function deleteCollectionProperty(string memory key) public {69		require(false, stub_error);70		key;71		dummy = 0;72	}7374	// Get collection property.75	//76	// @dev Throws error if key not found.77	//78	// @param key Property key.79	// @return bytes The property corresponding to the key.80	//81	// Selector: collectionProperty(string) cf24fd6d82	function collectionProperty(string memory key)83		public84		view85		returns (bytes memory)86	{87		require(false, stub_error);88		key;89		dummy;90		return hex"";91	}9293	// Set the sponsor of the collection.94	//95	// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.96	//97	// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.98	//99	// Selector: setCollectionSponsor(address) 7623402e100	function setCollectionSponsor(address sponsor) public {101		require(false, stub_error);102		sponsor;103		dummy = 0;104	}105106	// Collection sponsorship confirmation.107	//108	// @dev After setting the sponsor for the collection, it must be confirmed with this function.109	//110	// Selector: confirmCollectionSponsorship() 3c50e97a111	function confirmCollectionSponsorship() public {112		require(false, stub_error);113		dummy = 0;114	}115116	// Set limits for the collection.117	// @dev Throws error if limit not found.118	// @param limit Name of the limit. Valid names:119	// 	"accountTokenOwnershipLimit",120	// 	"sponsoredDataSize",121	// 	"sponsoredDataRateLimit",122	// 	"tokenLimit",123	// 	"sponsorTransferTimeout",124	// 	"sponsorApproveTimeout"125	// @param value Value of the limit.126	//127	// Selector: setCollectionLimit(string,uint32) 6a3841db128	function setCollectionLimit(string memory limit, uint32 value) public {129		require(false, stub_error);130		limit;131		value;132		dummy = 0;133	}134135	// Set limits for the collection.136	// @dev Throws error if limit not found.137	// @param limit Name of the limit. Valid names:138	// 	"ownerCanTransfer",139	// 	"ownerCanDestroy",140	// 	"transfersEnabled"141	// @param value Value of the limit.142	//143	// Selector: setCollectionLimit(string,bool) 993b7fba144	function setCollectionLimit(string memory limit, bool value) public {145		require(false, stub_error);146		limit;147		value;148		dummy = 0;149	}150151	// Get contract address.152	//153	// Selector: contractAddress() f6b4dfb4154	function contractAddress() public view returns (address) {155		require(false, stub_error);156		dummy;157		return 0x0000000000000000000000000000000000000000;158	}159160	// Add collection admin by substrate address.161	// @param new_admin Substrate administrator address.162	//163	// Selector: addCollectionAdminSubstrate(uint256) 5730062b164	function addCollectionAdminSubstrate(uint256 newAdmin) public {165		require(false, stub_error);166		newAdmin;167		dummy = 0;168	}169170	// Remove collection admin by substrate address.171	// @param admin Substrate administrator address.172	//173	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9174	function removeCollectionAdminSubstrate(uint256 admin) public {175		require(false, stub_error);176		admin;177		dummy = 0;178	}179180	// Add collection admin.181	// @param new_admin Address of the added administrator.182	//183	// Selector: addCollectionAdmin(address) 92e462c7184	function addCollectionAdmin(address newAdmin) public {185		require(false, stub_error);186		newAdmin;187		dummy = 0;188	}189190	// Remove collection admin.191	//192	// @param new_admin Address of the removed administrator.193	//194	// Selector: removeCollectionAdmin(address) fafd7b42195	function removeCollectionAdmin(address admin) public {196		require(false, stub_error);197		admin;198		dummy = 0;199	}200201	// Toggle accessibility of collection nesting.202	//203	// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'204	//205	// Selector: setCollectionNesting(bool) 112d4586206	function setCollectionNesting(bool enable) public {207		require(false, stub_error);208		enable;209		dummy = 0;210	}211212	// Toggle accessibility of collection nesting.213	//214	// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'215	// @param collections Addresses of collections that will be available for nesting.216	//217	// Selector: setCollectionNesting(bool,address[]) 64872396218	function setCollectionNesting(bool enable, address[] memory collections)219		public220	{221		require(false, stub_error);222		enable;223		collections;224		dummy = 0;225	}226227	// Set the collection access method.228	// @param mode Access mode229	// 	0 for Normal230	// 	1 for AllowList231	//232	// Selector: setCollectionAccess(uint8) 41835d4c233	function setCollectionAccess(uint8 mode) public {234		require(false, stub_error);235		mode;236		dummy = 0;237	}238239	// Add the user to the allowed list.240	//241	// @param user Address of a trusted user.242	//243	// Selector: addToCollectionAllowList(address) 67844fe6244	function addToCollectionAllowList(address user) public {245		require(false, stub_error);246		user;247		dummy = 0;248	}249250	// Remove the user from the allowed list.251	//252	// @param user Address of a removed user.253	//254	// Selector: removeFromCollectionAllowList(address) 85c51acb255	function removeFromCollectionAllowList(address user) public {256		require(false, stub_error);257		user;258		dummy = 0;259	}260261	// Switch permission for minting.262	//263	// @param mode Enable if "true".264	//265	// Selector: setCollectionMintMode(bool) 00018e84266	function setCollectionMintMode(bool mode) public {267		require(false, stub_error);268		mode;269		dummy = 0;270	}271}272273// Selector: 942e8b22274contract ERC20 is Dummy, ERC165, ERC20Events {275	// Selector: name() 06fdde03276	function name() public view returns (string memory) {277		require(false, stub_error);278		dummy;279		return "";280	}281282	// Selector: symbol() 95d89b41283	function symbol() public view returns (string memory) {284		require(false, stub_error);285		dummy;286		return "";287	}288289	// Selector: totalSupply() 18160ddd290	function totalSupply() public view returns (uint256) {291		require(false, stub_error);292		dummy;293		return 0;294	}295296	// Selector: decimals() 313ce567297	function decimals() public view returns (uint8) {298		require(false, stub_error);299		dummy;300		return 0;301	}302303	// Selector: balanceOf(address) 70a08231304	function balanceOf(address owner) public view returns (uint256) {305		require(false, stub_error);306		owner;307		dummy;308		return 0;309	}310311	// Selector: transfer(address,uint256) a9059cbb312	function transfer(address to, uint256 amount) public returns (bool) {313		require(false, stub_error);314		to;315		amount;316		dummy = 0;317		return false;318	}319320	// Selector: transferFrom(address,address,uint256) 23b872dd321	function transferFrom(322		address from,323		address to,324		uint256 amount325	) public returns (bool) {326		require(false, stub_error);327		from;328		to;329		amount;330		dummy = 0;331		return false;332	}333334	// Selector: approve(address,uint256) 095ea7b3335	function approve(address spender, uint256 amount) public returns (bool) {336		require(false, stub_error);337		spender;338		amount;339		dummy = 0;340		return false;341	}342343	// Selector: allowance(address,address) dd62ed3e344	function allowance(address owner, address spender)345		public346		view347		returns (uint256)348	{349		require(false, stub_error);350		owner;351		spender;352		dummy;353		return 0;354	}355}356357contract UniqueFungible is358	Dummy,359	ERC165,360	ERC20,361	ERC20UniqueExtensions,362	Collection363{}