TypeScript SDK

TOKENS.claimRewards

Prepares a transaction to call the "claimRewards" function on the contract.

Example

import { sendTransaction } from "thirdweb";
import { claimRewards } from "thirdweb/extensions/tokens";
const transaction = claimRewards({
contract,
asset: ...,
overrides: {
...
}
});
// Send the transaction
await sendTransaction({ transaction, account });
function claimRewards(
| ClaimRewardsParams
| { asyncParams: () => Promise<ClaimRewardsParams> }
>,

Parameters

The options for the "claimRewards" function.

Type

| ClaimRewardsParams
| { asyncParams: () => Promise<ClaimRewardsParams> }
>;

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.