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 = sdk.getTokenDrop("{{contract_address}}");
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(network, address, storage, options, contractWrapper) | Constructs a new instance of the TokenDrop class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
claimConditions | DropClaimConditions<DropERC20> | Configure claim conditions | |
contractAbi | static | any | |
contractRoles | static | readonly ["admin", "transfer"] | |
contractType | static | "token-drop" | |
encoder | ContractEncoder<DropERC20> | ||
estimator | GasCostEstimator<DropERC20> | ||
metadata | ContractMetadata<DropERC20, typeof TokenDrop.schema> | ||
platformFees | ContractPlatformFee<DropERC20> | ||
roles | ContractRoles<DropERC20, typeof TokenDrop.contractRoles[number]> | ||
sales | ContractPrimarySale<DropERC20> |
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 Erc20<DropERC20>
Extends: Erc20<DropERC20