mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-03-24 20:33:10 +00:00
901 B
901 B
| description |
|---|
| Get the program ID (Image ID) for a LEZ program. Use when the user asks for a program's ID, image ID, or program address (e.g. "what's the token program id", "get the amm program id"). |
program-id
The program ID is the RISC Zero Image ID derived from the compiled guest ELF binary.
The program name corresponds to a top-level workspace directory. If none is specified, discover
available programs by looking for <name>/methods/guest/Cargo.toml and ask the user to pick one.
Steps
- Check if the binary exists at
<name>/methods/guest/target/riscv32im-risc0-zkvm-elf/docker/<name>.bin. - If missing, build it first using
cargo risczero build --manifest-path <name>/methods/guest/Cargo.toml.- Docker must be running for this step. Fail fast if not.
- Inspect the binary with
lez-cli inspect <path-to-binary>and report the program ID to the user.