mirror of
https://github.com/logos-co/scaffold.git
synced 2026-08-30 22:21:11 +00:00
Program Deployment Scaffold
This project was generated by logos-scaffold for LEZ (Logos Execution Zone) standalone mode only.
Prerequisites
git,rustc,cargowalletbinary (built locally bylogos-scaffold setup)- Docker or Podman (required by guest method builds)
First Run (Checkpointed)
logos-scaffold setup
logos-scaffold localnet start
logos-scaffold build
logos-scaffold deploy
logos-scaffold wallet topup
logos-scaffold wallet -- check-health
logos-scaffold setup auto-seeds .scaffold/state/wallet.state with the first preconfigured public wallet if no default exists.
Check health before deploy/interact:
logos-scaffold localnet status
logos-scaffold doctor
Optional: Manual Deploy with Wallet Passthrough
export EXAMPLE_PROGRAMS_BUILD_DIR=$(pwd)/target/riscv-guest/example_program_deployment_methods/example_program_deployment_programs/riscv32im-risc0-zkvm-elf/release
logos-scaffold wallet -- deploy-program "$EXAMPLE_PROGRAMS_BUILD_DIR/hello_world.bin"
logos-scaffold wallet -- deploy-program "$EXAMPLE_PROGRAMS_BUILD_DIR/hello_world_with_authorization.bin"
logos-scaffold wallet -- deploy-program "$EXAMPLE_PROGRAMS_BUILD_DIR/hello_world_with_move_function.bin"
logos-scaffold wallet -- deploy-program "$EXAMPLE_PROGRAMS_BUILD_DIR/simple_tail_call.bin"
logos-scaffold wallet -- deploy-program "$EXAMPLE_PROGRAMS_BUILD_DIR/tail_call_with_pda.bin"
Create Accounts
Create fresh accounts and assign their IDs to shell vars:
# copy IDs from wallet output
PUBLIC_HELLO_ACCOUNT_ID="<public-account-id>"
PRIVATE_HELLO_ACCOUNT_ID="<private-account-id>"
PUBLIC_AUTH_ACCOUNT_ID="<public-account-id>"
PUBLIC_MOVE_ACCOUNT_ID="<public-account-id>"
PRIVATE_MOVE_ACCOUNT_ID="<private-account-id>"
Use logos-scaffold wallet -- account new public and logos-scaffold wallet -- account new private enough times to fill those values.
Run All Example Binaries
cargo run --bin run_hello_world -- $PUBLIC_HELLO_ACCOUNT_ID
cargo run --bin run_hello_world_private -- $PRIVATE_HELLO_ACCOUNT_ID
logos-scaffold wallet -- account sync-private
cargo run --bin run_hello_world_with_authorization -- $PUBLIC_AUTH_ACCOUNT_ID
cargo run --bin run_hello_world_with_move_function -- \
write-public \
$PUBLIC_MOVE_ACCOUNT_ID \
"hello-from-public"
cargo run --bin run_hello_world_with_move_function -- \
write-private \
$PRIVATE_MOVE_ACCOUNT_ID \
"hello-from-private"
logos-scaffold wallet -- account sync-private
cargo run --bin run_hello_world_with_move_function -- \
move-data-public-to-private \
$PUBLIC_MOVE_ACCOUNT_ID \
$PRIVATE_MOVE_ACCOUNT_ID
logos-scaffold wallet -- account sync-private
cargo run --bin run_hello_world_through_tail_call -- $PUBLIC_HELLO_ACCOUNT_ID
cargo run --bin run_hello_world_through_tail_call_private -- $PRIVATE_MOVE_ACCOUNT_ID
logos-scaffold wallet -- account sync-private
cargo run --bin run_hello_world_with_authorization_through_tail_call_with_pda
Each runner now prints transaction submission details (status + tx_hash) on success.
Optional Program Path Overrides
For testing custom binaries, pass explicit paths:
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_HELLO_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_MOVE_ACCOUNT_ID
Main Scaffold Commands
logos-scaffold setup
logos-scaffold build [project-path]
logos-scaffold deploy [program-name]
logos-scaffold wallet topup [--address <address-ref>]
logos-scaffold wallet -- check-health
logos-scaffold localnet start [--timeout-sec N]
logos-scaffold localnet status [--json]
logos-scaffold localnet logs --tail 200
logos-scaffold localnet stop
logos-scaffold doctor [--json]
logos-scaffold report [--out PATH] [--tail N]
Troubleshooting
- Startup failure:
logos-scaffold localnet logs --tail 200 - Foreign listener on
3040: stop external process, then rerunlogos-scaffold localnet start - Stale tracked state:
logos-scaffold localnet stopthenlogos-scaffold localnet start - Shareable diagnostics:
logos-scaffold report(inspect the archive before posting publicly)