Skip to content

Conversation

@pasevin
Copy link
Collaborator

@pasevin pasevin commented Dec 15, 2025

Summary

  • Add full support for OpenZeppelin Stellar AccessControl two-step admin transfer pattern
  • Add getAdminInfo(), transferAdminRole(), acceptAdminTransfer() methods to service
  • Add queryPendingAdminTransfer() to indexer client for pending admin transfers
  • Add new event types: ADMIN_TRANSFER_INITIATED, ADMIN_TRANSFER_COMPLETED, OWNERSHIP_TRANSFER_STARTED, OWNERSHIP_TRANSFER_COMPLETED
  • Remove deprecated TRANSFERRED legacy type from HistoryChangeType (use OWNERSHIP_TRANSFER_COMPLETED instead)
  • Remove redundant on-chain verification for pending transfers (standard OZ contracts don't expose getters)
  • Make integration tests stricter (fail instead of skip for missing data)
  • Security fix: Remove hardcoded API key from tests, require INDEXER_URL env var

Type Extensions

  • Added AdminState type for admin states ('active' | 'pending' | 'expired' | 'renounced')
  • Added PendingAdminTransfer interface for pending admin transfer details
  • Added AdminInfo interface for admin information with state and pending transfer
  • Extended AccessControlCapabilities with hasTwoStepAdmin flag

Breaking Changes

  • Removed GetOwnershipOptions interface and verifyOnChain option from getOwnership() and getAdminInfo()
  • Removed readPendingOwner() function from onchain-reader
  • Signature change: getOwnership(contractAddress, options?) -> getOwnership(contractAddress)
  • Removed TRANSFERRED from HistoryChangeType - use OWNERSHIP_TRANSFER_COMPLETED instead

Test plan

  • Unit tests pass for new admin transfer functionality
  • Integration tests verify admin transfer events are indexed and queryable
  • Integration tests properly skip when INDEXER_URL is not set
  • All 810 tests pass

- Add AdminTransferInfo type and related interfaces for admin two-step transfers
- Add getAdminInfo(), acceptAdminRole(), isAdminTransferExpired() methods
- Add queryPendingAdminTransfer() to indexer client
- Add ADMIN_TRANSFER_INITIATED and ADMIN_TRANSFER_COMPLETED event types
- Add OWNERSHIP_TRANSFER_STARTED and OWNERSHIP_TRANSFER_COMPLETED event types
- Remove deprecated TRANSFERRED legacy type from HistoryChangeType
- Remove redundant on-chain verification for pending transfers
- Make integration tests stricter (fail instead of skip for missing data)
- Fix: Remove hardcoded API key from tests, require INDEXER_URL env var

BREAKING CHANGE: TRANSFERRED removed from HistoryChangeType, use OWNERSHIP_TRANSFER_COMPLETED instead
@pasevin pasevin requested a review from a team as a code owner December 15, 2025 16:53
@pasevin pasevin requested a review from Copilot December 15, 2025 16:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@pasevin pasevin requested a review from Copilot December 15, 2025 18:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Address PR review: Defaulting to GRANTED for unknown event types could mask
indexer schema issues. Now using a dedicated UNKNOWN type to make these
cases visible during development and debugging.
@pasevin pasevin merged commit 98a9e5d into main Dec 15, 2025
11 checks passed
@pasevin pasevin deleted the feat/stellar-admin-two-step-transfer branch December 15, 2025 20:51
This was referenced Dec 14, 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.

2 participants