Skip to content

Commit

Permalink
Add chain docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
philiparthurmoore committed Apr 11, 2021
1 parent e5945d2 commit 60b06c2
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
vue/node_modules
vue/dist
vue/.cache
build
readme.md
build
86 changes: 86 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Frontier Chain

**Frontier Chain** is a blockchain application built using Cosmos SDK and Tendermint.

---

## Setup

Initialize the blockchain with one validator node:

```bash
rm -r ~/.frontcli
rm -r ~/.frontd

make install

frontd init mynode --chain-id frontierchain1

# Update chain's main denom from 'stake' to 'front'
jq '.app_state.staking.params.bond_denom = "front"' ~/.frontd/config/genesis.json|sponge ~/.frontd/config/genesis.json
jq '.app_state.crisis.constant_fee.denom = "front"' ~/.frontd/config/genesis.json|sponge ~/.frontd/config/genesis.json
jq '.app_state.mint.params.mint_denom = "front"' ~/.frontd/config/genesis.json|sponge ~/.frontd/config/genesis.json
jq '.app_state.gov.deposit_params.min_deposit[0].denom = "front"' ~/.frontd/config/genesis.json|sponge ~/.frontd/config/genesis.json

frontcli config keyring-backend test
frontcli config chain-id frontierchain1
frontcli config output json
frontcli config indent true
frontcli config trust-node true

frontcli keys add user1
frontcli keys add user2
frontd add-genesis-account $(frontcli keys show user1 -a) 110000000front
frontd add-genesis-account $(frontcli keys show user2 -a) 5000000front

frontd gentx --name user1 --amount=10000000front --keyring-backend test

frontd collect-gentxs
```

---

## Start

Start the blockchain:

```bash
frontd start
```

---

## Configuration

The blockchain's initialization parameters are stored in `~/.frontd/config/genesis.json`.

---

## Blockchain CLI

`frontcli` is a CLI that can be used to interact with the blockchain. Let's use it to transfer some tokens:

```bash
# example usage: frontcli tx send [from_key_or_address] [to_address] [amount] [flags]
frontcli tx send user1 front1y0ygwej3hqc8epzmytg0hdr7ylytpnq8cnpuvq 10front --from user1
```

---

## Frontend Application

Start the frontend application on `localhost:8080`:

```bash
cd vue/
npm i && npm run serve
```

The frontend application can be used to transfer tokens between accounts.

---

## Learn more

- [Cosmos SDK documentation](https://docs.cosmos.network)
- [Cosmos Tutorials](https://tutorials.cosmos.network)
27 changes: 27 additions & 0 deletions vue/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Frontier Chain UI

This is the [vuejs](https://vuejs.org/) user inteface to Frontier Chain.

It provides UI components including login, and a template for you to do additonal development.

## Project setup

```
npm install
```

### Compiles and hot-reloads for development

```
npm run serve
```

### Compiles and minifies for production

```
npm run build
```

### Customize configuration

See [Configuration Reference](https://cli.vuejs.org/config/).

0 comments on commit 60b06c2

Please sign in to comment.