FundingCycles
Mainnet: 0xf507B2A1dD7439201eb07F11E1d62AfB29216e2E
Inherits: TerminalUtility
, IFundingCycles
Manage funding cycle configurations, accounting, and scheduling.
State Variables
SECONDS_IN_DAY
uint256 private constant SECONDS_IN_DAY = 86400;
_packedConfigurationPropertiesOf
mapping(uint256 => uint256) private _packedConfigurationPropertiesOf;
_packedIntrinsicPropertiesOf
mapping(uint256 => uint256) private _packedIntrinsicPropertiesOf;
_metadataOf
mapping(uint256 => uint256) private _metadataOf;
_targetOf
mapping(uint256 => uint256) private _targetOf;
_tappedOf
mapping(uint256 => uint256) private _tappedOf;
BASE_WEIGHT
The weight used for each project's first funding cycle.
uint256 public constant override BASE_WEIGHT = 1e24;
MAX_CYCLE_LIMIT
The maximum value that a cycle limit can be set to.
uint256 public constant override MAX_CYCLE_LIMIT = 32;
latestIdOf
The ID of the latest funding cycle for each project.
mapping(uint256 => uint256) public override latestIdOf;
count
The total number of funding cycles created, which is used for issuing funding cycle IDs.
Funding cycles have IDs > 0.
uint256 public override count = 0;
Functions
get
Get the funding cycle with the given ID.
function get(uint256 _fundingCycleId) external view override returns (FundingCycle memory);
Parameters
Name | Type | Description |
---|---|---|
_fundingCycleId | uint256 | The ID of the funding cycle to get. |
Returns
Name | Type | Description |
---|---|---|
<none> | FundingCycle | _fundingCycle The funding cycle. |
queuedOf
The funding cycle that's next up for a project, and therefor not currently accepting payments.
This runs roughly similar logic to _configurable
.
function queuedOf(uint256 _projectId) external view override returns (FundingCycle memory);
Parameters
Name | Type | Description |
---|---|---|
_projectId | uint256 | The ID of the project being looked through. |
Returns
Name | Type | Description |
---|---|---|
<none> | FundingCycle | _fundingCycle The queued funding cycle. |
currentOf
The funding cycle that is currently active for the specified project.
This runs very similar logic to _tappable
.
function currentOf(uint256 _projectId) external view override returns (FundingCycle memory fundingCycle);
Parameters
Name | Type | Description |
---|---|---|
_projectId | uint256 | The ID of the project being looked through. |
Returns
Name | Type | Description |
---|---|---|
fundingCycle | FundingCycle | The current funding cycle. |
currentBallotStateOf
The currency ballot state of the project.
function currentBallotStateOf(uint256 _projectId) external view override returns (BallotState);
Parameters
Name | Type | Description |
---|---|---|
_projectId | uint256 | The ID of the project to check for a pending reconfiguration. |
Returns
Name | Type | Description |
---|---|---|
<none> | BallotState | The current ballot's state. |