Documentation Index
Fetch the complete documentation index at: https://core.anylayer.org/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The ZKScore Score Calculator contract emits events for all significant score changes and configuration updates. These events are essential for tracking score evolution, monitoring calculation activity, and building real-time applications.Score Events
ScoreCalculated
Emitted when a new score is calculated for a user.user(address indexed): The user whose score was calculatedtotalScore(uint256): The calculated total score (0-1000)timestamp(uint256): Block timestamp of calculation
- When
calculateScore()is called - During batch score calculations
- When scores are automatically refreshed
ScoreUpdated
Emitted when a user’s score changes.user(address indexed): The user whose score changedoldScore(uint256): Previous score valuenewScore(uint256): New score value
- When score recalculation results in a different value
- After category score updates
- During manual score refreshes
CategoryScoreUpdated
Emitted when a category score is updated.user(address indexed): The user whose category score was updatedcategory(uint8 indexed): Category index (0-7)score(uint256): New category score (0-1000)
- 0: DeFi
- 1: NFT
- 2: Social
- 3: Trading
- 4: Governance
- 5: Gaming
- 6: Identity
- 7: Trust
- When
updateCategoryScore()is called - During batch category updates
- When individual category recalculation occurs
Configuration Events
CategoryWeightUpdated
Emitted when a category weight is changed.category(uint8 indexed): Category index (0-7)oldWeight(uint256): Previous weight in basis pointsnewWeight(uint256): New weight in basis points
- When
updateCategoryWeight()is called - During batch weight updates
- When category weights are reconfigured
CalculatorConfigured
Emitted when the calculator is configured or reconfigured.admin(address indexed): Admin who performed the configurationtimestamp(uint256): Configuration timestamp
- During initial deployment configuration
- When major configuration changes occur
- When admin reconfigures the calculator
Event Monitoring
Real-time Score Tracking
Event Analytics
Best Practices
Event Handling
- Use Indexed Parameters: Filter events efficiently using indexed parameters
- Batch Processing: Process multiple events in batches
- Error Handling: Implement robust error handling for event listeners
- Performance: Limit block ranges for large queries
- Storage: Store important event data in a database
Monitoring Strategy
- Real-time Alerts: Set up alerts for significant score changes
- Historical Analysis: Regularly analyze historical event data
- User Tracking: Track individual user score evolution
- System Health: Monitor event emission rates
- Anomaly Detection: Detect unusual score patterns
Related Documentation
- Contract Overview - Contract architecture and features
- Functions Reference - Complete function documentation
- Integration Guide - Integration examples
- Identity SBT - Identity contract documentation