Docs

nextTokenIdToMint

Retrieves the next token ID to be minted in an ERC721 contract.

Example

import { nextTokenIdToMint } from "thirdweb/extensions/erc721";
const nextTokenId = await nextTokenIdToMint({ contract });

Parameters

Returns

A promise that resolves to the next token ID as a bigint.