Skip to content

fix(eip-1193): make eth_getTransactionReceipt non-blocking#34

Draft
Alicepoltora wants to merge 1 commit into
circlefin:masterfrom
Alicepoltora:codex/fix-nonblocking-transaction-receipt
Draft

fix(eip-1193): make eth_getTransactionReceipt non-blocking#34
Alicepoltora wants to merge 1 commit into
circlefin:masterfrom
Alicepoltora:codex/fix-nonblocking-transaction-receipt

Conversation

@Alicepoltora

Copy link
Copy Markdown

Summary

  • issue a single eth_getTransactionReceipt JSON-RPC request instead of waiting for a mined transaction
  • preserve the standard null result for pending or unknown transactions
  • add regression coverage for both mined and pending receipt responses

Root cause and impact

EIP1193Provider delegated eth_getTransactionReceipt to viem's waitForTransactionReceipt. That action polls until a receipt is available and has a default timeout, while the JSON-RPC method is a one-shot lookup that must return null when no receipt exists yet. As a result, callers could block until the polling timeout for pending or unknown transaction hashes.

Testing

  • jest --runInBand (60 suites, 302 tests)
  • tsc --project tsconfig.json --pretty --noEmit
  • eslint on the changed source, test, and mock files

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.

1 participant