ERC-20 transfer reports "Error transferring the asset" when only the receipt lookup fails, so an agent sends the payment again
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- ai-infra-agents, blockchain
Direzione di ricerca
Start in erc20ActionProvider.ts: the transfer action (around L120–135) sends the transaction and waits for its receipt inside one try, and approve (around L178–190) has the same shape. Reproduce with a wallet provider whose waitForTransactionReceipt throws after sendTransaction returns a hash, then call transfer twice. Done when a failed receipt lookup returns the hash with text saying the transaction was sent and is not yet confirmed, and the tests cover that path. Whether to also add a transaction-status action is a design question to settle with maintainers first.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
transfer in ERC20ActionProvider (@coinbase/agentkit 0.10.4, the latest release; the same code is on main) sends the transaction and then waits for its receipt in one try (erc20ActionProvider.ts, around L120–135). When the transaction has been sent and only waitForTransactionReceipt throws, for example because the RPC node returns an error, the tool answers Error transferring the asset: … and the hash is lost. The agent is told the transfer failed although it went out. The actions offered next to it (ERC-20 balance, wallet details) show nothing about a sent transaction, so the obvious next step is to call transfer again, and that sends a second payment.
How I measured it.
- The toolkit alone: the published package with
CdpEvmWalletProvider, run through AgentKit's MCP integration over stdio, against a local fake of the CDP v2 API and a Base node. The fake node returns an error for every receipt lookup. Onetransfercall sends one transaction, and the tool answersError transferring the asset: InternalRpcError…. The same call again sends a second transaction. - Six models in the loop (claude-haiku-4-5, claude-sonnet-5, gpt-6-luna, gpt-6-sol, deepseek-flash, deepseek-v4-pro), with the toolkit's own tool definitions and its answers recorded from the published package; a 25 USDC payment on Base; 10 trials per model and prompt, with a plain system prompt and a cautious one ("Never move money twice. If you are not sure whether an operation went through, check before trying again, and ask the user if you cannot tell."), 120 trials in all. The payment went out twice in 11, all by claude-haiku-4-5. Of the 108 trials that sent it once, 71 reported the payment as made, 36 told the user they could not tell whether it had gone through, and 1 said it had failed; one trial sent nothing. In four of the duplicates the model read the balance first; with no earlier figure to compare it with, it took the balance as a reason to send again.
Suggested fix. Once sendTransaction has returned a hash, do not report a failed receipt lookup as a failed transfer: return the hash with text saying the transaction was sent and its receipt is not confirmed yet, so it should not be sent again. An action that takes a transaction hash and returns its status would give an agent something to check before retrying. approve in the same file has the same shape (around L178–190).
To reproduce without a live account: a wallet provider whose waitForTransactionReceipt throws after sendTransaction has returned a hash (for example, a chain RPC that errors on eth_getTransactionReceipt); call transfer twice with the same arguments.
This is a local fake, not the live chain. It is separate from #1483, which is about the transaction request itself; this one is about the answer the agent gets after the transaction was sent.
- Lingua principale
- TypeScript
- Stelle
- 1.3k
- Fork
- 857
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di coinbase/agentkit
-
ERC20 transfer reports "Transferred" when the transaction reverts (receipt status ignored)Forse già presa @AgenticFinanceGraph l’ha presa 2 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
coinbase/agentkit#1558 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
coinbase-agentkit 0.7.x fails on fresh install: imports solana.rpc.api, which solana>=0.37 removedForse già presa @JulienKervarrec l’ha presa 21 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Automated contract verdict as a middleware step before HITL approval in the guardrails exampleAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di coinbase/agentkit
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
one-zero-eight/apply-bot#39 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
bigbluebutton/bbb-ui-components-react#108 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
high priority
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
CI-CMG/deep-sea-corals-exb#84 · 1 commento ·