forked from OpenZeppelin/openzeppelin-contracts
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathERC1155Receiver.sol
More file actions
21 lines (18 loc) · 792 Bytes
/
ERC1155Receiver.sol
File metadata and controls
21 lines (18 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)
pragma solidity ^0.8.19;
import {IERC1155Receiver} from "../IERC1155Receiver.sol";
import {IERC165, ERC165} from "../../../utils/introspection/ERC165.sol";
/**
* @dev Basic contract implementing the ERC-165 interface for {IERC1155Receiver}.
*
* NOTE: This contract does not suffice to receive tokens. See {ERC1155Holder}.
*/
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
}
}