๐ชToken
This is a standard CW20 token. CW20 is a specification for fungible tokens based on CosmWasm. The name and design is loosely based on Ethereum's ERC20 standard, but many changes have been made. The types in here can be imported by contracts that wish to implement this spec, or by contracts that call to any standard cw20 contract.
The token contract is used by the pool contract to create LP tokens.
The code for the token contract can be found here.
The following are the messages that can be executed on the cw20 token contract:
Instantiate
Instantiates a cw20 token.
ExecuteMsg
Increase allowance
Only with "approval" extension. Allows spender to access an additional amount tokens from the owner's (env.sender) account. If expires is Some(), overwrites current allowance expiration with this one.
Decrease allowance
Only with "approval" extension. Lowers the spender's access of tokens from the owner's (env.sender) account by amount. If expires is Some(), overwrites current allowance expiration with this one.
Burn
Burn is a base message to destroy tokens forever.
Burn from
Only with "approval" extension. Destroys tokens forever
Mint
Only with the "mintable" extension. If authorized, creates amount new tokens and adds to the recipient balance.
Send
Send is a base message to transfer tokens to a contract and trigger an action on the receiving contract.
Send from
Only with "approval" extension. Sends amount tokens from owner -> contract if env.sender has sufficient pre-approval.
Transfer
Transfer is a base message to move tokens to another account without triggering actions.
Transfer from
Only with "approval" extension. Transfers amount tokens from owner -> recipient if env.sender has sufficient pre-approval.
Update marketing
Only with the "marketing" extension. If authorized, updates marketing metadata. Setting None/null for any of these will leave it unchanged. Setting Some("") will clear this field on the contract storage
Update minter
Only with the "mintable" extension. The current minter may set a new minter. Setting the minter to None will remove the token's minter forever.
Upload logo
If set as the "marketing" role on the contract, upload a new URL, SVG, or PNG for the token.
Queries
All accounts
Only with "enumerable" extension. Returns all accounts that have balances. Supports pagination.
All allowances
Only with "enumerable" extension (and "allowances"). Returns all allowances this owner has approved. Supports pagination.
All spender allowances
Only with "enumerable" extension (and "allowances"). Returns all allowances this spender has been granted. Supports pagination.
Allowance
Only with "allowance" extension. Returns how much spender can use from owner account, 0 if unset.
Balance
Returns the current balance of the given address, 0 if unset.
Download logo
Only with "marketing" extension. Downloads the embedded logo data (if stored on chain). Errors if no logo data is stored for this contract.
Marketing info
Only with "marketing" extension. Returns more metadata on the contract to display in the client: description, logo, project url, etc.
Minter
Only with "mintable" extension. Returns who can mint and the hard cap on maximum tokens after minting.
Token info
Returns metadata on the contract - name, decimals, supply, etc.
Last updated