@@ -7,13 +7,13 @@ import {IERC20} from "./IERC20.sol";
77import {IERC165 } from "./IERC165.sol " ;
88
99/**
10- * @dev Interface of an ERC-1363 compliant contract, as defined in the
11- * https://eips.ethereum.org/EIPS/eip-1363[ERC].
10+ * @title IERC1363
11+ * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363 ].
1212 *
13- * Defines a interface for ERC-20 tokens that supports executing recipient
14- * code after `transfer` or `transferFrom`, or spender code after `approve`.
13+ * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
14+ * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction .
1515 */
16- interface IERC1363 is IERC165 , IERC20 {
16+ interface IERC1363 is IERC20 , IERC165 {
1717 /*
1818 * Note: the ERC-165 identifier for this interface is 0xb0202a11.
1919 * 0xb0202a11 ===
@@ -26,55 +26,61 @@ interface IERC1363 is IERC165, IERC20 {
2626 */
2727
2828 /**
29- * @dev Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver
30- * @param to address The address which you want to transfer to
31- * @param amount uint256 The amount of tokens to be transferred
32- * @return true unless throwing
29+ * @dev Moves a `value` amount of tokens from the caller's account to `to`
30+ * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
31+ * @param to The address which you want to transfer to.
32+ * @param value The amount of tokens to be transferred.
33+ * @return A boolean value indicating whether the operation succeeded unless throwing.
3334 */
34- function transferAndCall (address to , uint256 amount ) external returns (bool );
35+ function transferAndCall (address to , uint256 value ) external returns (bool );
3536
3637 /**
37- * @dev Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver
38- * @param to address The address which you want to transfer to
39- * @param amount uint256 The amount of tokens to be transferred
40- * @param data bytes Additional data with no specified format, sent in call to `to`
41- * @return true unless throwing
38+ * @dev Moves a `value` amount of tokens from the caller's account to `to`
39+ * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
40+ * @param to The address which you want to transfer to.
41+ * @param value The amount of tokens to be transferred.
42+ * @param data Additional data with no specified format, sent in call to `to`.
43+ * @return A boolean value indicating whether the operation succeeded unless throwing.
4244 */
43- function transferAndCall (address to , uint256 amount , bytes memory data ) external returns (bool );
45+ function transferAndCall (address to , uint256 value , bytes calldata data ) external returns (bool );
4446
4547 /**
46- * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver
47- * @param from address The address which you want to send tokens from
48- * @param to address The address which you want to transfer to
49- * @param amount uint256 The amount of tokens to be transferred
50- * @return true unless throwing
48+ * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
49+ * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
50+ * @param from The address which you want to send tokens from.
51+ * @param to The address which you want to transfer to.
52+ * @param value The amount of tokens to be transferred.
53+ * @return A boolean value indicating whether the operation succeeded unless throwing.
5154 */
52- function transferFromAndCall (address from , address to , uint256 amount ) external returns (bool );
55+ function transferFromAndCall (address from , address to , uint256 value ) external returns (bool );
5356
5457 /**
55- * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver
56- * @param from address The address which you want to send tokens from
57- * @param to address The address which you want to transfer to
58- * @param amount uint256 The amount of tokens to be transferred
59- * @param data bytes Additional data with no specified format, sent in call to `to`
60- * @return true unless throwing
58+ * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
59+ * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
60+ * @param from The address which you want to send tokens from.
61+ * @param to The address which you want to transfer to.
62+ * @param value The amount of tokens to be transferred.
63+ * @param data Additional data with no specified format, sent in call to `to`.
64+ * @return A boolean value indicating whether the operation succeeded unless throwing.
6165 */
62- function transferFromAndCall (address from , address to , uint256 amount , bytes memory data ) external returns (bool );
66+ function transferFromAndCall (address from , address to , uint256 value , bytes calldata data ) external returns (bool );
6367
6468 /**
65- * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender
66- * and then call `onApprovalReceived` on spender.
67- * @param spender address The address which will spend the funds
68- * @param amount uint256 The amount of tokens to be spent
69+ * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
70+ * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
71+ * @param spender The address which will spend the funds.
72+ * @param value The amount of tokens to be spent.
73+ * @return A boolean value indicating whether the operation succeeded unless throwing.
6974 */
70- function approveAndCall (address spender , uint256 amount ) external returns (bool );
75+ function approveAndCall (address spender , uint256 value ) external returns (bool );
7176
7277 /**
73- * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender
74- * and then call `onApprovalReceived` on spender.
75- * @param spender address The address which will spend the funds
76- * @param amount uint256 The amount of tokens to be spent
77- * @param data bytes Additional data with no specified format, sent in call to `spender`
78+ * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
79+ * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
80+ * @param spender The address which will spend the funds.
81+ * @param value The amount of tokens to be spent.
82+ * @param data Additional data with no specified format, sent in call to `spender`.
83+ * @return A boolean value indicating whether the operation succeeded unless throwing.
7884 */
79- function approveAndCall (address spender , uint256 amount , bytes memory data ) external returns (bool );
85+ function approveAndCall (address spender , uint256 value , bytes calldata data ) external returns (bool );
8086}
0 commit comments