Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open Beginner friendly
#1,474 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
javascript

Research direction

Open tmp-builder-codes-outline.mdx and compare the dataSuffix handling in "5. Minimal example (EOA)," "A. EOA Transactions," and "B. Smart Account / ERC-4337." Check that each example appends the suffix consistently to an existing hex string, then verify the documentation examples remain valid.

Written by the indexing model from the issue text.

Description

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)
Dominant language
JavaScript
Stars
337
Forks
798
Avg merge
13h 7m
Merged PRs (30d)
57

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from base/docs

All issues in base/docs

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.