Skip to main content

_isApproved

Contract: JBFundingCycleStore

Checks to see if the provided funding cycle is approved according to the correct ballot.

Definition

function _isApproved(uint256 _projectId, JBFundingCycle memory _fundingCycle)
private
view
returns (bool) { ... }
  • Arguments:
    • _projectId is the ID of the project to which the funding cycle belongs.
    • _fundingCycle is the JBFundingCycle to get an approval flag for.
  • The view function is private to this contract.
  • The view function does not alter state on the blockchain.
  • The function returns the approval flag.

Body

  1. Check to see if the state of the ballot for the provided funding cycle configuration is approved. The ballot that should be used is that of the funding cycle that the provided one is based on. This is because each funding cycle's ballot dictates the approval conditions of the next proposed reconfiguration.

    return
    _ballotStateOf(
    _projectId,
    _fundingCycle.configuration,
    _fundingCycle.start,
    _fundingCycle.basedOn
    ) == JBBallotState.Approved;

    Enums used:

    Internal references: