From 1c14560300beb70d1a2e5343edb387db846b504f Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:36:16 -0500 Subject: [PATCH 01/16] Add IERC6909 --- contracts/token/ERC6909/IERC6909.sol | 73 ++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 contracts/token/ERC6909/IERC6909.sol diff --git a/contracts/token/ERC6909/IERC6909.sol b/contracts/token/ERC6909/IERC6909.sol new file mode 100644 index 00000000000..cf70373fc29 --- /dev/null +++ b/contracts/token/ERC6909/IERC6909.sol @@ -0,0 +1,73 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (token/ERC6909/IRC6909.sol) + +pragma solidity ^0.8.20; + +import {IERC165} from "../../utils/introspection/IERC165.sol"; + +/** + * @dev Required interface of an ERC-6909 compliant contract, as defined in the + * https://eips.ethereum.org/EIPS/eip-6909[ERC]. + */ +interface IERC6909 is IERC165 { + /** + * @dev Emitted when the allowance of a `spender` for an `owner` is set by a call to `approve` for a + * token of type `id`. The new allowance is `amount`. + */ + event Approval(address indexed owner, address indexed spender, uint256 indexed id, uint256 amount); + + /** + * @dev Emitted when `owner` grants or revokes operator status for a `spender`. + */ + event OperatorSet(address indexed owner, address indexed spender, bool isOperator); + + /** + * @dev Emitted when `amount` tokens of type `id` are moved from `from` to `to` initiated by `caller`. + */ + event Transfer(address caller, address indexed from, address indexed to, uint256 indexed id, uint256 amount); + + /** + * @dev Returns the amount of tokens of type `id` owned by `owner`. + */ + function balanceOf(address owner, uint256 id) external view returns (uint256); + + /** + * @dev Returns the amount of tokens of type `id` that `spender` is allowed to spend on behalf of `owner`. + * + * NOTE: Does not include operator allowances. + */ + function allowance(address owner, address spender, uint256 id) external view returns (uint256); + + /** + * @dev Returns true if `spender` is set as an operator for `owner`. + */ + function isOperator(address owner, address spender) external view returns (bool); + + /** + * @dev Sets an approval to `spender` for `amount` tokens of type `id` from the caller's tokens. + * + * Must return true. + */ + function approve(address spender, uint256 id, uint256 amount) external view returns (bool); + + /** + * @dev Grants or revokes unlimited transfer permission of any token id to `spender` for the caller's tokens. + * + * Must return true. + */ + function setOperator(address spender, bool isOperator) external returns (bool); + + /** + * @dev Transfers `amount` of token type `id` from the caller's account to `to`. + * + * Must return true. + */ + function transfer(address to, uint256 id, uint256 amount) external returns (bool); + + /** + * @dev Transfers `amount` of token type `id` from `from` to `to`. + * + * Must return true. + */ + function transferFrom(address from, address to, uint256 id, uint256 amount) external returns (bool); +} From 7fac687109a661603600a331987a3b981977fe02 Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:37:14 -0500 Subject: [PATCH 02/16] rename file --- contracts/token/ERC6909/{IERC6909.sol => draft-IERC6909.sol} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename contracts/token/ERC6909/{IERC6909.sol => draft-IERC6909.sol} (100%) diff --git a/contracts/token/ERC6909/IERC6909.sol b/contracts/token/ERC6909/draft-IERC6909.sol similarity index 100% rename from contracts/token/ERC6909/IERC6909.sol rename to contracts/token/ERC6909/draft-IERC6909.sol From 8f49ffbb95c875efec5dda01a0f7935f83e84b2b Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:39:14 -0500 Subject: [PATCH 03/16] update file path --- contracts/token/ERC6909/draft-IERC6909.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/token/ERC6909/draft-IERC6909.sol b/contracts/token/ERC6909/draft-IERC6909.sol index cf70373fc29..65cb7ca7785 100644 --- a/contracts/token/ERC6909/draft-IERC6909.sol +++ b/contracts/token/ERC6909/draft-IERC6909.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (token/ERC6909/IRC6909.sol) +// OpenZeppelin Contracts (token/ERC6909/draft-IRC6909.sol) pragma solidity ^0.8.20; From 1f9f114a95391e23968c1e86ef6600afd6282b6b Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:46:29 -0500 Subject: [PATCH 04/16] add changelog --- .changeset/long-walls-draw.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/long-walls-draw.md diff --git a/.changeset/long-walls-draw.md b/.changeset/long-walls-draw.md new file mode 100644 index 00000000000..222b50cc007 --- /dev/null +++ b/.changeset/long-walls-draw.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': minor +--- + +`IERC6909`: Add the interface for the ERC6909. From 195cb47b06778defe3a4fa0dbd050040d768c891 Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:33:57 -0500 Subject: [PATCH 05/16] add file to interfaces dir --- contracts/interfaces/draft-IERC6909.sol | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 contracts/interfaces/draft-IERC6909.sol diff --git a/contracts/interfaces/draft-IERC6909.sol b/contracts/interfaces/draft-IERC6909.sol new file mode 100644 index 00000000000..1dd5f773528 --- /dev/null +++ b/contracts/interfaces/draft-IERC6909.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (interfaces/draft-IERC6909.sol) + +pragma solidity ^0.8.20; + +import {IERC6909} from "../token/ERC6909/draft-IERC6909.sol"; From 8b91f1c8db36dccf8cde15bfe88da77b2271936a Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Wed, 11 Dec 2024 11:31:47 -0500 Subject: [PATCH 06/16] move interface implementation to interfaces folder --- contracts/interfaces/draft-IERC6909.sol | 71 ++++++++++++++++++++- contracts/token/ERC6909/draft-IERC6909.sol | 73 ---------------------- 2 files changed, 69 insertions(+), 75 deletions(-) delete mode 100644 contracts/token/ERC6909/draft-IERC6909.sol diff --git a/contracts/interfaces/draft-IERC6909.sol b/contracts/interfaces/draft-IERC6909.sol index 1dd5f773528..2d2475e6021 100644 --- a/contracts/interfaces/draft-IERC6909.sol +++ b/contracts/interfaces/draft-IERC6909.sol @@ -1,6 +1,73 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (interfaces/draft-IERC6909.sol) +// OpenZeppelin Contracts (token/ERC6909/draft-IERC6909.sol) pragma solidity ^0.8.20; -import {IERC6909} from "../token/ERC6909/draft-IERC6909.sol"; +import {IERC165} from "../../utils/introspection/IERC165.sol"; + +/** + * @dev Required interface of an ERC-6909 compliant contract, as defined in the + * https://eips.ethereum.org/EIPS/eip-6909[ERC]. + */ +interface IERC6909 is IERC165 { + /** + * @dev Emitted when the allowance of a `spender` for an `owner` is set by a call to `approve` for a + * token of type `id`. The new allowance is `amount`. + */ + event Approval(address indexed owner, address indexed spender, uint256 indexed id, uint256 amount); + + /** + * @dev Emitted when `owner` grants or revokes operator status for a `spender`. + */ + event OperatorSet(address indexed owner, address indexed spender, bool isOperator); + + /** + * @dev Emitted when `amount` tokens of type `id` are moved from `from` to `to` initiated by `caller`. + */ + event Transfer(address caller, address indexed from, address indexed to, uint256 indexed id, uint256 amount); + + /** + * @dev Returns the amount of tokens of type `id` owned by `owner`. + */ + function balanceOf(address owner, uint256 id) external view returns (uint256); + + /** + * @dev Returns the amount of tokens of type `id` that `spender` is allowed to spend on behalf of `owner`. + * + * NOTE: Does not include operator allowances. + */ + function allowance(address owner, address spender, uint256 id) external view returns (uint256); + + /** + * @dev Returns true if `spender` is set as an operator for `owner`. + */ + function isOperator(address owner, address spender) external view returns (bool); + + /** + * @dev Sets an approval to `spender` for `amount` tokens of type `id` from the caller's tokens. + * + * Must return true. + */ + function approve(address spender, uint256 id, uint256 amount) external view returns (bool); + + /** + * @dev Grants or revokes unlimited transfer permission of any token id to `spender` for the caller's tokens. + * + * Must return true. + */ + function setOperator(address spender, bool isOperator) external returns (bool); + + /** + * @dev Transfers `amount` of token type `id` from the caller's account to `to`. + * + * Must return true. + */ + function transfer(address to, uint256 id, uint256 amount) external returns (bool); + + /** + * @dev Transfers `amount` of token type `id` from `from` to `to`. + * + * Must return true. + */ + function transferFrom(address from, address to, uint256 id, uint256 amount) external returns (bool); +} diff --git a/contracts/token/ERC6909/draft-IERC6909.sol b/contracts/token/ERC6909/draft-IERC6909.sol deleted file mode 100644 index 65cb7ca7785..00000000000 --- a/contracts/token/ERC6909/draft-IERC6909.sol +++ /dev/null @@ -1,73 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (token/ERC6909/draft-IRC6909.sol) - -pragma solidity ^0.8.20; - -import {IERC165} from "../../utils/introspection/IERC165.sol"; - -/** - * @dev Required interface of an ERC-6909 compliant contract, as defined in the - * https://eips.ethereum.org/EIPS/eip-6909[ERC]. - */ -interface IERC6909 is IERC165 { - /** - * @dev Emitted when the allowance of a `spender` for an `owner` is set by a call to `approve` for a - * token of type `id`. The new allowance is `amount`. - */ - event Approval(address indexed owner, address indexed spender, uint256 indexed id, uint256 amount); - - /** - * @dev Emitted when `owner` grants or revokes operator status for a `spender`. - */ - event OperatorSet(address indexed owner, address indexed spender, bool isOperator); - - /** - * @dev Emitted when `amount` tokens of type `id` are moved from `from` to `to` initiated by `caller`. - */ - event Transfer(address caller, address indexed from, address indexed to, uint256 indexed id, uint256 amount); - - /** - * @dev Returns the amount of tokens of type `id` owned by `owner`. - */ - function balanceOf(address owner, uint256 id) external view returns (uint256); - - /** - * @dev Returns the amount of tokens of type `id` that `spender` is allowed to spend on behalf of `owner`. - * - * NOTE: Does not include operator allowances. - */ - function allowance(address owner, address spender, uint256 id) external view returns (uint256); - - /** - * @dev Returns true if `spender` is set as an operator for `owner`. - */ - function isOperator(address owner, address spender) external view returns (bool); - - /** - * @dev Sets an approval to `spender` for `amount` tokens of type `id` from the caller's tokens. - * - * Must return true. - */ - function approve(address spender, uint256 id, uint256 amount) external view returns (bool); - - /** - * @dev Grants or revokes unlimited transfer permission of any token id to `spender` for the caller's tokens. - * - * Must return true. - */ - function setOperator(address spender, bool isOperator) external returns (bool); - - /** - * @dev Transfers `amount` of token type `id` from the caller's account to `to`. - * - * Must return true. - */ - function transfer(address to, uint256 id, uint256 amount) external returns (bool); - - /** - * @dev Transfers `amount` of token type `id` from `from` to `to`. - * - * Must return true. - */ - function transferFrom(address from, address to, uint256 id, uint256 amount) external returns (bool); -} From 792353a99d4fc78744d9aa022dfff527385aa86e Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Wed, 11 Dec 2024 11:32:47 -0500 Subject: [PATCH 07/16] Update .changeset/long-walls-draw.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ernesto GarcĂ­a --- .changeset/long-walls-draw.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/long-walls-draw.md b/.changeset/long-walls-draw.md index 222b50cc007..541e3c36499 100644 --- a/.changeset/long-walls-draw.md +++ b/.changeset/long-walls-draw.md @@ -2,4 +2,4 @@ 'openzeppelin-solidity': minor --- -`IERC6909`: Add the interface for the ERC6909. +`IERC6909`: Add the interface for the ERC-6909. From 1189a0d13dfbc52bc07e7a5cda7cae68ae924b71 Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Wed, 11 Dec 2024 12:20:45 -0500 Subject: [PATCH 08/16] fix import --- contracts/interfaces/draft-IERC6909.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/interfaces/draft-IERC6909.sol b/contracts/interfaces/draft-IERC6909.sol index 2d2475e6021..e05515316e6 100644 --- a/contracts/interfaces/draft-IERC6909.sol +++ b/contracts/interfaces/draft-IERC6909.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.20; -import {IERC165} from "../../utils/introspection/IERC165.sol"; +import {IERC165} from "../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC-6909 compliant contract, as defined in the From ae58067367b1222b1d2d9867512dac2f66adf962 Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:21:30 -0500 Subject: [PATCH 09/16] fix path --- contracts/interfaces/draft-IERC6909.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/interfaces/draft-IERC6909.sol b/contracts/interfaces/draft-IERC6909.sol index e05515316e6..3d375d02202 100644 --- a/contracts/interfaces/draft-IERC6909.sol +++ b/contracts/interfaces/draft-IERC6909.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (token/ERC6909/draft-IERC6909.sol) +// OpenZeppelin Contracts (interfaces/draft-IERC6909.sol) pragma solidity ^0.8.20; From af01467a8d17b46beec0bfc68a370ce261ab0d02 Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:52:51 -0500 Subject: [PATCH 10/16] update changelog --- .changeset/long-walls-draw.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/long-walls-draw.md b/.changeset/long-walls-draw.md index 541e3c36499..72451521011 100644 --- a/.changeset/long-walls-draw.md +++ b/.changeset/long-walls-draw.md @@ -2,4 +2,4 @@ 'openzeppelin-solidity': minor --- -`IERC6909`: Add the interface for the ERC-6909. +`IERC6909`: Add the interface for ERC-6909. From 1a037a0790e425be7a96e23b207df74d8ee34992 Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Thu, 12 Dec 2024 11:51:56 -0500 Subject: [PATCH 11/16] add interface extensions --- contracts/interfaces/draft-IERC6909.sol | 45 +++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/contracts/interfaces/draft-IERC6909.sol b/contracts/interfaces/draft-IERC6909.sol index 3d375d02202..24244b1ab03 100644 --- a/contracts/interfaces/draft-IERC6909.sol +++ b/contracts/interfaces/draft-IERC6909.sol @@ -71,3 +71,48 @@ interface IERC6909 is IERC165 { */ function transferFrom(address from, address to, uint256 id, uint256 amount) external returns (bool); } + +/** + * @dev Optional extension of {IERC6909} that adds metadata functions. + */ +interface IERC6909Metadata is IERC6909 { + /** + * @dev Returns the name of the token of type `id`. + */ + function name(uint256 id) external view returns (string memory); + + /** + * @dev Returns the ticker symbol of the token of type `id`. + */ + function symbol(uint256 id) external view returns (string memory); + + /** + * @dev Returns the number of decimals for the token of type `id`. + */ + function decimals(uint256 id) external view returns (uint8); +} + +/** + * @dev Optional extension of {IERC6909} that adds URI functions. + */ +interface IERC6909ContractURI is IERC6909 { + /** + * @dev Returns URI for the contract. + */ + function contractURI() external view returns (string memory); + + /** + * @dev Returns the URI for the token of type `id`. + */ + function tokenURI(uint256 id) external view returns (string memory); +} + +/** + * @dev Optional extension of {IERC6909} that adds a token supply function. + */ +interface IERC6909TokenSupply is IERC6909 { + /** + * @dev Returns the total supply of the token of type `id`. + */ + function totalSupply(uint256 id) external view returns (uint256); +} From af3fdda0ffba9318b2f3f1b4cf785ce97145a32b Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Thu, 12 Dec 2024 13:39:04 -0500 Subject: [PATCH 12/16] `approve` is not view --- contracts/interfaces/draft-IERC6909.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/interfaces/draft-IERC6909.sol b/contracts/interfaces/draft-IERC6909.sol index 24244b1ab03..6a0bc1445ee 100644 --- a/contracts/interfaces/draft-IERC6909.sol +++ b/contracts/interfaces/draft-IERC6909.sol @@ -48,7 +48,7 @@ interface IERC6909 is IERC165 { * * Must return true. */ - function approve(address spender, uint256 id, uint256 amount) external view returns (bool); + function approve(address spender, uint256 id, uint256 amount) external returns (bool); /** * @dev Grants or revokes unlimited transfer permission of any token id to `spender` for the caller's tokens. From f7e895e9ed8cefa3adf1473382b2d9293c13673b Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:54:15 -0500 Subject: [PATCH 13/16] Fix `IERC6909ContentURI` name --- contracts/interfaces/draft-IERC6909.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/interfaces/draft-IERC6909.sol b/contracts/interfaces/draft-IERC6909.sol index 6a0bc1445ee..03341c8c937 100644 --- a/contracts/interfaces/draft-IERC6909.sol +++ b/contracts/interfaces/draft-IERC6909.sol @@ -93,9 +93,9 @@ interface IERC6909Metadata is IERC6909 { } /** - * @dev Optional extension of {IERC6909} that adds URI functions. + * @dev Optional extension of {IERC6909} that adds content URI functions. */ -interface IERC6909ContractURI is IERC6909 { +interface IERC6909ContentURI is IERC6909 { /** * @dev Returns URI for the contract. */ From 8ee031dc015e0e97cc1bed09192f62e540878dc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Wed, 18 Dec 2024 12:51:51 -0600 Subject: [PATCH 14/16] Update contracts/interfaces/draft-IERC6909.sol --- contracts/interfaces/draft-IERC6909.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/contracts/interfaces/draft-IERC6909.sol b/contracts/interfaces/draft-IERC6909.sol index 03341c8c937..0a8d9e9491f 100644 --- a/contracts/interfaces/draft-IERC6909.sol +++ b/contracts/interfaces/draft-IERC6909.sol @@ -1,5 +1,4 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (interfaces/draft-IERC6909.sol) pragma solidity ^0.8.20; From f4ae88ed43fb8593210fde31644fac42728ca248 Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:47:12 -0500 Subject: [PATCH 15/16] generalize `Approval` docs --- contracts/interfaces/draft-IERC6909.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/interfaces/draft-IERC6909.sol b/contracts/interfaces/draft-IERC6909.sol index 0a8d9e9491f..30539bcefbe 100644 --- a/contracts/interfaces/draft-IERC6909.sol +++ b/contracts/interfaces/draft-IERC6909.sol @@ -10,8 +10,8 @@ import {IERC165} from "../utils/introspection/IERC165.sol"; */ interface IERC6909 is IERC165 { /** - * @dev Emitted when the allowance of a `spender` for an `owner` is set by a call to `approve` for a - * token of type `id`. The new allowance is `amount`. + * @dev Emitted when the allowance of a `spender` for an `owner` is set for a token of type `id`. + * The new allowance is `amount`. */ event Approval(address indexed owner, address indexed spender, uint256 indexed id, uint256 amount); From 96bb50a51af2b02561abd8950d1ae5bf24430b6e Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:29:37 -0500 Subject: [PATCH 16/16] use ERC parameters --- contracts/interfaces/draft-IERC6909.sol | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/contracts/interfaces/draft-IERC6909.sol b/contracts/interfaces/draft-IERC6909.sol index 30539bcefbe..12151e88656 100644 --- a/contracts/interfaces/draft-IERC6909.sol +++ b/contracts/interfaces/draft-IERC6909.sol @@ -18,12 +18,18 @@ interface IERC6909 is IERC165 { /** * @dev Emitted when `owner` grants or revokes operator status for a `spender`. */ - event OperatorSet(address indexed owner, address indexed spender, bool isOperator); + event OperatorSet(address indexed owner, address indexed spender, bool approved); /** - * @dev Emitted when `amount` tokens of type `id` are moved from `from` to `to` initiated by `caller`. + * @dev Emitted when `amount` tokens of type `id` are moved from `sender` to `receiver` initiated by `caller`. */ - event Transfer(address caller, address indexed from, address indexed to, uint256 indexed id, uint256 amount); + event Transfer( + address caller, + address indexed sender, + address indexed receiver, + uint256 indexed id, + uint256 amount + ); /** * @dev Returns the amount of tokens of type `id` owned by `owner`. @@ -54,21 +60,21 @@ interface IERC6909 is IERC165 { * * Must return true. */ - function setOperator(address spender, bool isOperator) external returns (bool); + function setOperator(address spender, bool approved) external returns (bool); /** - * @dev Transfers `amount` of token type `id` from the caller's account to `to`. + * @dev Transfers `amount` of token type `id` from the caller's account to `receiver`. * * Must return true. */ - function transfer(address to, uint256 id, uint256 amount) external returns (bool); + function transfer(address receiver, uint256 id, uint256 amount) external returns (bool); /** - * @dev Transfers `amount` of token type `id` from `from` to `to`. + * @dev Transfers `amount` of token type `id` from `sender` to `receiver`. * * Must return true. */ - function transferFrom(address from, address to, uint256 id, uint256 amount) external returns (bool); + function transferFrom(address sender, address receiver, uint256 id, uint256 amount) external returns (bool); } /**