lambdaclass / lambdaclass/eth-agent
Duplicate gas params object construction in wallet.ts
Open
Nobody has claimed this yet.
code-quality
low-priority
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Problem
Same gas params object is constructed multiple times in different methods.
Locations
src/agent/wallet.ts:287-294(send)src/agent/wallet.ts:309-316(send simulation)src/agent/wallet.ts:840-848(preview)
Recommendation
Extract to helper function:
private buildGasParams(to: Address, value: bigint, data?: Hex) {
// ...
}
Priority
Low - Code quality/DRY
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 lines 287-294, 309-316, and 840-848, comparing how the gas params object is constructed in send, send simulation, and preview. Extract the shared construction into the proposed buildGasParams helper and verify all three methods use it without changing their behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100