Builder Codes overview: example `dataSuffix` has the length byte in the wrong position
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 85/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
調査の方向性
issueでリンクされているBuilder Codesの概要ページを開き、「現在ERC-8021をサポートしているWalletは?」セクションのwallet.sendCallsの例を見つけてください。ERC-8021スキーマまたはissueで引用されているox/erc8021の例を照合してサフィックスを確認し、値を修正するか、Attribution.toDataSuffixで生成してください。例でコードの長さが正しい位置にエンコードされていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Page: https://docs.base.org/specifications/builder-codes/overview (section "Which Wallets Currently Support ERC-8021?", the wallet.sendCalls example)
Problem: the example value is
0x07626173656170700080218021802180218021802180218021
which puts the codes-length byte (07) before the code. ERC-8021 schema 0 is parsed from the end: marker (16 bytes), schema id (1 byte), codes length (1 byte), then the codes. So the length byte must come immediately before the schema id, after the code bytes. Parsed from the end, the example yields a codes length of 0x70 (112), which is invalid.
Proof (ox 1.8.5, ox/erc8021):
$ node -e "import('ox/erc8021').then(({Attribution:A})=>{console.log(A.toDataSuffix({codes:['baseapp']}));console.log(JSON.stringify(A.fromData('0x07626173656170700080218021802180218021802180218021')))})"
0x62617365617070070080218021802180218021802180218021
{"codes":["\u0007baseap"],"id":0}
The ERC's own test vector agrees (0xdddddddd62617365617070070080218021802180218021802180218021 → ["baseapp"]), as does every schema-0 suffix we sampled on Base mainnet (5,374 suffixed transactions in 900 blocks).
Suggested fix: replace the value with 0x62617365617070070080218021802180218021802180218021, or better, generate it in the example with Attribution.toDataSuffix({ codes: ['baseapp'] }) so it can't drift.
Related: the app-developer page's "Quick Setup with Wagmi" (createConfig({ dataSuffix })) currently doesn't attach the suffix for connector wallets in @wagmi/core 3.6.5 (wevm/wagmi#5248). A note pointing to per-call dataSuffix until that is fixed would save integrators from unattributed transactions.
- 主要言語
- JavaScript
- スター
- 343
- フォーク
- 818
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 66
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
base/docs のほかの issue
-
Issue on docsオープン
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
Broken redirect: /wallet-app/:slug* catch-all leads to 404対応中かも @forumevi が 16 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
docs(builder-codes): base.dev links use HTTP instead of HTTPS対応中かも @xam-dev-ux が 36 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
メンテナーはふだん 1 日以内に返信
-
fix(docs): Terms of Service links to Privacy Policy over HTTP対応中かも @xam-dev-ux が 36 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
clawsweeper:needs-product-decision clawsweeper:needs-security-review clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:security issue-rating: 🦞 diamond lobster P2
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
openclaw/openclaw#166870 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
⚠ needs intervention document structure changed
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Bug pulumi/pulumi
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
uoftblueprint/canada-basketball#32 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
andromarces/agent-loops#571 ·
メンテナーはふだん 1 日以内に返信