Skip to content

Implement renounce operations in the Stellar access control adapter #340

@pasevin

Description

@pasevin

Summary

The OpenZeppelin Stellar contracts (stellar-contracts) support three renounce operations that are not yet implemented in the Stellar adapter (adapter-stellar):

On-chain function Contract Stellar adapter status
renounce_ownership(e) Ownable Feature flag detected, but no action assembly or service method
renounce_role(e, role, caller) AccessControl hasRenounceRole hardcoded to false — no action or service method
renounce_admin(e) AccessControl No shared interface capability — not wired at all

The EVM adapter (adapter-evm-core) already implements renounceOwnership and renounceRole with full feature detection, action assembly, and service methods. The Stellar adapter should reach parity.

Context

  • The EVM adapter was implemented in branch 011-evm-access-control.
  • The Stellar feature-detection.ts already sets hasRenounceOwnership = true when the schema contains renounce_ownership, but the service has no corresponding method — clicking the UI button would throw "not supported by this adapter".
  • hasRenounceRole is hardcoded to false with the comment "Stellar uses revokeRole for self-revocation", which is inaccurate — the on-chain contracts have a dedicated renounce_role function.

Tasks

1. renounceOwnership

  • Add assembleRenounceOwnershipAction() in adapter-stellar/src/access-control/actions.ts — invoke renounce_ownership() with no args
  • Add renounceOwnership() method on StellarAccessControlService
  • Add tests

2. renounceRole

  • Add assembleRenounceRoleAction() in adapter-stellar/src/access-control/actions.ts — invoke renounce_role(role, caller)
  • Add renounceRole() method on StellarAccessControlService
  • Update feature detection: derive hasRenounceRole from schema (check for renounce_role) instead of hardcoding false
  • Add tests

3. renounceAdmin (optional / future)

  • Evaluate whether to add a hasRenounceAdmin capability to the shared AccessControlCapabilities type
  • If added, implement assembleRenounceAdminAction() and service method
  • Note: no EVM equivalent exists — this would be Stellar-specific

References

  • Stellar contracts source: stellar-contracts/packages/access/src/ownable/storage.rs and stellar-contracts/packages/access/src/access_control/storage.rs
  • EVM adapter implementation: adapter-evm-core/src/access-control/actions.ts, adapter-evm-core/src/access-control/service.ts
  • Shared types: ui-types/src/adapters/access-control.ts (AccessControlCapabilities)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeststellarStellar Ecosystem Related Issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions