Skip to content

Conversation

Josephtran102
Copy link
Contributor

This PR adds a minimal CLI podctl under examples/rust as a bin target.

Commands

  • balance: query account balance (wei)
  • committee: print current committee (JSON by default)
  • transfer: send value using POD_PRIVATE_KEY from ENV
  • logs: tail verifiable logs with optional verification

Design notes

  • Reads POD_RPC_URL / POD_PRIVATE_KEY via PodProviderBuilder.
  • Read-only commands (balance, committee, logs) do NOT require POD_PRIVATE_KEY.
  • logs requires a WebSocket RPC (ws:// or wss://). If HTTP is detected, the CLI prints a helpful hint and exits.

Limitations (current)

  • No ABI decoding for events yet.
  • No HTTP one-shot eth_getLogs fallback.
  • No global --format / --rpc flags yet.

Follow-ups proposed

  • logs-http (one-shot via HTTP; non-verifiable) with --from-block/--to-block/--topic0.
  • verify-receipt <txHash> using current committee.
  • Global flags: --rpc, --private-key, --format json|text|ndjson.
  • Optional ABI decoding from --abi-file or event signature.
  • Basic operator helpers: health, committee history.
Screen Shot 2025-08-15 at 10 05 21 Screen Shot 2025-08-15 at 10 05 50 Screen Shot 2025-08-15 at 10 06 11 Screen Shot 2025-08-15 at 10 07 02

Adds a minimal CLI under examples/rust as a bin target.

Features: balance, committee, transfer, logs (WS required; optional verify).

Read-only cmds use on_url; transfer uses from_env. Logs detect HTTP and exit with a hint.

Clippy/fmt clean. Follow-ups: HTTP eth_getLogs helper; extra subcommands.
@poszu poszu requested a review from shresthagrawal August 15, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant