Skip to content

Record FaultRecord events from all PDP-based service contracts #68

@silent-cipher

Description

@silent-cipher

Currently, we only record fault records from SimplePDPServiceContract deployed at

  • mainnet - 0x805370387fA5Bd8053FD8f7B2da4055B9a4f8019
  • calibration - 0x6170dE2b09b404776197485F3dc6c968Ef948505

However, other service contracts using PDPVerifier may also emit FaultRecord events with the standard event signature:

event FaultRecord(indexed uint256, uint256, uint256);

Proposal:

We should extend the subgraph to support capturing FaultRecord events from any PDP-based service contract that emits this standard event. This can be achieved by:

  • Defining a data source template for PDP service contracts.
  • Dynamically instantiating these templates in the handler for the proofSetCreated event (or any relevant trigger).

This approach allows the subgraph to dynamically follow all new service contracts and record their fault events without requiring static entries in the manifest.

For reference on implementing dynamic data sources in The Graph, see:
https://thegraph.com/docs/en/subgraphs/developing/creating/subgraph-manifest/#data-source-templates-for-dynamically-created-contracts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions