SolanaKeypairWalletProvider returns a signature when confirmation reports an execution error

オープン 初心者向け
#1,615 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@snuff12 がすでに取り組んでいます。

2026年11月1日 から。

  • #1616 @snuff12 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
70/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
blockchain

調査の方向性

バグは typescript/agentkit/src/wallet-providers/solanaKeypairWalletProvider.ts にあります。confirmTransaction の確認結果は await されていますが、その value.err は一度もチェックされていません。sendTransaction、signAndSendTransaction、nativeTransfer の 3 つのメソッドと、Connection をモックしている既存のプロバイダー用 Jest フィクスチャから始めてください。完了条件は、null でない value.err が署名と実行エラーを伴って reject されること、null の場合は引き続き署名で resolve されること、送信または確認時の例外が引き続き伝播することです。

索引モデルが issue の本文から書いたものです。

説明

SolanaKeypairWalletProvider waits for confirmation but discards the returned value.err. A transaction can therefore be submitted and confirmed with an execution failure while sendTransaction, signAndSendTransaction, and nativeTransfer resolve with its signature.

Affected code

Reproduced against main at f2f3e8c11a91d56a17979a229a172ba6e61a85c2, in typescript/agentkit/src/wallet-providers/solanaKeypairWalletProvider.ts.

Reproduction

In the existing provider Jest fixture, let Connection.sendTransaction resolve to signature123 and Connection.confirmTransaction resolve to:

{
  context: { slot: 1 },
  value: { err: { InstructionError: [0, { Custom: 7 }] } },
}

Invoke each of sendTransaction(tx), signAndSendTransaction(tx), and nativeTransfer(to, amount) with the existing valid transaction/balance fixtures. All three resolve to signature123 on the unmodified source. They do not reject, even though the confirmation explicitly reports failed execution. This can occur when execution fails after submission/preflight; a resolved confirmation promise alone does not imply successful execution.

Expected result and impact

Reject with an error carrying the submitted signature and execution error. Continue returning the signature when value.err === null, and preserve submission/confirmation exceptions. Otherwise callers can treat a failed transfer as successfully completed.

Verification

Three regression cases fail on the original source (21 other provider tests pass); the patched provider passes all 24. This reproduction uses controlled RPC results and does not spend funds or claim a live-network transaction.

Related: #1558 concerns EVM/ERC20 receipt status; this report concerns the separate Solana keypair provider and its confirmation result.

AI-assisted investigation and regression tests, prepared with Codex.

主要言語
TypeScript
スター
1.3k
フォーク
889
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

coinbase/agentkit のほかの issue

coinbase/agentkit の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。