Skip to content

Instantly share code, notes, and snippets.

@orkunkl
Last active August 20, 2020 10:12
Show Gist options
  • Save orkunkl/eefca01bdef52559925f89f75400e593 to your computer and use it in GitHub Desktop.
Save orkunkl/eefca01bdef52559925f89f75400e593 to your computer and use it in GitHub Desktop.
const someone = "coral1kl9my2rql4vlwrj8tku2tqephvcgul2g2clw3f";
const other = "coral1mfyug6ceg25htnz2x6unlaqdqt0054zp2g6fa5";
// You have the permission to mint, you did give yourself that special permission on init.
> dizz.mint(someone,"9988000")
'711D4E533323A943425B6C31FF6DBC60059B69BBF89F142AD77BBC4547543351' // tx hash
// check the tx on block explorer:
// https://bigdipper.coralnet.cosmwasm.com/transactions/711D4E533323A943425B6C31FF6DBC60059B69BBF89F142AD77BBC4547543351
>> dizz.balance()
'1000000'
// check transacted account
>> dizz.balance(someone)
'9988000'
// second account is empty
>> dizz.balance(other)
'0'
// watch for total coins minted
>> dizz.tokenInfo()
{
name: 'DIZZ COIN',
symbol: 'DIZZ',
decimals: 6,
total_supply: '10988000'
}
// Okay, now let's transfer some tokens
>> dizz.transfer(other, "9000")
'14682AD99CDA1BE49D52BD6040F828B495B8CC53B0F220A6E377EB7B24EB8C5F'
// https://bigdipper.coralnet.cosmwasm.com/transactions/14682AD99CDA1BE49D52BD6040F828B495B8CC53B0F220A6E377EB7B24EB8C5F
// Tokens are transferred
>> dizz.balance(other)
'9000'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment