latestConfiguredOf
Contract: JBFundingCycleStore
Interface: IJBFundingCycleStore
- Step by step
 - Code
 - Bug bounty
 
The latest funding cycle to be configured for the specified project, and its current ballot state.
Definition
function latestConfiguredOf(uint256 _projectId)
  external
  view
  override
  returns (JBFundingCycle memory fundingCycle, JBBallotState ballotState) { ... }
- Arguments:
_projectIdis the ID of the project to get the latest configured funding cycle of.
 - The view function can be accessed externally by anyone.
 - The view function does not alter state on the blockchain.
 - The function overrides a function definition from the 
IJBFundingCycleStoreinterface. - The function returns:
fundingCycleis the latest configured funding cycle.ballotStateis theJBBallotStateof the ballot for the reconfiguration.
 
Body
- 
Get a reference to the latest funding cycle for the project.
// Get a reference to the latest funding cycle configuration.
uint256 _fundingCycleConfiguration = latestConfigurationOf[_projectId];Internal references:
 - 
Get a reference to the funding cycle for the latest configuration.
// Resolve the funding cycle for the for the latest configuration.
fundingCycle = _getStructFor(_projectId, _fundingCycleConfiguration);Internal references:
 - 
Return the ballot state of the latest funding cycle configuration as is determined by the current configuration and the funding cycle it's based on.
// Resolve the ballot state.
ballotState = _ballotStateOf(
_projectId,
fundingCycle.configuration,
fundingCycle.start,
fundingCycle.basedOn
);Internal references:
 
/**
  @notice
  The latest funding cycle to be configured for the specified project, and its current ballot state.
  @param _projectId The ID of the project to get the latest configured funding cycle of.
  @return fundingCycle The project's queued funding cycle.
  @return ballotState The state of the ballot for the reconfiguration.
*/
function latestConfiguredOf(uint256 _projectId)
  external
  view
  override
  returns (JBFundingCycle memory fundingCycle, JBBallotState ballotState)
{
  // Get a reference to the latest funding cycle configuration.
  uint256 _fundingCycleConfiguration = latestConfigurationOf[_projectId];
  // Resolve the funding cycle for the latest configuration.
  fundingCycle = _getStructFor(_projectId, _fundingCycleConfiguration);
  // Resolve the ballot state.
  ballotState = _ballotStateOf(
    _projectId,
    fundingCycle.configuration,
    fundingCycle.start,
    fundingCycle.basedOn
  );
}
| Category | Description | Reward | 
|---|---|---|
| Optimization | Help make this operation more efficient. | 0.5ETH | 
| Low severity | Identify a vulnerability in this operation that could lead to an inconvenience for a user of the protocol or for a protocol developer. | 1ETH | 
| High severity | Identify a vulnerability in this operation that could lead to data corruption or loss of funds. | 5+ETH |