dataSuffix plugin makes this integration seamless—once configured, the attribution suffix is automatically appended to all transactions sent through your app, including both EOA transactions and ERC-4337 smart wallet user operations.
Prerequisites
- A Privy app with
@privy-io/react-authv3.13.0+ configured - A registered Builder Code from base.dev > Settings > Builder Codes
Installation
Install theox library to generate ERC-8021 compliant data suffixes:
Integration
Import thedataSuffix plugin from Privy and the Attribution utility from ox:
How it works
ThedataSuffix plugin automatically appends your attribution data to:
| Transaction Type | Where Suffix is Appended |
|---|---|
| EOA transactions | transaction.data field |
| Smart wallets (ERC-4337) | userOp.callData field |
Base Builder Codes rewards are specific to transactions on Base mainnet and Base Sepolia. However,
the
dataSuffix plugin will append the suffix to transactions on all chains. If you need
chain-specific suffix behavior, please reach out to the Privy team.
