FungibleFractionsWithTransferCallbackDO
Data Object that extends the FungibleFractionsDO functionality with transfer callback handlers
This contract extends the FungibleFractionsDO contract with the ability to register and unregister transfer callback handlers that will be called after fungible fractions transfers are performed (mint, burn, transferFrom and their batch variants) NOTE: This contract does not emit register and unregister events, it is expected that the DataManager contract will emit the events for register and unregister operations
ZeroAddressHandler
Error thrown when the handler is the zero address
HandlerAlreadyRegistered
Error thrown when handler couldn't be added.
HandlerNotRemoved
Error thrown when handler couldn't be removed.
DpData2
Data structure for storing transfer callback handlers
Parameters
Name | Type | Description |
---|
_dispatchWrite
_registerSingleIdFungibleFractionTransferCallback
Function used to register a callback for a single id token transfer
Parameters
Name | Type | Description |
---|---|---|
dp | DataPoint | DataPoint identifier |
id | uint256 | The id of the token |
handler | address | The handler address NOTE: The handler MUST implement the IFungibleFractionsTransferCallback interface or it will revert when the callback is called |
_unregisterSingleIdFungibleFractionTransferCallback
Function used to unregister a callback for a single id token transfer
Parameters
Name | Type | Description |
---|---|---|
dp | DataPoint | DataPoint identifier |
id | uint256 | The id of the token |
handler | address | The handler address |
_registerAllIdFungibleFractionTransferCallback
Function used to register a callback for all id token transfers
Parameters
Name | Type | Description |
---|---|---|
dp | DataPoint | DataPoint identifier |
handler | address | The handler address NOTE: The handler MUST implement the IFungibleFractionsTransferCallback interface or it will revert when the callback is called |
_unregisterAllIdFungibleFractionTransferCallback
Function used to unregister a callback for all id token transfers
Parameters
Name | Type | Description |
---|---|---|
dp | DataPoint | DataPoint identifier |
handler | address | The handler address |
_mint
After minting, this function notifies the registered handlers
_batchMint
After minting, this function notifies the registered handlers
_burn
After burn, this function notifies the registered handlers
_batchBurn
After burn, this function notifies the registered handlers
_transferFrom
After transfer, this function notifies the registered handlers
_batchTransferFrom
After batch transfer, this function notifies the registered handlers