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.- Wagmi (Recommended)
- Viem
- Legacy (writeContract)
Use the
useSendCalls hook from Wagmi’s experimental 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.