Skip to main content

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
Integrating Builder Codes requires appending a suffix—provided by Base—to your transaction data.
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.
Once you have added the suffix, your app is fully ERC-8021 compliant.

For Wallet Developers

Wallet providers need to support the dataSuffix 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.
interface DataSuffixCapability {
  dataSuffix: string; // hex-encoded bytes provided by the app
}
2

Append Suffix to Calldata

When constructing the transaction or User Operation, extract the dataSuffix and append it to the calldata.
Append to tx.data.
// Minimal example for EOA
function applySuffixToEOA(tx, capabilities) {
  const suffix = capabilities.find(c => c.dataSuffix)?.dataSuffix
  if (!suffix) return tx

  return {
    ...tx,
    // Append suffix bytes (remove 0x prefix from suffix if tx.data has it)
    data: tx.data + suffix.slice(2) 
  }
}
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.
  • No interaction required with apps: The wallet handles this independently.
  • Multi-code support: ERC-8021 natively supports multiple attribution codes.
Example:
finalSuffix = walletSuffix + appSuffix
This ensures both the app and the wallet receive onchain attribution.

For Base-Solana Bridge Developers

Onchain Builder codes are currently still not live on mainnet.
Builder codes work with the Base-Solana bridge via the hookData 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:
bytes memory hookData = abi.encode(
  0xUSER,           // destination address on Base (NOT the Twin)
  0xBUILDER_CODE,   // your bytes32 code
  100               // feeBps (100 = 1%)
);
3

Attach to Bridge Message

Set to = BRIDGE_CAMPAIGN_ADDRESS and attach a call to Flywheel.send.
For a bridge with no follow-up call:
to:     <BRIDGE_CAMPAIGN_ADDRESS>
amount: 100
call:
  ty:    Call
  to:    <FLYWHEEL_ADDRESS>
  value: 0
  data:  abi.encodeWithSelector(
           Flywheel.send.selector,
           <BRIDGE_CAMPAIGN_ADDRESS>,
           <wSOL_ADDRESS>,
           hookData
         )

Give feedback!

We’re constantly working to improve the Builder Codes experience. If you have any feedback, please let us know here.