From b768a577390fbd4349d121726751f23ca2c5946e Mon Sep 17 00:00:00 2001 From: Daniil Polyakov Date: Fri, 5 Jun 2026 22:08:49 +0300 Subject: [PATCH] chore(justfile): add some useful commands --- Justfile | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/Justfile b/Justfile index 83c9dd0c..346dc84b 100644 --- a/Justfile +++ b/Justfile @@ -8,7 +8,7 @@ METHODS_PATH := "program_methods" TEST_METHODS_PATH := "test_program_methods" ARTIFACTS := "artifacts" -# Build risc0 program artifacts +# Build risc0 program artifacts. build-artifacts: @echo "๐Ÿ”จ Building artifacts" @for methods_path in {{METHODS_PATH}} {{TEST_METHODS_PATH}}; do \ @@ -18,7 +18,13 @@ build-artifacts: cp target/$methods_path/riscv32im-risc0-zkvm-elf/docker/*.bin {{ARTIFACTS}}/$methods_path; \ done -# Run tests +# Format codebase. +fmt: + @echo "๐ŸŽจ Formatting codebase" + cargo +nightly fmt + taplo fmt + +# Run tests. test: @echo "๐Ÿงช Running tests" RISC0_DEV_MODE=1 cargo nextest run --no-fail-fast @@ -29,42 +35,59 @@ bench: cargo bench -p crypto_primitives_bench --bench primitives cargo bench -p cycle_bench --features ppe --bench verify -# Run Bedrock node in docker +# Run Bedrock node in docker. [working-directory: 'bedrock'] run-bedrock: @echo "โ›“๏ธ Running bedrock" docker compose up -# Run Sequencer +# Run Sequencer. Run with RISC0_DEV_MODE=1 to disable proof verification for faster iteration. [working-directory: 'lez/sequencer/service'] -run-sequencer: +run-sequencer standalone="": @echo "๐Ÿง  Running sequencer" - RUST_LOG=info RISC0_DEV_MODE=1 cargo run --release -p sequencer_service configs/debug/sequencer_config.json + @if [ "{{standalone}}" = "standalone" ]; then \ + echo "๐Ÿงช Running in standalone mode"; \ + RUST_LOG=info cargo run --features standalone --release -p sequencer_service configs/debug/sequencer_config.json; \ + else \ + echo "๐Ÿš€ Running in normal mode"; \ + RUST_LOG=info cargo run --release -p sequencer_service configs/debug/sequencer_config.json; \ + fi -# Run Indexer +# Run Indexer. Run with RISC0_DEV_MODE=1 to disable proof verification for faster iteration. [working-directory: 'lez/indexer/service'] run-indexer mock="": @echo "๐Ÿ” Running indexer" @if [ "{{mock}}" = "mock" ]; then \ echo "๐Ÿงช Using mock data"; \ - RUST_LOG=info RISC0_DEV_MODE=1 cargo run --release --features mock-responses -p indexer_service configs/indexer_config.json; \ + RUST_LOG=info cargo run --release --features mock-responses -p indexer_service configs/indexer_config.json; \ else \ echo "๐Ÿš€ Using real data"; \ - RUST_LOG=info RISC0_DEV_MODE=1 cargo run --release -p indexer_service configs/indexer_config.json; \ + RUST_LOG=info cargo run --release -p indexer_service configs/indexer_config.json; \ fi -# Run Explorer +# Run Explorer. [working-directory: 'lez/explorer_service'] run-explorer: @echo "๐ŸŒ Running explorer" RUST_LOG=info cargo leptos serve -# Run Wallet +# Run Wallet. [working-directory: 'lez/wallet'] run-wallet +args: @echo "๐Ÿ”‘ Running wallet" LEE_WALLET_HOME_DIR=$(pwd)/configs/debug cargo run --release -p wallet -- {{args}} +# Import test accounts supplied in sequencer configuration. +wallet-import-test-accounts: + @echo "โš™๏ธ Initializing accounts" + just run-wallet account import public --private-key 7f273098f25b71e6c005a9519f2678da8d1c7f01f6a27778e2d9948abdf901fb + just run-wallet vault claim --account-id Public/CbgR6tj5kWx5oziiFptM7jMvrQeYY3Mzaao6ciuhSr2r --amount 10000 + + just run-wallet account import public --private-key f434f8741720014586ae43356d2aec6257da086222f604ddb75d69733b86fc4c + just run-wallet vault claim --account-id Public/2RHZhw9h534Zr3eq2RGhQete2Hh667foECzXPmSkGni2 --amount 20000 + + just run-wallet account list + # Clean runtime data clean: @echo "๐Ÿงน Cleaning run artifacts"