This document describes how to develop the application on your local computer.
Tools you will need:
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
Start the development server
npm run dev
Run linter
npm run lint
Run formatter
npm run format
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