Summary
Set up Builder Code attribution so all onchain transactions from PlotLink include the builder code suffix, earning Base builder rewards.
Context
From Dropcast issues #286, #288, #290:
- Do NOT manually append builder code to calldata — modern wallets wrap transactions internally
- Use EIP-5792
dataSuffix capability on wallet_sendCalls
- Fallback to direct
sendTransaction with manual append only if wallet lacks EIP-5792
Steps
1. Register Builder Code
- OPERATOR: Register at base.dev to get a builder code (e.g.,
bc_xxxxxxxx)
- Add
NEXT_PUBLIC_BUILDER_CODE to env vars
2. Create builder-code helper
Reference: ~/Projects/dropcast/lib/builder-code.ts
import { Attribution } from '@base/attribution';
const BUILDER_CODE = process.env.NEXT_PUBLIC_BUILDER_CODE ?? '';
export const DATA_SUFFIX = BUILDER_CODE ? Attribution.toDataSuffix({ codes: [BUILDER_CODE] }) : null;
3. Integrate with wagmi
Reference: ~/Projects/dropcast/lib/wagmi.ts
- Configure wagmi to use
dataSuffix capability when available
- Primary:
wallet_sendCalls with capabilities.dataSuffix
- Fallback: direct
sendTransaction with manual append
4. Apply to all transaction paths
- TradingWidget: buy (ETH/USDC/HUNT/PLOT) and sell
- Create storyline
- Chain plot
- Donate
- Claim royalties
5. Verify attribution
- After a test tx, check via Base Attribution Checker that the builder code is detected
Dependencies
@base/attribution npm package
Acceptance Criteria
Branch
task/475-builder-code in plotlink repo
Parent: #475
Summary
Set up Builder Code attribution so all onchain transactions from PlotLink include the builder code suffix, earning Base builder rewards.
Context
From Dropcast issues #286, #288, #290:
dataSuffixcapability onwallet_sendCallssendTransactionwith manual append only if wallet lacks EIP-5792Steps
1. Register Builder Code
bc_xxxxxxxx)NEXT_PUBLIC_BUILDER_CODEto env vars2. Create builder-code helper
Reference:
~/Projects/dropcast/lib/builder-code.ts3. Integrate with wagmi
Reference:
~/Projects/dropcast/lib/wagmi.tsdataSuffixcapability when availablewallet_sendCallswithcapabilities.dataSuffixsendTransactionwith manual append4. Apply to all transaction paths
5. Verify attribution
Dependencies
@base/attributionnpm packageAcceptance Criteria
DATA_SUFFIXgenerated from builder codeBranch
task/475-builder-codein plotlink repo