Skip to main content

useEditionDrop() function

Warning: This API is now obsolete.

This hook is deprecated and will be removed in a future major version. You should use instead.

- const editionDrop = await sdk.useEditionDrop("0x1234...");
+ const editionDrop = await sdk.useContract("0x1234...", "edition-drop").contract;

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: RequiredParam<string>,
): import("@thirdweb-dev/sdk").EditionDrop | undefined;

Parameters

ParameterTypeDescription
contractAddressRequiredParam<string>the address of the Edition Drop contract, found in your thirdweb dashboard

Returns:

import("@thirdweb-dev/sdk").EditionDrop | undefined