From d0f46d06e75e8f9209e4da028361b47776bb6dc1 Mon Sep 17 00:00:00 2001 From: Daksh Date: Sun, 29 Oct 2023 17:55:14 +0530 Subject: [PATCH 1/2] chore: remove erc777 --- .../samples/callback/TokenCallbackHandler.sol | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/contracts/samples/callback/TokenCallbackHandler.sol b/contracts/samples/callback/TokenCallbackHandler.sol index d7ed9cbb..f4b195f3 100644 --- a/contracts/samples/callback/TokenCallbackHandler.sol +++ b/contracts/samples/callback/TokenCallbackHandler.sol @@ -4,7 +4,6 @@ pragma solidity ^0.8.12; /* solhint-disable no-empty-blocks */ import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; -import "@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; @@ -12,17 +11,7 @@ import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; * Token callback handler. * Handles supported tokens' callbacks, allowing account receiving these tokens. */ -contract TokenCallbackHandler is IERC777Recipient, IERC721Receiver, IERC1155Receiver { - function tokensReceived( - address, - address, - address, - uint256, - bytes calldata, - bytes calldata - ) external pure override { - } - +contract TokenCallbackHandler is IERC721Receiver, IERC1155Receiver { function onERC721Received( address, address, @@ -52,7 +41,9 @@ contract TokenCallbackHandler is IERC777Recipient, IERC721Receiver, IERC1155Rece return IERC1155Receiver.onERC1155BatchReceived.selector; } - function supportsInterface(bytes4 interfaceId) external view virtual override returns (bool) { + function supportsInterface( + bytes4 interfaceId + ) external view virtual override returns (bool) { return interfaceId == type(IERC721Receiver).interfaceId || interfaceId == type(IERC1155Receiver).interfaceId || From fb02bfd89a0bc5e4650bb2beb817dfcbbbb97d5a Mon Sep 17 00:00:00 2001 From: Daksh Date: Fri, 24 Nov 2023 19:14:11 +0530 Subject: [PATCH 2/2] chore: remove unused linter comment --- contracts/samples/callback/TokenCallbackHandler.sol | 2 -- 1 file changed, 2 deletions(-) diff --git a/contracts/samples/callback/TokenCallbackHandler.sol b/contracts/samples/callback/TokenCallbackHandler.sol index f4b195f3..a8dad7a8 100644 --- a/contracts/samples/callback/TokenCallbackHandler.sol +++ b/contracts/samples/callback/TokenCallbackHandler.sol @@ -1,8 +1,6 @@ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.12; -/* solhint-disable no-empty-blocks */ - import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";