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
Constructor | Modifiers | Description |
---|---|---|
(constructor)(network, address, storage, options, abi, chainId, contractWrapper) | Constructs a new instance of the TokenDrop class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
abi | Abi | ||
claimConditions | DropClaimConditions<PrebuiltTokenDrop> | Configure claim conditions | |
contractRoles | static | readonly ["admin", "transfer"] | |
encoder | ContractEncoder<PrebuiltTokenDrop> | ||
estimator | GasCostEstimator<PrebuiltTokenDrop> | ||
events | ContractEvents<PrebuiltTokenDrop> | ||
metadata | ContractMetadata<PrebuiltTokenDrop, typeof DropErc20ContractSchema> | ||
platformFees | ContractPlatformFee<PrebuiltTokenDrop> | ||
roles | ContractRoles<PrebuiltTokenDrop, typeof TokenDrop.contractRoles[number]> | ||
sales | ContractPrimarySale<PrebuiltTokenDrop> |
Methods
Method | Modifiers | Description |
---|---|---|
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>