Skip to main content

IEnablerV2

Git Source

Inherits: IEnabler

Title: IEnablerV2

The external interface of an enableable contract that augments IEnabler with a per-transition event and a timestamp of the most recent transition.

The wire-level surface of IEnabler is preserved, so callers that target the legacy interface can continue to invoke enable and disable and observe Enabled and Disabled events without modification. The Transition event is emitted alongside the legacy events on every successful transition, and provides the caller, the direction, the calldata payload, and the timestamp at which the transition was applied.

Functions​

lastTransitionAt​

Returns the timestamp of the most recent transition between the enabled and disabled states.

function lastTransitionAt() external view returns (uint48 at);

Returns

NameTypeDescription
atuint48The timestamp of the most recent transition, or zero before the first enable.

Events​

Transition​

Emitted when the contract transitions between the enabled and disabled states.

The event is emitted in addition to the legacy Enabled and Disabled events, so off-chain consumers may rely on either surface. The data field is the raw calldata payload passed to enable or disable.

event Transition(address indexed by, bool indexed enable, bytes data, uint48 at);

Parameters

NameTypeDescription
byaddressThe address that initiated the transition.
enableboolTrue when the transition is from disabled to enabled, false otherwise.
databytesThe calldata payload supplied to the transition entry point.
atuint48The timestamp at which the transition was applied.