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
cycleNumberis the previous ruleset'scycleNumberplus one. Each project's first ruleset has acycleNumberof 1. -
member: id The ruleset's ID, which is a timestamp of when this ruleset's rules were initialized. The
rulesetIdstays the same for rulesets that automatically cycle over from a manually queued ruleset. -
member: basedOnId The
rulesetIdof 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
durationis 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 newstarttimestamp and aweightreduced 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
weighteach time a new ruleset starts.weightis a percentage out ofJBConstants.MAX_WEIGHT_CUT_PERCENT. If it's 0, the next ruleset will have the sameweightby default. If it's 90%, the next ruleset'sweightwill be 10% smaller. If a ruleset explicitly sets a newweight, theweightCutPercentdoesn'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;
}