Skip to content

Feat: Index all files and permissions#3

Closed
volod-vana wants to merge 17 commits intomainfrom
volod/pro-394-index-all-data-registry-files-and-all-data-permissions-in
Closed

Feat: Index all files and permissions#3
volod-vana wants to merge 17 commits intomainfrom
volod/pro-394-index-all-data-registry-files-and-all-data-permissions-in

Conversation

@volod-vana
Copy link
Member

@volod-vana volod-vana commented Jul 10, 2025

This PR enhances the Moksha subgraph to provide a complete on-chain view of all registered files and user-granted permissions. These changes are isolated to the Moksha network and do not affect the vana mainnet subgraph.

Key changes:

  1. Introduces new File and Permission entities to the shared schema.
  2. Adds a new data source to subgraph.moksha.yaml to index events from the DataPermissionImplementation contract.
  3. Updates all DataRegistry handlers to index File entities from historical FileAdded events on Moksha.

All changes are additive and backward-compatible. Mainnet configuration remains untouched and will be updated in a future PR when the contracts are deployed there.

Local testing

Query 1: Verify that File entities are being created.

{
  files(first: 5, orderBy: addedAtTimestamp, orderDirection: desc) {
    id
    url
    owner {
      id
    }
    addedAtTimestamp
  }
}
image

Query 2: Verify that Permission entities are being created.

{
  permissions(first: 5, orderBy: addedAtTimestamp, orderDirection: desc) {
    id
    grant
    user {
      id
    }
    addedAtTimestamp
    nonce
  }
}
image

@linear
Copy link

linear bot commented Jul 10, 2025

@volod-vana volod-vana self-assigned this Jul 10, 2025
@volod-vana volod-vana requested a review from tnunamak July 10, 2025 18:09
@dumedco dumedco closed this Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments