IObjectMinter

Git Source

Interface for minting objects with configurable policies

Functions

mint

Mint an object (public permission)

function mint(address to, address set, uint64 id) external payable;

Parameters

NameTypeDescription
toaddressThe recipient address
setaddressThe set address
iduint64The object ID to mint

mint

Mint an object with additional data

function mint(address to, address set, uint64 id, bytes memory data) external payable;

Parameters

NameTypeDescription
toaddressThe recipient address
setaddressThe set address
iduint64The object ID to mint
databytesAdditional mint data

mint

Mint an object with allowlist proof

function mint(address to, address set, uint64 id, bytes memory auth, uint32 policy) external payable;

Parameters

NameTypeDescription
toaddressThe recipient address
setaddressThe set address
iduint64The object ID to mint
authbytesABI-encoded authorization data (see IMintAuthArgument)
policyuint32The policy index being used

mint

Mint an object with allowlist proof and additional data

function mint(address to, address set, uint64 id, bytes memory data, bytes memory auth, uint32 policy)
    external
    payable;

Parameters

NameTypeDescription
toaddressThe recipient address
setaddressThe set address
iduint64The object ID to mint
databytesAdditional mint data
authbytesABI-encoded authorization data (see IMintAuthArgument)
policyuint32The policy index being used

mintPolicyAdd

Add a new mint policy (callable only by set contracts)

function mintPolicyAdd(MintPolicy memory policy) external returns (uint32 index);

Parameters

NameTypeDescription
policyMintPolicyThe policy details to add

Returns

NameTypeDescription
indexuint32The assigned policy index

mintPolicyDisable

Disable a mint policy (callable only by set contracts)

function mintPolicyDisable(uint32 index) external;

Parameters

NameTypeDescription
indexuint32The policy index to disable

mintPolicyEnable

Enable a mint policy (callable only by set contracts)

function mintPolicyEnable(uint32 index) external;

Parameters

NameTypeDescription
indexuint32The policy index to enable

mintPolicyCount

Get number of mint policies for a set

function mintPolicyCount(address set) external view returns (uint256 count);

Parameters

NameTypeDescription
setaddressThe set address to query

Returns

NameTypeDescription
countuint256Number of policies

mintPolicyGet

Get mint policy by index

function mintPolicyGet(address set, uint32 index) external view returns (MintPolicy memory policy);

Parameters

NameTypeDescription
setaddressThe set address
indexuint32Policy index

Returns

NameTypeDescription
policyMintPolicyThe mint policy details

mintPolicySearch

Search for applicable mint policy with permission mask

function mintPolicySearch(address set, uint64 id, uint8 mask) external view returns (MintPolicy memory policy);

Parameters

NameTypeDescription
setaddressThe set address
iduint64The object ID to check
maskuint8Bitmask indicating which MintPermissionType values are included. Each bit corresponds to a permission type (e.g., bit 0 = Public, bit 1 = Allowlist, etc.).

Returns

NameTypeDescription
policyMintPolicyThe first matching mint policy

mintPolicySearch

Search for applicable mint policy with offset and permission mask

function mintPolicySearch(address set, uint64 id, uint8 mask, uint32 offset)
    external
    view
    returns (MintPolicy memory policy);

Parameters

NameTypeDescription
setaddressThe set address
iduint64The object ID to check
maskuint8Bitmask indicating which MintPermissionType values are included. Each bit corresponds to a permission type (e.g., bit 0 = Public, bit 1 = Allowlist, etc.).
offsetuint32Starting policy index to search from

Returns

NameTypeDescription
policyMintPolicyThe first matching mint policy

Events

MintPolicyEnabled

Emitted when a mint policy is enabled

event MintPolicyEnabled(address set, MintPolicy policy);

Parameters

NameTypeDescription
setaddressThe set address the policy applies to
policyMintPolicyThe enabled policy details

MintPolicyDisabled

Emitted when a mint policy is disabled

event MintPolicyDisabled(address set, MintPolicy policy);

Parameters

NameTypeDescription
setaddressThe set address the policy applies to
policyMintPolicyThe disabled policy details

ObjectMinted

Emitted when an object is successfully minted

event ObjectMinted(
    address set,
    uint64 id,
    address operator,
    address to,
    address currency,
    uint96 payment,
    address fundsRecipient,
    uint96 funds,
    address feeRecipient,
    uint96 fee
);

Parameters

NameTypeDescription
setaddressThe address of the set contract the object is minted from
iduint64The ID of the minted object within the set
operatoraddressThe address that initiated the mint (usually msg.sender)
toaddressThe recipient address receiving the minted object
currencyaddressThe address of the payment token (native or ERC20)
paymentuint96The total payment (includes both fee and funds)
fundsRecipientaddressThe address receiving the creator or project revenue
fundsuint96The amount sent to the fundsRecipient
feeRecipientaddressThe address receiving the protocol fee
feeuint96The amount sent to the feeRecipient