An open API service indexing awesome lists of open source software.

https://github.com/allinbits/cosmos-cash-poc

Cosmos Cash - Proof-of-Authority based POC
https://github.com/allinbits/cosmos-cash-poc

Last synced: 5 months ago
JSON representation

Cosmos Cash - Proof-of-Authority based POC

Awesome Lists containing this project

README

          

# Cosmos-Cash

## What is Cosmos Cash

Cosmos Cash is a research project that aims to develop a protocol that provides features typical of electronic money, adopting the blockchain technology as underlying infrastructure, and thus leading to a digital asset to be applied within the payment industry.

Please read the [full report for more information](https://drive.google.com/file/d/1zmEyA8kA0uAIRGDKxYElOKvjtz4f_Ep5/view?usp=sharing).

---

## What's in this repository

This repository hosts a Cosmos Cash proof-of-concept application built on Cosmos SDK that stores data in a [key/value store](https://www.techopedia.com/definition/26284/key-value-store) and is secured using a [Proof Of Authority](https://github.com/allinbits/modules/tree/master/x/poa) consensus algorithm.

The goal of the application is to re-define how an [electric money institution](https://thebanks.eu/emis) works by leveraging the [Cosmos SDK](https://github.com/cosmos/cosmos-sdk/) and [Tendermint](https://github.com/tendermint/tendermint/).

### How to install the application

---

1. Clone the repository

```sh
git clone git@github.com:allinbits/cosmos-cash-poc.git
```


2. Install the binaries (poad, poacli)

```
cd cosmos-cash-poc
make install
```


3. Ensure binaries are available and for testing purposes set the keyring to be test

```
poad -h
poacli -h
poacli config keyring-backend test
```


### How to initialize the application

---

1. Initialize the genesis file ($HOME/.poad/config/genesis.json)

```sh
poad init --chain-id=cash cash
```


2. Create a key for the first validator

```sh
poacli keys add validator
```

3. Add the validator that was created in the step 2 as the first validator and assign them 1000000000 `cash` coins

```sh
poad add-genesis-account $(poacli keys show validator -a) 1000000000cash,1000000000stake

```


4. Generate a initial `CreateValidator` transaction to allow other applications in the network to sync when they join

```sh
poad gentx --name validator --keyring-backend test
```


5. Put the previously generated transaction in the correct location to allow the application to start correctly

```sh
poad collect-gentxs
```


6. Start the applicaton :tada:

```sh
poad start
```


7. Run commands outlined in the Makefile

```sh
cat Makefile | grep create-
```


### How to run a localnet

---

1. Build the dockerfile

```sh
docker build -t 388991194029.dkr.ecr.us-east-1.amazonaws.com/allinbits-dev/cosmos-cash-poa .
```


2. Run the localnet

```sh
make localnet-start
```


3. Set up the consensus

```sh
make localnet-consensus
```


4. Create issuer data

```sh
make localnet-distribute-tokens
```


4. Create user data

```sh
make localnet-users
```


### How to run the webui (run localnet commands for seed data)

---

1. Go to the `vue` folder

```sh
cd vue
```


2. Start the web server

```sh
yarn serve
```


3. Check the website in the browser

[localhost:8080](http://localhost:8080)