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, contractWrapper)Constructs a new instance of the Token class

Properties

PropertyModifiersTypeDescription
contractAbistaticany
contractRolesstaticreadonly ["admin", "minter", "transfer"]
contractTypestatic"token"
encoderContractEncoder<TokenERC20>
estimatorGasCostEstimator<TokenERC20>
eventsContractEvents<TokenERC20>
historyTokenERC20History
metadataContractMetadata<TokenERC20, typeof Token.schema>
platformFeesContractPlatformFee<TokenERC20>
rolesContractRoles<TokenERC20, typeof Token.contractRoles[number]>
signatureErc20SignatureMintableSignature Minting

Methods

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

Signature:

export declare class Token extends Erc20<TokenERC20>

Extends: Erc20<TokenERC20