> ## 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.

# Protocol Registry Events

> Complete reference for all Protocol Registry contract events

## 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.

<Tip>
  Monitor protocol events to stay updated on new integrations and ecosystem growth.
</Tip>

## Protocol Events

### ProtocolRegistered

Emitted when a new protocol is registered.

```solidity theme={null}
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:**

<CodeGroup>
  ```javascript JavaScript theme={null}
  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()}`);
  });
  ```

  ```python Python theme={null}
  def handle_protocol_registered(event):
      protocol_id = event['args']['protocolId']
      name = event['args']['name']
      protocol_type = event['args']['protocolType']
      
      types = ['DeFi', 'NFT', 'Social', 'Trading', 'Governance', 'Gaming', 'Identity', 'Infrastructure']
      print(f"New protocol: {name} ({types[protocol_type]}) - ID: {protocol_id}")

  contract.events.ProtocolRegistered().on('data', handle_protocol_registered)
  ```
</CodeGroup>

### ProtocolUpdated

Emitted when protocol configuration is updated.

```solidity theme={null}
event ProtocolUpdated(
    uint256 indexed protocolId,
    bytes updateData
);
```

### DataProviderAdded

Emitted when a data provider is added.

```solidity theme={null}
event DataProviderAdded(
    uint256 indexed protocolId,
    address indexed provider
);
```

### UserIntegrated

Emitted when a user integrates with a protocol.

```solidity theme={null}
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

## Related Documentation

* [Contract Overview](/contracts/protocol-registry/overview) - Contract architecture
* [Functions Reference](/contracts/protocol-registry/functions) - Function documentation
* [Integration Guide](/contracts/protocol-registry/integration) - Integration examples
