Skip to main content
Timelock is the owner of RiskRegistry, FeeCollector, and other governed contracts. A single proposer schedules calls, and anyone can execute them after minDelay. It holds no ETH, cannot change its delay, and does not delegatecall. Launch delay is 48 hours. Timelock lets you:
  • Let the proposer schedule a call to a target
  • Let anyone execute a scheduled call after the delay
  • Let the proposer cancel a pending call
  • Compute operation ids and read their ready times
Addresses per network. Every address is also on Addresses. The source code is src/governance/Timelock.sol on GitHub. The ABI is /abis/Timelock.json.

Write methods

schedule

Queues a call for execution at block.timestamp + minDelay. Proposer only. Reverts with ZeroAddress for a zero target and AlreadyScheduled if the same (target, data, salt) is already pending.
Proposer only. Reverts with NotProposer otherwise.
Input parameters Return values

execute

Runs a scheduled call once its ready time has passed. Anyone can call it. Reverts with UnknownOp if not scheduled, NotReady before the ready time, and ExecuteFailed if the target call reverts. The operation is cleared before the call.
Permissionless execution means a scheduled change will land as soon as anyone submits it after the delay.
Input parameters

cancel

Removes a pending operation. Proposer only. Reverts with UnknownOp if nothing is scheduled under id.
Proposer only.
Input parameters

Read methods

hashOp

Computes the operation id as keccak256(abi.encode(target, data, salt)). Input parameters Return values

Events

Scheduled

Fires when an operation is queued, with its target, calldata, salt, and ready time.

Executed

Fires after an operation runs successfully.

Cancelled

Fires when the proposer removes a pending operation.

Errors

ZeroAddress

The proposer or target was the zero address.

InvalidDelay

The constructor delay was below 10 seconds or above 30 days.

NotProposer

Only the proposer can schedule or cancel.

AlreadyScheduled

An identical operation is already pending.

UnknownOp

No operation is scheduled under this id.

NotReady

The delay has not passed yet.

ExecuteFailed

The target call reverted.