JBRuleset
JBRuleset
timestamps are unix timestamps (seconds since 00:00 January 1st, 1970 UTC).
Notes:
-
member: cycleNumber The ruleset's cycle number. Each ruleset's
cycleNumber
is the previous ruleset'scycleNumber
plus one. Each project's first ruleset has acycleNumber
of 1. -
member: id The ruleset's ID, which is a timestamp of when this ruleset's rules were initialized. The
rulesetId
stays the same for rulesets that automatically cycle over from a manually queued ruleset. -
member: basedOnId The
rulesetId
of the ruleset which was active when this ruleset was created. -
member: start The timestamp from which this ruleset is considered active.
-
member: duration The number of seconds the ruleset lasts for. After this duration, a new ruleset will start. The project owner can queue new rulesets at any time, which will take effect once the current ruleset's duration is over. If the
duration
is 0, newly queued rulesets will take effect immediately. If a ruleset ends and there are no new rulesets queued, the current ruleset cycles over to another one with the same properties but a newstart
timestamp and aweight
reduced by the ruleset'sweightCutPercent
. -
member: weight A fixed point number with 18 decimals which is typically used by payment terminals to determine how many tokens should be minted when a payment is received. This can be used by other contracts for arbitrary calculations.
-
member: weightCutPercent The percentage by which to reduce the
weight
each time a new ruleset starts.weight
is a percentage out ofJBConstants.MAX_WEIGHT_CUT_PERCENT
. If it's 0, the next ruleset will have the sameweight
by default. If it's 90%, the next ruleset'sweight
will be 10% smaller. If a ruleset explicitly sets a newweight
, theweightCutPercent
doesn't apply. -
member: approvalHook An address of a contract that says whether a queued ruleset should be approved or rejected. If a ruleset is rejected, it won't go into effect. An approval hook can be used to create rules which dictate how a project owner can change their ruleset over time.
-
member: metadata Extra data associated with a ruleset which can be used by other contracts.
struct JBRuleset {
uint48 cycleNumber;
uint48 id;
uint48 basedOnId;
uint48 start;
uint32 duration;
uint112 weight;
uint32 weightCutPercent;
IJBRulesetApprovalHook approvalHook;
uint256 metadata;
}