import { ClaimButton } from "thirdweb/react";
import { ethereum } from "thirdweb/chains";
// For NFT Drop (ERC721)
<ClaimButton
contractAddress="0x..." // contract address of the NFT Drop
chain={ethereum}
client={client}
claimParams={{
type: "ERC721",
quantity: 1n, // claim 1 token
}}
>
Claim now
</ClaimButton>
// For Edition Drop (ERC1155)
<ClaimButton
contractAddress="0x..." // contract address of the Edition Drop
chain={ethereum}
client={client}
claimParams={{
type: "ERC1155",
quantity: 1n,
tokenId: 0n,
}}
>
Claim now
</ClaimButton>
// For Token Drop (ERC20)
<ClaimButton
contractAddress="0x..." // contract address of the Token Drop
chain={ethereum}
client={client}
claimParams={{
type: "ERC20",
quantity: "100", // claim 100 ERC20 tokens
// instead of `quantity`, you can also use `quantityInWei` (bigint)
}}
>
Claim now
</ClaimButton>
// Attach custom Pay metadata
<ClaimButton
payModal={{
metadata: {
name: "Van Gogh Starry Night",
image: "https://unsplash.com/starry-night.png"
}
}}
>...</ClaimButton>