Use Case
State diff tracking enables you to:- Monitor specific storage slots (e.g., owner, balance mappings)
- Track contract state evolution over time
- Analyze state changes without replaying transactions
- Build state-based analytics
Code Example
Try it yourself with the interactive query interface below:
Key Parameters
State diffs capture all storage changes that occurred in a block, providing a complete picture of contract state evolution.
Expected Output
Filter by Contract
Track state changes for a specific contract:Understanding Change Types
Thekind field indicates the type of state change:
Track Specific Storage Slots
Monitor a specific storage slot (e.g., owner variable):Monitor Balance Changes
Track balance mapping changes for ERC-20 tokens:Performance Tips
- Filter by contract: Always specify contract addresses to reduce data volume
- Post-filter keys: Filter specific storage keys in your application
- Understand data volume: State diffs can be very large for active contracts
- Combine with logs: Use event logs to identify interesting blocks, then query state diffs
Common Use Cases
Track Governance Changes
Monitor governance parameter changes:Monitor Oracle Updates
Track price oracle state updates:Audit Storage Access
Analyze which storage slots are frequently accessed:Related Examples
Query Event Logs
Track smart contract events
Query Transactions
Monitor transaction activity
Query Traces
Analyze internal transactions
API Reference
View complete API docs