Skip to content

Latest commit

 

History

History
86 lines (57 loc) · 1.28 KB

DEVELOPMENT.md

File metadata and controls

86 lines (57 loc) · 1.28 KB

Development

This document describes how to develop the application on your local computer.

Prerequirements

Tools you will need:

Rust Smart Contracts

Build the contracts. This also compiles the liquidation bot. Look in Makefile for commands for compiling a specific binary.

make Build

To deploy new smart contracts to testnet, run the scripts/initialize.ts script:

npm run init

To update the code of already initialized contracts in-place, use the scripts/upgrade.ts script.

npm run upgrade

Run tests

cargo test

Format code

cargo fmt

TypeScript & React DApp

Start the development server

npm run dev

Run linter

npm run lint

Run formatter

npm run format

Rust Liquidation Bot

Start the development database. You can use the -d flag if you want to detach your terminal from the output.

docker-compose up

Run database migrations

cd liquidation-bot
diesel migration run

Start liquidation-bot

cargo run