@@ -21,7 +21,7 @@ _A CLI tools built for AElf_
2121
2222## Features
2323
24- - Get or Set common configs, ` endpoint ` , ` account ` , ` datadir ` , ` password ` , ` csv ` .
24+ - Get or Set common configs, ` endpoint ` , ` account ` , ` datadir ` , ` password ` , ` csv ` , ` json ` .
2525- For new users who are not familiar with the CLI parameters, any missing parameters will be asked in a prompting way.
2626- Create a new ` account ` .
2727- Load an account from a given ` private key ` or ` mnemonic ` .
@@ -130,7 +130,7 @@ Welcome to aelf interactive console. Ctrl + C to terminate the program. Double t
130130 ║ NAME | DESCRIPTION ║
131131 ║ AElf | imported from aelf-sdk ║
132132 ║ aelf | the instance of an aelf-sdk, connect to ║
133- ║ | http ://13.231.179.27:8000 ║
133+ ║ | https ://tdvw-test-node.aelf.io ║
134134 ║ _account | the instance of an AElf wallet, address ║
135135 ║ | is ║
136136 ║ | 2Ue31YTuB5Szy7cnr3SCEGU2gtGi5uMQBYarYUR… ║
@@ -155,6 +155,7 @@ Options:
155155 -p, --password < password> The password of encrypted keyStore
156156 -d, --datadir < directory> The directory that contains the AElf related files. Defaults to {home}/.local/share/aelf
157157 -c, --csv < csv> The location of the CSV file containing the parameters.
158+ -j, --json < json> The location of the JSON file containing the parameters.
158159 -h, --help output usage information
159160
160161Commands:
@@ -216,7 +217,8 @@ aelf-command console
216217- ` endpoint` : The endpoint for the RPC service.
217218- ` account` : The account to be used to interact with the blockchain ` endpoint` .
218219- ` password` : The password for unlocking the given ` account` .
219- - ` csv> ` : The location of the CSV file containing the parameters.
220+ - ` csv` : The location of the CSV file containing the parameters.
221+ - ` json` : The location of the JSON file containing the parameters.
220222
221223You can specified options above in several ways, and the priority is in the order of low to high.
222224
@@ -670,7 +672,7 @@ In each item:
670672
671673```bash
672674$ aelf-command send
673- ✔ Enter the the URI of an AElf node … http ://13.231.179.27:8000
675+ ✔ Enter the the URI of an AElf node … https ://tdvw-test-node.aelf.io
674676✔ Enter a valid wallet address, if you don' t have, create one by aelf-command create … D3vSjRYL8MpeRpvUDy85ktXijnBe2tHn8NTACsggUVteQCNGP
675677✔ Enter the password you typed when creating a wallet … ********
676678✔ Enter contract name (System contracts only) or the address of contract … AElf.ContractNames.Token
@@ -708,7 +710,7 @@ aelf-command send AElf.ContractNames.Token Transfer '{"symbol": "ELF", "to": "C9
708710
709711` ` ` bash
710712$ aelf-command call
711- ✔ Enter the the URI of an AElf node … http ://13.231.179.27:8000
713+ ✔ Enter the the URI of an AElf node … https ://tdvw-test-node.aelf.io
712714✔ Enter a valid wallet address, if you don' t have, create one by aelf-command create … D3vSjRYL8MpeRpvUDy85ktXijnBe2tHn8NTACsggUVteQCNGP
713715✔ Enter the password you typed when creating a wallet … ********
714716✔ Enter contract name (System contracts only) or the address of contract … AElf.ContractNames.Token
@@ -744,6 +746,38 @@ Result:
744746aelf-command call AElf.ContractNames.Token GetTokenInfo ' {" symbol" :" ELF" }'
745747```
746748
749+ #### Call a read-only method and pass params through CSV
750+
751+ ```bash
752+ $ aelf-command call -e https://tdvw-test-node.aelf.io/ -a GyQX6t18kpwaD9XHXe1ToKxfov8mSeTLE9q9NwUAeTE8tULZk -p 1234*Qwer -j ./test.csv AElf.ContractNames.Token GetBalance
753+ ✔ Fetching contract successfully!
754+ ✔ Calling method successfully!
755+ AElf [Info]:
756+ Result:
757+ {
758+ "symbol": "ELF",
759+ "owner": "GyQX6t18kpwaD9XHXe1ToKxfov8mSeTLE9q9NwUAeTE8tULZk",
760+ "balance": "155000"
761+ }
762+ ✔ Succeed!
763+ ```
764+
765+ #### Call a read-only method and pass params through JSON
766+
767+ ```bash
768+ $ aelf-command call -e https://tdvw-test-node.aelf.io/ -a GyQX6t18kpwaD9XHXe1ToKxfov8mSeTLE9q9NwUAeTE8tULZk -p 1234*Qwer -j ./test.json AElf.ContractNames.Token GetBalance
769+ ✔ Fetching contract successfully!
770+ ✔ Calling method successfully!
771+ AElf [Info]:
772+ Result:
773+ {
774+ "symbol": "ELF",
775+ "owner": "GyQX6t18kpwaD9XHXe1ToKxfov8mSeTLE9q9NwUAeTE8tULZk",
776+ "balance": "155000"
777+ }
778+ ✔ Succeed!
779+ ```
780+
747781### get-chain-status - Get the current status of the block chain
748782
749783```bash
@@ -770,7 +804,7 @@ $ aelf-command get-chain-status
770804
771805```bash
772806$ aelf-command get-tx-result
773- ✔ Enter the the URI of an AElf node … http ://13.231.179.27:8000
807+ ✔ Enter the the URI of an AElf node … https ://tdvw-test-node.aelf.io
774808✔ Enter a valid transaction id in hex format … 7b620a49ee9666c0c381fdb33f94bd31e1b5eb0fdffa081463c3954e9f734a02
775809✔ Succeed!
776810{ TransactionId:
@@ -800,7 +834,7 @@ $ aelf-command get-tx-result
800834
801835```bash
802836$ aelf-command get-blk-height
803- ✔ Enter the the URI of an AElf node … http ://13.231.179.27:8000
837+ ✔ Enter the the URI of an AElf node … https ://tdvw-test-node.aelf.io
804838> 7902091
805839```
806840
@@ -810,7 +844,7 @@ You can pass a block height or a block hash to this sub-command.
810844
811845```bash
812846$ aelf-command get-blk-info
813- ✔ Enter the the URI of an AElf node: http ://13.231.179.27:8000
847+ ✔ Enter the the URI of an AElf node: https ://tdvw-test-node.aelf.io
814848✔ Enter a valid height or block hash: 123
815849✔ Include transactions whether or not: no / yes
816850{ BlockHash:
@@ -845,7 +879,7 @@ aelf-command get-blk-info ca61c7c8f5fc1bc8af0536bc9b51c61a94f39641a93a748e72802b
845879
846880```bash
847881$ aelf-command console
848- ✔ Enter the the URI of an AElf node … http ://13.231.179.27:8000
882+ ✔ Enter the the URI of an AElf node … https ://tdvw-test-node.aelf.io
849883✔ Enter a valid wallet address, if you don' t have, create one by aelf-command create … 2Ue31YTuB5Szy7cnr3SCEGU2gtGi5uMQBYarYUR5oGin1sys6H
850884✔ Enter the password you typed when creating a wallet … ********
851885✔ Succeed!
@@ -856,7 +890,7 @@ Welcome to aelf interactive console. Ctrl + C to terminate the program. Double t
856890 ║ NAME | DESCRIPTION ║
857891 ║ AElf | imported from aelf-sdk ║
858892 ║ aelf | instance of aelf-sdk, connect to ║
859- ║ | http ://13.231.179.27:8000 ║
893+ ║ | https ://tdvw-test-node.aelf.io ║
860894 ║ _account | instance of AElf wallet, wallet address ║
861895 ║ | is ║
862896 ║ | 2Ue31YTuB5Szy7cnr3SCEGU2gtGi5uMQBYarYUR… ║
0 commit comments