2017-03-21 13:06:30 +04:00
|
|
|
# Basecoin example
|
|
|
|
|
|
|
|
This is an example of using [basecoin](https://github.com/tendermint/basecoin).
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```
|
|
|
|
make create
|
|
|
|
```
|
|
|
|
|
|
|
|
### Check account balance and send a transaction
|
|
|
|
|
|
|
|
1. wait until all the pods are `Running`.
|
|
|
|
|
|
|
|
```
|
|
|
|
kubectl get pods -w -o wide -L tm
|
|
|
|
```
|
|
|
|
|
|
|
|
2. wait until app starts.
|
|
|
|
|
|
|
|
```
|
|
|
|
kubectl logs -c app -f tm-0
|
|
|
|
```
|
|
|
|
|
|
|
|
3. get account's address of the second pod
|
|
|
|
|
|
|
|
```
|
2017-04-03 14:57:12 +04:00
|
|
|
ADDR=`kubectl exec -c app tm-1 -- cat /app/key.json | grep "address" | tr -d "\""`
|
2017-03-21 13:06:30 +04:00
|
|
|
```
|
|
|
|
|
|
|
|
4. send 5 coins to it from the first pod
|
|
|
|
|
|
|
|
```
|
2017-04-03 14:57:12 +04:00
|
|
|
kubectl exec -c app tm-0 -- basecoin tx send --to "0x$ADDR" --amount 5
|
2017-03-21 13:06:30 +04:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Clean up
|
|
|
|
|
|
|
|
```
|
|
|
|
make destroy
|
|
|
|
```
|