Skip to content
Lattice

IERC1155Supply

Git Source

Title: IERC1155Supply

Author: Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/extensions/ERC1155Supply.sol)

Supply views of the ERC-1155 supply-tracking extension. OpenZeppelin ships no interface for this extension; Lattice declares one so diamonds can advertise it through ERC-165. The facet also serves burn/burnBatch, which belong to IERC1155Burnable and are left out here.

Functions

totalSupply

Total value of tokens of type id in existence.

function totalSupply(uint256 id) external view returns (uint256);

Parameters

NameTypeDescription
iduint256

Returns

NameTypeDescription
<none>uint256

totalSupply

Total value of tokens across every id.

Bounded by type(uint256).max: a mint that would push it past that reverts.

function totalSupply() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256

exists

Whether any token of type id exists, that is totalSupply(id) > 0.

function exists(uint256 id) external view returns (bool);

Parameters

NameTypeDescription
iduint256

Returns

NameTypeDescription
<none>bool