Skip to main content

TokenDrop class

Create a Drop contract for a standard crypto token or cryptocurrency.

Example

import { ThirdwebSDK } from "@thirdweb-dev/sdk";

const sdk = new ThirdwebSDK("{{chainName}}");
const contract = await sdk.getContract("{{contract_address}}", "token-drop");

Constructors

ConstructorModifiersDescription
(constructor)(network, address, storage, options, abi, chainId, contractWrapper)Constructs a new instance of the TokenDrop class

Properties

PropertyModifiersTypeDescription
abiAbi
claimConditionsDropClaimConditions<PrebuiltTokenDrop>Configure claim conditions
contractRolesstaticreadonly ["admin", "transfer"]
encoderContractEncoder<PrebuiltTokenDrop>
estimatorGasCostEstimator<PrebuiltTokenDrop>
eventsContractEvents<PrebuiltTokenDrop>
metadataContractMetadata<PrebuiltTokenDrop, typeof DropErc20ContractSchema>
platformFeesContractPlatformFee<PrebuiltTokenDrop>
rolesContractRoles<PrebuiltTokenDrop, typeof TokenDrop.contractRoles[number]>
salesContractPrimarySale<PrebuiltTokenDrop>

Methods

MethodModifiersDescription
burnFrom(holder, amount)Burn Tokens
burnTokens(amount)Burn Tokens
claim(amount, checkERC20Allowance)Claim a certain amount of tokens
claimTo(destinationAddress, amount, checkERC20Allowance)Claim a certain amount of tokens to a specific Wallet
getDelegation()Get your voting delegatee address
getDelegationOf(account)Get a specific address voting delegatee address
getVoteBalance()Get your wallet voting power for the current checkpoints
getVoteBalanceOf(account)
isTransferRestricted()Get whether users can transfer tokens from this contract

Signature:

export declare class TokenDrop extends StandardErc20<PrebuiltTokenDrop>

Extends: StandardErc20<PrebuiltTokenDrop>