Token class
Create 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");
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(network, address, storage, options, abi, chainId, contractWrapper) | Constructs a new instance of the Token class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
abi | Abi | ||
contractRoles | static | readonly ["admin", "minter", "transfer"] | |
encoder | ContractEncoder<TokenERC20> | ||
estimator | GasCostEstimator<TokenERC20> | ||
events | ContractEvents<TokenERC20> | ||
history | TokenERC20History | ||
metadata | ContractMetadata<TokenERC20, typeof TokenErc20ContractSchema> | ||
platformFees | ContractPlatformFee<TokenERC20> | ||
roles | ContractRoles<TokenERC20, typeof Token.contractRoles[number]> | ||
sales | ContractPrimarySale<TokenERC20> | ||
signature | Erc20SignatureMintable | Signature Minting |
Methods
Method | Modifiers | Description |
---|---|---|
burn(amount) | Burn Tokens | |
burnFrom(holder, amount) | Burn Tokens | |
getDelegation() | Get your voting delegatee address | |
getDelegationOf(account) | Get a specific address voting delegatee address | |
getMintTransaction(to, amount) | Construct a mint transaction without executing it. This is useful for estimating the gas cost of a mint transaction, overriding transaction options and having fine grained control over the transaction execution. | |
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>