Skip to main content
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 the GOVERNOR role and all critical admin roles are explicitly set under the GOVERNOR’s authority.
This is a one-time setup mechanism. After deployment, the deployer is expected to renounce their elevated privileges.

Errors

Functions

createRole

Creates a new access control role dynamically. Parameters:
  • role: The new role identifier
  • adminRole: The admin role that governs the new role

setRoleAdmin

Reassigns the admin controller for an existing role.

grantRoles

Batch operation to grant multiple roles to multiple accounts.
Caller must have administrative rights over each role being granted.