Skip to main content
A setup transaction activates a timelock with an accidentally short delay. This example rejects activation unless the stored delay is within the configured range.

Behavior

At transaction end, TimelockVerificationAssertion reads delay slot 0 and active flag slot 1. On an inactive-to-active transition, it requires a delay from one day through two weeks, inclusive. If the timelock was already active, it returns without checking the delay.

Configuration

Replace the two slots and the minimum and maximum delays with your deployment’s layout and policy. The example has no constructor arguments. It assumes the active flag is decoded from a dedicated slot.

Scenarios

Coverage limits

This does not verify that an operation was queued, that its waiting period elapsed, or that execution used the approved payload. Those properties require the timelock’s operation ID, schedule, and execution state. Rename the policy accordingly when you adapt it; a valid activation delay is not proof of delayed execution.

Source

The reviewed source is a teaching template. The example setup guide provides the pinned checkout and test procedure.