Skip to content

[#479] Add Builder Code (ERC-8021) attribution#486

Merged
realproject7 merged 1 commit intomainfrom
task/479-builder-code
Mar 24, 2026
Merged

[#479] Add Builder Code (ERC-8021) attribution#486
realproject7 merged 1 commit intomainfrom
task/479-builder-code

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Creates lib/builder-code.ts — generates ERC-8021 DATA_SUFFIX from NEXT_PUBLIC_BUILDER_CODE env var using ox/erc8021 Attribution
  • Updates lib/wagmi.ts — applies dataSuffix at wagmi config level so all transactions automatically include builder code attribution
  • NEXT_PUBLIC_BUILDER_CODE left empty until operator registers at base.dev
  • Uses EIP-5792 dataSuffix capability (NOT manual calldata append) per issue spec

Fixes #479

Operator items

  • Register at base.dev to get builder code (e.g., bc_xxxxxxxx)
  • Set NEXT_PUBLIC_BUILDER_CODE in Vercel env vars
  • Verify attribution via Base Attribution Checker after first tx

Test plan

  • Build passes (next build)
  • With empty NEXT_PUBLIC_BUILDER_CODE: no dataSuffix applied, transactions work normally
  • With valid builder code: dataSuffix appended to all transactions
  • Verify via Attribution Checker that builder code is detected

🤖 Generated with Claude Code

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>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Mar 24, 2026 9:25am

Request Review

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@realproject7 realproject7 merged commit 088114e into main Mar 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[#475] Builder Code (ERC-8021) attribution

2 participants