git.delta.rocks / unique-network / refs/commits / e8c8f78361e7

difftreelog

source

pallets/refungible/src/stubs/UniqueRefungibleToken.sol9.8 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/// @dev the ERC-165 identifier for this interface is 0x5755c3f221contract ERC1633 is Dummy, ERC165 {22	/// @dev EVM selector for this function is: 0x80a54001,23	///  or in textual repr: parentToken()24	function parentToken() public view returns (address) {25		require(false, stub_error);26		dummy;27		return 0x0000000000000000000000000000000000000000;28	}2930	/// @dev EVM selector for this function is: 0xd7f083f3,31	///  or in textual repr: parentTokenId()32	function parentTokenId() public view returns (uint256) {33		require(false, stub_error);34		dummy;35		return 0;36	}37}3839/// @dev the ERC-165 identifier for this interface is 0xedd3a56440contract ERC20UniqueExtensions is Dummy, ERC165 {41	/// @dev Function to check the amount of tokens that an owner allowed to a spender.42	/// @param owner crossAddress The address which owns the funds.43	/// @param spender crossAddress The address which will spend the funds.44	/// @return A uint256 specifying the amount of tokens still available for the spender.45	/// @dev EVM selector for this function is: 0xe0af4bd7,46	///  or in textual repr: allowanceCross((address,uint256),(address,uint256))47	function allowanceCross(CrossAddress memory owner, CrossAddress memory spender) public view returns (uint256) {48		require(false, stub_error);49		owner;50		spender;51		dummy;52		return 0;53	}5455	// /// @dev Function that burns an amount of the token of a given account,56	// /// deducting from the sender's allowance for said account.57	// /// @param from The account whose tokens will be burnt.58	// /// @param amount The amount that will be burnt.59	// /// @dev EVM selector for this function is: 0x79cc6790,60	// ///  or in textual repr: burnFrom(address,uint256)61	// function burnFrom(address from, uint256 amount) public returns (bool) {62	// 	require(false, stub_error);63	// 	from;64	// 	amount;65	// 	dummy = 0;66	// 	return false;67	// }6869	/// @dev Function that burns an amount of the token of a given account,70	/// deducting from the sender's allowance for said account.71	/// @param from The account whose tokens will be burnt.72	/// @param amount The amount that will be burnt.73	/// @dev EVM selector for this function is: 0xbb2f5a58,74	///  or in textual repr: burnFromCross((address,uint256),uint256)75	function burnFromCross(CrossAddress memory from, uint256 amount) public returns (bool) {76		require(false, stub_error);77		from;78		amount;79		dummy = 0;80		return false;81	}8283	/// @dev Approve the passed address to spend the specified amount of tokens on behalf of `msg.sender`.84	/// Beware that changing an allowance with this method brings the risk that someone may use both the old85	/// and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this86	/// race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:87	/// https://github.com/ethereum/EIPs/issues/20#issuecomment-26352472988	/// @param spender The crossaccount which will spend the funds.89	/// @param amount The amount of tokens to be spent.90	/// @dev EVM selector for this function is: 0x0ecd0ab0,91	///  or in textual repr: approveCross((address,uint256),uint256)92	function approveCross(CrossAddress memory spender, uint256 amount) public returns (bool) {93		require(false, stub_error);94		spender;95		amount;96		dummy = 0;97		return false;98	}99100	/// @notice Balance of account101	/// @param owner An cross address for whom to query the balance102	/// @return The number of fingibles owned by `owner`, possibly zero103	/// @dev EVM selector for this function is: 0xec069398,104	///  or in textual repr: balanceOfCross((address,uint256))105	function balanceOfCross(CrossAddress memory owner) public view returns (uint256) {106		require(false, stub_error);107		owner;108		dummy;109		return 0;110	}111112	/// @dev Function that changes total amount of the tokens.113	///  Throws if `msg.sender` doesn't owns all of the tokens.114	/// @param amount New total amount of the tokens.115	/// @dev EVM selector for this function is: 0xd2418ca7,116	///  or in textual repr: repartition(uint256)117	function repartition(uint256 amount) public returns (bool) {118		require(false, stub_error);119		amount;120		dummy = 0;121		return false;122	}123124	/// @dev Transfer token for a specified address125	/// @param to The crossaccount to transfer to.126	/// @param amount The amount to be transferred.127	/// @dev EVM selector for this function is: 0x2ada85ff,128	///  or in textual repr: transferCross((address,uint256),uint256)129	function transferCross(CrossAddress memory to, uint256 amount) public returns (bool) {130		require(false, stub_error);131		to;132		amount;133		dummy = 0;134		return false;135	}136137	/// @dev Transfer tokens from one address to another138	/// @param from The address which you want to send tokens from139	/// @param to The address which you want to transfer to140	/// @param amount the amount of tokens to be transferred141	/// @dev EVM selector for this function is: 0xd5cf430b,142	///  or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)143	function transferFromCross(144		CrossAddress memory from,145		CrossAddress memory to,146		uint256 amount147	) public returns (bool) {148		require(false, stub_error);149		from;150		to;151		amount;152		dummy = 0;153		return false;154	}155}156157/// Cross account struct158struct CrossAddress {159	address eth;160	uint256 sub;161}162163/// @dev inlined interface164contract ERC20Events {165	event Transfer(address indexed from, address indexed to, uint256 value);166	event Approval(address indexed owner, address indexed spender, uint256 value);167}168169/// @title Standard ERC20 token170///171/// @dev Implementation of the basic standard token.172/// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md173/// @dev the ERC-165 identifier for this interface is 0x942e8b22174contract ERC20 is Dummy, ERC165, ERC20Events {175	/// @return the name of the token.176	/// @dev EVM selector for this function is: 0x06fdde03,177	///  or in textual repr: name()178	function name() public view returns (string memory) {179		require(false, stub_error);180		dummy;181		return "";182	}183184	/// @return the symbol of the token.185	/// @dev EVM selector for this function is: 0x95d89b41,186	///  or in textual repr: symbol()187	function symbol() public view returns (string memory) {188		require(false, stub_error);189		dummy;190		return "";191	}192193	/// @dev Total number of tokens in existence194	/// @dev EVM selector for this function is: 0x18160ddd,195	///  or in textual repr: totalSupply()196	function totalSupply() public view returns (uint256) {197		require(false, stub_error);198		dummy;199		return 0;200	}201202	/// @dev Not supported203	/// @dev EVM selector for this function is: 0x313ce567,204	///  or in textual repr: decimals()205	function decimals() public view returns (uint8) {206		require(false, stub_error);207		dummy;208		return 0;209	}210211	/// @dev Gets the balance of the specified address.212	/// @param owner The address to query the balance of.213	/// @return An uint256 representing the amount owned by the passed address.214	/// @dev EVM selector for this function is: 0x70a08231,215	///  or in textual repr: balanceOf(address)216	function balanceOf(address owner) public view returns (uint256) {217		require(false, stub_error);218		owner;219		dummy;220		return 0;221	}222223	/// @dev Transfer token for a specified address224	/// @param to The address to transfer to.225	/// @param amount The amount to be transferred.226	/// @dev EVM selector for this function is: 0xa9059cbb,227	///  or in textual repr: transfer(address,uint256)228	function transfer(address to, uint256 amount) public returns (bool) {229		require(false, stub_error);230		to;231		amount;232		dummy = 0;233		return false;234	}235236	/// @dev Transfer tokens from one address to another237	/// @param from address The address which you want to send tokens from238	/// @param to address The address which you want to transfer to239	/// @param amount uint256 the amount of tokens to be transferred240	/// @dev EVM selector for this function is: 0x23b872dd,241	///  or in textual repr: transferFrom(address,address,uint256)242	function transferFrom(243		address from,244		address to,245		uint256 amount246	) public returns (bool) {247		require(false, stub_error);248		from;249		to;250		amount;251		dummy = 0;252		return false;253	}254255	/// @dev Approve the passed address to spend the specified amount of tokens on behalf of `msg.sender`.256	/// Beware that changing an allowance with this method brings the risk that someone may use both the old257	/// and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this258	/// race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:259	/// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729260	/// @param spender The address which will spend the funds.261	/// @param amount The amount of tokens to be spent.262	/// @dev EVM selector for this function is: 0x095ea7b3,263	///  or in textual repr: approve(address,uint256)264	function approve(address spender, uint256 amount) public returns (bool) {265		require(false, stub_error);266		spender;267		amount;268		dummy = 0;269		return false;270	}271272	/// @dev Function to check the amount of tokens that an owner allowed to a spender.273	/// @param owner address The address which owns the funds.274	/// @param spender address The address which will spend the funds.275	/// @return A uint256 specifying the amount of tokens still available for the spender.276	/// @dev EVM selector for this function is: 0xdd62ed3e,277	///  or in textual repr: allowance(address,address)278	function allowance(address owner, address spender) public view returns (uint256) {279		require(false, stub_error);280		owner;281		spender;282		dummy;283		return 0;284	}285}286287contract UniqueRefungibleToken is Dummy, ERC165, ERC20, ERC20UniqueExtensions, ERC1633 {}