@bananapus/core-v6 0.0.49 → 0.0.51
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/CHANGELOG.md +32 -0
- package/foundry.toml +1 -0
- package/package.json +1 -1
- package/src/JBMultiTerminal.sol +490 -296
- package/src/interfaces/IJBCashOutTerminal.sol +68 -0
- package/src/libraries/JBCashOutHookSpecsLib.sol +181 -0
- package/src/libraries/JBConstants.sol +6 -0
- package/src/libraries/JBFees.sol +25 -0
- package/src/libraries/JBHeldFeesLib.sol +288 -0
- package/src/libraries/JBRulesetMetadataResolver.sol +20 -12
- package/src/structs/JBRulesetMetadata.sol +4 -1
- package/test/helpers/JBTest.sol +6 -3
|
@@ -23,10 +23,12 @@ pragma solidity ^0.8.0;
|
|
|
23
23
|
/// @custom:member holdFees If `true`, fees are accumulated but not processed until a future ruleset (or manually).
|
|
24
24
|
/// @custom:member scopeCashOutsToLocalBalances If `true`, omnichain cash-out calculations use only the local chain's
|
|
25
25
|
/// balances (not cross-chain aggregates).
|
|
26
|
+
/// @custom:member pauseCrossProjectFeeFreeInflows If `true`, the project cannot be targeted by
|
|
27
|
+
/// `payAfterCashOutTokensOf` calls during this ruleset.
|
|
26
28
|
/// @custom:member useDataHookForPay If `true`, the data hook is called before recording payments.
|
|
27
29
|
/// @custom:member useDataHookForCashOut If `true`, the data hook is called before recording cash outs.
|
|
28
30
|
/// @custom:member dataHook Contract called before pay/cash-out to potentially override token counts or add hooks.
|
|
29
|
-
/// @custom:member metadata
|
|
31
|
+
/// @custom:member metadata 13 bits of application-specific metadata (upper 3 bits of the uint16 are ignored).
|
|
30
32
|
struct JBRulesetMetadata {
|
|
31
33
|
uint16 reservedPercent;
|
|
32
34
|
uint16 cashOutTaxRate;
|
|
@@ -43,6 +45,7 @@ struct JBRulesetMetadata {
|
|
|
43
45
|
bool ownerMustSendPayouts;
|
|
44
46
|
bool holdFees;
|
|
45
47
|
bool scopeCashOutsToLocalBalances;
|
|
48
|
+
bool pauseCrossProjectFeeFreeInflows;
|
|
46
49
|
bool useDataHookForPay;
|
|
47
50
|
bool useDataHookForCashOut;
|
|
48
51
|
address dataHook;
|
package/test/helpers/JBTest.sol
CHANGED
|
@@ -68,7 +68,8 @@ contract JBTest is Test {
|
|
|
68
68
|
useDataHookForPay: false,
|
|
69
69
|
useDataHookForCashOut: false,
|
|
70
70
|
dataHook: address(0),
|
|
71
|
-
metadata: 0
|
|
71
|
+
metadata: 0,
|
|
72
|
+
pauseCrossProjectFeeFreeInflows: false
|
|
72
73
|
});
|
|
73
74
|
|
|
74
75
|
uint256 packed = _rulesMetadata.packRulesetMetadata();
|
|
@@ -106,7 +107,8 @@ contract JBTest is Test {
|
|
|
106
107
|
useDataHookForPay: false,
|
|
107
108
|
useDataHookForCashOut: false,
|
|
108
109
|
dataHook: address(0),
|
|
109
|
-
metadata: 0
|
|
110
|
+
metadata: 0,
|
|
111
|
+
pauseCrossProjectFeeFreeInflows: false
|
|
110
112
|
});
|
|
111
113
|
}
|
|
112
114
|
|
|
@@ -130,7 +132,8 @@ contract JBTest is Test {
|
|
|
130
132
|
useDataHookForPay: false,
|
|
131
133
|
useDataHookForCashOut: false,
|
|
132
134
|
dataHook: address(0),
|
|
133
|
-
metadata: 0
|
|
135
|
+
metadata: 0,
|
|
136
|
+
pauseCrossProjectFeeFreeInflows: false
|
|
134
137
|
});
|
|
135
138
|
|
|
136
139
|
uint256 packed = _rulesMetadata.packRulesetMetadata();
|