Skip to content

Commit 3844855

Browse files
committed
update
1 parent b6c6b8f commit 3844855

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-3
lines changed

packages/thirdweb/src/extensions/erc1155/drops/write/claimTo.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export type ClaimToParams = {
1919
* @param options - The options for the transaction
2020
* @extension ERC1155
2121
* @example
22+
* ### Basic usage
2223
* ```ts
2324
* import { claimTo } from "thirdweb/extensions/erc1155";
2425
* import { sendTransaction } from "thirdweb";
@@ -32,9 +33,20 @@ export type ClaimToParams = {
3233
*
3334
* await sendTransaction({ transaction, account });
3435
* ```
36+
*
37+
* ### For Drops with allowlists
38+
* You need to specify the claimer address as the `from` param to avoid any issue with the allowlist
39+
* ```ts
40+
* const transaction = claimTo({
41+
* contract,
42+
* to: "0x...",
43+
* tokenId: 0n,
44+
* quantity: 1n,
45+
* from: "0x...", // address of the one claiming
46+
* });
47+
* ```
3548
* @throws If no claim condition is set
3649
* @returns The prepared transaction
37-
* @note If the claiming address is not the same as the receiving address, you need to specify the claimer address as the `from` param to avoid any issue with the allowlist (if one exists)
3850
*/
3951
export function claimTo(options: BaseTransactionOptions<ClaimToParams>) {
4052
return GeneratedClaim.claim({

packages/thirdweb/src/extensions/erc20/drops/write/claimTo.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ export type ClaimToParams = {
2020
* @param options - The options for the transaction
2121
* @extension ERC20
2222
* @example
23+
*
24+
* ### Basic usage
2325
* ```ts
2426
* import { claimTo } from "thirdweb/extensions/erc20";
2527
* import { sendTransaction } from "thirdweb";
@@ -32,9 +34,19 @@ export type ClaimToParams = {
3234
*
3335
* await sendTransaction({ transaction, account });
3436
* ```
37+
*
38+
* ### For Drops with allowlists
39+
* You need to specify the claimer address as the `from` param to avoid any issue with the allowlist
40+
* ```ts
41+
* const transaction = claimTo({
42+
* contract,
43+
* to: "0x...",
44+
* quantity: 100n,
45+
* from: "0x...", // address of the one claiming
46+
* });
47+
* ```
3548
* @throws If no claim condition is set
3649
* @returns A promise that resolves with the submitted transaction hash.
37-
* @note If the claiming address is not the same as the receiving address, you need to specify the claimer address as the `from` param to avoid any issue with the allowlist (if one exists)
3850
*/
3951
export function claimTo(options: BaseTransactionOptions<ClaimToParams>) {
4052
return GeneratedClaim.claim({

packages/thirdweb/src/extensions/erc721/drops/write/claimTo.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export type ClaimToParams = {
2323
* @param options - The options for the transaction
2424
* @extension ERC721
2525
* @example
26+
*
27+
* ### Basic usage
2628
* ```ts
2729
* import { claimTo } from "thirdweb/extensions/erc721";
2830
* import { sendTransaction } from "thirdweb";
@@ -35,9 +37,19 @@ export type ClaimToParams = {
3537
*
3638
* await sendTransaction({ transaction, account });
3739
* ```
40+
*
41+
* ### For Drops with allowlists
42+
* You need to specify the claimer address as the `from` param to avoid any issue with the allowlist
43+
* ```ts
44+
* const transaction = claimTo({
45+
* contract,
46+
* to: "0x...",
47+
* quantity: 1n,
48+
* from: "0x...", // address of the one claiming
49+
* });
50+
* ```
3851
* @throws If no claim condition is set
3952
* @returns A promise that resolves with the submitted transaction hash.
40-
* @note If the claiming address is not the same as the receiving address, you need to specify the claimer address as the `from` param to avoid any issue with the allowlist (if one exists)
4153
*/
4254
export function claimTo(options: BaseTransactionOptions<ClaimToParams>) {
4355
return claim({

0 commit comments

Comments
 (0)