Skip to main content

IGracePeriod

Git Source

Title: IGracePeriod

The external interface of a contract that exposes a grace window measured from a reference timestamp, along with the events and errors related to its configuration and enforcement.

Functions​

setGracePeriod​

Updates the grace window to the supplied length in seconds.

function setGracePeriod(uint32 period_) external;

Parameters

NameTypeDescription
period_uint32The new length of the grace window in seconds.

gracePeriod​

Returns the configured grace window in seconds.

function gracePeriod() external view returns (uint32 period);

Returns

NameTypeDescription
perioduint32The length of the grace window in seconds.

Events​

GracePeriodSet​

Emitted when the grace window is configured.

event GracePeriodSet(uint32 period);

Parameters

NameTypeDescription
perioduint32The new length of the grace window in seconds.

Errors​

GracePeriod_Expired​

Thrown when an operation gated by the grace window is invoked after the window has elapsed.

error GracePeriod_Expired(uint48 deadline);

Parameters

NameTypeDescription
deadlineuint48The timestamp at which the grace window ended.

GracePeriod_ZeroPeriod​

Thrown when the grace window is configured with a zero length, which would otherwise prevent any grace-gated operation from succeeding.

error GracePeriod_ZeroPeriod();

GracePeriod_NotConfigurable​

Thrown when a call to setGracePeriod is rejected because the implementation has locked the grace window.

error GracePeriod_NotConfigurable();