lambdaclass / lambdaclass/eth-agent
getCapabilities returns hardcoded chainId: 1
Open
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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