Where Builder Code data lives
Attribution is indexed into two tables, because Base carries Builder Codes differently for regular (EOA) transactions and for smart-account (ERC-4337) user operations.
Two things to keep in mind when querying either table:
- Deduplicate transactions. In
base.transaction_attributionsa transaction attributed to multiple Builder Codes appears once per code, so countDISTINCT transaction_hashwhen you want a transaction count. - Scope to active rows. Both tables use an
actioncolumn (Int8):1means the record was added to the chain and-1means it was removed by a re-org. Filteraction = 1for a quick view, or aggregate withSUM(action) > 0if you need re-org-safe totals.
Access
SQL Playground
Try queries in your browser (no API keys needed)
REST API
Programmatic access with free API keys
Example queries
EOA transactions for a Builder Code
Most recent transactions attributed to your code:User operations for a Builder Code
builder_codes is an array, so use has() to match your code within a user operation:
Daily attributed transaction count
Count distinct EOA transactions per day for your code:Query tips
Follow the SQL API best practices when querying attribution data:- Match the right column per table — filter
builder_code = '...'onbase.transaction_attributionsandhas(builder_codes, '...')onbase.decoded_user_operations. - Deduplicate transactions — a transaction attributed to multiple codes appears once per code in
base.transaction_attributions; countDISTINCT transaction_hash. - Scope to active records — add
action = 1for a quick view, orSUM(action) > 0in aHAVING/aggregate for re-org-safe totals. - Bound your scan — filter on
block_timestampand add aLIMITwhile iterating to keep queries fast.
Learn more
- Builder Codes overview — what Builder Codes are and how to register
- Schema reference — full column definitions for
base.transaction_attributionsandbase.decoded_user_operations - Quickstart — run your first SQL API query
- Best practices — write fast, correct SQL API queries