MakinaGovernable
Inherits: AccessManagedUpgradeable, IMakinaGovernable
State Variables
MakinaGovernableStorageLocation
bytes32 private constant MakinaGovernableStorageLocation =
0x7e702089668346e906996be6de3dfc0cb2b0c125fc09b3c0391871825913e000;
Functions
_getMakinaGovernableStorage
function _getMakinaGovernableStorage() internal pure returns (MakinaGovernableStorage storage $);
constructor
constructor();
__MakinaGovernable_init
function __MakinaGovernable_init(MakinaGovernableInitParams calldata params) internal onlyInitializing;
onlyOperator
modifier onlyOperator();
onlyMechanic
modifier onlyMechanic();
onlySecurityCouncil
modifier onlySecurityCouncil();
onlyRiskManager
modifier onlyRiskManager();
onlyRiskManagerTimelock
modifier onlyRiskManagerTimelock();
notRecoveryMode
modifier notRecoveryMode();
onlyAccountingAuthorized
modifier onlyAccountingAuthorized();
mechanic
Address of the mechanic.
function mechanic() external view override returns (address);
securityCouncil
Address of the security council.
function securityCouncil() public view override returns (address);
riskManager
Address of the risk manager.
function riskManager() external view override returns (address);
riskManagerTimelock
Address of the risk manager timelock.
function riskManagerTimelock() external view override returns (address);
recoveryMode
True if the contract is in recovery mode, false otherwise.
function recoveryMode() external view returns (bool);
restrictedAccountingMode
True if the contract is in restricted accounting mode, false otherwise.
function restrictedAccountingMode() external view override returns (bool);
isAccountingAgent
User => Whether the user is an accounting agent
function isAccountingAgent(address user) external view override returns (bool);
isOperator
User => Whether the user is the current operator The operator is either the mechanic or the security council depending on the recovery mode.
function isOperator(address user) public view override returns (bool);
isAccountingAuthorized
User => Whether the user is authorized to perform accounting operations under current settings
function isAccountingAuthorized(address user) public view override returns (bool);
setMechanic
Sets a new mechanic.
function setMechanic(address newMechanic) external override restricted;
Parameters
| Name | Type | Description |
|---|---|---|
newMechanic | address | The address of new mechanic. |
setSecurityCouncil
Sets a new security council.
function setSecurityCouncil(address newSecurityCouncil) external override restricted;
Parameters
| Name | Type | Description |
|---|---|---|
newSecurityCouncil | address | The address of the new security council. |
setRiskManager
Sets a new risk manager.
function setRiskManager(address newRiskManager) external override restricted;
Parameters
| Name | Type | Description |
|---|---|---|
newRiskManager | address | The address of the new risk manager. |
setRiskManagerTimelock
Sets a new risk manager timelock.
function setRiskManagerTimelock(address newRiskManagerTimelock) external override restricted;
Parameters
| Name | Type | Description |
|---|---|---|
newRiskManagerTimelock | address | The address of the new risk manager timelock. |
setRecoveryMode
Sets the recovery mode.
function setRecoveryMode(bool enabled) external onlySecurityCouncil;
Parameters
| Name | Type | Description |
|---|---|---|
enabled | bool | True to enable recovery mode, false to disable it. |
setRestrictedAccountingMode
Sets the restricted accounting mode.
function setRestrictedAccountingMode(bool enabled) external restricted;
Parameters
| Name | Type | Description |
|---|---|---|
enabled | bool | True to enable restricted accounting mode, false to disable it. |
addAccountingAgent
Adds a new accounting agent.
function addAccountingAgent(address newAgent) external override restricted;
Parameters
| Name | Type | Description |
|---|---|---|
newAgent | address | The address of the new accounting agent. |
removeAccountingAgent
Removes an accounting agent.
function removeAccountingAgent(address agent) external override restricted;
Parameters
| Name | Type | Description |
|---|---|---|
agent | address | The address of the accounting agent to remove. |
Structs
MakinaGovernableStorage
Note: storage-location: erc7201:makina.storage.MakinaGovernable
struct MakinaGovernableStorage {
address _mechanic;
address _securityCouncil;
address _riskManager;
address _riskManagerTimelock;
bool _recoveryMode;
bool _restrictedAccountingMode;
mapping(address user => bool isAccountingAgent) _isAccountingAgent;
}