@bananapus/core-v6 0.0.16 → 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/ADMINISTRATION.md +1 -1
- package/ARCHITECTURE.md +2 -1
- package/AUDIT_INSTRUCTIONS.md +342 -0
- package/CHANGE_LOG.md +400 -0
- package/README.md +4 -4
- package/RISKS.md +171 -50
- package/SKILLS.md +9 -6
- package/USER_JOURNEYS.md +622 -0
- package/package.json +2 -2
- package/script/DeployPeriphery.s.sol +7 -1
- package/src/JBController.sol +5 -0
- package/src/JBDeadline.sol +3 -0
- package/src/JBDirectory.sol +2 -1
- package/src/JBMultiTerminal.sol +50 -9
- package/src/JBPermissions.sol +2 -0
- package/src/JBPrices.sol +8 -2
- package/src/JBRulesets.sol +3 -0
- package/src/JBSplits.sol +9 -5
- package/src/JBTerminalStore.sol +54 -47
- package/src/JBTokens.sol +3 -0
- package/src/interfaces/IJBTerminalStore.sol +3 -0
- package/src/libraries/JBFees.sol +2 -0
- package/src/libraries/JBMetadataResolver.sol +17 -4
- package/src/structs/JBBeforeCashOutRecordedContext.sol +4 -0
- package/test/TestAuditResponseDesignProofs.sol +434 -0
- package/test/TestDataHookFuzzing.sol +520 -0
- package/test/TestFeeFreeCashOutBypass.sol +617 -0
- package/test/TestL2SequencerPriceFeed.sol +292 -0
- package/test/TestMetadataOffsetOverflow.sol +179 -0
- package/test/TestMultiTerminalSurplus.sol +348 -0
- package/test/TestPermit2DataHook.t.sol +360 -0
- package/test/TestRulesetQueueing.sol +1 -2
- package/test/TestRulesetWeightCaching.sol +122 -124
- package/test/WeirdTokenTests.t.sol +37 -0
- package/test/regression/HoldFeesCashOutReserved.t.sol +415 -0
- package/test/regression/WeightCacheBoundary.t.sol +291 -0
- package/test/units/static/JBMultiTerminal/TestAddToBalanceOf.sol +2 -2
- package/test/units/static/JBMultiTerminal/TestCashOutTokensOf.sol +18 -17
- package/test/units/static/JBMultiTerminal/TestPay.sol +6 -4
- package/test/units/static/JBMultiTerminal/TestProcessHeldFeesOf.sol +206 -18
- package/test/units/static/JBMultiTerminal/TestUseAllowanceOf.sol +280 -0
- package/test/units/static/JBSplits/TestSelfManagedSplitGroups.sol +55 -12
- package/test/units/static/JBTerminalStore/TestRecordCashOutsFor.sol +72 -0
- 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,165 +0,0 @@
|
|
|
1
|
-
# IJBRulesets
|
|
2
|
-
[Git Source](https://github.com/Bananapus/nana-core/blob/2998dca2fbd2658e2c8791d6dc8348147d69e28e/src/interfaces/IJBRulesets.sol)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Functions
|
|
6
|
-
### latestRulesetIdOf
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
```solidity
|
|
10
|
-
function latestRulesetIdOf(uint256 projectId) external view returns (uint256);
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
### currentApprovalStatusForLatestRulesetOf
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```solidity
|
|
17
|
-
function currentApprovalStatusForLatestRulesetOf(uint256 projectId) external view returns (JBApprovalStatus);
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### currentOf
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```solidity
|
|
24
|
-
function currentOf(uint256 projectId) external view returns (JBRuleset memory ruleset);
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### deriveCycleNumberFrom
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```solidity
|
|
31
|
-
function deriveCycleNumberFrom(
|
|
32
|
-
uint256 baseRulesetCycleNumber,
|
|
33
|
-
uint256 baseRulesetStart,
|
|
34
|
-
uint256 baseRulesetDuration,
|
|
35
|
-
uint256 start
|
|
36
|
-
)
|
|
37
|
-
external
|
|
38
|
-
returns (uint256);
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### deriveStartFrom
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
```solidity
|
|
45
|
-
function deriveStartFrom(
|
|
46
|
-
uint256 baseRulesetStart,
|
|
47
|
-
uint256 baseRulesetDuration,
|
|
48
|
-
uint256 mustStartAtOrAfter
|
|
49
|
-
)
|
|
50
|
-
external
|
|
51
|
-
view
|
|
52
|
-
returns (uint256 start);
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### deriveWeightFrom
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
```solidity
|
|
59
|
-
function deriveWeightFrom(
|
|
60
|
-
uint256 projectId,
|
|
61
|
-
uint256 baseRulesetStart,
|
|
62
|
-
uint256 baseRulesetDuration,
|
|
63
|
-
uint256 baseRulesetWeight,
|
|
64
|
-
uint256 baseRulesetWeightCutPercent,
|
|
65
|
-
uint256 baseRulesetCacheId,
|
|
66
|
-
uint256 start
|
|
67
|
-
)
|
|
68
|
-
external
|
|
69
|
-
view
|
|
70
|
-
returns (uint256 weight);
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### getRulesetOf
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
```solidity
|
|
77
|
-
function getRulesetOf(uint256 projectId, uint256 rulesetId) external view returns (JBRuleset memory);
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### latestQueuedOf
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
```solidity
|
|
84
|
-
function latestQueuedOf(uint256 projectId)
|
|
85
|
-
external
|
|
86
|
-
view
|
|
87
|
-
returns (JBRuleset memory ruleset, JBApprovalStatus approvalStatus);
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
### allOf
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
```solidity
|
|
94
|
-
function allOf(
|
|
95
|
-
uint256 projectId,
|
|
96
|
-
uint256 startingId,
|
|
97
|
-
uint256 size
|
|
98
|
-
)
|
|
99
|
-
external
|
|
100
|
-
view
|
|
101
|
-
returns (JBRuleset[] memory rulesets);
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### upcomingOf
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
```solidity
|
|
108
|
-
function upcomingOf(uint256 projectId) external view returns (JBRuleset memory ruleset);
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### queueFor
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
```solidity
|
|
115
|
-
function queueFor(
|
|
116
|
-
uint256 projectId,
|
|
117
|
-
uint256 duration,
|
|
118
|
-
uint256 weight,
|
|
119
|
-
uint256 weightCutPercent,
|
|
120
|
-
IJBRulesetApprovalHook approvalHook,
|
|
121
|
-
uint256 metadata,
|
|
122
|
-
uint256 mustStartAtOrAfter
|
|
123
|
-
)
|
|
124
|
-
external
|
|
125
|
-
returns (JBRuleset memory ruleset);
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### updateRulesetWeightCache
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
```solidity
|
|
132
|
-
function updateRulesetWeightCache(uint256 projectId) external;
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
## Events
|
|
136
|
-
### RulesetInitialized
|
|
137
|
-
|
|
138
|
-
```solidity
|
|
139
|
-
event RulesetInitialized(
|
|
140
|
-
uint256 indexed rulesetId, uint256 indexed projectId, uint256 indexed basedOnId, address caller
|
|
141
|
-
);
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### RulesetQueued
|
|
145
|
-
|
|
146
|
-
```solidity
|
|
147
|
-
event RulesetQueued(
|
|
148
|
-
uint256 indexed rulesetId,
|
|
149
|
-
uint256 indexed projectId,
|
|
150
|
-
uint256 duration,
|
|
151
|
-
uint256 weight,
|
|
152
|
-
uint256 weightCutPercent,
|
|
153
|
-
IJBRulesetApprovalHook approvalHook,
|
|
154
|
-
uint256 metadata,
|
|
155
|
-
uint256 mustStartAtOrAfter,
|
|
156
|
-
address caller
|
|
157
|
-
);
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### WeightCacheUpdated
|
|
161
|
-
|
|
162
|
-
```solidity
|
|
163
|
-
event WeightCacheUpdated(uint256 projectId, uint112 weight, uint256 weightCutMultiple, address caller);
|
|
164
|
-
```
|
|
165
|
-
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# IJBSplitHook
|
|
2
|
-
[Git Source](https://github.com/Bananapus/nana-core/blob/2998dca2fbd2658e2c8791d6dc8348147d69e28e/src/interfaces/IJBSplitHook.sol)
|
|
3
|
-
|
|
4
|
-
**Inherits:**
|
|
5
|
-
IERC165
|
|
6
|
-
|
|
7
|
-
Allows processing a single split with custom logic.
|
|
8
|
-
|
|
9
|
-
*The split hook's address should be set as the `hook` in the relevant split.*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Functions
|
|
13
|
-
### processSplitWith
|
|
14
|
-
|
|
15
|
-
If a split has a split hook, payment terminals and controllers call this function while processing the
|
|
16
|
-
split.
|
|
17
|
-
|
|
18
|
-
*Critical business logic should be protected by appropriate access control. The tokens and/or native tokens
|
|
19
|
-
are optimistically transferred to the split hook when this function is called.*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
```solidity
|
|
23
|
-
function processSplitWith(JBSplitHookContext calldata context) external payable;
|
|
24
|
-
```
|
|
25
|
-
**Parameters**
|
|
26
|
-
|
|
27
|
-
|Name|Type|Description|
|
|
28
|
-
|----|----|-----------|
|
|
29
|
-
|`context`|`JBSplitHookContext`|The context passed by the terminal/controller to the split hook as a `JBSplitHookContext` struct:|
|
|
30
|
-
|
|
31
|
-
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# IJBSplits
|
|
2
|
-
[Git Source](https://github.com/Bananapus/nana-core/blob/2998dca2fbd2658e2c8791d6dc8348147d69e28e/src/interfaces/IJBSplits.sol)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Functions
|
|
6
|
-
### FALLBACK_RULESET_ID
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
```solidity
|
|
10
|
-
function FALLBACK_RULESET_ID() external view returns (uint256);
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
### splitsOf
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```solidity
|
|
17
|
-
function splitsOf(uint256 projectId, uint256 rulesetId, uint256 groupId) external view returns (JBSplit[] memory);
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### setSplitGroupsOf
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```solidity
|
|
24
|
-
function setSplitGroupsOf(uint256 projectId, uint256 rulesetId, JBSplitGroup[] memory splitGroups) external;
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Events
|
|
28
|
-
### SetSplit
|
|
29
|
-
|
|
30
|
-
```solidity
|
|
31
|
-
event SetSplit(
|
|
32
|
-
uint256 indexed projectId, uint256 indexed rulesetId, uint256 indexed groupId, JBSplit split, address caller
|
|
33
|
-
);
|
|
34
|
-
```
|
|
35
|
-
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
# IJBTerminal
|
|
2
|
-
[Git Source](https://github.com/Bananapus/nana-core/blob/2998dca2fbd2658e2c8791d6dc8348147d69e28e/src/interfaces/IJBTerminal.sol)
|
|
3
|
-
|
|
4
|
-
**Inherits:**
|
|
5
|
-
IERC165
|
|
6
|
-
|
|
7
|
-
A terminal that accepts payments and can be migrated.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## Functions
|
|
11
|
-
### accountingContextForTokenOf
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
```solidity
|
|
15
|
-
function accountingContextForTokenOf(
|
|
16
|
-
uint256 projectId,
|
|
17
|
-
address token
|
|
18
|
-
)
|
|
19
|
-
external
|
|
20
|
-
view
|
|
21
|
-
returns (JBAccountingContext memory);
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### accountingContextsOf
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
```solidity
|
|
28
|
-
function accountingContextsOf(uint256 projectId) external view returns (JBAccountingContext[] memory);
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### currentSurplusOf
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
```solidity
|
|
35
|
-
function currentSurplusOf(
|
|
36
|
-
uint256 projectId,
|
|
37
|
-
JBAccountingContext[] memory accountingContexts,
|
|
38
|
-
uint256 decimals,
|
|
39
|
-
uint256 currency
|
|
40
|
-
)
|
|
41
|
-
external
|
|
42
|
-
view
|
|
43
|
-
returns (uint256);
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### addAccountingContextsFor
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
```solidity
|
|
50
|
-
function addAccountingContextsFor(uint256 projectId, JBAccountingContext[] calldata accountingContexts) external;
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### addToBalanceOf
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
```solidity
|
|
57
|
-
function addToBalanceOf(
|
|
58
|
-
uint256 projectId,
|
|
59
|
-
address token,
|
|
60
|
-
uint256 amount,
|
|
61
|
-
bool shouldReturnHeldFees,
|
|
62
|
-
string calldata memo,
|
|
63
|
-
bytes calldata metadata
|
|
64
|
-
)
|
|
65
|
-
external
|
|
66
|
-
payable;
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### migrateBalanceOf
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
```solidity
|
|
73
|
-
function migrateBalanceOf(uint256 projectId, address token, IJBTerminal to) external returns (uint256 balance);
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### pay
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
```solidity
|
|
80
|
-
function pay(
|
|
81
|
-
uint256 projectId,
|
|
82
|
-
address token,
|
|
83
|
-
uint256 amount,
|
|
84
|
-
address beneficiary,
|
|
85
|
-
uint256 minReturnedTokens,
|
|
86
|
-
string calldata memo,
|
|
87
|
-
bytes calldata metadata
|
|
88
|
-
)
|
|
89
|
-
external
|
|
90
|
-
payable
|
|
91
|
-
returns (uint256 beneficiaryTokenCount);
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## Events
|
|
95
|
-
### AddToBalance
|
|
96
|
-
|
|
97
|
-
```solidity
|
|
98
|
-
event AddToBalance(
|
|
99
|
-
uint256 indexed projectId, uint256 amount, uint256 returnedFees, string memo, bytes metadata, address caller
|
|
100
|
-
);
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### HookAfterRecordPay
|
|
104
|
-
|
|
105
|
-
```solidity
|
|
106
|
-
event HookAfterRecordPay(
|
|
107
|
-
IJBPayHook indexed hook, JBAfterPayRecordedContext context, uint256 specificationAmount, address caller
|
|
108
|
-
);
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### MigrateTerminal
|
|
112
|
-
|
|
113
|
-
```solidity
|
|
114
|
-
event MigrateTerminal(
|
|
115
|
-
uint256 indexed projectId, address indexed token, IJBTerminal indexed to, uint256 amount, address caller
|
|
116
|
-
);
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
### Pay
|
|
120
|
-
|
|
121
|
-
```solidity
|
|
122
|
-
event Pay(
|
|
123
|
-
uint256 indexed rulesetId,
|
|
124
|
-
uint256 indexed rulesetCycleNumber,
|
|
125
|
-
uint256 indexed projectId,
|
|
126
|
-
address payer,
|
|
127
|
-
address beneficiary,
|
|
128
|
-
uint256 amount,
|
|
129
|
-
uint256 newlyIssuedTokenCount,
|
|
130
|
-
string memo,
|
|
131
|
-
bytes metadata,
|
|
132
|
-
address caller
|
|
133
|
-
);
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### SetAccountingContext
|
|
137
|
-
|
|
138
|
-
```solidity
|
|
139
|
-
event SetAccountingContext(uint256 indexed projectId, JBAccountingContext context, address caller);
|
|
140
|
-
```
|
|
141
|
-
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
# IJBTerminalStore
|
|
2
|
-
[Git Source](https://github.com/Bananapus/nana-core/blob/2998dca2fbd2658e2c8791d6dc8348147d69e28e/src/interfaces/IJBTerminalStore.sol)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Functions
|
|
6
|
-
### DIRECTORY
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
```solidity
|
|
10
|
-
function DIRECTORY() external view returns (IJBDirectory);
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
### PRICES
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```solidity
|
|
17
|
-
function PRICES() external view returns (IJBPrices);
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### RULESETS
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```solidity
|
|
24
|
-
function RULESETS() external view returns (IJBRulesets);
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### balanceOf
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```solidity
|
|
31
|
-
function balanceOf(address terminal, uint256 projectId, address token) external view returns (uint256);
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### usedPayoutLimitOf
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
```solidity
|
|
38
|
-
function usedPayoutLimitOf(
|
|
39
|
-
address terminal,
|
|
40
|
-
uint256 projectId,
|
|
41
|
-
address token,
|
|
42
|
-
uint256 rulesetCycleNumber,
|
|
43
|
-
uint256 currency
|
|
44
|
-
)
|
|
45
|
-
external
|
|
46
|
-
view
|
|
47
|
-
returns (uint256);
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### usedSurplusAllowanceOf
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
```solidity
|
|
54
|
-
function usedSurplusAllowanceOf(
|
|
55
|
-
address terminal,
|
|
56
|
-
uint256 projectId,
|
|
57
|
-
address token,
|
|
58
|
-
uint256 rulesetId,
|
|
59
|
-
uint256 currency
|
|
60
|
-
)
|
|
61
|
-
external
|
|
62
|
-
view
|
|
63
|
-
returns (uint256);
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### currentReclaimableSurplusOf
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
```solidity
|
|
70
|
-
function currentReclaimableSurplusOf(
|
|
71
|
-
uint256 projectId,
|
|
72
|
-
uint256 tokenCount,
|
|
73
|
-
uint256 totalSupply,
|
|
74
|
-
uint256 surplus
|
|
75
|
-
)
|
|
76
|
-
external
|
|
77
|
-
view
|
|
78
|
-
returns (uint256);
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### currentReclaimableSurplusOf
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
```solidity
|
|
85
|
-
function currentReclaimableSurplusOf(
|
|
86
|
-
uint256 projectId,
|
|
87
|
-
uint256 cashOutCount,
|
|
88
|
-
IJBTerminal[] calldata terminals,
|
|
89
|
-
JBAccountingContext[] calldata accountingContexts,
|
|
90
|
-
uint256 decimals,
|
|
91
|
-
uint256 currency
|
|
92
|
-
)
|
|
93
|
-
external
|
|
94
|
-
view
|
|
95
|
-
returns (uint256);
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### currentSurplusOf
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
```solidity
|
|
102
|
-
function currentSurplusOf(
|
|
103
|
-
address terminal,
|
|
104
|
-
uint256 projectId,
|
|
105
|
-
JBAccountingContext[] calldata accountingContexts,
|
|
106
|
-
uint256 decimals,
|
|
107
|
-
uint256 currency
|
|
108
|
-
)
|
|
109
|
-
external
|
|
110
|
-
view
|
|
111
|
-
returns (uint256);
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### currentTotalSurplusOf
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
```solidity
|
|
118
|
-
function currentTotalSurplusOf(uint256 projectId, uint256 decimals, uint256 currency) external view returns (uint256);
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### recordAddedBalanceFor
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
```solidity
|
|
125
|
-
function recordAddedBalanceFor(uint256 projectId, address token, uint256 amount) external;
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### recordPaymentFrom
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
```solidity
|
|
132
|
-
function recordPaymentFrom(
|
|
133
|
-
address payer,
|
|
134
|
-
JBTokenAmount memory amount,
|
|
135
|
-
uint256 projectId,
|
|
136
|
-
address beneficiary,
|
|
137
|
-
bytes calldata metadata
|
|
138
|
-
)
|
|
139
|
-
external
|
|
140
|
-
returns (JBRuleset memory ruleset, uint256 tokenCount, JBPayHookSpecification[] memory hookSpecifications);
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### recordPayoutFor
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
```solidity
|
|
147
|
-
function recordPayoutFor(
|
|
148
|
-
uint256 projectId,
|
|
149
|
-
JBAccountingContext calldata accountingContext,
|
|
150
|
-
uint256 amount,
|
|
151
|
-
uint256 currency
|
|
152
|
-
)
|
|
153
|
-
external
|
|
154
|
-
returns (JBRuleset memory ruleset, uint256 amountPaidOut);
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
### recordCashOutFor
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
```solidity
|
|
161
|
-
function recordCashOutFor(
|
|
162
|
-
address holder,
|
|
163
|
-
uint256 projectId,
|
|
164
|
-
uint256 cashOutCount,
|
|
165
|
-
JBAccountingContext calldata accountingContext,
|
|
166
|
-
JBAccountingContext[] calldata balanceAccountingContexts,
|
|
167
|
-
bytes calldata metadata
|
|
168
|
-
)
|
|
169
|
-
external
|
|
170
|
-
returns (
|
|
171
|
-
JBRuleset memory ruleset,
|
|
172
|
-
uint256 reclaimAmount,
|
|
173
|
-
uint256 cashOutTaxRate,
|
|
174
|
-
JBCashOutHookSpecification[] memory hookSpecifications
|
|
175
|
-
);
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### recordTerminalMigration
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
```solidity
|
|
182
|
-
function recordTerminalMigration(uint256 projectId, address token) external returns (uint256 balance);
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### recordUsedAllowanceOf
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
```solidity
|
|
189
|
-
function recordUsedAllowanceOf(
|
|
190
|
-
uint256 projectId,
|
|
191
|
-
JBAccountingContext calldata accountingContext,
|
|
192
|
-
uint256 amount,
|
|
193
|
-
uint256 currency
|
|
194
|
-
)
|
|
195
|
-
external
|
|
196
|
-
returns (JBRuleset memory ruleset, uint256 usedAmount);
|
|
197
|
-
```
|
|
198
|
-
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# IJBToken
|
|
2
|
-
[Git Source](https://github.com/Bananapus/nana-core/blob/2998dca2fbd2658e2c8791d6dc8348147d69e28e/src/interfaces/IJBToken.sol)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Functions
|
|
6
|
-
### balanceOf
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
```solidity
|
|
10
|
-
function balanceOf(address account) external view returns (uint256);
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
### canBeAddedTo
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```solidity
|
|
17
|
-
function canBeAddedTo(uint256 projectId) external view returns (bool);
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### decimals
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```solidity
|
|
24
|
-
function decimals() external view returns (uint8);
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### totalSupply
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```solidity
|
|
31
|
-
function totalSupply() external view returns (uint256);
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### initialize
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
```solidity
|
|
38
|
-
function initialize(string memory name, string memory symbol, address owner) external;
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### burn
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
```solidity
|
|
45
|
-
function burn(address account, uint256 amount) external;
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### mint
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
```solidity
|
|
52
|
-
function mint(address account, uint256 amount) external;
|
|
53
|
-
```
|
|
54
|
-
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# IJBTokenUriResolver
|
|
2
|
-
[Git Source](https://github.com/Bananapus/nana-core/blob/2998dca2fbd2658e2c8791d6dc8348147d69e28e/src/interfaces/IJBTokenUriResolver.sol)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Functions
|
|
6
|
-
### getUri
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
```solidity
|
|
10
|
-
function getUri(uint256 projectId) external view returns (string memory tokenUri);
|
|
11
|
-
```
|
|
12
|
-
|