Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove erc777 #359

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 */
dawksh marked this conversation as resolved.
Show resolved Hide resolved

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
Loading