lambdaclass / lambdaclass/eth-agent

No transaction persistence - pending txs lost on restart

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

Nobody has claimed this yet.

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

Description

Problem

There's no built-in way to track pending transactions across application restarts. If the application crashes or restarts while transactions are pending, that state is lost.

Impact

  • Users can't recover pending transaction status after restart
  • waitForTransaction doesn't work across sessions
  • Difficult to build reliable payment flows

Recommendation

  1. Add optional transaction state persistence layer
  2. Allow users to provide storage adapter (localStorage, file, database)
  3. Track: txHash, nonce, timestamp, status
interface TransactionStore {
  save(tx: PendingTransaction): Promise<void>;
  load(txHash: Hash): Promise<PendingTransaction | null>;
  listPending(): Promise<PendingTransaction[]>;
  markConfirmed(txHash: Hash, receipt: TransactionReceipt): Promise<void>;
}

// Usage
const wallet = new AgentWallet({
  // ...
  transactionStore: new FileTransactionStore('./tx-state.json'),
});

Priority

High - Reliability for production use

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 by tracing AgentWallet's transaction handling and the waitForTransaction flow. Use the proposed TransactionStore interface and listed fields as the scope, then verify that pending transactions can be recovered after a restart and that confirmation updates persisted state.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.