- Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Install forge (if you launch local network)
curl -L https://foundry.paradigm.xyz | bash
foundryup
- Install sqlx-cli
cargo install sqlx-cli
- Install wasm-pack
cargo install wasm-pack
Launch local network
anvil
Contract deployment
cargo test -r -p tests deploy_contracts -- --nocapture
Launch database
docker run --name postgres -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres
- Start Store-vault-server. Example port: 9000
cd store-vault-server && sqlx database setup && cargo run -r
- Start balance-prover. Example port: 9001
cd balance-prover && cargo run -r
- Start validity-prover. Example port: 9002
cd validity-prover && sqlx database setup && cargo run -r
- Start withdrawal-server. Example port: 9003
cd withdrawal-server && sqlx database setup && cargo run -r
- Start block-builder. Example port: 9004
cd block-builder && cargo run -r
Please refer to the examples of cli
cd store-vault-server && sqlx database reset -y && cd ../validity-prover && sqlx database reset -y && cd ../withdrawal-server && sqlx database reset -y && cd ..