Skip to main content

Token class

Create a standard crypto token or cryptocurrency.

Example

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

const sdk = new ThirdwebSDK("{{chainName}}");
const contract = sdk.getToken("{{contract_address}}");

Constructors

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

Properties

PropertyModifiersTypeDescription
abitypeof ABI
contractRolesstaticreadonly ["admin", "minter", "transfer"]
encoderContractEncoder<TokenERC20>
estimatorGasCostEstimator<TokenERC20>
eventsContractEvents<TokenERC20>
historyTokenERC20History
metadataContractMetadata<TokenERC20, typeof TokenErc20ContractSchema>
platformFeesContractPlatformFee<TokenERC20>
rolesContractRoles<TokenERC20, typeof Token.contractRoles[number]>
salesContractPrimarySale<TokenERC20>
signatureErc20SignatureMintableSignature Minting

Methods

MethodModifiersDescription
burn(amount)Burn Tokens
burnFrom(holder, amount)Burn Tokens
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
mint(amount)Mint Tokens for the connected wallet
mintBatchTo(args)Mint Tokens To Many Wallets
mintTo(to, amount)Mint Tokens

Signature:

export declare class Token extends StandardErc20<TokenERC20>

Extends: StandardErc20<TokenERC20>