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
Constructor | Modifiers | Description |
---|---|---|
(constructor)(network, address, storage, options, contractWrapper) | Constructs a new instance of the Token class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
contractAbi | static | any | |
contractRoles | static | readonly ["admin", "minter", "transfer"] | |
contractType | static | "token" | |
encoder | ContractEncoder<TokenERC20> | ||
estimator | GasCostEstimator<TokenERC20> | ||
events | ContractEvents<TokenERC20> | ||
history | TokenERC20History | ||
metadata | ContractMetadata<TokenERC20, typeof Token.schema> | ||
platformFees | ContractPlatformFee<TokenERC20> | ||
roles | ContractRoles<TokenERC20, typeof Token.contractRoles[number]> | ||
signature | Erc20SignatureMintable | Signature Minting |
Methods
Method | Modifiers | Description |
---|---|---|
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