Permissions

The access control module of Fei Protocol Core

Contract

Permissions.sol implements IPermissions, AccessControl

Description

The access control module of the Core contract. It maintains which roles exist, role admins, and which addresses have which roles.

The contract expands the OpenZeppelin Access Control contract with additional Fei Protocol-specific roles and functionality.

Granting and revoking roles is gated for only Governor ⚖️ access. The Guardian🛡role can also revoke roles in certain circumstances.

Read-Only Functions

isBurner

function isBurner(address _address) external view returns (bool);

returns true if _address has the Burner🔥role

isMinter

function isMinter(address _address) external view returns (bool);

returns true if _address has the Minter💰role

isGovernor

function isGovernor(address _address) external view returns (bool);

returns true if _address has the Governor⚖️role

isGuardian

function isGuardian(address _address) external view returns (bool);

returns true if _address has the Guardian🛡role

isPCVController

function isPCVController(address _address) external view returns (bool);

returns true if _address has the PCV Controller⚙️role

Governor-Only⚖️ State-Changing Functions

createRole

function createRole(bytes32 role, bytes32 adminRole) external;

assigns role role a new admin role adminRole

This function can be used either to create a new access control role or reassign an admin for an existing role.

grantMinter

function grantMinter(address minter) external;

assigns Minter💰role to minter

grantBurner

function grantBurner(address burner) external;

assigns Burner🔥role to burner

grantPCVController

function grantPCVController(address pcvController) external;

assigns PCV Controller⚙️ role to pcvController

grantGovernor

function grantGovernor(address governor) external;

assigns Governor⚖️role to governor

grantGuardian

function grantGuardian(address guardian) external;

assigns Guardian🛡role to guardian

revokeMinter

function revokeMinter(address minter) external;

revokes Minter💰role from minter

revokeBurner

function revokeBurner(address burner) external;

revokes Burner🔥role from burner

revokePCVController

function revokePCVController(address pcvController) external;

revokes PCV Controller⚙️ role from pcvController

revokeGovernor

function revokeGovernor(address governor) external;

revokes Governor⚖️role from governor

revokeGuardian

function revokeGuardian(address guardian) external;

revokes Guardian🛡role from guardian

Guardian-Only🛡State-Changing Functions

revokeOverride

function revokeOverride(bytes32 role, address account) external;

revokes role from account

fails if role is equal to Governor⚖️

ABIs