Documentation Index
Fetch the complete documentation index at: https://docs-preview.infinifi.xyz/llms.txt
Use this file to discover all available pages before exploring further.
InfiniFiCore.sol
Purpose: Establishes the central authority for role-based access control across the InfiniFi protocol.Description
InfiniFiCore is the foundational contract responsible for maintaining and enforcing hierarchical role-based permissions throughout the InfiniFi system. Every contract requiring access control should delegate role checks to this core registry.
Constructor
Initializes the core roles structure. The deployer is granted theGOVERNOR role and all critical admin roles are explicitly set under the GOVERNOR’s authority.
Errors
| Error | Description |
|---|---|
RoleAlreadyExists(bytes32 role) | Thrown when re-registering an existing role |
RoleDoesNotExist(bytes32 role) | Thrown when accessing undefined role |
LengthMismatch(uint256, uint256) | Thrown on array length mismatch in batch operations |
Functions
createRole
role: The new role identifieradminRole: The admin role that governs the new role
setRoleAdmin
grantRoles
Caller must have administrative rights over each role being granted.