Guide
In this guide, we'll go over how to instantiate, query, and execute CW20 methods seen below.
Instantiate​
In order to create a CW20 token, a CW20 contract must be instantiated.
Thanks to the JunoTools dashboard, you can easily instantiate a CW20 contract.
Before creating a CW20 token, you must decide on the following information. However, some of them are optional.
Token Details​
- Name is the full name of your token.
- Symbol is the shortening of your CW20 token name.
- Decimals denote how much divisible your token is. If your token has 6 decimals, it means addresses can have as little as 0.000001 of your token.
- Initial Balance is the number of existing tokens at the genesis block.
Mint​
- Minter Address is the address that has access to mint new tokens.
- Cap is the maximum amount of tokens that exist.
Marketing​
- Project is the name shown on marketing details.
- Description is where you can store detailed project information about your token.
- Wallet Address will be shown as the marketing address of your token.
- Logo URL is any URL that contains an image, your token will have that URL information for marketing and branding purposes.
Query​
Querying a CW20 token means gathering information related to that token directly from the blockchain.
Using the dashboard, it is possible to query any CW20 token for
However, each query requires at least 1 input which is the CW20 contract address.
All Accounts, Minter, and Marketing queries do not require additional parameters other than the CW20 contract address. Required parameters for other queries are shown below.
- Balance of a specific address
- Owner Address
- Allowance which is an amount allowed by some address to another address for spending or burning.
- Allower address
- Spender address
- All Allowance is the list of all allowances an address has provided.
- Allower Address
- All Accounts that have the token.
- Minter address for the token contract.
- Marketing information provided by the token.
Execute​
A CW20 Contract contains a set of methods to control and interact with the token it contains. JunoTools lets you easily execute those methods as you wish with just a click.
All the messages that can be executed are explained below.
- Burn: Remove some amount of tokens from your balance and reduce the total token supply by the same amount.
- Burn From: Make use of an allowance and remove some amount of tokens from the balance of another address.
- Increase Allowance: Increase the allowance of an address based on your balance.
- Decrease Allowance: Decrease the allowance of an address based on your balance.
- Transfer: Move some amount of tokens from one address to another address.
- Transfer From: Make use of an allowance and move some amount of tokens from one address to another address. Your address must be given an allowance from another address to use this.
- Send: Move some amount of tokens from one address to another address and execute a message in the end.
- Send From: Make use of an allowance and move some amount of tokens from one address to another address and execute a message at the end.
- Update Marketing: Update marketing information related to your token contract.
- Update Logo: Update token logo URL.
After each execution, the corresponding transaction hash will be prompted for your information.
Congrats! You have successfully learned how to create a CW20 token and interact with it.