Skip to content

Commit 798aca1

Browse files
Amxxernestognw
andauthored
Mark ERC721Holder and ERC1155Holder as stateless (#5942)
Co-authored-by: Ernesto García <[email protected]>
1 parent 6538427 commit 798aca1

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### Breaking changes
88

99
- `SignerERC7702` is renamed as `SignerEIP7702`. Imports and inheritance must be updated to that new name and path. Behavior is unmodified.
10+
- `ERC721Holder` and `ERC1155Holder` are flagged as stateless and are no longer transpiled. Developers using their upgradeable variants from `@openzeppelin/contracts-upgradeable` (i.e. `ERC712HolderUpgradeable` and `ERC1155HolderUpgradeable`) must update their imports to use the equivalent version available in `@openzeppelin/contracts`.
1011
- Update minimum pragma to 0.8.24 in `Votes`, `VotesExtended`, `ERC20Votes`, `Strings`, `ERC1155URIStorage`, `MessageHashUtils`, `ERC721URIStorage`, `ERC721Votes`, `ERC721Wrapper`, `ERC721Burnable`, `ERC721Consecutive`, `ERC721Enumerable`, `ERC721Pausable`, `ERC721Royalty`, `ERC721Wrapper`, `EIP712`, `ERC4626` and `ERC7739`. ([#5726](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5726))
1112

1213
### Deprecation

contracts/token/ERC1155/utils/ERC1155Holder.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import {IERC1155Receiver} from "../IERC1155Receiver.sol";
1111
*
1212
* IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be
1313
* stuck.
14+
*
15+
* @custom:stateless
1416
*/
1517
abstract contract ERC1155Holder is ERC165, IERC1155Receiver {
1618
/// @inheritdoc IERC165

contracts/token/ERC721/utils/ERC721Holder.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import {IERC721Receiver} from "../IERC721Receiver.sol";
1111
* Accepts all token transfers.
1212
* Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or
1313
* {IERC721-setApprovalForAll}.
14+
*
15+
* @custom:stateless
1416
*/
1517
abstract contract ERC721Holder is IERC721Receiver {
1618
/**

0 commit comments

Comments
 (0)