IGracePeriod
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
| Name | Type | Description |
|---|---|---|
| period_ | uint32 | The new length of the grace window in seconds. |
gracePeriod
Returns the configured grace window in seconds.
function gracePeriod() external view returns (uint32 period);
Returns
| Name | Type | Description |
|---|---|---|
| period | uint32 | The length of the grace window in seconds. |
Events
GracePeriodSet
Emitted when the grace window is configured.
event GracePeriodSet(uint32 period);
Parameters
| Name | Type | Description |
|---|---|---|
| period | uint32 | The 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
| Name | Type | Description |
|---|---|---|
| deadline | uint48 | The 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();