Governance Timelock
src/controllers/GovernanceTimelock.sol
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.
_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.
_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.
setAdmin
Changes the admin, who is authorised to schedule transactions. This function can only be called by the time lock contract itself.
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 forGovernanceTimelock
contract
Last updated