lambdaclass / lambdaclass/eth-agent

getCapabilities returns hardcoded chainId: 1

Open
#6 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug high-priority
Dominant language
TypeScript
Stars
10
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Problem

getCapabilities() always returns chainId: 1 instead of querying the actual chain.

Location

src/agent/wallet.ts:746

Current Code

network: { chainId: 1 }, // TODO: Get from RPC

Recommendation

  • Cache chainId on first RPC call (e.g., in constructor or lazily)
  • Return cached value in getCapabilities()

Priority

High - Incorrect behavior on non-mainnet chains

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/agent/wallet.ts at getCapabilities() around line 746 and trace how the wallet makes RPC calls. Implement the requested chainId caching so capabilities report the connected chain rather than always 1. Done means getCapabilities() returns the actual chain ID on non-mainnet EVM chains.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design, blockchain
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.