Skip to main content

reconfigureFundingCyclesOf

Contract: JBController​‌

Interface: IJBController

Proposes a configuration of a subsequent funding cycle that will take effect once the current one expires if it is approved by the current funding cycle's ballot.

Only a project's owner or a designated operator can configure its funding cycles.

Definition

function reconfigureFundingCyclesOf(
uint256 _projectId,
JBFundingCycleData calldata _data,
JBFundingCycleMetadata calldata _metadata,
uint256 _mustStartAtOrAfter,
JBGroupedSplits[] memory _groupedSplits,
JBFundAccessConstraints[] memory _fundAccessConstraints,
string calldata _memo
)
external
virtual
override
requirePermission(projects.ownerOf(_projectId), _projectId, JBOperations.RECONFIGURE)
returns (uint256 configuration) { ... }
  • Arguments:
    • _projectId is the ID of the project whose funding cycles are being reconfigured.
    • _data is a JBFundingCycleData data structure that defines the funding cycle. These properties will remain fixed for the duration of the funding cycle.
    • _metadata is a JBFundingCycleMetadata data structure specifying the controller specific params that a funding cycle can have. These properties will remain fixed for the duration of the funding cycle.
    • _mustStartAtOrAfter is the time before which the configured funding cycle cannot start.
    • _groupedSplits is an array of JBGroupedSplits data structures containing splits to set for any number of groups. The core protocol makes use of groups defined in JBSplitsGroups.
    • _fundAccessConstraints is an array of JBFundAccessConstraints data structures containing amounts that a project can use from its treasury for each payment terminal. Amounts are fixed point numbers using the same number of decimals as the accompanying terminal. The _distributionLimit and _overflowAllowance parameters must fit in a uint232. The _distributionLimit applies for each funding cycle, and the _overflowAllowance applies for the entirety of the configuration.
  • Through the requirePermission modifier, the function is only accessible by the project's owner, or from an operator that has been given the JBOperations.RECONFIGURE permission by the project owner for the provided _projectId.
  • The function can be overriden by inheriting contracts.
  • The function overrides a function definition from the IJBController interface.
  • The function returns the configuration of the funding cycle that was successfully updated.

Body

  1. Configure the project's funding cycle, fund access constraints, and splits. Get a reference to the resulting funding cycle's configuration.

    // Configure the next funding cycle.
    configuration = _configure(
    _projectId,
    _data,
    _metadata,
    _mustStartAtOrAfter,
    _groupedSplits,
    _fundAccessConstraints
    );

    Internal references:

  2. Emit a ReconfigureFundingCycles event with the relevant parameters.

    emit ReconfigureFundingCycles(configuration, _projectId, _memo, msg.sender);

    Event references: