fix up basecli readme and basecoin-tool.md
This commit is contained in:
parent
e671ce6030
commit
43378a9b7b
|
@ -4,13 +4,6 @@ To keep things clear, let's have two shells...
|
|||
|
||||
`$` is for basecoin (server), `%` is for basecli (client)
|
||||
|
||||
## Set up a clean basecoin, but don't start the chain
|
||||
|
||||
```
|
||||
$ export BCHOME=~/.demoserve
|
||||
$ basecoin init
|
||||
```
|
||||
|
||||
## Set up your basecli with a new key
|
||||
|
||||
```
|
||||
|
@ -24,16 +17,15 @@ And set up a few more keys for fun...
|
|||
```
|
||||
% basecli keys new buddy
|
||||
% basecli keys list
|
||||
% ME=`basecli keys get demo -o json | jq .address | tr -d '"'`
|
||||
% YOU=`basecli keys get buddy -o json | jq .address | tr -d '"'`
|
||||
% ME=$(basecli keys get demo | awk '{print $2}')
|
||||
% YOU=$(basecli keys get buddy | awk '{print $2}')
|
||||
```
|
||||
|
||||
## Update genesis so you are rich, and start
|
||||
## Set up a clean basecoin, initialized with your account
|
||||
|
||||
```
|
||||
$ vi $BCHOME/genesis.json
|
||||
-> cut/paste your pubkey from the results above
|
||||
|
||||
$ export BCHOME=~/.demoserve
|
||||
$ basecoin init $ME
|
||||
$ basecoin start
|
||||
```
|
||||
|
||||
|
@ -46,8 +38,8 @@ $ basecoin start
|
|||
## Check your balances...
|
||||
|
||||
```
|
||||
% basecli proof state get --app=account --key=$ME
|
||||
% basecli proof state get --app=account --key=$YOU
|
||||
% basecli query account $ME
|
||||
% basecli query account $YOU
|
||||
```
|
||||
|
||||
## Send the money
|
||||
|
@ -55,9 +47,7 @@ $ basecoin start
|
|||
```
|
||||
% basecli tx send --name demo --amount 1000mycoin --sequence 1 --to $YOU
|
||||
-> copy hash to HASH
|
||||
% basecli proof tx get --key $HASH
|
||||
|
||||
% basecli proof tx get --key $HASH --app base
|
||||
% basecli proof state get --key $YOU --app account
|
||||
% basecli query tx $HASH
|
||||
% basecli query account $YOU
|
||||
```
|
||||
|
||||
|
|
|
@ -5,6 +5,15 @@ CLI](/docs/guide/basecoin-basics.md) and [how to implement a
|
|||
plugin](/docs/guide/basecoin-plugins.md). In this tutorial, we provide more
|
||||
details on using the Basecoin tool.
|
||||
|
||||
# Generate a Key
|
||||
|
||||
Generate a key using the `basecli` tool:
|
||||
|
||||
```
|
||||
basecli keys new mykey
|
||||
ME=$(basecli keys get mykey | awk '{print $2}')
|
||||
```
|
||||
|
||||
# Data Directory
|
||||
|
||||
By default, `basecoin` works out of `~/.basecoin`. To change this, set the
|
||||
|
@ -12,14 +21,14 @@ By default, `basecoin` works out of `~/.basecoin`. To change this, set the
|
|||
|
||||
```
|
||||
export BCHOME=~/.my_basecoin_data
|
||||
basecoin init
|
||||
basecoin init $ME
|
||||
basecoin start
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
BCHOME=~/.my_basecoin_data basecoin init
|
||||
BCHOME=~/.my_basecoin_data basecoin init $ME
|
||||
BCHOME=~/.my_basecoin_data basecoin start
|
||||
```
|
||||
|
||||
|
@ -30,7 +39,7 @@ we use ABCI, we can actually run them in different processes. First,
|
|||
initialize them:
|
||||
|
||||
```
|
||||
basecoin init
|
||||
basecoin init $ME
|
||||
```
|
||||
|
||||
This will create a single `genesis.json` file in `~/.basecoin` with the
|
||||
|
@ -168,7 +177,7 @@ You can reset all blockchain data by running:
|
|||
basecoin unsafe_reset_all
|
||||
```
|
||||
|
||||
Similarity you can reset client data by running:
|
||||
Similarly, you can reset client data by running:
|
||||
|
||||
```
|
||||
basecli reset_all
|
||||
|
|
Loading…
Reference in New Issue