[Bug] Inconsistent dataSuffix hex stripping: slice(2) used in some examples but not others
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
- Domain
- blockchain, documentation
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
0xprefix 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from base/docs
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100
-
Issue-Bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
sugarlabs/musicblocks#8924 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ArduPilot/ardupilot_wiki#8088 ·
-
[BUG] createTool tools cannot be registered with Mastra when exactOptionalPropertyTypes is enabled Opencustomer-eng status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100