@@ -132,10 +132,9 @@ OPTIONS:
132
132
--node value Tendermint RPC address (default: "tcp://localhost:46657")
133
133
--chain_id value ID of the chain for replay protection (default: "test_chain_id")
134
134
--from value Path to a private key to sign the transaction (default: "key.json")
135
- --amount value Amount of coins to send in the transaction (default: 0)
136
- --coin value Specify a coin denomination (default: "mycoin")
135
+ --amount value Coins to send in transaction of the format <amt><coin>,<amt2><coin2>,... (eg: 1btc,2gold,5silver)
137
136
--gas value The amount of gas for the transaction (default: 0)
138
- --fee value The transaction fee (default: 0)
137
+ --fee value Coins for the transaction fee of the format <amt><coin>
139
138
--sequence value Sequence number for the account (default: 0)
140
139
--valid Set this to make the transaction valid
141
140
```
@@ -363,25 +362,25 @@ example-plugin start --in-proc
363
362
In another window, we can try sending some transactions:
364
363
365
364
```
366
- example-plugin tx send --to 0x1B1BE55F969F54064628A63B9559E7C21C925165 --amount 100 --coin gold --chain_id example-chain
365
+ example-plugin tx send --to 0x1B1BE55F969F54064628A63B9559E7C21C925165 --amount 100gold --chain_id example-chain
367
366
```
368
367
369
- Note the ` --coin ` and ` -- chain_id` flags . In the [ previous tutorial] ( basecoin-basics.md ) ,
370
- we didn't need them because we were using the default coin type ("mycoin") and chain ID ("test_chain_id").
371
- Now that we're using custom values , we need to specify them explicitly on the command line.
368
+ Note the ` --chain_id ` flag . In the [ previous tutorial] ( basecoin-basics.md ) ,
369
+ we didn't include it because we were using the default chain ID ("test_chain_id").
370
+ Now that we're using a custom chain , we need to specify the chain explicitly on the command line.
372
371
373
372
Ok, so that's how we can send a ` SendTx ` transaction using our ` example-plugin ` CLI,
374
373
but we were already able to do that with the ` basecoin ` CLI.
375
374
With our new CLI, however, we can also send an ` ExamplePluginTx ` :
376
375
377
376
```
378
- example-plugin tx example --amount 1 --coin gold --chain_id example-chain
377
+ example-plugin tx example --amount 1gold --chain_id example-chain
379
378
```
380
379
381
380
The transaction is invalid! That's because we didn't specify the ` --valid ` flag:
382
381
383
382
```
384
- example-plugin tx example --valid --amount 1 --coin gold --chain_id example-chain
383
+ example-plugin tx example --valid --amount 1gold --chain_id example-chain
385
384
```
386
385
387
386
Tada! We successfuly created, signed, broadcast, and processed our custom transaction type.
@@ -401,7 +400,7 @@ which contains only an integer.
401
400
If we send another transaction, and then query again, we'll see the value increment:
402
401
403
402
```
404
- example-plugin tx example --valid --amount 1 --coin gold --chain_id example-chain
403
+ example-plugin tx example --valid --amount 1gold --chain_id example-chain
405
404
example-plugin query ExamplePlugin.State
406
405
```
407
406
0 commit comments