MakinaXGovernable
Inherits: Initializable, IMakinaXGovernable
State Variables
safe
Address of the Safe.
address public override safe;Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
provider
Address of the MakinaX service account.
address public override provider;Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
isOperator
Account => Whether the account is an operator.
mapping(address account => bool isOperator) public override isOperator;Parameters
| Name | Type | Description |
|---|---|---|
| account | address |
Returns
| Name | Type | Description |
|---|---|---|
| isOperator | bool |
isGuardian
Account => Whether the account is a guardian.
mapping(address account => bool isGuardian) public override isGuardian;Parameters
| Name | Type | Description |
|---|---|---|
| account | address |
Returns
| Name | Type | Description |
|---|---|---|
| isGuardian | bool |
paused
True if the contract is paused by a guardian, false otherwise.
bool public override paused;Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
suspendedByProvider
True if the contract is suspended by the provider, false otherwise.
bool public override suspendedByProvider;Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
operatingMode
Current operating mode of the contract.
OperatingMode public override operatingMode;Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint8 |
Functions
__MakinaXGovernable_init
function __MakinaXGovernable_init(address _safe, address _provider, OperatingMode _initialOperatingMode)
internal
onlyInitializing;Parameters
| Name | Type | Description |
|---|---|---|
| _safe | address | |
| _provider | address | |
| _initialOperatingMode | OperatingMode |
onlySafe
modifier onlySafe();onlyProvider
modifier onlyProvider();onlyOperator
modifier onlyOperator();onlyGuardian
modifier onlyGuardian();whenOperational
modifier whenOperational();setProvider
Sets the provider address.
function setProvider(address newProvider) external override onlyProvider;Parameters
| Name | Type | Description |
|---|---|---|
| newProvider | address | The address of the new provider. |
addOperator
Adds a new operator.
function addOperator(address newOperator) external override onlySafe;Parameters
| Name | Type | Description |
|---|---|---|
| newOperator | address | The address of the new operator. |
removeOperator
Removes an operator.
function removeOperator(address operator) external override onlySafe;Parameters
| Name | Type | Description |
|---|---|---|
| operator | address | The address of the operator to remove. |
addGuardian
Adds a new guardian.
function addGuardian(address newGuardian) external override onlySafe;Parameters
| Name | Type | Description |
|---|---|---|
| newGuardian | address | The address of the new guardian. |
removeGuardian
Removes a guardian.
function removeGuardian(address guardian) external override onlySafe;Parameters
| Name | Type | Description |
|---|---|---|
| guardian | address | The address of the guardian to remove. |
setOperatingMode
Sets the operating mode.
function setOperatingMode(OperatingMode newMode) external override onlySafe;Parameters
| Name | Type | Description |
|---|---|---|
| newMode | OperatingMode | The operating mode to set. |
suspend
Suspends operations. Used by the provider to enforce service restrictions.
function suspend() external override onlyProvider;unsuspend
Restores operations after a provider suspension.
function unsuspend() external override onlyProvider;pause
Pauses operations. Used by a guardian in case of emergency.
function pause() external override onlyGuardian;unpause
Unpauses operations after an emergency pause.
function unpause() external override onlyGuardian;_setProvider
Internal function to update the MakinaX service account.
function _setProvider(address newProvider) internal;Parameters
| Name | Type | Description |
|---|---|---|
| newProvider | address |
_addGuardian
Internal logic to add a new guardian.
function _addGuardian(address newGuardian) internal;Parameters
| Name | Type | Description |
|---|---|---|
| newGuardian | address |
_setOperatingMode
Internal logic to update the operating mode.
function _setOperatingMode(OperatingMode newMode) internal;Parameters
| Name | Type | Description |
|---|---|---|
| newMode | OperatingMode |