Skip to content

Instantly share code, notes, and snippets.

@truongnmt
Last active September 7, 2018 03:26
Show Gist options
  • Save truongnmt/cf0fe1cc23f7a56f73e1ffdd875bea8c to your computer and use it in GitHub Desktop.
Save truongnmt/cf0fe1cc23f7a56f73e1ffdd875bea8c to your computer and use it in GitHub Desktop.
Welcome to Iroha-Cli.
Choose what to do:
1. New transaction (tx)
2. New query (qry)
3. New transaction status request (st)
> : 1
Forming a new transactions, choose command to add:
1. Detach role from account (detach)
2. Add new role to account (apnd_role)
3. Create new role (crt_role)
4. Set account key/value detail (set_acc_kv)
5. Transfer Assets (tran_ast)
6. Grant permission over your account (grant_perm)
7. Subtract Assets Quantity from Account (sub_ast_qty)
8. Set Account Quorum (set_qrm)
9. Remove Signatory (rem_sign)
10. Create Domain (crt_dmn)
11. Revoke permission from account (revoke_perm)
12. Create Account (crt_acc)
13. Add Signatory to Account (add_sign)
14. Create Asset (crt_ast)
15. Add Peer to Iroha Network (add_peer)
16. Add Asset Quantity (add_ast_qty)
0. Back (b)
> : 14
Asset name: abcabc
Domain Id: test
Asset precision: 2
Command is formed. Choose what to do:
1. Add one more command to the transaction (add)
2. Send to Iroha peer (send)
3. Go back and start a new transaction (b)
4. Save as json file (save)
> : 2
Peer address (0.0.0.0):
Peer port (50051):
[2018-09-07 02:06:24.274806465][th:31][info] TransactionResponseHandler Transaction successfully sent
Congratulation, your transaction was accepted for processing.
Its hash is 99d597068541cdfc00cb632c35668261f051f9ed1ec9d2c8de6f0fffdbb67a98
--------------------
Choose what to do:
1. New transaction (tx)
2. New query (qry)
3. New transaction status request (st)
> : 1
Forming a new transactions, choose command to add:
1. Detach role from account (detach)
2. Add new role to account (apnd_role)
3. Create new role (crt_role)
4. Set account key/value detail (set_acc_kv)
5. Transfer Assets (tran_ast)
6. Grant permission over your account (grant_perm)
7. Subtract Assets Quantity from Account (sub_ast_qty)
8. Set Account Quorum (set_qrm)
9. Remove Signatory (rem_sign)
10. Create Domain (crt_dmn)
11. Revoke permission from account (revoke_perm)
12. Create Account (crt_acc)
13. Add Signatory to Account (add_sign)
14. Create Asset (crt_ast)
15. Add Peer to Iroha Network (add_peer)
16. Add Asset Quantity (add_ast_qty)
0. Back (b)
> : b
Choose what to do:
1. New transaction (tx)
2. New query (qry)
3. New transaction status request (st)
> : 3
Choose action:
1. Get status of transaction (get_tx_info)
0. Back (b)
> : 99d597068541cdfc00cb632c35668261f051f9ed1ec9d2c8de6f0fffdbb67a98
Command not found: 99d597068541cdfc00cb632c35668261f051f9ed1ec9d2c8de6f0fffdbb67a98
Parser for command not found
> : 1
Requested tx hash: 99d597068541cdfc00cb632c35668261f051f9ed1ec9d2c8de6f0fffdbb67a98
Tx hash is saved. Choose what to do:
1. Send to Iroha peer (send)
2. Save as json file (save)
0. Back (b)
> : 2
Path to save json file:
Parse params returned no value
> : b
--------------------
Choose action:
1. Get status of transaction (get_tx_info)
0. Back (b)
> : 1
Requested tx hash (99d597068541cdfc00cb632c35668261f051f9ed1ec9d2c8de6f0fffdbb67a98):
Tx hash is saved. Choose what to do:
1. Send to Iroha peer (send)
2. Save as json file (save)
0. Back (b)
> : 1
Peer address (0.0.0.0):
Peer port (50051):
Transaction was successfully committed.
--------------------
Choose what to do:
1. New transaction (tx)
2. New query (qry)
3. New transaction status request (st)
> : 1
Forming a new transactions, choose command to add:
1. Detach role from account (detach)
2. Add new role to account (apnd_role)
3. Create new role (crt_role)
4. Set account key/value detail (set_acc_kv)
5. Transfer Assets (tran_ast)
6. Grant permission over your account (grant_perm)
7. Subtract Assets Quantity from Account (sub_ast_qty)
8. Set Account Quorum (set_qrm)
9. Remove Signatory (rem_sign)
10. Create Domain (crt_dmn)
11. Revoke permission from account (revoke_perm)
12. Create Account (crt_acc)
13. Add Signatory to Account (add_sign)
14. Create Asset (crt_ast)
15. Add Peer to Iroha Network (add_peer)
16. Add Asset Quantity (add_ast_qty)
0. Back (b)
> : 16
Account Id: admin@test
Asset Id: abcabc
Amount to to add, e.g 123.456: 10000
Command is formed. Choose what to do:
1. Add one more command to the transaction (add)
2. Send to Iroha peer (send)
3. Go back and start a new transaction (b)
4. Save as json file (save)
> : 2
Peer address (0.0.0.0):
Peer port (50051):
[2018-09-07 02:10:26.657419210][th:31][info] TransactionResponseHandler Transaction successfully sent
Congratulation, your transaction was accepted for processing.
Its hash is 98dc823e5f8d4c1003bbb1879c14d93fe9756edaf73ea06a08e8f4b04f22b944
--------------------
Choose what to do:
1. New transaction (tx)
2. New query (qry)
3. New transaction status request (st)
> : 3
Choose action:
1. Get status of transaction (get_tx_info)
0. Back (b)
> : 1
Requested tx hash (99d597068541cdfc00cb632c35668261f051f9ed1ec9d2c8de6f0fffdbb67a98): 98dc823e5f8d4c1003bbb1879c14d93fe9756edaf73ea06a08e8f4b04f22b944
Tx hash is saved. Choose what to do:
1. Send to Iroha peer (send)
2. Save as json file (save)
0. Back (b)
> : 1
Peer address (0.0.0.0):
Peer port (50051):
Transaction has not passed stateless validation. Stateless invalid tx: 98dc823e5f8d4c1003bbb1879c14d93fe9756edaf73ea06a08e8f4b04f22b944. Error is: Error in transaction with reduced hash: 2a6a213ea5554c57842c534ff235819e99008f238d917299a0bdfbc410f7ae85: [[0 AddAssetQuantity: [[Wrongly formed asset_id, passed value: 'admin@test'. Field should match regex '[a-z_0-9]{1,32}\#([a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?' Amount must be greater than 0, passed value: 0 ]]
Transaction batch: : [[]]
]]
--------------------
Choose what to do:
1. New transaction (tx)
2. New query (qry)
3. New transaction status request (st)
> : 1
Forming a new transactions, choose command to add:
1. Detach role from account (detach)
2. Add new role to account (apnd_role)
3. Create new role (crt_role)
4. Set account key/value detail (set_acc_kv)
5. Transfer Assets (tran_ast)
6. Grant permission over your account (grant_perm)
7. Subtract Assets Quantity from Account (sub_ast_qty)
8. Set Account Quorum (set_qrm)
9. Remove Signatory (rem_sign)
10. Create Domain (crt_dmn)
11. Revoke permission from account (revoke_perm)
12. Create Account (crt_acc)
13. Add Signatory to Account (add_sign)
14. Create Asset (crt_ast)
15. Add Peer to Iroha Network (add_peer)
16. Add Asset Quantity (add_ast_qty)
0. Back (b)
> : 14
Asset name (abcabc): mfc
Domain Id (test): test
Asset precision (2):
Command is formed. Choose what to do:
1. Add one more command to the transaction (add)
2. Send to Iroha peer (send)
3. Go back and start a new transaction (b)
4. Save as json file (save)
> : 1
--------------------
Choose command to add:
1. Detach role from account (detach)
2. Add new role to account (apnd_role)
3. Create new role (crt_role)
4. Set account key/value detail (set_acc_kv)
5. Transfer Assets (tran_ast)
6. Grant permission over your account (grant_perm)
7. Subtract Assets Quantity from Account (sub_ast_qty)
8. Set Account Quorum (set_qrm)
9. Remove Signatory (rem_sign)
10. Create Domain (crt_dmn)
11. Revoke permission from account (revoke_perm)
12. Create Account (crt_acc)
13. Add Signatory to Account (add_sign)
14. Create Asset (crt_ast)
15. Add Peer to Iroha Network (add_peer)
16. Add Asset Quantity (add_ast_qty)
0. Back (b)
> : 16
Account Id (admin@test):
Asset Id (abcabc): mfc#test
Amount to to add, e.g 123.456 (10000): 20050
Command is formed. Choose what to do:
1. Add one more command to the transaction (add)
2. Send to Iroha peer (send)
3. Go back and start a new transaction (b)
4. Save as json file (save)
> : 1
--------------------
Choose command to add:
1. Detach role from account (detach)
2. Add new role to account (apnd_role)
3. Create new role (crt_role)
4. Set account key/value detail (set_acc_kv)
5. Transfer Assets (tran_ast)
6. Grant permission over your account (grant_perm)
7. Subtract Assets Quantity from Account (sub_ast_qty)
8. Set Account Quorum (set_qrm)
9. Remove Signatory (rem_sign)
10. Create Domain (crt_dmn)
11. Revoke permission from account (revoke_perm)
12. Create Account (crt_acc)
13. Add Signatory to Account (add_sign)
14. Create Asset (crt_ast)
15. Add Peer to Iroha Network (add_peer)
16. Add Asset Quantity (add_ast_qty)
0. Back (b)
> : 5
SrcAccount Id: admin@test
DestAccount Id: test@test
Asset Id: mfc#test
Amount to to add, e.g 123.456: 10050
Command is formed. Choose what to do:
1. Add one more command to the transaction (add)
2. Send to Iroha peer (send)
3. Go back and start a new transaction (b)
4. Save as json file (save)
> : 2
Peer address (0.0.0.0):
Peer port (50051):
[2018-09-07 02:13:11.296162264][th:31][info] TransactionResponseHandler Transaction successfully sent
Congratulation, your transaction was accepted for processing.
Its hash is fd43a81a8901f01dacf89aa3b5895cb970f2a53e1e2640fd7d596e03c4ce9f16
--------------------
Choose what to do:
1. New transaction (tx)
2. New query (qry)
3. New transaction status request (st)
> : 3
Choose action:
1. Get status of transaction (get_tx_info)
0. Back (b)
> : 1
Requested tx hash (98dc823e5f8d4c1003bbb1879c14d93fe9756edaf73ea06a08e8f4b04f22b944): fd43a81a8901f01dacf89aa3b5895cb970f2a53e1e2640fd7d596e03c4ce9f16
Tx hash is saved. Choose what to do:
1. Send to Iroha peer (send)
2. Save as json file (save)
0. Back (b)
> : 1
Peer address (0.0.0.0):
Peer port (50051):
Transaction has not passed stateless validation. Stateless invalid tx: fd43a81a8901f01dacf89aa3b5895cb970f2a53e1e2640fd7d596e03c4ce9f16. Error is: Error in transaction with reduced hash: 99369b97f6bfa09a72b01a91b88d200b58c5a64bed2aec77e2113d9ff5a55595: [[1 AddAssetQuantity: [[Wrongly formed asset_id, passed value: 'admin@test'. Field should match regex '[a-z_0-9]{1,32}\#([a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?' Amount must be greater than 0, passed value: 0 ]]
Transaction batch: : [[]]
]]
--------------------
Choose what to do:
1. New transaction (tx)
2. New query (qry)
3. New transaction status request (st)
> : 1
Forming a new transactions, choose command to add:
1. Detach role from account (detach)
2. Add new role to account (apnd_role)
3. Create new role (crt_role)
4. Set account key/value detail (set_acc_kv)
5. Transfer Assets (tran_ast)
6. Grant permission over your account (grant_perm)
7. Subtract Assets Quantity from Account (sub_ast_qty)
8. Set Account Quorum (set_qrm)
9. Remove Signatory (rem_sign)
10. Create Domain (crt_dmn)
11. Revoke permission from account (revoke_perm)
12. Create Account (crt_acc)
13. Add Signatory to Account (add_sign)
14. Create Asset (crt_ast)
15. Add Peer to Iroha Network (add_peer)
16. Add Asset Quantity (add_ast_qty)
0. Back (b)
> : 16
Account Id (admin@test):
Asset Id (mfc#test): mfc
Amount to to add, e.g 123.456 (20050):
Command is formed. Choose what to do:
1. Add one more command to the transaction (add)
2. Send to Iroha peer (send)
3. Go back and start a new transaction (b)
4. Save as json file (save)
> : 2
Peer address (0.0.0.0):
Peer port (50051):
[2018-09-07 02:15:30.371664884][th:31][info] TransactionResponseHandler Transaction successfully sent
Congratulation, your transaction was accepted for processing.
Its hash is ab39ca886b94a62666909b4e4945cf147cb954a8ca2465b1850074872f194f89
--------------------
Choose what to do:
1. New transaction (tx)
2. New query (qry)
3. New transaction status request (st)
> : 3
Choose action:
1. Get status of transaction (get_tx_info)
0. Back (b)
> : 1
Requested tx hash (fd43a81a8901f01dacf89aa3b5895cb970f2a53e1e2640fd7d596e03c4ce9f16): ab39ca886b94a62666909b4e4945cf147cb954a8ca2465b1850074872f194f89
Tx hash is saved. Choose what to do:
1. Send to Iroha peer (send)
2. Save as json file (save)
0. Back (b)
> : 1
Peer address (0.0.0.0):
Peer port (50051):
Transaction has not passed stateless validation. Stateless invalid tx: ab39ca886b94a62666909b4e4945cf147cb954a8ca2465b1850074872f194f89. Error is: Error in transaction with reduced hash: 2e4cbcebde966668201a0457f58cb3e7017c0f2602a4ae17ae55b2573eb5a3ba: [[0 AddAssetQuantity: [[Wrongly formed asset_id, passed value: 'admin@test'. Field should match regex '[a-z_0-9]{1,32}\#([a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?' Amount must be greater than 0, passed value: 0 ]]
Transaction batch: : [[]]
]]
--------------------
Choose what to do:
1. New transaction (tx)
2. New query (qry)
3. New transaction status request (st)
> : 2
Choose query:
1. Get all permissions related to role (get_role_perm)
2. Get Transactions by transactions' hashes (get_tx)
3. Get information about asset (get_ast_info)
4. Get Account's Transactions (get_acc_tx)
5. Get Account's Asset Transactions (get_acc_ast_tx)
6. Get all current roles in the system (get_roles)
7. Get Account's Signatories (get_acc_sign)
8. Get Account's Assets (get_acc_ast)
9. Get Account Information (get_acc)
0. Back (b)
> : 4
Requested account Id: admin@test
Query is formed. Choose what to do:
1. Send to Iroha peer (send)
2. Save as json file (save)
0. Back (b)
> : 1
Peer address (0.0.0.0):
Peer port (50051):
[2018-09-07 02:16:03.416929729][th:31][info] QueryResponseHandler [Transaction]
[2018-09-07 02:16:03.417599033][th:31][info] QueryResponseHandler -Hash- 99d597068541cdfc00cb632c35668261f051f9ed1ec9d2c8de6f0fffdbb67a98
[2018-09-07 02:16:03.418211035][th:31][info] QueryResponseHandler -Creator Id- admin@test
[2018-09-07 02:16:03.418768838][th:31][info] QueryResponseHandler -Created Time- 1536285984262
[2018-09-07 02:16:03.419307141][th:31][info] QueryResponseHandler -Commands- 1
[2018-09-07 02:16:03.420256545][th:31][info] QueryResponseHandler CreateAsset: [asset_name=abcabc, domain_id=test, precision=2, ]
--------------------
root@cc7d98869b99:/opt/iroha_data# cat tmp.json
{
"signatures": [
{
"pubkey": "313a07e6384776ed95447710d15e59148473ccfc052a681317a72a69f2a49910",
"signature": "bb039c54c5037f01eb221bf95ff10c1776c63044408818848a0eac75351349641e49b2131ab0c8aa382fa545524449689d0781719fdad1090a9b86882ac6c200"
}
],
"created_ts": 1536290696758,
"creator_account_id": "admin@test",
"quorum": 1,
"commands": [
{
"command_type": "AddAssetQuantity",
"asset_id": "admin@test",
"amount": "mfc#test"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment