Skip to content

Instantly share code, notes, and snippets.

@juliangruber
Last active May 28, 2025 13:23
Show Gist options
  • Save juliangruber/063796d81cc5e29d60e1872595f3a027 to your computer and use it in GitHub Desktop.
Save juliangruber/063796d81cc5e29d60e1872595f3a027 to your computer and use it in GitHub Desktop.

Chain Indexer

First iteration

  • PDPVerifier.onProofSetCreated(proofSetId, ownerAddress)
  • PDPVerifier.onRootsAdded(proofSetId, rootIDs)
proof_sets:
+==============+===============+
| proof_set_id | owner_address |
+==============+===============+
| NUMBER       | STRING        |
| PRIMARY KEY  | NOT NULL      |
+--------------+---------------+

roots:
+=============+==============+
| root_id     | proof_set_id |
+-------------+--------------+
| NUMBER      | NUMBER       |
| PRIMARY KEY | FOREIGN KEY  |
+-------------+--------------+
(rootCommP) -> []{ Owner }

Goal

  • PDPVerifier.onProofSetCreated(proofSetId, ownerAddress)
  • Pandora.onProofSetCreated(clientWalletAddress, proofSetId, withCDN)
  • PDPVerifier.onRootsAdded(proofSetId, rootIDs)
proof_sets:
+=============+===============+
| id          | owner_address |
+=============+===============+
| NUMBER      | STRING        |
| PRIMARY KEY | NOT NULL      |
+-------------+---------------+

cdn_deals:
+==============+=======================+
| proof_set_id | client_wallet_address |
+==============+=======================+
| NUMBER       | STRING                |
| PRIMARY KEY  | NOT NULL              |
+--------------+-----------------------+

roots:
+=============+==============+
| id          | proof_set_id |
+-------------+--------------+
| NUMBER      | NUMBER       |
| PRIMARY KEY | FOREIGN KEY  |
+-------------+--------------+
(clientWalletAddres, rootCommP) -> []{ Owner, withCDN }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment