Others Events
Main Interface events
URI
Event
URI
EventThe URI event is emitted in two cases by the Main Interface singleton contract:
When an Item is created within the Collection through the
createCollection
function or directly using themintItems
function. If multiple Items are created at once in a single transaction, multipleURI
event will be emitted.When the
uri
of an Item is changed by thesetItemsMetadata
function. If multiple Itemsuri
are changed at once in a single transaction, multiple URI event will be emitted.
The uint256 id
represents the itemId
of the created Item (point 1) or the item on which the uri is changed (point 2).
ApprovalForAll
event
ApprovalForAll
eventThe ApprovalForAll
event is emitted by the Main Interface singleton contract when the setApprovalForAll
function is called. The msg.sender
grants or revokes permission to the operator
address to act on all the account’s Items.
TransferSingle
event
TransferSingle
eventThe TransferSingle
event is emitted by the Main Interface singleton contract in 4 situations:
When the
burn
(both the version with or without data) functions is called. Theoperator
address is equal tofrom
address if themsg.sender
is thefrom
address otherwise it is theoperator
address calling the function. Thefrom
address is the one who owns the tokens to burn.recipient
address is equal toaddress(0).
Id
represents thetokenId
to burn.value
represents the amount to burn.When the
safeTransferFrom
functions is called. Theoperator
address is equal tofrom
address if themsg.sender
is thefrom
address otherwise it is theoperator
address calling the function. Thefrom
address is the one who owns the tokens to transfer.recipient
address is equal to the address receiving the token.Id
represents thetokenId
to transfer.value
represents the amount to transfer.When the
mintTransferOrBurn
function is called in single mode (isMulti is false) minting an Item. Theoperator
address is equal toaddress(0)
. Thefrom
is the Collection host addres. Therecipient
address is equal to address receiving the created/minted token.Id
represents thetokenId
created/minted.value
represents the amount created/minted.When the
mintTransferOrBurn
function is called in single mode (isMulti is false) transferring an Item. Theoperator
address is equal tofrom
address if themsg.sender
is thefrom
address otherwise it is theoperator
address calling the function. Thefrom
address is the one who owns the tokens to transfer. Therecipient
address is equal to the address receiving the token.Id
represents thetokenId
to transfer.value
represents the amount to transfer.When the
mintTransferOrBurn
function is called in single mode (isMulti is false) burning an Item. Theoperator
address is equal tofrom
address if themsg.sender
is thefrom
address otherwise it is theoperator
address calling the function. Thefrom
address is the one who owns the tokens to burn. Therecipient
address isaddress(0)
.Id
represents thetokenId
to burn.value
represents the amount to burn.
TransferBatch
event
TransferBatch
eventThe TransferBatch
event is emitted in four situations:
When one or multiple Items are created within the Collection through the
createCollection
function or directly using themintItems
function. In this case, operator is address(0), from is address(0), to is the receiver address of the created/minted Items,ids
represents theitemIds
created/minted andvalues
represents theitemIds
amounts created/minted.When the
burnBatch
functions is called. Theoperator
address is equal tofrom
address if themsg.sender
is thefrom
address otherwise it is theoperator
address calling the function. Therecipient
address is equal toaddress(0)
.ids
represents theitemIds
burned andvalues
represents theitemIds
amounts burned.When the
safeBatchTransferFrom
functionis called. Theoperator
address is equal tofrom
address if themsg.sender
is thefrom
address otherwise it is theoperator
address calling the function. Therecipient
address is equal to the address receiving the tokens.ids
represents theitemIds
transferred andvalues
represents theitemIds
amounts transferred.When the
mintTransferOrBurn
function is called withisMulti
astrue
. So when themintTransferOrBurn
function is called to perform a multi-single or a multi-batch mint, transfer or burn operation. In case of a transfer thesender
and therecipient
address are populated differently fromaddress(0)
. In case of a burn thesender
address is populated differently fromaddress(0)
and therecipient
address is equal toaddress(0)
. In case of a mint thesender
address is equal toaddress (0)
.Look at here for more information about themintTransferOrBurn
operation.
Interoperable Interface events
Approval
The approval
event is emitted by the Interoperable Interface contract in two cases:
When the
approve
function on the Interoperable Interface is called. Remember that the Interoperableapprove
function can be called only by the Items holder.
When the
permit
function on the Interoperable Interface is called. Remember that the Interoperablepermit
function can be called by any address.
Transfer
The Transfer
event is emitted by the Interoperable Interface contract in two cases:
When the
burn
function of the Interoperable Interface is called. The addressto
is equal toaddress(0)
.
When the
transfer
ortransferFrom
function of the Interoperable Interface is called. In the first case the sender address is equal tomsg.sender.
EmitEvent function
The emitEvent
function of the Interoperable Interface is called by the Main Interface to emit events is some operations at the Interoperable level. Look here for more information about the emitEvent
operation.
Approval
In particular, the emitEvent
is called by the Main interface to launch the approval
event on the Interoperable Interface in two cases:
When the
approve
function (of the Main Interface) is called by an address different from the Interoperable Interface address, so whenmsg.sender != address(uint160(itemId))
.
Remember that, as explained here, the approve
function can be called by:
Item holder,
Item
InteroperableInterface
.
When the permit function (of the Main Interface) is called by an address different from the Interoperable Interface address, so when
msg.sender != address(uint160(itemId)
. Remember that, as explained here, the permit function can be called by any address.
Transfer
The emitEvent
is called by the Main interface to launch the Transfer
event on the Interoperable Interface in some different cases:
When the
burn
(both the version with or without data) or thesafeTransferFrom
functions are called on the Main Interface. In case of a burn, theto
address is equal toaddress(0)
.
When one or multiple Items are created within the Collection through the
createCollection
function or directly using themintItems
function. If multiple Items are created, multipleTransfer
events are emitted.When the
burnBatch
or thesafeBatchTransferFrom
functions are called. In both cases, theoperator
address is equal tomsg.sender
. Therecipient
address is equal toaddress(0)
in case of theburnBatch
, otherwise in case of thesafeTransferFrom
it is populated different fromaddress(0)
. If multiple Items are burned/transferred, multipleTransfer
events are emitted.When the
mintTransferOrBurn
function is called withisMulti
astrue
. So when themintTransferOrBurn
function is called to perform a multi-single or a multi-batch mint, transfer or burn operation. In case of a transfer thesender
and therecipient
address are populated differently fromaddress(0)
. In case of a burn thesender
address is populated differently fromaddress(0)
and therecipient
address is equal toaddress(0)
. In case of a mint thesender
address is equal toaddress (0)
.Look at here for more information about themintTransferOrBurn
operation. If multiple Items are minted/burned/transferred, multipleTransfer
events are emitted.
Last updated