Builder Codes overview: example `dataSuffix` has the length byte in the wrong position
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 85/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
- Lĩnh vực
- documentation
Hướng nghiên cứu
Mở trang tổng quan về Builder Codes được liên kết trong issue và tìm ví dụ wallet.sendCalls trong phần “Những Wallet nào hiện hỗ trợ ERC-8021?”. Kiểm tra hậu tố theo schema ERC-8021 hoặc ví dụ ox/erc8021 được trích dẫn trong issue, sau đó sửa giá trị hoặc tạo giá trị bằng Attribution.toDataSuffix. Hoàn tất khi ví dụ mã hóa độ dài của các mã ở đúng vị trí.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 343
- Fork
- 818
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 63
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của base/docs
-
Issue on docsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Broken redirect: /wallet-app/:slug* catch-all leads to 404Có thể đã có người làm @forumevi đã nhận 19 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
docs(builder-codes): base.dev links use HTTP instead of HTTPSCó thể đã có người làm @xam-dev-ux đã nhận 39 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
base/docs#1910 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(docs): Terms of Service links to Privacy Policy over HTTPCó thể đã có người làm @xam-dev-ux đã nhận 39 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
druxt/umami.demo.druxtjs.org#527 ·
Maintainer thường phản hồi trong vòng 9 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
NuSkooler/enigma-bbs#907 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
documentation good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày