git.delta.rocks / unique-network / refs/commits / 2d2eac8ef8b2

difftreelog

source

pallets/fungible/src/stubs/UniqueFungible.sol8.8 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: 942e8b2247contract ERC20 is Dummy, ERC165, ERC20Events {48	// Selector: name() 06fdde0349	function name() public view returns (string memory) {50		require(false, stub_error);51		dummy;52		return "";53	}5455	// Selector: symbol() 95d89b4156	function symbol() public view returns (string memory) {57		require(false, stub_error);58		dummy;59		return "";60	}6162	// Selector: totalSupply() 18160ddd63	function totalSupply() public view returns (uint256) {64		require(false, stub_error);65		dummy;66		return 0;67	}6869	// Selector: decimals() 313ce56770	function decimals() public view returns (uint8) {71		require(false, stub_error);72		dummy;73		return 0;74	}7576	// Selector: balanceOf(address) 70a0823177	function balanceOf(address owner) public view returns (uint256) {78		require(false, stub_error);79		owner;80		dummy;81		return 0;82	}8384	// Selector: transfer(address,uint256) a9059cbb85	function transfer(address to, uint256 amount) public returns (bool) {86		require(false, stub_error);87		to;88		amount;89		dummy = 0;90		return false;91	}9293	// Selector: transferFrom(address,address,uint256) 23b872dd94	function transferFrom(95		address from,96		address to,97		uint256 amount98	) public returns (bool) {99		require(false, stub_error);100		from;101		to;102		amount;103		dummy = 0;104		return false;105	}106107	// Selector: approve(address,uint256) 095ea7b3108	function approve(address spender, uint256 amount) public returns (bool) {109		require(false, stub_error);110		spender;111		amount;112		dummy = 0;113		return false;114	}115116	// Selector: allowance(address,address) dd62ed3e117	function allowance(address owner, address spender)118		public119		view120		returns (uint256)121	{122		require(false, stub_error);123		owner;124		spender;125		dummy;126		return 0;127	}128}129130// Selector: aa7d570d131contract Collection is Dummy, ERC165 {132	// Set collection property.133	//134	// @param key Property key.135	// @param value Propery value.136	//137	// Selector: setCollectionProperty(string,bytes) 2f073f66138	function setCollectionProperty(string memory key, bytes memory value)139		public140	{141		require(false, stub_error);142		key;143		value;144		dummy = 0;145	}146147	// Delete collection property.148	//149	// @param key Property key.150	//151	// Selector: deleteCollectionProperty(string) 7b7debce152	function deleteCollectionProperty(string memory key) public {153		require(false, stub_error);154		key;155		dummy = 0;156	}157158	// Get collection property.159	//160	// @dev Throws error if key not found.161	//162	// @param key Property key.163	// @return bytes The property corresponding to the key.164	//165	// Selector: collectionProperty(string) cf24fd6d166	function collectionProperty(string memory key)167		public168		view169		returns (bytes memory)170	{171		require(false, stub_error);172		key;173		dummy;174		return hex"";175	}176177	// Set the sponsor of the collection.178	//179	// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.180	//181	// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.182	//183	// Selector: setCollectionSponsor(address) 7623402e184	function setCollectionSponsor(address sponsor) public {185		require(false, stub_error);186		sponsor;187		dummy = 0;188	}189190	// Collection sponsorship confirmation.191	//192	// @dev After setting the sponsor for the collection, it must be confirmed with this function.193	//194	// Selector: confirmCollectionSponsorship() 3c50e97a195	function confirmCollectionSponsorship() public {196		require(false, stub_error);197		dummy = 0;198	}199200	// Set limits for the collection.201	// @dev Throws error if limit not found.202	// @param limit Name of the limit. Valid names:203	// 	"accountTokenOwnershipLimit",204	// 	"sponsoredDataSize",205	// 	"sponsoredDataRateLimit",206	// 	"tokenLimit",207	// 	"sponsorTransferTimeout",208	// 	"sponsorApproveTimeout"209	// @param value Value of the limit.210	//211	// Selector: setCollectionLimit(string,uint32) 6a3841db212	function setCollectionLimit(string memory limit, uint32 value) public {213		require(false, stub_error);214		limit;215		value;216		dummy = 0;217	}218219	// Set limits for the collection.220	// @dev Throws error if limit not found.221	// @param limit Name of the limit. Valid names:222	// 	"ownerCanTransfer",223	// 	"ownerCanDestroy",224	// 	"transfersEnabled"225	// @param value Value of the limit.226	//227	// Selector: setCollectionLimit(string,bool) 993b7fba228	function setCollectionLimit(string memory limit, bool value) public {229		require(false, stub_error);230		limit;231		value;232		dummy = 0;233	}234235	// Get contract address.236	//237	// Selector: contractAddress() f6b4dfb4238	function contractAddress() public view returns (address) {239		require(false, stub_error);240		dummy;241		return 0x0000000000000000000000000000000000000000;242	}243244	// Add collection admin by substrate address.245	// @param new_admin Substrate administrator address.246	//247	// Selector: addCollectionAdminSubstrate(uint256) 5730062b248	function addCollectionAdminSubstrate(uint256 newAdmin) public {249		require(false, stub_error);250		newAdmin;251		dummy = 0;252	}253254	// Remove collection admin by substrate address.255	// @param admin Substrate administrator address.256	//257	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9258	function removeCollectionAdminSubstrate(uint256 admin) public {259		require(false, stub_error);260		admin;261		dummy = 0;262	}263264	// Add collection admin.265	// @param new_admin Address of the added administrator.266	//267	// Selector: addCollectionAdmin(address) 92e462c7268	function addCollectionAdmin(address newAdmin) public {269		require(false, stub_error);270		newAdmin;271		dummy = 0;272	}273274	// Remove collection admin.275	//276	// @param new_admin Address of the removed administrator.277	//278	// Selector: removeCollectionAdmin(address) fafd7b42279	function removeCollectionAdmin(address admin) public {280		require(false, stub_error);281		admin;282		dummy = 0;283	}284285	// Toggle accessibility of collection nesting.286	//287	// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'288	//289	// Selector: setCollectionNesting(bool) 112d4586290	function setCollectionNesting(bool enable) public {291		require(false, stub_error);292		enable;293		dummy = 0;294	}295296	// Toggle accessibility of collection nesting.297	//298	// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'299	// @param collections Addresses of collections that will be available for nesting.300	//301	// Selector: setCollectionNesting(bool,address[]) 64872396302	function setCollectionNesting(bool enable, address[] memory collections)303		public304	{305		require(false, stub_error);306		enable;307		collections;308		dummy = 0;309	}310311	// Set the collection access method.312	// @param mode Access mode313	// 	0 for Normal314	// 	1 for AllowList315	//316	// Selector: setCollectionAccess(uint8) 41835d4c317	function setCollectionAccess(uint8 mode) public {318		require(false, stub_error);319		mode;320		dummy = 0;321	}322323	// Add the user to the allowed list.324	//325	// @param user Address of a trusted user.326	//327	// Selector: addToCollectionAllowList(address) 67844fe6328	function addToCollectionAllowList(address user) public {329		require(false, stub_error);330		user;331		dummy = 0;332	}333334	// Remove the user from the allowed list.335	//336	// @param user Address of a removed user.337	//338	// Selector: removeFromCollectionAllowList(address) 85c51acb339	function removeFromCollectionAllowList(address user) public {340		require(false, stub_error);341		user;342		dummy = 0;343	}344345	// Switch permission for minting.346	//347	// @param mode Enable if "true".348	//349	// Selector: setCollectionMintMode(bool) 00018e84350	function setCollectionMintMode(bool mode) public {351		require(false, stub_error);352		mode;353		dummy = 0;354	}355356	// Check that account is the owner or admin of the collection357	//358	// @return "true" if account is the owner or admin359	//360	// Selector: verifyOwnerOrAdmin() 04a46053361	function verifyOwnerOrAdmin() public returns (bool) {362		require(false, stub_error);363		dummy = 0;364		return false;365	}366367	// Returns collection type368	//369	// @return `Fungible` or `NFT` or `ReFungible`370	//371	// Selector: uniqueCollectionType() d34b55b8372	function uniqueCollectionType() public returns (string memory) {373		require(false, stub_error);374		dummy = 0;375		return "";376	}377}378379contract UniqueFungible is380	Dummy,381	ERC165,382	ERC20,383	ERC20UniqueExtensions,384	Collection385{}