# Laconic Console Setup
* Clone the required repos:
* [laconic-console](https://github.com/cerc-io/laconic-console)
```bash
git clone git@github.com:cerc-io/laconic-console.git
```
* [laconicd](https://github.com/cerc-io/laconicd)
```bash
git clone git@github.com:cerc-io/laconicd.git
```
* [laconic-sdk](https://github.com/cerc-io/laconic-sdk)
```bash
git clone git@github.com:cerc-io/laconic-sdk.git
```
* [debug](https://github.com/lirewine/debug)
```bash
git clone git@github.com:lirewine/debug.git
```
* [gem](https://github.com/lirewine/gem)
```bash
git clone git@github.com:lirewine/gem.git
```
* [sdk](https://github.com/lirewine/sdk)
```bash
git clone git@github.com:lirewine/sdk.git
```
* Run the `laconicd` chain:
* In [laconicd](https://github.com/cerc-io/laconicd) repo, checkout to a different branch for the demo
```bash
git checkout console
```
* Start the chain
```bash
./init.sh
```
* Export the private key using:
```bash
laconicd keys export mykey --unarmored-hex --unsafe
```
* Run the tests in `laconic-sdk`
* In [laconic-sdk](https://github.com/cerc-io/laconic-sdk) repo, copy [.env.example](https://github.com/cerc-io/laconic-sdk/blob/main/.env.example) file and create a `.env` file
```bash
cp .env.example .env
```
* Copy the private key exported above and assign it to variable `PRIVATE_KEY` in the `.env` file.
* Also change value of `COSMOS_CHAIN_ID` in `.env` file
```
COSMOS_CHAIN_ID=ethermint_9000-1
```
* Install dependencies
```bash
yarn
```
* Run the tests in laconic-sdk repo:
```bash
yarn test
```
*NOTE*: One test from [util.test.ts](https://github.com/cerc-io/laconic-sdk/blob/main/src/util.test.ts) fails as mentioned in the [PR](https://github.com/cerc-io/laconic-sdk/pull/5#issuecomment-1299572012)
* Run the laconic-console app
* In [laconic-console](https://github.com/cerc-io/laconic-console) repo, checkout to the branch using lirewine packages
```bash
git checkout ng-lirewine-packages
```
* Install dependencies
```bash
yarn
```
* Register the dependencies to link
* `lirewine/debug`
* In [debug](https://github.com/lirewine/debug) repo, checkout to release version
```
git checkout v1.0.0-beta.78
```
* Install and build packages
```
# Install dependencies
yarn
# Build all packages
yarn build
```
* Run `yarn link` in repo root
* `lirewine/gem-core`
* In [gem](https://github.com/lirewine/gem) repo, checkout to release version
```
git checkout v1.0.0-beta.26
```
* Install and build packages
```
# Install dependencies
yarn
# Build all packages
yarn build
```
* Change directory to core package and run `yarn link`
```
cd packages/core
# Register package to link
yarn link
```
* `lirewine/react-ux`
* In [sdk](https://github.com/lirewine/sdk) repo, checkout to release version
```
git checkout v1.1.0-beta.0
```
* Install and build packages
```
# Install dependencies
yarn
# Build all packages
yarn build
```
* Change directory to react-ux package and run `yarn link`
```
cd packages/react-ux
# Register package to link
yarn link
```
* Link the packages in `laconic-console`
* In root of [repo](https://github.com/cerc-io/laconic-console), run
```bash
yarn link "@lirewine/debug"
yarn link "@lirewine/gem-core"
yarn link "@lirewine/react-ux"
```
* Change directory to [packages/console-app](https://github.com/cerc-io/laconic-console/tree/main/packages/console-app) and start the react app
```bash
# Change directory
cd packages/console-app/
# Start app
CONFIG_FILE=config-local.yml yarn start
```
* Open console-app at http://localhost:8080