trace_filter - Sonic RPC Method
Filter traces by address and block range on Sonic. Requires archive node for ultra-fast DeFi, high-frequency trading dApps, and performance-critical applications.
Returns traces matching a filter on Sonic.
Archive Node Required
This method requires an archive node. It is not available on full nodes.
When to Use This Method
- Search for traces matching address criteria - Find all internal transactions involving a specific address on Sonic
- Find all interactions with a contract - Track every call, delegate call, and create operation targeting a contract for ultra-fast DeFi, high-frequency trading dApps, and performance-critical applications
- Audit contract usage patterns - Analyze how contracts are used over time across block ranges
- Forensic analysis - Investigate transaction patterns and address-level activity across the chain
Best Practices
- Very resource-intensive on large block ranges; narrow the range as much as possible
- Use specific fromAddress or toAddress filters to reduce response size
- Limit block range to small chunks and paginate results
- Many provider-managed endpoints disable this method due to computational cost
Response Body
ResponseCode Examples
Related Methods
trace_block- Get all traces in a blocktrace_transaction- Get traces for a specific transactioneth_getLogs- Filter event logs
trace_call
Trace a call without creating a transaction on Sonic. Requires archive node for ultra-fast DeFi, high-frequency trading dApps, and performance-critical applications.
trace_get
Get a specific trace by transaction hash and index on Sonic. Requires archive node for ultra-fast DeFi, high-frequency trading dApps, and performance-critical applications.