IObjectMinterHook
Inherits: IERC165
Interface for set contracts that support minting via ObjectMinter
Functions
onObjectMint
Called by ObjectMinter after payment is collected and before minting is finalized
- If
id0is 0, the contract must assign and return a new object ID. - If
id0is non-zero, the contract must validate and return the same ID. The call must returnonObjectMint.selectorto signal success.
function onObjectMint(address operator, address to, uint64 id0, uint256 context, bytes memory data)
external
returns (bytes4 selector, uint64 id);
Parameters
| Name | Type | Description |
|---|---|---|
operator | address | Caller who initiated the mint (typically msg.sender) |
to | address | Recipient of the minted object |
id0 | uint64 | Requested object ID (0 = auto-assign) |
context | uint256 | Packed 256-bit context for custom mint logic (see MintingContext) |
data | bytes | Arbitrary input payload for extensible logic |
Returns
| Name | Type | Description |
|---|---|---|
selector | bytes4 | Must return onObjectMint.selector to proceed |
id | uint64 | Final resolved object ID to be minted |