# IGovernable

[Git Source](https://github.com/isle-labs/isle-contract/blob/main/contracts/interfaces/IGovernable.sol)

Contract module that provides a basic access control mechanism, with a governor that can be granted exclusive access to specific functions. The inheriting contract must set the initial governor in the constructor.

## Functions

### governor

The address of the governor account or contract.

```solidity
function governor() external view returns (address governor_);
```

### pendingGovernor

The address of the pending governor account or contract.

```solidity
function pendingGovernor() external view returns (address pendingGovernor_);
```

### nominateGovernor

Configure the pendingGovernor to newGovnernor parameter.

*Does not revert if the pendingGovernor is the same, or there is already a pendingGovernor address.*

```solidity
function nominateGovernor(address newGovernor) external;
```

**Parameters**

| Name          | Type      | Description                                                 |
| ------------- | --------- | ----------------------------------------------------------- |
| `newGovernor` | `address` | The nominated governor, it will become the pendingGovernor. |

### acceptGovernor

The pending governor should accept and become the governor.

*Only the pendingGovernor can trigger this function.*

```solidity
function acceptGovernor() external;
```

### cancelPendingGovenor

Cancel the nominated pending governor.

*Only the governor can trigger this function*

```solidity
function cancelPendingGovenor() external;
```

## Events

### AcceptGovernor

Emitted when the pendingGovernor is accepted.

```solidity
event AcceptGovernor(address indexed oldGovernor, address indexed newGovernor);
```

**Parameters**

| Name          | Type      | Description                      |
| ------------- | --------- | -------------------------------- |
| `oldGovernor` | `address` | The address of the old governor. |
| `newGovernor` | `address` | The address of the new governor. |

### NominateGovernor

Emitted when the pendingGovernor is nominated.

*Configure the pending governor value, not revert if the pending governor is not zero address*

```solidity
event NominateGovernor(address indexed governor, address indexed pendingGovernor);
```

**Parameters**

| Name              | Type      | Description                            |
| ----------------- | --------- | -------------------------------------- |
| `governor`        | `address` | The address of original governor       |
| `pendingGovernor` | `address` | The address of the new pendingGovernor |

### CancelPendingGovernor

Emitted when the pendingGovernor is reset to zero address

*Reset the pending governor to zero address*

```solidity
event CancelPendingGovernor(address indexed oldPendingGovernor);
```

**Parameters**

| Name                 | Type      | Description                              |
| -------------------- | --------- | ---------------------------------------- |
| `oldPendingGovernor` | `address` | The original configured pending governor |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.isle.finance/contract-documentation/interfaces/igovernable.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
