Skip to content

Solidity API

PropsERC1155Base

_beforeTokenTransfer

solidity
function _beforeTokenTransfer(address operator, address from, address to, uint256[] ids, uint256[] amounts, bytes data) internal virtual

ERC1155 hook, called before all transfers including mint and burn

function should be overridden and new implementation must call super called for both single and batch transfers

Parameters

NameTypeDescription
operatoraddressexecutor of transfer
fromaddresssender of tokens
toaddressreceiver of tokens
idsuint256[]token IDs
amountsuint256[]quantities of tokens to transfer
databytesdata payload