> For the complete documentation index, see [llms.txt](https://docs.fathom.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fathom.fi/dao/interfaces/governance/timelockcontroller.md).

# TimelockController

The `TimelockController` is a contract designed to add a delay between the initiation and execution of governance proposals as a security measure. It ensures that actions intended by governance are delayed by a minimum time period (configurable), allowing the community to prepare or respond to upcoming changes. This contract operates with role-based permissions for proposing, executing, and canceling scheduled operations. It supports batch operations and manages operational prerequisites to ensure that proposals are executed in the correct sequence and timing

### Set Functions

#### **schedule**

* **Arguments:**
  * **target** (address): The target address for the operation.
  * **value** (uint256): The amount of ether to send with the operation.
  * **data** (bytes): The data payload for the operation.
  * **predecessor** (bytes32): The identifier of the preceding operation.
  * **salt** (bytes32): A salt to ensure uniqueness of the operation's hash.
  * **delay** (uint256): The delay before the operation can be executed.
* **Description:** Schedules an operation to be executed after a specified delay.

#### **scheduleBatch**

* **Arguments:**
  * **targets** (address\[]): Array of target addresses for the batch operation.
  * **values** (uint256\[]): Array of ether amounts to send with each operation.
  * **payloads** (bytes\[]): Array of data payloads for each operation.
  * **predecessor** (bytes32): The identifier of the preceding operation.
  * **salt** (bytes32): A salt to ensure uniqueness of the batch operation's hash.
  * **delay** (uint256): The delay before the batch operation can be executed.
* **Description:** Schedules a batch of operations to be executed after a specified delay.

#### **cancel**

* **Arguments:**
  * **id** (bytes32): The unique identifier of the operation to cancel.
* **Description:** Cancels a scheduled operation.

#### **execute**

* **Arguments:**
  * **target** (address): The target address for the operation.
  * **value** (uint256): The amount of ether to send with the operation.
  * **payload** (bytes): The data payload for the operation.
  * **predecessor** (bytes32): The identifier of the preceding operation.
  * **salt** (bytes32): A salt to ensure uniqueness of the operation's hash.
* **Description:** Executes a scheduled operation if it is ready and all prerequisites are met.

#### **executeBatch**

* **Arguments:**
  * **targets** (address\[]): Array of target addresses for the batch operation.
  * **values** (uint256\[]): Array of ether amounts to send with each operation.
  * **payloads** (bytes\[]): Array of data payloads for each operation.
  * **predecessor** (bytes32): The identifier of the preceding operation.
  * **salt** (bytes32): A salt to ensure uniqueness of the batch operation's hash.
* **Description:** Executes a batch of scheduled operations if they are ready and all prerequisites are met.

#### **updateDelay**

* **Arguments:**
  * **newDelay** (uint256): The new minimum delay for operations to be executed.
* **Description:** Updates the minimum delay for all future operations.

#### **grantRoleByAdmin**

* **Arguments:**
  * **role** (bytes32): The role identifier.
  * **account** (address): The address to be granted the role.
* **Description:** Grants a specified role to an account, callable only by admin.

#### **revokeRoleByAdmin**

* **Arguments:**
  * **role** (bytes32): The role identifier.
  * **account** (address): The address from which to revoke the role.
* **Description:** Revokes a specified role from an account, callable only by admin.

### Events

#### **CallScheduled**

* **Parameters:**
  * **id** (bytes32): Unique identifier of the operation.
  * **index** (uint256): Index of the specific call in the batch operation.
  * **target** (address): Address of the contract targeted by the call.
  * **value** (uint256): Ether value, in wei, to be sent with the call.
  * **data** (bytes): Data payload to be sent to the target.
  * **predecessor** (bytes32): Identifier of the operation that must be completed before this one.
  * **delay** (uint256): Delay before the operation becomes valid.
* **Description:** Emitted when an operation is scheduled.

#### **CallExecuted**

* **Parameters:**
  * **id** (bytes32): Unique identifier of the executed operation.
  * **index** (uint256): Index of the specific call in the batch operation.
  * **target** (address): Address of the contract targeted by the call.
  * **value** (uint256): Ether value, in wei, used in the call.
  * **data** (bytes): Data payload sent to the target.
* **Description:** Emitted when an operation is successfully executed.

#### **Cancelled**

* **Parameters:**
  * **id** (bytes32): Unique identifier of the operation that was cancelled.
* **Description:** Emitted when a scheduled operation is cancelled.

#### **MinDelayChange**

* **Parameters:**
  * **oldDuration** (uint256): Previous minimum delay before operations can be executed.
  * **newDuration** (uint256): New minimum delay before operations can be executed.
* **Description:** Emitted when the minimum delay for operations is changed.

#### **ExecuteTransaction**

* **Parameters:**
  * **owner** (address): Address initiating the transaction.
  * **success** (bool): Status of the transaction execution.
  * **data** (bytes): Data payload used in the transaction.
* **Description:** Emitted after an execution attempt, detailing the result.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.fathom.fi/dao/interfaces/governance/timelockcontroller.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
