Skip to content

Commit fadd8ed

Browse files
Augmented the Readme with sample commands; fied the typos in the description of all the commands
Signed-off-by: Dhinakaran Vinayagamurthy <[email protected]>
1 parent 100d4aa commit fadd8ed

File tree

7 files changed

+35
-15
lines changed

7 files changed

+35
-15
lines changed

samples/besu/besu-cli/readme.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,34 @@ $ npm publish
2828
```
2929

3030
# Commands
31-
- asset init
32-
- asset get-balance
33-
- asset lock
34-
- asset claim
35-
- asset unlock
36-
- asset is-locked
37-
- asset exchange
38-
31+
Here are the list of commands supported by the besu-cli. We also provide a sample for each command.
32+
- asset issue: Issuance of tokens
33+
```
34+
besu-cli asset issue --network=network1 --account=1 --amount=10
35+
```
36+
- asset get-balance: Get account balance of tokens
37+
```
38+
besu-cli asset get-balance --network=network1 --account=1
39+
```
40+
- asset lock: Lock assets (fungible assets for now)
41+
```
42+
besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --amount=5 --timeout=1000
43+
```
44+
A random preimage and its corresponding hash will be generated and the preimage will be output, along with the lockContractID, to be used during Claim.
45+
- asset claim: Claim assets (fungible assets for now)
46+
```
47+
besu-cli asset claim --network=network1 --lock_contract_id=lockContractID --recipient_account=2 --preimage_base64=preimage
48+
```
49+
- asset unlock: Unlock and reclaim assets after timeout (fungible assets for now)
50+
```
51+
besu-cli asset unlock --network=network1 --lock_contract_id=lockContractID --sender_account=1
52+
```
53+
- asset is-locked: Check if a contract exists, which also checks if an asset is locked
54+
```
55+
besu-cli asset is-locked --network=network1 --lock_contract_id=lockContractID
56+
```
57+
- asset exchange: A complete cross-network exchange of assets (fungible assets for now)
58+
besu-cli asset exchange --network1=network1 --network2=network2 --amount=5 --timeout=20
3959

4060
# License
4161

samples/besu/besu-cli/src/commands/asset/claim.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ const command: GluegunCommand = {
1616
commandHelp(
1717
print,
1818
toolbox,
19-
`besu-cli asset claim -network=network1 --lock_contract_id=lockContractID --recipient_account=2 --preimage=preimage`,
20-
'besu-cli asset claim --network=<network1|network2> --lock_contract_id=<lockContractID> --recipient_account=<2|1> --preimage=<preimage>',
19+
`besu-cli asset claim --network=network1 --lock_contract_id=lockContractID --recipient_account=2 --preimage_base64=preimage`,
20+
'besu-cli asset claim --network=<network1|network2> --lock_contract_id=<lockContractID> --recipient_account=<2|1> --preimage_base64=<preimage>',
2121
[
2222
{
2323
name: '--network',

samples/besu/besu-cli/src/commands/asset/exchange.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const command: GluegunCommand = {
1717
commandHelp(
1818
print,
1919
toolbox,
20-
`besu-cli asset exchange --local-network=network1 mychannel interop Create '["test", "teststate"]'`,
20+
`besu-cli asset exchange --network1=network1 --network2=network2 --amount=5 --timeout=20`,
2121
'besu-cli asset exchange --local-network=<network1|network2> --user=<user-id> <channel-name> <contract-name> <function-name> <args>',
2222
[
2323
{

samples/besu/besu-cli/src/commands/asset/get-balance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const command: GluegunCommand = {
1616
commandHelp(
1717
print,
1818
toolbox,
19-
`besu-cli asset get-balance -network=network1 --account=1`,
19+
`besu-cli asset get-balance --network=network1 --account=1`,
2020
'besu-cli asset get-balance --network=<network1|network2> --account=<1|2>',
2121
[
2222
{

samples/besu/besu-cli/src/commands/asset/is-locked.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const command: GluegunCommand = {
1616
commandHelp(
1717
print,
1818
toolbox,
19-
`besu-cli asset is-locked -network=network1 --lock_contract_id=lockContractID`,
19+
`besu-cli asset is-locked --network=network1 --lock_contract_id=lockContractID`,
2020
'besu-cli asset is-locked --network=<network1|network2> --lock_contract_id=<lockContractID>',
2121
[
2222
{

samples/besu/besu-cli/src/commands/asset/lock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const command: GluegunCommand = {
1717
commandHelp(
1818
print,
1919
toolbox,
20-
`besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --amount=5 --timeout=10`,
20+
`besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --amount=5 --timeout=1000`,
2121
'besu-cli asset lock --network=<network1|network2> --sender_account=<1|2> --recipient_account=<2|1> --amount=<lock-amount> --timeout=<lock-duration-seconds> --hash=<hashLock-optional-parameter>',
2222
[
2323
{

samples/besu/besu-cli/src/commands/asset/unlock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const command: GluegunCommand = {
1616
commandHelp(
1717
print,
1818
toolbox,
19-
`besu-cli asset unlock -network=network1 --lock_contract_id=lockContractID --sender_account=1`,
19+
`besu-cli asset unlock --network=network1 --lock_contract_id=lockContractID --sender_account=1`,
2020
'besu-cli asset unlock --network=<network1|network2> --lock_contract_id=<lockContractID> --sender_account=<1|2>',
2121
[
2222
{

0 commit comments

Comments
 (0)