---
description: src/controllers/GovernanceTimelock.sol
---

# Governance Timelock

The `GovernanceTimelock` contract is deployed on all destination chains. Its role is to delay all governance action messages for a specific period of time before they can be executed. The main purpose of this delay is to give Uniswap stakeholders on destination chains enough time to respond to any invalid governance decisions that may be submitted due to compromised AMBs.

The `GovernanceTimelock` is also the global owner of all components on the destination chain. It has ownership of the `MultiBridgeMessageReceiver` contract and all receiver adapters on the destination chain. This ensures that the Uniswap DAO on Ethereum has exclusive control over key protocol parameters and that any changes to these parameters must follow the same governance process and delays required for other governance messages.

### Features

* schedule governance messages for execution after a pre-specified delay period
* execute transactions encoded in a message
* update time lock delay parameters

### Functions

**scheduleTransaction**

schedules a given transaction for execution after a pre-configured `delay` paramter. This function can only be called by the admin, which corresponds to the `MultiBrigeMessageReceiver` on the destination chain.&#x20;

{% code overflow="wrap" %}
```solidity
function scheduleTransaction(address _target, uint256 _value, bytes memory _data) external onlyAdmin
```
{% endcode %}

* `_target` is the address to call by low-level call
* `_value` is the value to pass to target by low-level call
* `_data` is the abieencoded function selector and arguments data, to execute on target



**executeTransaction**

Executes a previously scheduled transaction if it has reached its ETA, but has not exceeded a grace period beyond that.

```solidity
function executeTransaction(uint256 _txId, address _target, uint256 _value, bytes memory _data, uint256 _eta)
external payable;
```

* `_txId` is the unique identifier of the executed transaction, generated when the transaction was scheduled
* `_target` is the address to call by low-level call
* `_value` is the value to pass to target by low-level call
* `_data` is the abieencoded function selector and arguments data, to execute on target
* `_eta` is the timestamp after which the transaction should be executed



**setDelay**

Changes the time period that transactions must be queued for before they can be executed. This function can only be called by the time lock contract itself.&#x20;

```solidity
function setDelay(uint256 _delay) external override onlySelf
```

**setAdmin**

Changes the admin, who is authorised to schedule transactions. This function can only be called by the time lock contract itself.

```solidity
function setAdmin(address _newAdmin) external override onlySelf
```

### Events

* `TransactionScheduled`: emitted when a transaction is scheduled for execution.
* `TransactionExecuted`: emitted when a transaction is executed.
* `DelayUpdated`: emitted when the time delay parameter is updated.
* `AdminUpdated`: emitted when the admin that can schedule transactions is changed.

### Dependencies

* `IGovernanceTimelock`: interface for `GovernanceTimelock` contract

