Adds register_token command which allows the user to add tokens considering their symbol and precision. Removes the hardcoded transfer and balance commands.
Checklist
[x] I have built this pull request locally
[x] I have ran the unit tests locally
[x] I have manually tested this pull request
[x] I have reviewed my pull request
[x] I have added any relevant tests
Demonstration
❯ ./koinos-cli
Connected to endpoint https://api.koinos.io/
Token 'koin' at address 15DJN4a8SgrbGhhGksSBASiSYjGnMU8dGL registered
Token 'vhp' at address 1AdzuXSpC6K9qtXdCBgD5NUpDNwHjMgrc9 registered
Contract 'pob' at address 159myq5YUhhoVWu3wsHKHiJYKPKGUrGiyv registered
Contract 'name_service' at address 19WxDJ9Kcvx4VqQFkpwVmwVEy1hMuwXtQE registered
Koinos CLI v1.0.0
Type "list" for a list of commands, "help <command>" for help on a specific command.
🔐 > vhp.total_supply
7759501.02489313 VHP
🔐 > koin.total_supply
9557584.57649814 KOIN
🔐 > koin.balance_of 1NsQbH5AhQXgtSNg1ejpFqTi2hmCWz1eQS
6977.43290515 KOIN
🔐 > vhp.balance_of 1NsQbH5AhQXgtSNg1ejpFqTi2hmCWz1eQS
2197976.10563429 VHP
...
🔓 > tkoin.transfer 1Kv5E6ZSJbJxNtDCy2dLTNqJoT1fLvpukP 0.1
Transferring 0.1 tKOIN to 1Kv5E6ZSJbJxNtDCy2dLTNqJoT1fLvpukP
Transaction with ID 0x1220dd0e8f7d3989a4a007e8bbc340a409822cd47bcafd5828ee684098be6af66a7a containing 1 operations submitted.
Mana cost: 0.10904102 (Disk: 112, Network: 313, Compute: 561569)
🔓 > tkoin.balance_of
9999.9 tKOIN
🔓 > tkoin.balance_of 1Kv5E6ZSJbJxNtDCy2dLTNqJoT1fLvpukP
0.1 tKOIN
🔓 > tkoin.total_supply
19658634.79195013 tKOIN
Resolves #143. Resolves #144. Resolves #145.
Brief description
Adds
register_token
command which allows the user to add tokens considering their symbol and precision. Removes the hardcodedtransfer
andbalance
commands.Checklist
Demonstration