Skip to content

Commit

Permalink
chore: remove erc777
Browse files Browse the repository at this point in the history
  • Loading branch information
dawksh committed Oct 29, 2023
1 parent 8215b88 commit d0f46d0
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions contracts/samples/callback/TokenCallbackHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,14 @@ 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";

/**
* 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,
Expand Down Expand Up @@ -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 ||
Expand Down

0 comments on commit d0f46d0

Please sign in to comment.