Skip to main content

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 Protocol Registry emits events for protocol registration, updates, data provider changes, and user integrations. These events enable real-time monitoring of the protocol ecosystem.
Monitor protocol events to stay updated on new integrations and ecosystem growth.

Protocol Events

ProtocolRegistered

Emitted when a new protocol is registered.
event ProtocolRegistered(
    uint256 indexed protocolId,
    string name,
    ProtocolType protocolType
);
Parameters:
  • protocolId (uint256 indexed): Protocol identifier
  • name (string): Protocol name
  • protocolType (ProtocolType): Protocol type
Example Usage:
contract.on('ProtocolRegistered', (protocolId, name, protocolType, event) => {
  const types = ['DeFi', 'NFT', 'Social', 'Trading', 'Governance', 'Gaming', 'Identity', 'Infrastructure'];
  console.log(`New protocol: ${name} (${types[protocolType]}) - ID: ${protocolId.toString()}`);
});

ProtocolUpdated

Emitted when protocol configuration is updated.
event ProtocolUpdated(
    uint256 indexed protocolId,
    bytes updateData
);

DataProviderAdded

Emitted when a data provider is added.
event DataProviderAdded(
    uint256 indexed protocolId,
    address indexed provider
);

UserIntegrated

Emitted when a user integrates with a protocol.
event UserIntegrated(
    address indexed user,
    uint256 indexed protocolId,
    uint256 timestamp
);

Best Practices

  1. Monitor Registrations: Track new protocol additions
  2. Cache Data: Cache protocol metadata
  3. Filter Events: Use indexed parameters for filtering
  4. Analytics: Build analytics from event data