Skip to main content

useEditionDrop() function

Hook for getting an instance of an EditionDrop contract. This conract is used to interface with ERC1155 compliant NFTs that can be lazily minted.

Example

import { useEditionDrop } from '@thirdweb-dev/react'

export default function Component() {
const editionDrop = useEditionDrop("<YOUR-CONTRACT-ADDRESS>")

// Now you can use the edition drop contract in the rest of the component

// For example, this function will let the connected wallet claim a new NFT
async function claim(tokenId, quantity) {
await editionDrop.claim(tokenId, quantity)
}

...
}

Signature:

export declare function useEditionDrop(
contractAddress?: string,
): EditionDrop | undefined;

Parameters

ParameterTypeDescription
contractAddressstring(Optional) the address of the Edition Drop contract, found in your thirdweb dashboard

Returns:

EditionDrop | undefined