Skip to main content
Builder Codes allow you to attribute onchain activity to your app or wallet, unlocking analytics, rewards, and future incentives. This guide covers the implementation steps for both application developers and wallet providers.

For App Developers

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.
  • EOA Transactions
  • ERC-4337 User Operations
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.