Skip to content

Comments

199 kcs 4#204

Open
mvandeberg wants to merge 4 commits intomasterfrom
199-kcs-4
Open

199 kcs 4#204
mvandeberg wants to merge 4 commits intomasterfrom
199-kcs-4

Conversation

@mvandeberg
Copy link
Member

Resolves #199

Brief description

Adds KCS-4 support to CLI and updates to use new ABI format.

Checklist

  • I have built this pull request locally
  • I have ran the unit tests locally
  • I have manually tested this pull request
  • I have reviewed my pull request
  • I have added any relevant tests

Demonstration

🔐 > open wallets/genesis.wallet genesis
Opened wallet: wallets/genesis.wallet

🔓 > register_token koin 1HnCM6v2bLg8Qhw6BKCVhGPeoTamJbkbFi
Token 'koin' at address 1HnCM6v2bLg8Qhw6BKCVhGPeoTamJbkbFi registered

🔓 > koin.balance_of 
4995044.58898006 tKOIN

🔓 > generate
New key generated
This is only shown once, make sure to record this information
---
Address: 1JtDoET16SVeqY6vXRdrNwEWarYoqJh4B5
Public : AlK7-8L2hWJAxXbVjW2Z0bVDZwhMIBqig67N0LIi9Nbt
Private: L57Gx3tyEwwNUsT6GTptxFcGhGMw94r8e5Si6k9t2Qs2tGcgDbie

🔓 > help koin.transfer 
Transfers the token
Usage: koin.transfer <to:address> <amount:amount> [memo:string]

🔓 > koin.transfer 1JtDoET16SVeqY6vXRdrNwEWarYoqJh4B5 1 foobar
Transferring 1 tKOIN to 1JtDoET16SVeqY6vXRdrNwEWarYoqJh4B5
Transaction with ID 0x1220d798e24bcf36db10b0c424202b891cdd5f3b762d743c3d6d960083b72cabba5c containing 1 operations submitted.
Mana cost: 0.03033264 (Disk: 77, Network: 322, Compute: 605751)

🔓 > koin.transfer 1JtDoET16SVeqY6vXRdrNwEWarYoqJh4B5 1 
Transferring 1 tKOIN to 1JtDoET16SVeqY6vXRdrNwEWarYoqJh4B5
Transaction with ID 0x1220148881f318217a3bc67f54e01b5469e29cb00ccced12943b91c9dc98c02f0dfd containing 1 operations submitted.
Mana cost: 0.03016436 (Disk: 77, Network: 314, Compute: 603012)

🔓 > help koin.approve
Approves an address to spend token
Usage: koin.approve <spender:address> <amount:amount> [memo:string]

🔓 > koin.approve 1JtDoET16SVeqY6vXRdrNwEWarYoqJh4B5 10
Approving 1JtDoET16SVeqY6vXRdrNwEWarYoqJh4B5 for 10 tKOIN
Transaction with ID 0x1220f2eeeab13d069036b2dbf57cd130005571896b4b2e96db1f370149cbd1d6621f containing 1 operations submitted.
Mana cost: 0.0316829 (Disk: 91, Network: 315, Compute: 623796)

🔓 > generate
New key generated
This is only shown once, make sure to record this information
---
Address: 19Td3CgUaekUorsWnNs762gbu6iUQZJ3dN
Public : Ak-qeLDp5Oc4iof_rRNq7qCA0Fcm0uEc-jZAlzQAsrB9
Private: L4rigx8QksuZgwanFK9FgpS3qkr2Fk86Gks2tcmvd9e6E3ZPaBZU

🔓 > koin.approve 19Td3CgUaekUorsWnNs762gbu6iUQZJ3dN 25 foobar
Approving 19Td3CgUaekUorsWnNs762gbu6iUQZJ3dN for 25 tKOIN
Transaction with ID 0x1220a7e30cd07b084565ad62484d318234044c0a99ee7e94e1fbfb1b9b11ca29107f containing 1 operations submitted.
Mana cost: 0.03175898 (Disk: 91, Network: 323, Compute: 624230)

🔓 > koin.allowance 1JtDoET16SVeqY6vXRdrNwEWarYoqJh4B5
10 tKOIN

🔓 > koin.allowance 19Td3CgUaekUorsWnNs762gbu6iUQZJ3dN
25 tKOIN

🔓 > generate
New key generated
This is only shown once, make sure to record this information
---
Address: 12AxvKpaigojnrxqobwubmYbuJ5Hh2JmL5
Public : Ak-oGO33kvcjzgoYs12XkoahmEKvJuxUgrCsCCsFA9WK
Private: L5EZ5u3KfS4H1RpCAYr84guee2VCzxX1SQBnCmcavfVhTMUUJDZF

🔓 > koin.allowance 12AxvKpaigojnrxqobwubmYbuJ5Hh2JmL5
0 tKOIN

🔓 > help koin.allowances
Returns token allowances
Usage: koin.allowances [start:address] [limit:uint] [owner:address]

🔓 > koin.allowances
Allowances:
 - 19Td3CgUaekUorsWnNs762gbu6iUQZJ3dN: 25 tKOIN
 - 1JtDoET16SVeqY6vXRdrNwEWarYoqJh4B5: 10 tKOIN

🔓 > koin.allowances 19Td3CgUaekUorsWnNs762gbu6iUQZJ3dN 1
Allowances:
 - 1JtDoET16SVeqY6vXRdrNwEWarYoqJh4B5: 10 tKOIN

🔓 > koin.approve 19Td3CgUaekUorsWnNs762gbu6iUQZJ3dN 0
Approving 19Td3CgUaekUorsWnNs762gbu6iUQZJ3dN for 0 tKOIN
Transaction with ID 0x122021659d9c63c09ac1b998e7a623c6cd5be850accd70473565b96137c8b6f4b647 containing 1 operations submitted.
Mana cost: 0.02264646 (Disk: 0, Network: 309, Compute: 619934)

🔓 > koin.allowances
Allowances:
 - 1JtDoET16SVeqY6vXRdrNwEWarYoqJh4B5: 10 tKOIN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Support KCS-4

1 participant