Skip to content

fix(erc20): check transfer receipt status and keep hash on receipt errors - #1610

Open
ninglinLiu wants to merge 1 commit into
coinbase:mainfrom
ninglinLiu:fix/erc20-transfer-receipt-status
Open

ninglinLiu wants to merge 1 commit into
coinbase:mainfrom
ninglinLiu:fix/erc20-transfer-receipt-status

Conversation

@ninglinLiu

Copy link
Copy Markdown

Summary

  • Fail ERC-20 transfer when the mined receipt status is reverted / failed / 0 (Viem does not throw on revert).
  • Separate receipt lookup from sendTransaction so an RPC receipt failure still returns the transaction hash and the agent does not retry/double-pay.

Fixes

Fixes #1558
Fixes #1547

Test plan

  • jest src/action-providers/erc20/erc20ActionProvider.test.ts (32 passed), including new cases for reverted status and receipt-lookup failure.

This PR was prepared with AI assistance and reviewed/tested by the author.

…rors

Viem resolves reverted receipts without throwing, so transfer was reporting
success after a mined revert. Also separate receipt lookup from send so an
RPC receipt failure still returns the hash and the agent does not double-pay.

Fixes coinbase#1558
Fixes coinbase#1547

This PR was prepared with AI assistance and reviewed/tested by the author.
@cb-heimdall

Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/2
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@github-actions github-actions Bot added action provider New action provider typescript labels Oct 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants