Skip to main content

ERC1155Holder

Simple implementation of ERC1155Receiver that will allow a contract to hold ERC1155 tokens. IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be stuck.

Available since v3.1.

Methods

onERC1155BatchReceived

function onERC1155BatchReceived(address, address, uint256[], uint256[], bytes) external nonpayable returns (bytes4)

Parameters

NameTypeDescription
_0addressundefined
_1addressundefined
_2uint256[]undefined
_3uint256[]undefined
_4bytesundefined

Returns

NameTypeDescription
_0bytes4undefined

onERC1155Received

function onERC1155Received(address, address, uint256, uint256, bytes) external nonpayable returns (bytes4)

Parameters

NameTypeDescription
_0addressundefined
_1addressundefined
_2uint256undefined
_3uint256undefined
_4bytesundefined

Returns

NameTypeDescription
_0bytes4undefined

supportsInterface

function supportsInterface(bytes4 interfaceId) external view returns (bool)

See {IERC165-supportsInterface}.

Parameters

NameTypeDescription
interfaceIdbytes4undefined

Returns

NameTypeDescription
_0boolundefined