The dataSuffix capability allows apps to append arbitrary hex-encoded bytes to transaction calldata. This enables attribution tracking, allowing platforms to identify which app originated a transaction and distribute rewards accordingly.
Parameters
Hex-encoded bytes to append to the transaction calldata. This value is appended to the end of the calldata for each call in the batch.
When
true, the wallet may ignore the capability if it doesn’t support it. When false or omitted, the wallet must support the capability or reject the request.Returns
The data suffix capability configuration for the specified chain.
Example Usage
Error Handling
| Code | Message | Description |
|---|---|---|
| 4100 | Data suffix not supported | Wallet does not support data suffix functionality |
| 5700 | DataSuffix capability required | Transaction requires dataSuffix but wallet doesn’t support it |
How It Works
When a wallet receives adataSuffix capability, the suffix is appended to userOp.callData. The suffix bytes are concatenated directly to the end of the calldata, making them available for onchain parsing and attribution.
Use Cases
Builder Codes Attribution
The primary use case fordataSuffix is Builder Codes attribution. Builder Codes are unique identifiers that allow apps to receive attribution for onchain activity they generate.
Best Practices
- Use with Builder Codes: Register on base.dev to get your Builder Code for proper attribution
- Set optional appropriately: Use
optional: trueif your app can function without attribution tracking - Keep suffixes small: Larger suffixes increase gas costs
For wallet developers implementing dataSuffix support, see the For Wallet Developers section in the Builder Codes guide.
Related Capabilities
- paymasterService - Combine with sponsored transactions
- atomic - Use with atomic batch transactions