Access Control Manager
The AccessControlManager (ACM) contract provides a centralized, fine-grained permission system for the Rheofi Protocol. It governs which addresses are authorized to call specific functions on specific contracts throughout the protocol.
Overview
The ACM implements role-based access control at the function level. Rather than relying solely on contract ownership, the protocol delegates permission checks to the ACM, enabling governance to grant or revoke specific permissions to individual accounts or contracts without modifying contract code. This architecture supports flexible, upgradeable access control across all protocol components.
Every privileged function in the Rheofi Protocol queries the ACM before execution, ensuring consistent and auditable permission enforcement.
Key Functions
giveCallPermission
Grants an account permission to call a specific function on a target contract.
function giveCallPermission(
address contractAddress,
string calldata functionSig,
address accountToPermit
) external;
revokeCallPermission
Revokes a previously granted permission.
function revokeCallPermission(
address contractAddress,
string calldata functionSig,
address accountToRevoke
) external;
isAllowedToCall
Checks whether an account has permission to call a specific function on a target contract.
function isAllowedToCall(
address account,
string calldata functionSig
) external view returns (bool);
hasPermission
Queries whether an account holds a specific permission for a contract-function pair.
function hasPermission(
address account,
address contractAddress,
string calldata functionSig
) external view returns (bool);