getClaimParams

Get the claim parameters for a given drop

Example

import { getClaimParams } from "thirdweb/extensions/erc1155";
const claimParams = await getClaimParams({
contract,
to: "0x...",
quantity: 1n,
type: "erc1155",
tokenId: 0n,
});
function getClaimParams(
): Promise<{
allowlistProof: OverrideProof;
currency: string;
data: `0x${string}`;
overrides: {
erc20Value:
| undefined
| { amountWei: bigint; tokenAddress: string };
value: bigint;
};
pricePerToken: bigint;
quantity: bigint;
receiver: string;
tokenId: undefined | bigint;
}>;

Parameters

The options for getting the claim parameters

Type

let options: {
contract: ThirdwebContract;
from?: string;
quantity: bigint;
to: string;
} & (
| { type: "erc721" }
| { tokenDecimals: number; type: "erc20" }
| { tokenId: bigint; type: "erc1155" }
);

Returns

let returnType: Promise<{
allowlistProof: OverrideProof;
currency: string;
data: `0x${string}`;
overrides: {
erc20Value:
| undefined
| { amountWei: bigint; tokenAddress: string };
value: bigint;
};
pricePerToken: bigint;
quantity: bigint;
receiver: string;
tokenId: undefined | bigint;
}>;

The claim parameters