mirror of
https://github.com/logos-co/scaffold.git
synced 2026-08-27 12:41:13 +00:00
wallet
logos-scaffold
logos-scaffold is a Rust CLI for bootstrapping LSSA program_deployment projects in standalone mode.
Platform
The CLI is currently Unix-only. Localnet and process/port detection rely on Unix tools (lsof, ps, kill).
Scope
- Single external dependency: lssa
- Standalone sequencer flow only
- No
logos-blockchaindependency - No full-stack/circuits management
Prerequisites
git,rustc,cargo- Unix process helpers:
lsof,ps,kill - Container runtime for guest builds: Docker or Podman
Build
cargo build
CLI
logos-scaffold create <name> [--vendor-deps] [--lssa-path PATH] [--cache-root PATH]
logos-scaffold new <name> [--vendor-deps] [--lssa-path PATH] [--cache-root PATH]
logos-scaffold setup [--wallet-install auto|always|never]
logos-scaffold build [project-path]
logos-scaffold deploy [program-name]
logos-scaffold localnet start [--timeout-sec N]
logos-scaffold localnet stop
logos-scaffold localnet status [--json]
logos-scaffold localnet logs [--tail N]
logos-scaffold wallet list [--long]
logos-scaffold wallet topup [<address> | --address <address-ref>] [--dry-run]
logos-scaffold wallet default set <address-ref>
logos-scaffold wallet default set --address <address-ref>
logos-scaffold wallet -- <wallet-command...>
logos-scaffold doctor [--json]
logos-scaffold report [--out PATH] [--tail N]
logos-scaffold help
Command Semantics
createandneware aliases.setupsyncs LSSA to pinned commit, builds standalonesequencer_runner, installs wallet based on--wallet-installpolicy, and seeds a deterministic default wallet from preconfigured public accounts when none is set.build [project-path]runssetupwith wallet policyautoand thencargo build --workspace.deploy [program-name]deploys one or all guest programs discovered inmethods/guest/src/bin/*.rsusing prebuilt.binartifacts.localnet startwaits until localnet is actually ready (pid alive+127.0.0.1:3040reachable), otherwise fails with diagnostics.localnet statusdistinguishes managed process, stale state, and foreign listeners.wallet listshows known wallet accounts (wallet account list).wallet topupuses a single Piñata faucet claim (wallet pinata claim --to ...). If address is omitted, scaffold uses project default wallet from.scaffold/state/wallet.state.wallet default setstores a project-scoped default wallet address in.scaffold/state/wallet.state.wallet -- ...forwards raw wallet CLI commands while preserving project wallet environment.doctorprints actionable checks and next steps;--jsonis for CI/machine parsing.reportcreates a.tar.gzdiagnostics bundle for GitHub issues using strict allowlist collection with redaction and explicit skip reporting.- Wallet-facing commands accept
LOGOS_SCAFFOLD_WALLET_PASSWORDfor password override (fallback: local dev default).
Pinned LSSA Commit
Scaffold enforces this commit for standalone mode:
767b5afd388c7981bcdf6f5b5c80159607e07e5b
First Success Path
logos-scaffold new my-app
cd my-app
logos-scaffold setup
logos-scaffold localnet start
logos-scaffold build
logos-scaffold deploy
logos-scaffold wallet -- check-health
logos-scaffold wallet topup
setup automatically seeds .scaffold/state/wallet.state with the first preconfigured public account when no default is present.
Checkpoint commands:
logos-scaffold localnet status
logos-scaffold doctor
Troubleshooting
- If
localnet startfails, inspect:
logos-scaffold localnet logs --tail 200
- If status reports
ownership: foreign, stop external listeners on127.0.0.1:3040before starting scaffold localnet. - If status reports stale state, run:
logos-scaffold localnet stop
logos-scaffold localnet start
- JSON status for tooling:
logos-scaffold localnet status --json
logos-scaffold doctor --json
logos-scaffold report --tail 500
Example Runs
Run examples directly without passing .bin paths:
cargo run --bin run_hello_world -- <public_account_id>
cargo run --bin run_hello_world_private -- <private_account_id>
cargo run --bin run_hello_world_with_authorization -- <public_account_id>
cargo run --bin run_hello_world_with_move_function -- write-public <public_account_id> <text>
cargo run --bin run_hello_world_through_tail_call -- <public_account_id>
cargo run --bin run_hello_world_through_tail_call_private -- <private_account_id>
cargo run --bin run_hello_world_with_authorization_through_tail_call_with_pda
Optional overrides for custom binaries:
export EXAMPLE_PROGRAMS_BUILD_DIR=$(pwd)/target/riscv-guest/example_program_deployment_methods/example_program_deployment_programs/riscv32im-risc0-zkvm-elf/release
cargo run --bin run_hello_world -- --program-path "$EXAMPLE_PROGRAMS_BUILD_DIR/hello_world.bin" <public_account_id>
cargo run --bin run_hello_world_through_tail_call_private -- --simple-tail-call-path "$EXAMPLE_PROGRAMS_BUILD_DIR/simple_tail_call.bin" --hello-world-path "$EXAMPLE_PROGRAMS_BUILD_DIR/hello_world.bin" <private_account_id>
Description
Logos Scaffold is CLI tool that bootstraps a fully runnable Logos application environment.
4.1 MiB
Languages
Rust
100%