Skip to content

feat: ENS resolution, move chains under apps#37

Merged
CodesMcCabe merged 9 commits intomainfrom
cm/final-feedback
Mar 25, 2026
Merged

feat: ENS resolution, move chains under apps#37
CodesMcCabe merged 9 commits intomainfrom
cm/final-feedback

Conversation

@CodesMcCabe
Copy link
Copy Markdown
Collaborator

@CodesMcCabe CodesMcCabe commented Mar 25, 2026

Summary

  • ENS name resolution: balance, transfers, tokens, nfts now accept .eth names (e.g. alchemy balance vitalik.eth). Resolves via Universal Resolver contract on Ethereum networks. Uses @noble/hashes for keccak256 (15KB, zero deps).
  • Move chains listapps chains: Clearer separation from network list. network list shows RPC network IDs (e.g. eth-mainnet) for --network flag. apps chains shows Admin API chain identifiers (e.g. ETH_MAINNET) for app configuration.
  • Updated descriptions, README, REPL autocomplete, and agent-prompt references.

Test plan

  • pnpm run build — clean
  • pnpm test — 245 tests passing
  • alchemy balance vitalik.eth — resolves to 0xd8da6b... and returns balance
  • Manual: alchemy balance vitalik.eth -n polygon-mainnet — should error (ENS only on Ethereum)
  • Manual: alchemy tokens vitalik.eth — verify ENS works with tokens
  • Manual: alchemy apps chains — verify it lists Admin API chain enums
  • Manual: alchemy chains list — should show "Unknown command"
  • Manual: alchemy network list — verify updated hint text

🤖 Generated with Claude Code

CodesMcCabe and others added 3 commits March 25, 2026 11:53
Add support for .eth names (e.g. `alchemy balance vitalik.eth`) across
balance, transfers, tokens, and nfts commands. Resolves ENS names via
eth_call to the Universal Resolver contract on Ethereum networks.

- New src/lib/ens.ts: namehash (EIP-137), DNS wire encoding, resolver
- New resolveAddress() in validators.ts: detects .eth suffix, resolves
  via ENS, or validates as hex address
- Dependency: @noble/hashes for keccak256 (15KB, zero deps)
- Only supported on eth-* networks; clear error otherwise

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0xeEeEEEeE14D718C2B47D9923Deab1335E144EeEe is the current production
Universal Resolver per ENS documentation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move `chains list` to `apps chains` since it's Admin API functionality.
Update `network list` description to clarify it provides RPC network IDs
(e.g. eth-mainnet) for use with --network. Delete standalone chains
command and test.

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 18:08
CodesMcCabe and others added 6 commits March 25, 2026 14:09
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removing unref() prevents Node from exiting prematurely between
pagination prompts in standalone (non-REPL) commands. stdin.pause()
alone is sufficient — a paused non-raw stdin doesn't keep the process
alive.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Show "X tokens (zero balances hidden)" instead of confusing
"X non-zero of Y contracts" per-page counts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix das subcommand registration (was creating a literal <method> command
instead of using it as an argument). DAS methods use named params
(object) per the OpenRPC spec, not positional params (array) — unwrap
single JSON object args to send as params directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@CodesMcCabe CodesMcCabe merged commit 0c2d4ce into main Mar 25, 2026
7 checks passed
@CodesMcCabe CodesMcCabe deleted the cm/final-feedback branch March 25, 2026 21:02
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