Burn Tokens
Rest
...args: [holder: string, amount: string | number]Burn tokens held by the specified wallet
// Address of the wallet sending the tokens
const holderAddress = "{{wallet_address}}";
// The amount of this token you want to burn
const amount = 1.2;
await contract.burnFrom(holderAddress, amount);
Rest
...args: [holder: string, amount: string | number]Burn Tokens
Rest
...args: [amount: string | number]Burn tokens held by the connected wallet
// The amount of this token you want to burn
const amount = 1.2;
await contract.burnTokens(amount);
Rest
...args: [amount: string | number]Claim a certain amount of tokens
Rest
...args: [amount: string | number, checkERC20Allowance: any]Rest
...args: [amount: string | number, checkERC20Allowance: any]Configure claim conditions
Define who can claim Tokens, when and how many.
const presaleStartTime = new Date();
const publicSaleStartTime = new Date(Date.now() + 60 * 60 * 24 * 1000);
const claimConditions = [
{
startTime: presaleStartTime, // start the presale now
maxQuantity: 3117.42, // limit how many tokens are released in this presale
price: 0.001, // presale price per token
snapshot: ['0x...', '0x...'], // limit claiming to only certain addresses
},
{
startTime: publicSaleStartTime, // 24h after presale, start public sale
price: 0.008, // public sale price per token
}
]);
await contract.claimConditions.set(claimConditions);
Claim a certain amount of tokens to a specific Wallet
Rest
...args: [destinationAddress: string, amount: string | number, checkERC20Allowance: any]Let the specified wallet claim Tokens.
const address = "{{wallet_address}}"; // address of the wallet you want to claim the NFTs
const quantity = 42.69; // how many tokens you want to claim
const tx = await contract.claimTo(address, quantity);
const receipt = tx.receipt; // the transaction receipt
Rest
...args: [destinationAddress: string, amount: string | number, checkERC20Allowance: any]Protected
contractAlpha
Lets you delegate your voting power to the delegateeAddress
Rest
...args: [delegateeAddress: string]Rest
...args: [delegateeAddress: string]Allows the specified spender
wallet to transfer the given amount
of tokens to another wallet
Rest
...args: [spender: string, amount: string | number]// Address of the wallet to allow transfers from
const spenderAddress = "0x...";
// The number of tokens to give as allowance
const amount = 100
await contract.setAllowance(spenderAddress, amount);
Rest
...args: [spender: string, amount: string | number]Protected
storageTransfer Tokens
Rest
...args: [to: string, amount: string | number]Transfer tokens from the connected wallet to another wallet.
// Address of the wallet you want to send the tokens to
const toAddress = "0x...";
// The amount of tokens you want to send
const amount = 0.1;
await contract.transfer(toAddress, amount);
Rest
...args: [to: string, amount: string | number]Transfer Tokens To Many Wallets
Rest
...args: [args: { Mint tokens from the connected wallet to many wallets
// Data of the tokens you want to mint
const data = [
{
toAddress: "{{wallet_address}}", // Address to mint tokens to
amount: 100, // How many tokens to mint to specified address
},
{
toAddress: "0x...",
amount: 100,
}
]
await contract.transferBatch(data);
Rest
...args: [args: { Transfer Tokens From Address
Rest
...args: [from: string, to: string, amount: string | number]Transfer tokens from one wallet to another
// Address of the wallet sending the tokens
const fromAddress = "{{wallet_address}}";
// Address of the wallet you want to send the tokens to
const toAddress = "0x...";
// The number of tokens you want to send
const amount = 1.2
// Note that the connected wallet must have approval to transfer the tokens of the fromAddress
await contract.transferFrom(fromAddress, toAddress, amount);
Rest
...args: [from: string, to: string, amount: string | number]Static
contractGet Token Allowance
The allowance of one wallet over anothers funds.
Get the allowance of a 'spender' wallet over the connected wallet's funds - the allowance of a different address for a token is the amount of tokens that the spender
wallet is allowed to spend on behalf of the connected wallet.
// Address of the wallet to check token allowance
const spenderAddress = "0x...";
const allowance = await contract.allowance(spenderAddress);
Get Token Allowance
The allowance of one wallet over anothers funds.
Get the allowance of one wallet over another wallet's funds - the allowance of a different address for a token is the amount of tokens that the wallet is allowed to spend on behalf of the specified wallet.
// Address of the wallet who owns the funds
const owner = "{{wallet_address}}";
// Address of the wallet to check token allowance
const spender = "0x...";
const allowance = await contract.allowanceOf(owner, spender);
Get Token Balance for the currently connected wallet
The balance of a specific wallet.
Get a wallets token balance.
const balance = await contract.balance();
Get Token Balance
The balance of a specific wallet.
Get a wallets token balance.
// Address of the wallet to check token balance
const walletAddress = "{{wallet_address}}";
const balance = await contract.balanceOf(walletAddress);
Get your wallet voting power for the current checkpoints
the amount of voting power in tokens
The total supply for this token
Get how much supply has been minted
const balance = await contract.totalSupply();
Generated using TypeDoc
Create a Drop contract for a standard crypto token or cryptocurrency.
Example