Inherits: IERC165

Interface for set contracts that support minting via an external ObjectMinter

Functions

onObjectMint

Called by ObjectMinter after payment is collected but before finalizing the mint

If id0 is 0, the contract must assign and return a new object ID. If id0 is non-zero, the contract must validate and return the same ID.

function onObjectMint(address operator, address to, uint64 id0, uint256 context, bytes memory data)
    external
    returns (bytes4 selector, uint64 id);

Parameters

NameTypeDescription
operatoraddressAddress that initiated the mint (typically msg.sender)
toaddressRecipient of the newly minted object
id0uint64Requested object ID (0 = assign automatically)
contextuint256Packed 256-bit context data (see MintingContext)
databytesOptional arbitrary payload passed for custom logic

Returns

NameTypeDescription
selectorbytes4Must return onObjectMint.selector to confirm success
iduint64Finalized object ID to be minted

objectMinter

Returns the address of the ObjectMinter contract

function objectMinter() external view returns (address minter);

Returns

NameTypeDescription
minteraddressThe ObjectMinter address