What are Builder Codes
Base Builder Codes are an ERC-721 NFT collection where unique codes (e.g. “abc123”) are minted to help identify builders onchain. Each code has associated metadata. Onchain metadata primarily includes a “payout address” where each code declares where potential rewards should be sent to. Offchain metadata includes more details about the app including its name and site.Automatic Builder-Code Attribution on Base
Once your app is registered on Base.dev, the Base App will auto-append your Base Builder Code to transactions its users make in your app (e.g. via your mini app, or the Base App’s browser). This powers your onchain analytics in Base.dev and qualifies you for potential future rewards.For App Developers
Mini Apps in the Base app will have their builder codes auto-appended to their transactions.
Be sure to register for Base.dev
1
Get your Builder Code
When you register on base.dev, you will receive a Builder Code. This is a random string (e.g.,
k3p9da) that you will use to generate your attribution suffix.2
Append the Suffix to Transactions
The recommended way to attach your suffix is using
wallet_sendCalls (ERC-5792). This passes the suffix through a capability, allowing the wallet to handle the attachment automatically for both EOA and Smart Account (ERC-4337) users.- Wagmi (Recommended)
- Viem
- Legacy (writeContract)
Use the
useSendCalls hook from Wagmi’s features to pass the dataSuffix capability.For Wallet Developers
Wallet providers need to support thedataSuffix capability to enable attribution. This involves accepting the capability and appending the suffix to the calldata before signing.
1
Support the dataSuffix Capability
Your wallet should accept a
dataSuffix string in the capabilities object of wallet_sendCalls.2
Append Suffix to Calldata
When constructing the transaction or User Operation, extract the
dataSuffix and append it to the calldata.- EOA Transactions
- ERC-4337 User Operations
Append to
tx.data.3
(Optional) Add Wallet Attribution
Wallets may also include their own attribution code (their own ERC-8021 suffix) by simply prepending the wallet’s own suffix before the app’s.This ensures both the app and the wallet receive onchain attribution.
- No interaction required with apps: The wallet handles this independently.
- Multi-code support: ERC-8021 natively supports multiple attribution codes.
For Base-Solana Bridge Developers
Builder codes work with the Base-Solana bridge via thehookData mechanism. Currently available for Solana → Base flows only.
1
Get your Builder Code
When you register on base.dev, you will receive a Builder Code. This is a random string (e.g., k3p9da) that you will use to generate your attribution suffix.
2
Build hookData
ABI-encode the user address, your code, and fee:
3
Attach to Bridge Message
Set
to = BRIDGE_CAMPAIGN_ADDRESS and attach a call to Flywheel.send.- Simple Bridge
- Bridge + Follow-Up Call
For a bridge with no follow-up call:
Give feedback!
We’re constantly working to improve the Builder Codes experience. If you have any feedback, please let us know here.