Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug] Inconsistent dataSuffix hex stripping: slice(2) used in some examples but not others

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

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

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
javascript

調査の方向性

tmp-builder-codes-outline.mdx を開き、"5. Minimal example (EOA),"、"A. EOA Transactions,"、"B. Smart Account / ERC-4337." における dataSuffix の処理を比較してください。各例で既存の 16 進文字列に一貫した形でサフィックスが追加されていることを確認し、その後、ドキュメントの例が引き続き有効であることを検証してください。

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

説明

Description

In tmp-builder-codes-outline.mdx, there is an inconsistency in how
dataSuffix is appended to calldata across examples.

Some examples strip the 0x prefix:

data: tx.data + suffix.slice(2)

While others append directly without stripping:

tx.data = tx.data + dataSuffix
userOp.callData = userOp.callData + dataSuffix

Location

tmp-builder-codes-outline.mdx:

  • Section "5. Minimal example (EOA)" → uses suffix.slice(2)
  • Section "A. EOA Transactions" → uses tx.data + dataSuffix (no slice)
  • Section "B. Smart Account / ERC-4337" → uses userOp.callData + dataSuffix (no slice)

Impact

  • Developers copying different examples will get inconsistent behavior
  • Appending 0x prefix mid-calldata will produce malformed transactions
  • Could cause silent transaction failures or wrong attribution

Suggested Fix

Standardize all examples to consistently use suffix.slice(2) when
appending to existing hex strings, or use a proper concat utility:

data: tx.data + dataSuffix.slice(2)
主要言語
JavaScript
スター
337
フォーク
798
平均マージ
19時間 12分
マージ済み PR(30日)
60

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

base/docs のほかの issue

base/docs の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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