git.delta.rocks / unique-network / refs/commits / 6a7d5b108992

difftreelog

source

pallets/refungible/src/stubs/UniqueRefungibleToken.sol5.5 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: 042f110635contract ERC1633UniqueExtensions is Dummy, ERC165 {36	// Selector: setParentNFT(address,uint256) 042f110637	function setParentNFT(address collection, uint256 nftId)38		public39		returns (bool)40	{41		require(false, stub_error);42		collection;43		nftId;44		dummy = 0;45		return false;46	}47}4849// Selector: 5755c3f250contract ERC1633 is Dummy, ERC165 {51	// Selector: parentToken() 80a5400152	function parentToken() public view returns (address) {53		require(false, stub_error);54		dummy;55		return 0x0000000000000000000000000000000000000000;56	}5758	// Selector: parentTokenId() d7f083f359	function parentTokenId() public view returns (uint256) {60		require(false, stub_error);61		dummy;62		return 0;63	}64}6566// Selector: 942e8b2267contract ERC20 is Dummy, ERC165, ERC20Events {68	// @return the name of the token.69	//70	// Selector: name() 06fdde0371	function name() public view returns (string memory) {72		require(false, stub_error);73		dummy;74		return "";75	}7677	// @return the symbol of the token.78	//79	// Selector: symbol() 95d89b4180	function symbol() public view returns (string memory) {81		require(false, stub_error);82		dummy;83		return "";84	}8586	// @dev Total number of tokens in existence87	//88	// Selector: totalSupply() 18160ddd89	function totalSupply() public view returns (uint256) {90		require(false, stub_error);91		dummy;92		return 0;93	}9495	// @dev Not supported96	//97	// Selector: decimals() 313ce56798	function decimals() public view returns (uint8) {99		require(false, stub_error);100		dummy;101		return 0;102	}103104	// @dev Gets the balance of the specified address.105	// @param owner The address to query the balance of.106	// @return An uint256 representing the amount owned by the passed address.107	//108	// Selector: balanceOf(address) 70a08231109	function balanceOf(address owner) public view returns (uint256) {110		require(false, stub_error);111		owner;112		dummy;113		return 0;114	}115116	// @dev Transfer token for a specified address117	// @param to The address to transfer to.118	// @param amount The amount to be transferred.119	//120	// Selector: transfer(address,uint256) a9059cbb121	function transfer(address to, uint256 amount) public returns (bool) {122		require(false, stub_error);123		to;124		amount;125		dummy = 0;126		return false;127	}128129	// @dev Transfer tokens from one address to another130	// @param from address The address which you want to send tokens from131	// @param to address The address which you want to transfer to132	// @param amount uint256 the amount of tokens to be transferred133	//134	// Selector: transferFrom(address,address,uint256) 23b872dd135	function transferFrom(136		address from,137		address to,138		uint256 amount139	) public returns (bool) {140		require(false, stub_error);141		from;142		to;143		amount;144		dummy = 0;145		return false;146	}147148	// @dev Approve the passed address to spend the specified amount of tokens on behalf of `msg.sender`.149	// Beware that changing an allowance with this method brings the risk that someone may use both the old150	// and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this151	// race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:152	// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729153	// @param spender The address which will spend the funds.154	// @param amount The amount of tokens to be spent.155	//156	// Selector: approve(address,uint256) 095ea7b3157	function approve(address spender, uint256 amount) public returns (bool) {158		require(false, stub_error);159		spender;160		amount;161		dummy = 0;162		return false;163	}164165	// @dev Function to check the amount of tokens that an owner allowed to a spender.166	// @param owner address The address which owns the funds.167	// @param spender address The address which will spend the funds.168	// @return A uint256 specifying the amount of tokens still available for the spender.169	//170	// Selector: allowance(address,address) dd62ed3e171	function allowance(address owner, address spender)172		public173		view174		returns (uint256)175	{176		require(false, stub_error);177		owner;178		spender;179		dummy;180		return 0;181	}182}183184// Selector: ab8deb37185contract ERC20UniqueExtensions is Dummy, ERC165 {186	// @dev Function that burns an amount of the token of a given account,187	// deducting from the sender's allowance for said account.188	// @param from The account whose tokens will be burnt.189	// @param amount The amount that will be burnt.190	//191	// Selector: burnFrom(address,uint256) 79cc6790192	function burnFrom(address from, uint256 amount) public returns (bool) {193		require(false, stub_error);194		from;195		amount;196		dummy = 0;197		return false;198	}199200	// @dev Function that changes total amount of the tokens.201	//  Throws if `msg.sender` doesn't owns all of the tokens.202	// @param amount New total amount of the tokens.203	//204	// Selector: repartition(uint256) d2418ca7205	function repartition(uint256 amount) public returns (bool) {206		require(false, stub_error);207		amount;208		dummy = 0;209		return false;210	}211}212213contract UniqueRefungibleToken is214	Dummy,215	ERC165,216	ERC20,217	ERC20UniqueExtensions,218	ERC1633,219	ERC1633UniqueExtensions220{}