claimTo

Claim ERC1155 NFTs to a specified address

Example

Basic usage

import { claimTo } from "thirdweb/extensions/erc1155";
import { sendTransaction } from "thirdweb";
const transaction = claimTo({
contract,
to: "0x...",
tokenId: 0n,
quantity: 1n,
});
await sendTransaction({ transaction, account });

For Drops with allowlists

You need to specify the claimer address as the from param to avoid any issue with the allowlist

const transaction = claimTo({
contract,
to: "0x...",
tokenId: 0n,
quantity: 1n,
from: "0x...", // address of the one claiming
});
function claimTo(

Parameters

The options for the transaction

Type

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

The prepared transaction