Skip to content

Implement owner/admin access control and emergency controls #5

Description

@Divineifed1

Description: Add a robust access control layer to all contracts using Soroban's Address type and an Authorized trait pattern. Include owner-only functions and an emergency pause mechanism.

Acceptance Criteria:

Base Ownable module with owner: Address set at __constructor or first call
transfer_ownership(new_owner: Address) – owner-only; emits OwnershipTransferred
renounce_ownership() – permanent; sets owner to zero address
Pausable module with paused: bool state
pause() / unpause() – owner-only functions toggling paused state
Critical functions (vote, create_prediction, resolve_prediction) check !paused before execution
_only_owner(caller: Address) internal helper panics with AccessDenied if caller != owner
_only_authorized(caller, authorized_list: Vec

) helper for multi-admin scenarios
All admin functions emit events
Documentation in code comments explaining the AC model

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions