@bananapus/core-v6 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGE_LOG.md +38 -13
- package/package.json +1 -1
- package/docs/book.css +0 -13
- package/docs/book.toml +0 -12
- package/docs/solidity.min.js +0 -74
- package/docs/src/README.md +0 -703
- package/docs/src/SUMMARY.md +0 -94
- package/docs/src/src/JBChainlinkV3PriceFeed.sol/contract.JBChainlinkV3PriceFeed.md +0 -83
- package/docs/src/src/JBChainlinkV3SequencerPriceFeed.sol/contract.JBChainlinkV3SequencerPriceFeed.md +0 -88
- package/docs/src/src/JBController.sol/contract.JBController.md +0 -1121
- package/docs/src/src/JBDeadline.sol/contract.JBDeadline.md +0 -84
- package/docs/src/src/JBDirectory.sol/contract.JBDirectory.md +0 -294
- package/docs/src/src/JBERC20.sol/contract.JBERC20.md +0 -190
- package/docs/src/src/JBFeelessAddresses.sol/contract.JBFeelessAddresses.md +0 -80
- package/docs/src/src/JBFundAccessLimits.sol/contract.JBFundAccessLimits.md +0 -253
- package/docs/src/src/JBMultiTerminal.sol/contract.JBMultiTerminal.md +0 -1472
- package/docs/src/src/JBPermissions.sol/contract.JBPermissions.md +0 -199
- package/docs/src/src/JBPrices.sol/contract.JBPrices.md +0 -154
- package/docs/src/src/JBProjects.sol/contract.JBProjects.md +0 -131
- package/docs/src/src/JBRulesets.sol/contract.JBRulesets.md +0 -677
- package/docs/src/src/JBSplits.sol/contract.JBSplits.md +0 -237
- package/docs/src/src/JBTerminalStore.sol/contract.JBTerminalStore.md +0 -591
- package/docs/src/src/JBTokens.sol/contract.JBTokens.md +0 -353
- package/docs/src/src/README.md +0 -25
- package/docs/src/src/abstract/JBControlled.sol/abstract.JBControlled.md +0 -64
- package/docs/src/src/abstract/JBPermissioned.sol/abstract.JBPermissioned.md +0 -84
- package/docs/src/src/abstract/README.md +0 -5
- package/docs/src/src/enums/JBApprovalStatus.sol/enum.JBApprovalStatus.md +0 -17
- package/docs/src/src/enums/README.md +0 -4
- package/docs/src/src/interfaces/IJBCashOutHook.sol/interface.IJBCashOutHook.md +0 -29
- package/docs/src/src/interfaces/IJBCashOutTerminal.sol/interface.IJBCashOutTerminal.md +0 -57
- package/docs/src/src/interfaces/IJBControlled.sol/interface.IJBControlled.md +0 -12
- package/docs/src/src/interfaces/IJBController.sol/interface.IJBController.md +0 -334
- package/docs/src/src/interfaces/IJBDirectory.sol/interface.IJBDirectory.md +0 -108
- package/docs/src/src/interfaces/IJBDirectoryAccessControl.sol/interface.IJBDirectoryAccessControl.md +0 -19
- package/docs/src/src/interfaces/IJBFeeTerminal.sol/interface.IJBFeeTerminal.md +0 -91
- package/docs/src/src/interfaces/IJBFeelessAddresses.sol/interface.IJBFeelessAddresses.md +0 -26
- package/docs/src/src/interfaces/IJBFundAccessLimits.sol/interface.IJBFundAccessLimits.md +0 -88
- package/docs/src/src/interfaces/IJBMigratable.sol/interface.IJBMigratable.md +0 -29
- package/docs/src/src/interfaces/IJBMultiTerminal.sol/interface.IJBMultiTerminal.md +0 -50
- package/docs/src/src/interfaces/IJBPayHook.sol/interface.IJBPayHook.md +0 -28
- package/docs/src/src/interfaces/IJBPayoutTerminal.sol/interface.IJBPayoutTerminal.md +0 -105
- package/docs/src/src/interfaces/IJBPermissioned.sol/interface.IJBPermissioned.md +0 -12
- package/docs/src/src/interfaces/IJBPermissions.sol/interface.IJBPermissions.md +0 -74
- package/docs/src/src/interfaces/IJBPermitTerminal.sol/interface.IJBPermitTerminal.md +0 -15
- package/docs/src/src/interfaces/IJBPriceFeed.sol/interface.IJBPriceFeed.md +0 -12
- package/docs/src/src/interfaces/IJBPrices.sol/interface.IJBPrices.md +0 -74
- package/docs/src/src/interfaces/IJBProjectUriRegistry.sol/interface.IJBProjectUriRegistry.md +0 -19
- package/docs/src/src/interfaces/IJBProjects.sol/interface.IJBProjects.md +0 -49
- package/docs/src/src/interfaces/IJBRulesetApprovalHook.sol/interface.IJBRulesetApprovalHook.md +0 -35
- package/docs/src/src/interfaces/IJBRulesetDataHook.sol/interface.IJBRulesetDataHook.md +0 -97
- package/docs/src/src/interfaces/IJBRulesets.sol/interface.IJBRulesets.md +0 -165
- package/docs/src/src/interfaces/IJBSplitHook.sol/interface.IJBSplitHook.md +0 -31
- package/docs/src/src/interfaces/IJBSplits.sol/interface.IJBSplits.md +0 -35
- package/docs/src/src/interfaces/IJBTerminal.sol/interface.IJBTerminal.md +0 -141
- package/docs/src/src/interfaces/IJBTerminalStore.sol/interface.IJBTerminalStore.md +0 -198
- package/docs/src/src/interfaces/IJBToken.sol/interface.IJBToken.md +0 -54
- package/docs/src/src/interfaces/IJBTokenUriResolver.sol/interface.IJBTokenUriResolver.md +0 -12
- package/docs/src/src/interfaces/IJBTokens.sol/interface.IJBTokens.md +0 -151
- package/docs/src/src/interfaces/README.md +0 -33
- package/docs/src/src/libraries/JBCashOuts.sol/library.JBCashOuts.md +0 -40
- package/docs/src/src/libraries/JBConstants.sol/library.JBConstants.md +0 -52
- package/docs/src/src/libraries/JBCurrencyIds.sol/library.JBCurrencyIds.md +0 -19
- package/docs/src/src/libraries/JBFees.sol/library.JBFees.md +0 -52
- package/docs/src/src/libraries/JBFixedPointNumber.sol/library.JBFixedPointNumber.md +0 -12
- package/docs/src/src/libraries/JBMetadataResolver.sol/library.JBMetadataResolver.md +0 -242
- package/docs/src/src/libraries/JBRulesetMetadataResolver.sol/library.JBRulesetMetadataResolver.md +0 -180
- package/docs/src/src/libraries/JBSplitGroupIds.sol/library.JBSplitGroupIds.md +0 -14
- package/docs/src/src/libraries/JBSurplus.sol/library.JBSurplus.md +0 -44
- package/docs/src/src/libraries/README.md +0 -12
- package/docs/src/src/periphery/JBDeadline1Day.sol/contract.JBDeadline1Day.md +0 -15
- package/docs/src/src/periphery/JBDeadline3Days.sol/contract.JBDeadline3Days.md +0 -15
- package/docs/src/src/periphery/JBDeadline3Hours.sol/contract.JBDeadline3Hours.md +0 -15
- package/docs/src/src/periphery/JBDeadline7Days.sol/contract.JBDeadline7Days.md +0 -15
- package/docs/src/src/periphery/JBMatchingPriceFeed.sol/contract.JBMatchingPriceFeed.md +0 -22
- package/docs/src/src/periphery/README.md +0 -8
- package/docs/src/src/structs/JBAccountingContext.sol/struct.JBAccountingContext.md +0 -20
- package/docs/src/src/structs/JBAfterCashOutRecordedContext.sol/struct.JBAfterCashOutRecordedContext.md +0 -43
- package/docs/src/src/structs/JBAfterPayRecordedContext.sol/struct.JBAfterPayRecordedContext.md +0 -42
- package/docs/src/src/structs/JBBeforeCashOutRecordedContext.sol/struct.JBBeforeCashOutRecordedContext.md +0 -45
- package/docs/src/src/structs/JBBeforePayRecordedContext.sol/struct.JBBeforePayRecordedContext.md +0 -41
- package/docs/src/src/structs/JBCashOutHookSpecification.sol/struct.JBCashOutHookSpecification.md +0 -22
- package/docs/src/src/structs/JBCurrencyAmount.sol/struct.JBCurrencyAmount.md +0 -17
- package/docs/src/src/structs/JBFee.sol/struct.JBFee.md +0 -20
- package/docs/src/src/structs/JBFundAccessLimitGroup.sol/struct.JBFundAccessLimitGroup.md +0 -39
- package/docs/src/src/structs/JBPayHookSpecification.sol/struct.JBPayHookSpecification.md +0 -22
- package/docs/src/src/structs/JBPermissionsData.sol/struct.JBPermissionsData.md +0 -21
- package/docs/src/src/structs/JBRuleset.sol/struct.JBRuleset.md +0 -55
- package/docs/src/src/structs/JBRulesetConfig.sol/struct.JBRulesetConfig.md +0 -51
- package/docs/src/src/structs/JBRulesetMetadata.sol/struct.JBRulesetMetadata.md +0 -79
- package/docs/src/src/structs/JBRulesetWeightCache.sol/struct.JBRulesetWeightCache.md +0 -16
- package/docs/src/src/structs/JBRulesetWithMetadata.sol/struct.JBRulesetWithMetadata.md +0 -16
- package/docs/src/src/structs/JBSingleAllowance.sol/struct.JBSingleAllowance.md +0 -26
- package/docs/src/src/structs/JBSplit.sol/struct.JBSplit.md +0 -49
- package/docs/src/src/structs/JBSplitGroup.sol/struct.JBSplitGroup.md +0 -17
- package/docs/src/src/structs/JBSplitHookContext.sol/struct.JBSplitHookContext.md +0 -29
- package/docs/src/src/structs/JBTerminalConfig.sol/struct.JBTerminalConfig.md +0 -16
- package/docs/src/src/structs/JBTokenAmount.sol/struct.JBTokenAmount.md +0 -23
- package/docs/src/src/structs/README.md +0 -25
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
# JBSplits
|
|
2
|
-
[Git Source](https://github.com/Bananapus/nana-core/blob/2998dca2fbd2658e2c8791d6dc8348147d69e28e/src/JBSplits.sol)
|
|
3
|
-
|
|
4
|
-
**Inherits:**
|
|
5
|
-
[JBControlled](/src/abstract/JBControlled.sol/abstract.JBControlled.md), [IJBSplits](/src/interfaces/IJBSplits.sol/interface.IJBSplits.md)
|
|
6
|
-
|
|
7
|
-
Stores and manages splits for each project.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## State Variables
|
|
11
|
-
### FALLBACK_RULESET_ID
|
|
12
|
-
The ID of the ruleset that will be checked if nothing was found in the provided rulesetId.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```solidity
|
|
16
|
-
uint256 public constant override FALLBACK_RULESET_ID = 0;
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
### _packedSplitParts1Of
|
|
21
|
-
Packed split data given the split's project, ruleset, and group IDs, as well as the split's index within
|
|
22
|
-
that group.
|
|
23
|
-
|
|
24
|
-
*`preferAddToBalance` in bit 0, `percent` in bits 1-32, `projectId` in bits 33-88, and `beneficiary` in bits
|
|
25
|
-
89-248*
|
|
26
|
-
|
|
27
|
-
**Note:**
|
|
28
|
-
return: The split's `preferAddToBalance`, `percent`, `projectId`, and `beneficiary` packed into one
|
|
29
|
-
`uint256`.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
```solidity
|
|
33
|
-
mapping(
|
|
34
|
-
uint256 projectId => mapping(uint256 rulesetId => mapping(uint256 groupId => mapping(uint256 index => uint256)))
|
|
35
|
-
) internal _packedSplitParts1Of;
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
### _packedSplitParts2Of
|
|
40
|
-
More packed split data given the split's project, ruleset, and group IDs, as well as the split's index
|
|
41
|
-
within that group.
|
|
42
|
-
|
|
43
|
-
*`lockedUntil` in bits 0-47, `hook` address in bits 48-207.*
|
|
44
|
-
|
|
45
|
-
*This packed data is often 0.*
|
|
46
|
-
|
|
47
|
-
**Note:**
|
|
48
|
-
return: The split's `lockedUntil` and `hook` packed into one `uint256`.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
```solidity
|
|
52
|
-
mapping(
|
|
53
|
-
uint256 projectId => mapping(uint256 rulesetId => mapping(uint256 groupId => mapping(uint256 index => uint256)))
|
|
54
|
-
) internal _packedSplitParts2Of;
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
### _splitCountOf
|
|
59
|
-
The number of splits currently stored in a group given a project ID, ruleset ID, and group ID.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
```solidity
|
|
63
|
-
mapping(uint256 projectId => mapping(uint256 rulesetId => mapping(uint256 groupId => uint256))) internal _splitCountOf;
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
## Functions
|
|
68
|
-
### constructor
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
```solidity
|
|
72
|
-
constructor(IJBDirectory directory) JBControlled(directory);
|
|
73
|
-
```
|
|
74
|
-
**Parameters**
|
|
75
|
-
|
|
76
|
-
|Name|Type|Description|
|
|
77
|
-
|----|----|-----------|
|
|
78
|
-
|`directory`|`IJBDirectory`|A contract storing directories of terminals and controllers for each project.|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
### splitsOf
|
|
82
|
-
|
|
83
|
-
Get the split structs for the specified project ID, within the specified ruleset, for the specified
|
|
84
|
-
group. The splits stored at ruleset 0 are used by default during a ruleset if the splits for the specific
|
|
85
|
-
ruleset aren't set.
|
|
86
|
-
|
|
87
|
-
*If splits aren't found at the given `rulesetId`, they'll be sought in the FALLBACK_RULESET_ID of 0.*
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
```solidity
|
|
91
|
-
function splitsOf(
|
|
92
|
-
uint256 projectId,
|
|
93
|
-
uint256 rulesetId,
|
|
94
|
-
uint256 groupId
|
|
95
|
-
)
|
|
96
|
-
external
|
|
97
|
-
view
|
|
98
|
-
override
|
|
99
|
-
returns (JBSplit[] memory splits);
|
|
100
|
-
```
|
|
101
|
-
**Parameters**
|
|
102
|
-
|
|
103
|
-
|Name|Type|Description|
|
|
104
|
-
|----|----|-----------|
|
|
105
|
-
|`projectId`|`uint256`|The ID of the project to get splits for.|
|
|
106
|
-
|`rulesetId`|`uint256`|An identifier within which the returned splits should be considered active.|
|
|
107
|
-
|`groupId`|`uint256`|The identifying group of the splits.|
|
|
108
|
-
|
|
109
|
-
**Returns**
|
|
110
|
-
|
|
111
|
-
|Name|Type|Description|
|
|
112
|
-
|----|----|-----------|
|
|
113
|
-
|`splits`|`JBSplit[]`|An array of all splits for the project.|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
### _getStructsFor
|
|
117
|
-
|
|
118
|
-
Unpack an array of `JBSplit` structs for all of the splits in a group, given project, ruleset, and group
|
|
119
|
-
IDs.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
```solidity
|
|
123
|
-
function _getStructsFor(
|
|
124
|
-
uint256 projectId,
|
|
125
|
-
uint256 rulesetId,
|
|
126
|
-
uint256 groupId
|
|
127
|
-
)
|
|
128
|
-
internal
|
|
129
|
-
view
|
|
130
|
-
returns (JBSplit[] memory);
|
|
131
|
-
```
|
|
132
|
-
**Parameters**
|
|
133
|
-
|
|
134
|
-
|Name|Type|Description|
|
|
135
|
-
|----|----|-----------|
|
|
136
|
-
|`projectId`|`uint256`|The ID of the project the splits belong to.|
|
|
137
|
-
|`rulesetId`|`uint256`|The ID of the ruleset the group of splits should be considered active within.|
|
|
138
|
-
|`groupId`|`uint256`|The ID of the group to get the splits structs of.|
|
|
139
|
-
|
|
140
|
-
**Returns**
|
|
141
|
-
|
|
142
|
-
|Name|Type|Description|
|
|
143
|
-
|----|----|-----------|
|
|
144
|
-
|`<none>`|`JBSplit[]`|splits The split structs, as an array of `JBSplit`s.|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
### _includesLockedSplits
|
|
148
|
-
|
|
149
|
-
Determine if the provided splits array includes the locked split.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
```solidity
|
|
153
|
-
function _includesLockedSplits(JBSplit[] memory splits, JBSplit memory lockedSplit) internal pure returns (bool);
|
|
154
|
-
```
|
|
155
|
-
**Parameters**
|
|
156
|
-
|
|
157
|
-
|Name|Type|Description|
|
|
158
|
-
|----|----|-----------|
|
|
159
|
-
|`splits`|`JBSplit[]`|The array of splits to check within.|
|
|
160
|
-
|`lockedSplit`|`JBSplit`|The locked split.|
|
|
161
|
-
|
|
162
|
-
**Returns**
|
|
163
|
-
|
|
164
|
-
|Name|Type|Description|
|
|
165
|
-
|----|----|-----------|
|
|
166
|
-
|`<none>`|`bool`|A flag indicating if the `lockedSplit` is contained in the `splits`.|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
### setSplitGroupsOf
|
|
170
|
-
|
|
171
|
-
Sets a project's split groups.
|
|
172
|
-
|
|
173
|
-
*Only a project's controller can set its splits.*
|
|
174
|
-
|
|
175
|
-
*The new split groups must include any currently set splits that are locked.*
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
```solidity
|
|
179
|
-
function setSplitGroupsOf(
|
|
180
|
-
uint256 projectId,
|
|
181
|
-
uint256 rulesetId,
|
|
182
|
-
JBSplitGroup[] calldata splitGroups
|
|
183
|
-
)
|
|
184
|
-
external
|
|
185
|
-
override
|
|
186
|
-
onlyControllerOf(projectId);
|
|
187
|
-
```
|
|
188
|
-
**Parameters**
|
|
189
|
-
|
|
190
|
-
|Name|Type|Description|
|
|
191
|
-
|----|----|-----------|
|
|
192
|
-
|`projectId`|`uint256`|The ID of the project to set the split groups of.|
|
|
193
|
-
|`rulesetId`|`uint256`|The ID of the ruleset the split groups should be active in. Send 0 to set the default split that'll be active if no ruleset has specific splits set. The default's default is the project's owner.|
|
|
194
|
-
|`splitGroups`|`JBSplitGroup[]`|An array of split groups to set.|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
### _setSplitsOf
|
|
198
|
-
|
|
199
|
-
Sets the splits for a group given a project, ruleset, and group ID.
|
|
200
|
-
|
|
201
|
-
*The new splits must include any currently set splits that are locked.*
|
|
202
|
-
|
|
203
|
-
*The sum of the split `percent`s within one group must be less than 100%.*
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
```solidity
|
|
207
|
-
function _setSplitsOf(uint256 projectId, uint256 rulesetId, uint256 groupId, JBSplit[] memory splits) internal;
|
|
208
|
-
```
|
|
209
|
-
**Parameters**
|
|
210
|
-
|
|
211
|
-
|Name|Type|Description|
|
|
212
|
-
|----|----|-----------|
|
|
213
|
-
|`projectId`|`uint256`|The ID of the project splits are being set for.|
|
|
214
|
-
|`rulesetId`|`uint256`|The ID of the ruleset the splits should be considered active within.|
|
|
215
|
-
|`groupId`|`uint256`|The ID of the group to set the splits within.|
|
|
216
|
-
|`splits`|`JBSplit[]`|An array of splits to set.|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
## Errors
|
|
220
|
-
### JBSplits_TotalPercentExceeds100
|
|
221
|
-
|
|
222
|
-
```solidity
|
|
223
|
-
error JBSplits_TotalPercentExceeds100();
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
### JBSplits_PreviousLockedSplitsNotIncluded
|
|
227
|
-
|
|
228
|
-
```solidity
|
|
229
|
-
error JBSplits_PreviousLockedSplitsNotIncluded();
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
### JBSplits_ZeroSplitPercent
|
|
233
|
-
|
|
234
|
-
```solidity
|
|
235
|
-
error JBSplits_ZeroSplitPercent();
|
|
236
|
-
```
|
|
237
|
-
|