Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(subgraph): As a user, I want the update Registry address on the Router to be indexed for the 4 registries #925

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

Chirag-S-Kotian
Copy link
Contributor

Add Router Registry Updates Indexing

Description

Implements indexing functionality for registry address updates in the Router contract for all four registries (Attestation, Module, Portal, and Schema) to provide transparency on administrative actions.

Changes

  • Added RegistryUpdate entity to track registry address changes
  • Implemented handlers for all registry update events:
    • AttestationRegistryUpdated
    • ModuleRegistryUpdated
    • PortalRegistryUpdated
    • SchemaRegistryUpdated
  • Created audit information tracking for registry updates
  • Added types and schema definitions for the new entities

Technical Details

  • Created new GraphQL schema entities for registry updates
  • Implemented common handler function handleRegistryUpdate to process all registry update events
  • Added proper audit information tracking with transaction details
  • Enhanced type safety with proper event type handling

Testing

  • Verified event handling with subgraph deployment
  • Tested audit information creation
  • Validated entity creation and storage

Documentation

The implementation allows querying registry updates with the following fields:

  • Registry type (ATTESTATION, MODULE, PORTAL, SCHEMA)
  • Registry address
  • Audit information (transaction details, timestamp, etc.)

Closes #290

@Chirag-S-Kotian
Copy link
Contributor Author

applied your chnages ,let me know if you need any changes

Comment on lines +57 to +58
"@graphprotocol/graph-cli": "0.49.0 ",
"@graphprotocol/graph-ts": "0.30.0 ",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just revert the changes on these two lines?

network: linea
source:
abi: Router
address: "0x5A5A30aB3d6A6DD3463512793C7c36E9B47615e8"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the correct address (see here).

network: bsc-testnet
source:
abi: Router
address: "0x4E797aD91EE5d467D878E71C65D564D5b2026bE9"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the correct address (see here).

network: bsc
source:
abi: Router
address: "0x4E797aD91EE5d467D878E71C65D564D5b2026bE9"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the correct address (see here).

network: base-sepolia
source:
abi: Router
address: "0x4E797aD91EE5d467D878E71C65D564D5b2026bE9"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the correct address (see here).

source:
abi: Router
address: "0x4E797aD91EE5d467D878E71C65D564D5b2026bE9"
startBlock: 34645879
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the correct block number (see above)

source:
abi: Router
address: "0x4E797aD91EE5d467D878E71C65D564D5b2026bE9"
startBlock: 32972749
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the correct block number (see above)

source:
abi: Router
address: "0x4E797aD91EE5d467D878E71C65D564D5b2026bE9"
startBlock: 7731130
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the correct block number (see above)

source:
abi: Router
address: "0x4E797aD91EE5d467D878E71C65D564D5b2026bE9"
startBlock: 1279337
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the correct block number (see above)

source:
abi: Router
address: "0x4E797aD91EE5d467D878E71C65D564D5b2026bE9"
startBlock: 160697387
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the correct block number (see above)

@alainncls
Copy link
Collaborator

Please use the correct addresses for all Router contracts(different for each network).
Also, the startBlock value should be the block where the contract was deployed (different for each network).
Finally, don't forget to update the file for the Linea Sepolia network.

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.

[US] As a user, I want the update Registry address on the Router to be indexed for the 4 registries
2 participants