OpenZeppelin / OpenZeppelin/ui-builder
Implement renounce operations in the Stellar access control adapter
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 48
- Forks
- 23
- Avg merge
- 3h 1m
- Merged PRs (30d)
- 10
Description
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.tsalready setshasRenounceOwnership = truewhen the schema containsrenounce_ownership, but the service has no corresponding method — clicking the UI button would throw "not supported by this adapter". hasRenounceRoleis hardcoded tofalsewith the comment "Stellar uses revokeRole for self-revocation", which is inaccurate — the on-chain contracts have a dedicatedrenounce_rolefunction.
Tasks
1. renounceOwnership
- Add
assembleRenounceOwnershipAction()inadapter-stellar/src/access-control/actions.ts— invokerenounce_ownership()with no args - Add
renounceOwnership()method onStellarAccessControlService - Add tests
2. renounceRole
- Add
assembleRenounceRoleAction()inadapter-stellar/src/access-control/actions.ts— invokerenounce_role(role, caller) - Add
renounceRole()method onStellarAccessControlService - Update feature detection: derive
hasRenounceRolefrom schema (check forrenounce_role) instead of hardcodingfalse - Add tests
3. renounceAdmin (optional / future)
- Evaluate whether to add a
hasRenounceAdmincapability to the sharedAccessControlCapabilitiestype - 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.rsandstellar-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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with adapter-stellar/src/access-control/actions.ts, the Stellar access-control service, and feature-detection.ts; compare their structure with adapter-evm-core/src/access-control/actions.ts and service.ts. Review ui-types/src/adapters/access-control.ts and the referenced Stellar contract storage files before adding tests. Done means ownership and role renunciation are assembled, exposed by the service, detected from the schema, and covered by tests; the optional admin work requires a separate capability decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100