123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- // SPDX-License-Identifier: MIT
- // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1363.sol)
- pragma solidity ^0.8.0;
- import "./IERC20.sol";
- import "./IERC165.sol";
- interface IERC1363 is IERC165, IERC20 {
- /*
- * Note: the ERC-165 identifier for this interface is 0x4bbee2df.
- * 0x4bbee2df ===
- * bytes4(keccak256('transferAndCall(address,uint256)')) ^
- * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
- * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
- * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)'))
- */
- /*
- * Note: the ERC-165 identifier for this interface is 0xfb9ec8ce.
- * 0xfb9ec8ce ===
- * bytes4(keccak256('approveAndCall(address,uint256)')) ^
- * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
- */
- /**
- * @dev Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver
- * @param to address The address which you want to transfer to
- * @param value uint256 The amount of tokens to be transferred
- * @return true unless throwing
- */
- function transferAndCall(address to, uint256 value) external returns (bool);
- /**
- * @dev Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver
- * @param to address The address which you want to transfer to
- * @param value uint256 The amount of tokens to be transferred
- * @param data bytes Additional data with no specified format, sent in call to `to`
- * @return true unless throwing
- */
- function transferAndCall(address to, uint256 value, bytes memory data) external returns (bool);
- /**
- * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver
- * @param from address The address which you want to send tokens from
- * @param to address The address which you want to transfer to
- * @param value uint256 The amount of tokens to be transferred
- * @return true unless throwing
- */
- function transferFromAndCall(address from, address to, uint256 value) external returns (bool);
- /**
- * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver
- * @param from address The address which you want to send tokens from
- * @param to address The address which you want to transfer to
- * @param value uint256 The amount of tokens to be transferred
- * @param data bytes Additional data with no specified format, sent in call to `to`
- * @return true unless throwing
- */
- function transferFromAndCall(address from, address to, uint256 value, bytes memory data) external returns (bool);
- /**
- * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender
- * and then call `onApprovalReceived` on spender.
- * @param spender address The address which will spend the funds
- * @param value uint256 The amount of tokens to be spent
- */
- function approveAndCall(address spender, uint256 value) external returns (bool);
- /**
- * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender
- * and then call `onApprovalReceived` on spender.
- * @param spender address The address which will spend the funds
- * @param value uint256 The amount of tokens to be spent
- * @param data bytes Additional data with no specified format, sent in call to `spender`
- */
- function approveAndCall(address spender, uint256 value, bytes memory data) external returns (bool);
- }
|