ERC1155Holder
Inherits: ERC165, IERC1155Receiver
Simple implementation of IERC1155Receiver that will allow a contract to hold ERC-1155 tokens.
IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be
stuck.
Functions
supportsInterface
Query if a contract implements an interface
Interface identification is specified in ERC-165. This function uses less than 30,000 gas.
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool);
Parameters
| Name | Type | Description |
|---|---|---|
interfaceId | bytes4 |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool | true if the contract implements interfaceID and interfaceID is not 0xffffffff, false otherwise |
onERC1155Received
function onERC1155Received(address, address, uint256, uint256, bytes memory) public virtual override returns (bytes4);
onERC1155BatchReceived
function onERC1155BatchReceived(address, address, uint256[] memory, uint256[] memory, bytes memory)
public
virtual
override
returns (bytes4);