Skip to content

feat: Phase 7-8 — data/output improvements, new commands, interactive pagination#35

Merged
CodesMcCabe merged 5 commits intomainfrom
cm/fb-7
Mar 25, 2026
Merged

feat: Phase 7-8 — data/output improvements, new commands, interactive pagination#35
CodesMcCabe merged 5 commits intomainfrom
cm/fb-7

Conversation

@CodesMcCabe
Copy link
Collaborator

@CodesMcCabe CodesMcCabe commented Mar 25, 2026

Summary

  • Phase 7: --block on balance, receipt command, consistent decoded (0xhex) format, pagination hints on transfers, default 25 results in human mode
  • Phase 8: gas command (eth_gasPrice + eth_maxPriorityFeePerGas), logs command (eth_getLogs with interactive pagination), completions command (bash/zsh/fish shell completions)
  • Interactive pagination: transfers (with proper table output), tokens, nfts now prompt "Load next page / Stop here" in TTY mode; apps replaces "Load all remaining" with "Load next 5 pages"; logs paginates client-side with "Show next 25 / Show next 100 / Stop here"
  • Gwei precision: formatGwei() shows full value (up to 9 decimals, trailing zeros stripped) instead of truncating to 2 decimal places — applied across gas, receipt, tx, block
  • REPL fix: promptSelect no longer kills the REPL session by pausing stdin when already in raw mode
  • README: added shell completions section, gas/logs/receipt/completions to command tables

Test plan

  • pnpm run build — clean
  • pnpm test — 237 tests passing (12 new)
  • Manual: alchemy gas on mainnet — verify full gwei precision
  • Manual: alchemy logs --from-block 18000000 --to-block 18000010 — verify pagination prompt
  • Manual: alchemy completions zsh — verify Tab completion after source ~/.zshrc
  • Manual: alchemy transfers <addr> in REPL — verify pagination doesn't exit REPL
  • Manual: alchemy tokens <addr> — verify interactive pagination
  • Manual: alchemy nfts <addr> — verify interactive pagination

🤖 Generated with Claude Code

CodesMcCabe and others added 2 commits March 24, 2026 20:44
- balance: add --block option for historical balance queries
- receipt: new command for eth_getTransactionReceipt with formatted
  output (status, gas used, gas price in gwei, logs count, contract
  created)
- Human-readable decoding: consistent "decoded (0xhex)" format across
  block, tx, and receipt commands via new formatHexWithRaw(),
  formatWeiWithRaw(), formatGweiWithRaw() helpers
- tx: now shows gas used, gas price in gwei, and native token symbol
  per chain instead of raw hex and hardcoded "ETH"
- transfers: simplified to single request (bare address = outgoing),
  default 25 results in human mode (no limit in JSON mode), proper
  pagination with --page-key hint when more results exist
- transfers: removed merge-two-requests approach that broke pagination
- Added receipt to REPL autocomplete command list

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add gas command (eth_gasPrice + eth_maxPriorityFeePerGas), logs command
(eth_getLogs with interactive TTY pagination), and shell completions
command (bash/zsh/fish). Replace raw JSON dump in transfers with a
proper table (Block, From, To, Value, Asset, Category). Add interactive
server-side pagination to transfers, tokens, nfts, and replace "load
all remaining" with "load next 5 pages" in apps. Fix formatGwei to show
full precision instead of truncating to 2 decimal places. Fix
promptSelect stdin cleanup to not kill the REPL session.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@CodesMcCabe CodesMcCabe requested a review from a team as a code owner March 25, 2026 01:58
CodesMcCabe and others added 3 commits March 24, 2026 22:02
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Injects the header at the fetchWithTimeout level so every HTTP call
(RPC, REST, Admin, x402) automatically identifies itself as alchemy-cli.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: add x-alchemy-client-breadcrumb header
@CodesMcCabe CodesMcCabe merged commit 093ae7a into main Mar 25, 2026
7 checks passed
@CodesMcCabe CodesMcCabe deleted the cm/fb-7 branch March 25, 2026 14:35
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.

2 participants