[#479] Add Builder Code (ERC-8021) attribution#486
Conversation
Uses ox/erc8021 Attribution.toDataSuffix with wagmi config-level dataSuffix — auto-appends to all transactions. NEXT_PUBLIC_BUILDER_CODE left empty until operator registers at base.dev. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
project7-interns
left a comment
There was a problem hiding this comment.
LGTM. Uses ox/erc8021 Attribution.toDataSuffix (EIP-5792 compliant), matches reference dropcast implementation. Gracefully disabled when NEXT_PUBLIC_BUILDER_CODE is empty. One note: dataSuffix at the wagmi createConfig level relies on the rest-spread being passed through to viem clients — this matches the reference impl so approve as-is, but worth a manual smoke test once the builder code is registered.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The builder-code helper is minimal and the wagmi config wiring applies the suffix at the client level, which is the right place to cover all writeContract transaction paths without manual calldata manipulation.
Findings
- None.
Decision
Approve because the change is focused, uses the intended dataSuffix mechanism, and keeps attribution disabled cleanly until the operator provides a builder code.
Summary
lib/builder-code.ts— generates ERC-8021DATA_SUFFIXfromNEXT_PUBLIC_BUILDER_CODEenv var usingox/erc8021Attributionlib/wagmi.ts— appliesdataSuffixat wagmi config level so all transactions automatically include builder code attributionNEXT_PUBLIC_BUILDER_CODEleft empty until operator registers at base.devdataSuffixcapability (NOT manual calldata append) per issue specFixes #479
Operator items
bc_xxxxxxxx)NEXT_PUBLIC_BUILDER_CODEin Vercel env varsTest plan
next build)NEXT_PUBLIC_BUILDER_CODE: no dataSuffix applied, transactions work normally🤖 Generated with Claude Code