Series1155V1
MINTER_ROLE
Section titled “MINTER_ROLE”bytes32 MINTER_ROLEMETADATA_ROLE
Section titled “METADATA_ROLE”bytes32 METADATA_ROLEPAUSER_ROLE
Section titled “PAUSER_ROLE”bytes32 PAUSER_ROLEROYALTY_ROLE
Section titled “ROYALTY_ROLE”bytes32 ROYALTY_ROLEADMIN_ROLE
Section titled “ADMIN_ROLE”bytes32 ADMIN_ROLEcontractUriFrozen
Section titled “contractUriFrozen”bool contractUriFrozenIndicates if the contract URI is frozen
royaltyFrozen
Section titled “royaltyFrozen”bool royaltyFrozenIndicates if the royalty is frozen
SeriesCreated
Section titled “SeriesCreated”event SeriesCreated(uint256 seriesId, string uri, bool isFungible)A new series is registered.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| seriesId | uint256 | Unique identifier for the series. |
| uri | string | IPFS base URI for the series metadata (e.g. “ipfs:// |
| isFungible | bool | True if the series is fungible, false for 1-of-1 NFTs. |
SeriesMetadataUpdated
Section titled “SeriesMetadataUpdated”event SeriesMetadataUpdated(uint256 seriesId, string oldUri, string newUri)Series metadata URI updated.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| seriesId | uint256 | Series identifier. |
| oldUri | string | Previous IPFS base URI. |
| newUri | string | New IPFS base URI. |
SeriesMetadataFrozen
Section titled “SeriesMetadataFrozen”event SeriesMetadataFrozen(uint256 seriesId, string uri)Series metadata permanently frozen.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| seriesId | uint256 | Series identifier. |
| uri | string | Frozen IPFS base URI. |
SeriesTokensMinted
Section titled “SeriesTokensMinted”event SeriesTokensMinted(uint256 seriesId, address to, uint256[] tokenIds, uint256[] amounts, bool isFungible)Tokens minted for a series.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| seriesId | uint256 | Series identifier. |
| to | address | Recipient address. |
| tokenIds | uint256[] | List of token IDs minted. |
| amounts | uint256[] | Corresponding amounts minted for each token ID. |
| isFungible | bool | True if the series is fungible. |
ContractURIFrozen
Section titled “ContractURIFrozen”event ContractURIFrozen(string uri)Contract-level metadata URI frozen.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| uri | string | Frozen contract-level URI. |
RoyaltySet
Section titled “RoyaltySet”event RoyaltySet(address receiver, uint96 feeBps)Default royalty configured.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| receiver | address | Royalty recipient address. |
| feeBps | uint96 | Royalty fee in basis points. |
RoyaltyCleared
Section titled “RoyaltyCleared”event RoyaltyCleared()Default royalty removed.
RoyaltyFrozen
Section titled “RoyaltyFrozen”event RoyaltyFrozen()Default royalty frozen and can no longer be changed.
MaxAtomicOperationUpdated
Section titled “MaxAtomicOperationUpdated”event MaxAtomicOperationUpdated(uint256 oldLimit, uint256 newLimit)_maxAtomicOperation updated.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| oldLimit | uint256 | Previous limit. |
| newLimit | uint256 | New limit. |
PermanentURI
Section titled “PermanentURI”event PermanentURI(string uri, uint256 tokenId)Token-level metadata permanently frozen (OpenSea compliant).
https://docs.opensea.io/docs/metadata-standards#freezing-metadata
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| uri | string | Full metadata URI. |
| tokenId | uint256 | Token identifier. |
SeriesNotFound
Section titled “SeriesNotFound”error SeriesNotFound()Series does not exist.
InvalidCID
Section titled “InvalidCID”error InvalidCID()IPFS CID is not valid CIDv0.
SeriesFrozen
Section titled “SeriesFrozen”error SeriesFrozen()Series metadata is frozen (immutable).
SeriesAlreadyExists
Section titled “SeriesAlreadyExists”error SeriesAlreadyExists()Series ID already exists.
LengthMismatch
Section titled “LengthMismatch”error LengthMismatch()tokenIds and amounts array lengths mismatch.
NFTAmountMustBeOne
Section titled “NFTAmountMustBeOne”error NFTAmountMustBeOne()Amount must be 1 for non-fungible tokens.
DuplicateTokenId
Section titled “DuplicateTokenId”error DuplicateTokenId()Token ID already minted in this series.
TokenInDifferentSeries
Section titled “TokenInDifferentSeries”error TokenInDifferentSeries()Token ID belongs to a different series.
URIFrozen
Section titled “URIFrozen”error URIFrozen()Contract URI is frozen.
SeriesTooLarge
Section titled “SeriesTooLarge”error SeriesTooLarge(uint256 seriesSize, uint256 maxAtomicOperation)Series size exceeds _maxAtomicOperation.
ZeroAtomicLimit
Section titled “ZeroAtomicLimit”error ZeroAtomicLimit()Atomic operation limit cannot be zero.
InvalidLimit
Section titled “InvalidLimit”error InvalidLimit()Limit parameter is zero or exceeds maximum.
RoyaltyAlreadyFrozen
Section titled “RoyaltyAlreadyFrozen”error RoyaltyAlreadyFrozen()Royalties are frozen.
RoyaltyTooHigh
Section titled “RoyaltyTooHigh”error RoyaltyTooHigh()Royalty fee exceeds maximum basis points.
ZeroAmount
Section titled “ZeroAmount”error ZeroAmount()Amount must be greater than zero.
ZeroAddress
Section titled “ZeroAddress”error ZeroAddress()Zero address.
UpdateInProgress
Section titled “UpdateInProgress”error UpdateInProgress()A metadata update is currently in progress for the series.
NoPendingEvents
Section titled “NoPendingEvents”error NoPendingEvents()No pending batch events to emit.
seriesExists
Section titled “seriesExists”modifier seriesExists(uint256 seriesId)Modifier to check if a series exists
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| seriesId | uint256 | Series ID to check |
initialize
Section titled “initialize”function initialize(string contractUri) externalInitialize the contract
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| contractUri | string | Contract Metadata URI |
_authorizeUpgrade
Section titled “_authorizeUpgrade”function _authorizeUpgrade(address) internal virtualrequired by the OZ UUPS module
createSeries
Section titled “createSeries”function createSeries(string cid, bool isFungible) external returns (uint256 seriesId)Register a new metadata series.
The seriesId is the keccak256 hash of the raw IPFS CID, making the
mapping deterministic across chains.
Reverts with:
- {InvalidCID} if cid is not a valid CIDv0
- {SeriesAlreadyExists} if the hash is already registered
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| cid | string | Raw IPFS content identifier (CID) that forms the folder for metadata. |
| isFungible | bool | true → tokens in this series may be multi‑minted; false → every tokenId is a unique 1‑of‑1 NFT. |
Return Values
Section titled “Return Values”| Name | Type | Description |
|---|---|---|
| seriesId | uint256 | Deterministic identifier assigned to the series. Emits {SeriesCreated}. Requirements: - caller has METADATA_ROLE - contract is not paused |
updateSeriesInit
Section titled “updateSeriesInit”function updateSeriesInit(uint256 seriesId, string cid) externalStart a streamed metadata‑update for a large series.
Stores newCid, resets the internal cursor and emits a single
{SeriesMetadataUpdated}. Event emission must be finished via
successive calls to {updateSeriesEmit} until it reverts with
{NoPendingEvents}.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| seriesId | uint256 | Target series. |
| cid | string | New IPFS CID. |
updateSeriesEmit
Section titled “updateSeriesEmit”function updateSeriesEmit(uint256 seriesId, uint256 limit) external returns (bool hasMore)Continue a streamed metadata‑update started with {updateSeriesInit}.
Emits up to limit {URI} events from the current cursor.
Reverts with:
- {InvalidLimit} if limit is 0 or above _maxAtomicOperation
- {NoPendingEvents} once the last token has been processed
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| seriesId | uint256 | Target series. |
| limit | uint256 | Max tokens to process this call. |
Return Values
Section titled “Return Values”| Name | Type | Description |
|---|---|---|
| hasMore | bool | True if there are more tokens to process, false if the update is complete. |
freezeSeriesInit
Section titled “freezeSeriesInit”function freezeSeriesInit(uint256 seriesId) externalBegin a streamed metadata‑freeze for a large series.
Sets the frozen flag, resets the cursor and emits one
{SeriesMetadataFrozen}. Actual PermanentURI emission is delegated to
{freezeSeriesEmit}.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| seriesId | uint256 | Target series. |
freezeSeriesEmit
Section titled “freezeSeriesEmit”function freezeSeriesEmit(uint256 seriesId, uint256 limit) external returns (bool hasMore)Continue a streamed metadata‑freeze started with {freezeSeriesInit}.
Emits up to limit {PermanentURI} events and advances the cursor.
Reverts with:
- {InvalidLimit} if limit is 0 or above _maxAtomicOperation
- {NoPendingEvents} once all tokens are processed
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| seriesId | uint256 | Target series. |
| limit | uint256 | Max tokens to process this call. |
mintBatch
Section titled “mintBatch”function mintBatch(address to, uint256 seriesId, uint256[] tokenIds, uint256[] amounts) externalMint tokens in a series
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| to | address | Address to mint tokens to |
| seriesId | uint256 | ID of the series |
| tokenIds | uint256[] | Array of token IDs to mint |
| amounts | uint256[] | Array of amounts to mint for each token |
seriesCount
Section titled “seriesCount”function seriesCount() external view returns (uint256)Total number of series that have ever been created.
listSeries
Section titled “listSeries”function listSeries(uint256 offset, uint256 limit) external view returns (uint256[] seriesIds, string[] uris)List series IDs and their CIDs with pagination.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| offset | uint256 | Starting index in the global series array. |
| limit | uint256 | Maximum items to return. |
Return Values
Section titled “Return Values”| Name | Type | Description |
|---|---|---|
| seriesIds | uint256[] | Array of series IDs. |
| uris | string[] | Array of corresponding IPFS CIDs. |
seriesTokenCount
Section titled “seriesTokenCount”function seriesTokenCount(uint256 seriesId) external view returns (uint256)Get the number of tokens in a series
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| seriesId | uint256 | ID of the series |
Return Values
Section titled “Return Values”| Name | Type | Description |
|---|---|---|
| [0] | uint256 | count Number of tokens in the series |
seriesTokens
Section titled “seriesTokens”function seriesTokens(uint256 seriesId, uint256 offset, uint256 limit) external view returns (uint256[] tokens)Get tokens in a series with pagination
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| seriesId | uint256 | ID of the series |
| offset | uint256 | Starting index |
| limit | uint256 | Maximum number of tokens to return |
Return Values
Section titled “Return Values”| Name | Type | Description |
|---|---|---|
| tokens | uint256[] | Array of token IDs in the series |
tokenSeries
Section titled “tokenSeries”function tokenSeries(uint256 tokenId) external view returns (uint256)Get the series ID for a token
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| tokenId | uint256 | ID of the token |
Return Values
Section titled “Return Values”| Name | Type | Description |
|---|---|---|
| [0] | uint256 | seriesId ID of the series the token belongs to |
function uri(uint256 tokenId) public view virtual returns (string)Get the URI for a token
see {ERC1155-uri}
contractURI
Section titled “contractURI”function contractURI() public view returns (string)Returns the contract-level metadata URI (OpenSea compliant).
setContractURI
Section titled “setContractURI”function setContractURI(string newContractUri) externalSet the contract-level metadata URI
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| newContractUri | string | The new contract-level metadata URI |
freezeContractURI
Section titled “freezeContractURI”function freezeContractURI() externalFreeze the contract-level metadata URI
setRoyalty
Section titled “setRoyalty”function setRoyalty(address receiver, uint96 feeBps) externalSet the default royalty for the contract
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| receiver | address | The address to receive the royalty |
| feeBps | uint96 | The royalty fee in basis points |
clearRoyalty
Section titled “clearRoyalty”function clearRoyalty() externalfreezeRoyalties
Section titled “freezeRoyalties”function freezeRoyalties() externalsetMaxAtomicOperation
Section titled “setMaxAtomicOperation”function setMaxAtomicOperation(uint256 newLimit) externalUpdate {_maxAtomicOperation} cap.
function pause() externalunpause
Section titled “unpause”function unpause() external_processMint
Section titled “_processMint”function _processMint(uint256 seriesId, uint256 tokenId, uint256 amount, bool fungible, bool frozen) internalWhen a series is frozen, new token IDs cannot be minted. However, existing fungible tokens in the series can still be minted.
function isCid(string cid) internal pure returns (bool)cidIdToUri
Section titled “cidIdToUri”function cidIdToUri(string cid, uint256 id) public pure returns (string)supportsInterface
Section titled “supportsInterface”function supportsInterface(bytes4 interfaceId) public view returns (bool)See {IERC165-supportsInterface}.
_update
Section titled “_update”function _update(address from, address to, uint256[] ids, uint256[] values) internal_Transfers a value amount of tokens of type id from from to to. Will mint (or burn) if from
(or to) is the zero address.
Emits a {TransferSingle} event if the arrays contain one element, and {TransferBatch} otherwise.
Requirements:
- If
torefers to a smart contract, it must implement either {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value. idsandvaluesmust have the same length.
NOTE: The ERC-1155 acceptance check is not performed in this function. See {updateWithAcceptanceCheck} instead.