Conversation
…schema Update the Stellar adapter to support the new multi-chain access control indexer schema while maintaining full backward compatibility. Changes: - Use `eventType` instead of `type` in GraphQL queries - Use `blockNumber` instead of `blockHeight` - Add support for `previousOwner`/`newOwner` and `previousAdmin`/`newAdmin` fields - Add `normalizeAccount()` helper for backward-compatible data extraction - Add support for `ROLE_ADMIN_CHANGED`, `OWNERSHIP_RENOUNCED`, and `ADMIN_RENOUNCED` event types The public interfaces remain unchanged, so Role Manager requires no code changes - only a dependency update to the new adapter version.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Stellar adapter's indexer client to support a new multi-chain access control indexer schema. The changes include field name updates (type → eventType, blockHeight → blockNumber), new field support for ownership/admin transfers (previousOwner, newOwner, previousAdmin, newAdmin), and support for new event types (ROLE_ADMIN_CHANGED, OWNERSHIP_RENOUNCED, ADMIN_RENOUNCED).
Changes:
- Updated GraphQL queries to use
eventTypeinstead oftypeandblockNumberinstead ofblockHeight - Added new fields to IndexerHistoryEntry interface for multi-chain schema support
- Implemented
normalizeAccount()helper to handle different field mappings per event type - Added support for three new event types in the mapping logic
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/adapter-stellar/src/access-control/indexer-client.ts | Main implementation: updated interface, queries, field mappings, and added normalizeAccount() helper |
| packages/adapter-stellar/test/access-control/indexer-client.spec.ts | Updated test data to use new field names (eventType, blockNumber) |
| packages/adapter-stellar/test/access-control/ownable-two-step.test.ts | Updated ownership transfer test data with new field names and event types |
| packages/adapter-stellar/test/access-control/admin-two-step.test.ts | Updated admin transfer test data with new field names and event types |
| .changeset/multi-chain-indexer-support.md | Added changeset documentation describing the updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/adapter-stellar/test/access-control/ownable-two-step.test.ts
Outdated
Show resolved
Hide resolved
- Remove backward compatibility fallback logic for legacy fields - Update test data to use new field names (previousOwner, newOwner, previousAdmin, newAdmin) exclusively - Fix incorrect event type in test (OWNERSHIP_TRANSFER_INITIATED → OWNERSHIP_TRANSFER_STARTED) - Clean up IndexerHistoryEntry interface to remove legacy admin field - Update normalizeAccount() to handle all event types without fallbacks
The dependency-review workflow was blocking our own AGPL-licensed packages. Since we're consuming our own packages, this check is unnecessary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
eventTypeinstead oftypein GraphQL queriesblockNumberinstead ofblockHeightpreviousOwner/newOwnerandpreviousAdmin/newAdminfieldsnormalizeAccount()helper for backward-compatible data extractionROLE_ADMIN_CHANGED,OWNERSHIP_RENOUNCED, andADMIN_RENOUNCEDevent typesContext
This update aligns the Stellar adapter with the new multi-chain access control indexers schema. The changes maintain full backward compatibility with existing public interfaces, meaning Role Manager requires no code changes - only a dependency update to this new adapter version.
Dependencies
@openzeppelin/ui-types>= 1.6.0 (for newHistoryChangeTypevalues)Test plan