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
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
) helper for multi-admin scenariostransfer_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
All admin functions emit events
Documentation in code comments explaining the AC model