Skip to main content
Defined in ERC-8021
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

value
`0x${string}`
required
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.
optional
boolean
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

dataSuffix
object
The data suffix capability configuration for the specified chain.

Example Usage

Error Handling

How It Works

When a wallet receives a dataSuffix 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 for dataSuffix is Builder Codes attribution. Builder Codes are unique identifiers that allow apps to receive attribution for onchain activity they generate.
Register on base.dev to get your Builder Code for proper attribution.

Best Practices

  1. Use with Builder Codes: Register on base.dev to get your Builder Code for proper attribution
  2. Set optional appropriately: Use optional: true if your app can function without attribution tracking
  3. 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.