Skip to main content

JBDeadline

Git Source

Inherits: IJBRulesetApprovalHook

JBDeadline is a ruleset approval hook which rejects rulesets if they are not queued at least duration seconds before the current ruleset ends. In other words, rulesets must be queued before the deadline to take effect.

Project rulesets are stored in a queue. Rulesets take effect after the previous ruleset in the queue ends, and only if they are approved by the previous ruleset's approval hook.

State Variables

DURATION

The minimum number of seconds between the time a ruleset is queued and the time it starts. If the difference is greater than this number, the ruleset is Approved.

uint256 public immutable override DURATION;

Functions

constructor

constructor(uint256 duration);

Parameters

NameTypeDescription
durationuint256The minimum number of seconds between the time a ruleset is queued and the time it starts for it to be Approved.

approvalStatusOf

The approval status of a given ruleset.

function approvalStatusOf(uint256, uint256 rulesetId, uint256 start) public view override returns (JBApprovalStatus);

Parameters

NameTypeDescription
<none>uint256
rulesetIduint256The ID of the ruleset to check the status of.
startuint256The start timestamp of the ruleset to check the status of.

Returns

NameTypeDescription
<none>JBApprovalStatusThe ruleset's approval status.

supportsInterface

Indicates whether this contract adheres to the specified interface.

See IERC165-supportsInterface.

function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool);

Parameters

NameTypeDescription
interfaceIdbytes4The ID of the interface to check for adherence to.

Returns

NameTypeDescription
<none>boolA flag indicating if this contract adheres to the specified interface.