MakinaGovernable
Inherits: AccessManagedUpgradeable, IMakinaGovernable
Constants
MakinaGovernableStorageLocation
bytes32 private constant MakinaGovernableStorageLocation =
0x7e702089668346e906996be6de3dfc0cb2b0c125fc09b3c0391871825913e000;Functions
_getMakinaGovernableStorage
function _getMakinaGovernableStorage() internal pure returns (MakinaGovernableStorage storage $);Returns
| Name | Type | Description |
|---|---|---|
| $ | MakinaGovernableStorage |
constructor
constructor();__MakinaGovernable_init
function __MakinaGovernable_init(MakinaGovernableInitParams calldata params) internal onlyInitializing;Parameters
| Name | Type | Description |
|---|---|---|
| params | MakinaGovernableInitParams |
onlyOperator
modifier onlyOperator();onlyMechanic
modifier onlyMechanic();onlySecurityCouncil
modifier onlySecurityCouncil();onlyRiskManager
modifier onlyRiskManager();onlyRiskManagerTimelock
modifier onlyRiskManagerTimelock();notRecoveryMode
modifier notRecoveryMode();onlyAccountingAuthorized
modifier onlyAccountingAuthorized();operator
Address of the current operator (mechanic or security council).
function operator() public view override returns (address);Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
mechanic
Address of the mechanic.
function mechanic() external view override returns (address);Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
securityCouncil
Address of the security council.
function securityCouncil() public view override returns (address);Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
riskManager
Address of the risk manager.
function riskManager() external view override returns (address);Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
riskManagerTimelock
Address of the risk manager timelock.
function riskManagerTimelock() external view override returns (address);Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
recoveryMode
True if the contract is in recovery mode, false otherwise.
function recoveryMode() external view override returns (bool);Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
restrictedAccountingMode
True if the contract is in restricted accounting mode, false otherwise.
function restrictedAccountingMode() external view override returns (bool);Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
isAccountingAgent
User => Whether the user is an accounting agent
function isAccountingAgent(address user) external view override returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
| user | address |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
isAccountingAuthorized
User => Whether the user is authorized to perform accounting operations under current settings
function isAccountingAuthorized(address user) public view override returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
| user | address |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
setMechanic
Sets a new mechanic.
function setMechanic(address newMechanic) external override restricted;Parameters
| Name | Type | Description |
|---|---|---|
| newMechanic | address | The address of the 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 override 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 override 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. |
_addAccountingAgent
Internal logic for adding an accounting agent.
function _addAccountingAgent(address newAgent) internal;Parameters
| Name | Type | Description |
|---|---|---|
| newAgent | address |
_removeAccountingAgent
Internal logic for removing an accounting agent.
function _removeAccountingAgent(address agent) internal;Parameters
| Name | Type | Description |
|---|---|---|
| agent | address |
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;
}Properties
| Name | Type | Description |
|---|---|---|
| _mechanic | address | |
| _securityCouncil | address | |
| _riskManager | address | |
| _riskManagerTimelock | address | |
| _recoveryMode | bool | |
| _restrictedAccountingMode | bool | |
| _isAccountingAgent | mapping(address user => bool isAccountingAgent) |