@bananapus/core-v6 0.0.34 → 0.0.35
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 +75 -349
- package/ARCHITECTURE.md +86 -44
- package/AUDIT_INSTRUCTIONS.md +29 -42
- package/README.md +22 -3
- package/RISKS.md +7 -0
- package/SKILLS.md +16 -4
- package/USER_JOURNEYS.md +130 -30
- package/foundry.toml +2 -0
- package/package.json +1 -1
- package/src/JBERC20.sol +0 -1
- package/src/structs/JBAccountingContext.sol +0 -1
- package/src/structs/JBAfterCashOutRecordedContext.sol +0 -1
- package/src/structs/JBAfterPayRecordedContext.sol +0 -1
- package/src/structs/JBBeforeCashOutRecordedContext.sol +0 -1
- package/src/structs/JBBeforePayRecordedContext.sol +0 -1
- package/src/structs/JBCashOutHookSpecification.sol +0 -1
- package/src/structs/JBCurrencyAmount.sol +0 -1
- package/src/structs/JBFee.sol +0 -1
- package/src/structs/JBFundAccessLimitGroup.sol +0 -1
- package/src/structs/JBPayHookSpecification.sol +0 -1
- package/src/structs/JBPermissionsData.sol +0 -1
- package/src/structs/JBRuleset.sol +0 -1
- package/src/structs/JBRulesetConfig.sol +0 -1
- package/src/structs/JBRulesetMetadata.sol +0 -1
- package/src/structs/JBRulesetWeightCache.sol +0 -1
- package/src/structs/JBRulesetWithMetadata.sol +0 -1
- package/src/structs/JBSingleAllowance.sol +0 -1
- package/src/structs/JBSplit.sol +0 -1
- package/src/structs/JBSplitGroup.sol +0 -1
- package/src/structs/JBSplitHookContext.sol +0 -1
- package/src/structs/JBTerminalConfig.sol +0 -1
- package/src/structs/JBTokenAmount.sol +0 -1
package/USER_JOURNEYS.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# User Journeys
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Repo Purpose
|
|
4
|
+
|
|
5
|
+
This repo is the canonical Juicebox V6 runtime surface.
|
|
6
|
+
It owns project identity, rulesets, terminal execution, treasury accounting, permissions, price feeds, and migration
|
|
7
|
+
paths. Most other V6 repos wrap or extend this behavior rather than replacing it.
|
|
8
|
+
|
|
9
|
+
## Primary Actors
|
|
4
10
|
|
|
5
11
|
- founders launching and evolving Juicebox projects
|
|
6
12
|
- supporters paying projects in the asset a terminal accepts
|
|
@@ -8,109 +14,203 @@
|
|
|
8
14
|
- operators managing permissions, splits, fund access limits, and rulesets
|
|
9
15
|
- integrators wiring hooks, terminals, price feeds, and migrations into the canonical protocol surface
|
|
10
16
|
|
|
17
|
+
## Key Surfaces
|
|
18
|
+
|
|
19
|
+
- `JBController`: project launch, ruleset queueing, token setup, splits, and controller migration
|
|
20
|
+
- `JBMultiTerminal`: pay, payout, allowance, preview, and cash-out entrypoint
|
|
21
|
+
- `JBTerminalStore`: balance, surplus, fee, and reclaim accounting
|
|
22
|
+
- `JBDirectory`: controller and terminal routing
|
|
23
|
+
- `JBPermissions`: packed operator-permission registry
|
|
24
|
+
- `JBProjects`, `JBRulesets`, `JBPrices`, `JBFundAccessLimits`, `JBSplits`, `JBTokens`: core state and helper surfaces
|
|
25
|
+
|
|
11
26
|
## Journey 1: Launch A Project With The Right Initial Shape
|
|
12
27
|
|
|
13
|
-
**
|
|
28
|
+
**Actor:** founder, deployer, or protocol integrator.
|
|
14
29
|
|
|
15
|
-
**
|
|
30
|
+
**Intent:** create a project with the right owner, terminal, ruleset, and hook assumptions from block zero.
|
|
16
31
|
|
|
17
|
-
**
|
|
32
|
+
**Preconditions**
|
|
33
|
+
- the team knows who should own the project, which terminals it should use, and what the first ruleset should allow
|
|
34
|
+
|
|
35
|
+
**Main Flow**
|
|
18
36
|
1. Call `JBController.launchProjectFor(...)` with the owner, URI, ruleset config, terminal configs, and any split or hook metadata.
|
|
19
37
|
2. `JBProjects` mints the project NFT, `JBDirectory` records controller and terminal routing, and `JBRulesets` stores the first ruleset.
|
|
20
38
|
3. If the project wants ERC-20 tokens, reserved-rate behavior, or hook-driven behavior, that configuration is committed at launch instead of being inferred later.
|
|
21
39
|
4. The project can now accept payments and queue future rulesets without changing project identity.
|
|
22
40
|
|
|
23
|
-
**Failure
|
|
41
|
+
**Failure Modes**
|
|
42
|
+
- accounting contexts do not match the intended terminal asset
|
|
43
|
+
- hook metadata or split assumptions are invalid at launch
|
|
44
|
+
- ownership or permission assumptions are wrong and expensive to repair later
|
|
45
|
+
|
|
46
|
+
**Postconditions**
|
|
47
|
+
- the project NFT exists, the initial ruleset is active, accepted terminals are installed, and downstream hooks or splits can begin working immediately
|
|
24
48
|
|
|
25
49
|
## Journey 2: Accept A Payment And Issue The Right Token Exposure
|
|
26
50
|
|
|
27
|
-
**
|
|
51
|
+
**Actor:** payer or integration paying on a user's behalf.
|
|
52
|
+
|
|
53
|
+
**Intent:** settle a payment through the canonical terminal path and issue the correct token exposure.
|
|
28
54
|
|
|
29
|
-
**
|
|
55
|
+
**Preconditions**
|
|
56
|
+
- the project has an active ruleset and a terminal that accepts the payer's asset
|
|
30
57
|
|
|
31
|
-
**Flow**
|
|
58
|
+
**Main Flow**
|
|
32
59
|
1. A payer calls `pay(...)` on `JBMultiTerminal`.
|
|
33
60
|
2. The terminal validates the accounting context, records funds, and asks `JBTerminalStore` to derive issuance from the active ruleset.
|
|
34
61
|
3. `JBController` and `JBTokens` decide whether the beneficiary gets project token credits, ERC-20s, or no issuance because weight is zero.
|
|
35
62
|
4. Any configured pay hooks or data hooks run around the accounting path.
|
|
36
63
|
|
|
37
|
-
**
|
|
64
|
+
**Failure Modes**
|
|
65
|
+
- payments are paused or the token is unsupported for the target accounting context
|
|
66
|
+
- fee-on-transfer behavior or price-feed assumptions break the intended issuance path
|
|
67
|
+
- hooks add side effects the payer or integrator did not account for
|
|
68
|
+
|
|
69
|
+
**Postconditions**
|
|
70
|
+
- treasury balances increase, hooks run in the right order, and the beneficiary receives credits or ERC-20 tokens consistent with the ruleset
|
|
38
71
|
|
|
39
72
|
## Journey 3: Turn Credits Into ERC-20 Tokens Once A Project Wants A Transferable Token
|
|
40
73
|
|
|
41
|
-
**
|
|
74
|
+
**Actor:** holder or operator acting for a holder.
|
|
75
|
+
|
|
76
|
+
**Intent:** convert non-transferable project credits into ERC-20 balances once the project exposes a token.
|
|
42
77
|
|
|
43
|
-
**
|
|
78
|
+
**Preconditions**
|
|
79
|
+
- users already have project token credits
|
|
80
|
+
- the project now wants an ERC-20 representation
|
|
44
81
|
|
|
45
|
-
**Flow**
|
|
82
|
+
**Main Flow**
|
|
46
83
|
1. Deploy or set the project's ERC-20 token through `JBController`.
|
|
47
84
|
2. Holders or operators call `claimTokensFor(...)` to convert credits into ERC-20 balances for a beneficiary.
|
|
48
85
|
3. Future issuance can continue using the same project identity while users now interact with a standard token surface.
|
|
49
86
|
|
|
87
|
+
**Failure Modes**
|
|
88
|
+
- the wrong token is installed for the project
|
|
89
|
+
- integrations assume credits are automatically ERC-20 balances after token installation
|
|
90
|
+
|
|
91
|
+
**Postconditions**
|
|
92
|
+
- the project deploys or installs its ERC-20 token and holders can claim credits into transferable balances
|
|
93
|
+
|
|
50
94
|
## Journey 4: Distribute Treasury Funds Through Governed Paths
|
|
51
95
|
|
|
52
|
-
**
|
|
96
|
+
**Actor:** owner or authorized operator.
|
|
97
|
+
|
|
98
|
+
**Intent:** move value out of the treasury through configured payouts or allowance surfaces.
|
|
53
99
|
|
|
54
|
-
**
|
|
100
|
+
**Preconditions**
|
|
101
|
+
- the project has terminal balances
|
|
102
|
+
- the caller is allowed to use payout or allowance paths
|
|
55
103
|
|
|
56
|
-
**Flow**
|
|
104
|
+
**Main Flow**
|
|
57
105
|
1. Authorized actors call payout or allowance surfaces on the terminal.
|
|
58
106
|
2. `JBFundAccessLimits` bounds how much may leave for the current ruleset cycle.
|
|
59
107
|
3. `JBSplits` fans value out to beneficiaries, projects, hooks, or fee recipients as configured.
|
|
60
108
|
4. `JBTerminalStore` updates balances and fee accounting so later previews and cash outs remain consistent.
|
|
61
109
|
|
|
62
|
-
**Failure
|
|
110
|
+
**Failure Modes**
|
|
111
|
+
- splits or access limits no longer match operator expectations
|
|
112
|
+
- downstream hook execution fails during payout fanout
|
|
113
|
+
- operators assume allowance withdrawals behave exactly like payouts when fee treatment differs
|
|
114
|
+
|
|
115
|
+
**Postconditions**
|
|
116
|
+
- treasury value leaves only through configured limits, recipients, and fee logic instead of arbitrary admin withdrawals
|
|
63
117
|
|
|
64
118
|
## Journey 5: Let Holders Cash Out Against Surplus
|
|
65
119
|
|
|
66
|
-
**
|
|
120
|
+
**Actor:** holder or integrator acting for a holder.
|
|
67
121
|
|
|
68
|
-
**
|
|
122
|
+
**Intent:** exit project-token exposure against available terminal surplus.
|
|
69
123
|
|
|
70
|
-
**
|
|
124
|
+
**Preconditions**
|
|
125
|
+
- a holder owns project token exposure
|
|
126
|
+
- the project has reclaimable surplus in some terminal
|
|
127
|
+
|
|
128
|
+
**Main Flow**
|
|
71
129
|
1. The holder calls `cashOutTokensOf(...)` on the relevant terminal.
|
|
72
130
|
2. `JBTerminalStore` calculates reclaim value using surplus, outstanding token supply, cash-out tax rate, and any pending reserved token effects.
|
|
73
131
|
3. Cash-out hooks can modify behavior or side effects, but the core accounting remains anchored in the terminal store.
|
|
74
132
|
4. Tokens burn and value exits the treasury through the terminal that actually held the asset.
|
|
75
133
|
|
|
76
|
-
**
|
|
134
|
+
**Failure Modes**
|
|
135
|
+
- fee-free or custom hook paths produce different outcomes than the holder expected
|
|
136
|
+
- preview-versus-execution drift appears under volatile routing or multi-terminal liquidity
|
|
137
|
+
- users misread multi-terminal surplus as one homogeneous pool
|
|
138
|
+
|
|
139
|
+
**Postconditions**
|
|
140
|
+
- the holder burns the intended amount of token exposure and receives the correct reclaim amount under the current ruleset
|
|
77
141
|
|
|
78
142
|
## Journey 6: Queue New Rulesets Without Migrating The Project
|
|
79
143
|
|
|
80
|
-
**
|
|
144
|
+
**Actor:** owner or authorized operator.
|
|
145
|
+
|
|
146
|
+
**Intent:** change future project economics without changing the project's identity or existing balances.
|
|
81
147
|
|
|
82
|
-
**
|
|
148
|
+
**Preconditions**
|
|
149
|
+
- the project is live and future economics need to change
|
|
83
150
|
|
|
84
|
-
**Flow**
|
|
151
|
+
**Main Flow**
|
|
85
152
|
1. The owner or an operator with the right permission queues one or more new rulesets through `JBController`.
|
|
86
153
|
2. `JBRulesets` stores the proposed future configuration and any approval hook requirements.
|
|
87
154
|
3. When the active duration elapses, the next approved ruleset becomes live and future pays, payouts, and cash outs follow the new terms.
|
|
88
155
|
4. Existing balances and token history remain intact because only future behavior changed.
|
|
89
156
|
|
|
90
|
-
**Failure
|
|
157
|
+
**Failure Modes**
|
|
158
|
+
- approval-hook requirements are forgotten or misunderstood
|
|
159
|
+
- queued metadata is incompatible with installed hooks
|
|
160
|
+
- teams assume a ruleset change can retroactively fix prior accounting
|
|
161
|
+
|
|
162
|
+
**Postconditions**
|
|
163
|
+
- the next ruleset activates on schedule while the project keeps the same identity, treasury, and downstream integrations
|
|
91
164
|
|
|
92
165
|
## Journey 7: Migrate A Project To New Terminal Or Controller Surfaces Deliberately
|
|
93
166
|
|
|
94
|
-
**
|
|
167
|
+
**Actor:** owner or migration operator.
|
|
168
|
+
|
|
169
|
+
**Intent:** move a live project to new terminal or controller surfaces without corrupting balances, permissions, or routing history.
|
|
95
170
|
|
|
96
|
-
**
|
|
171
|
+
**Preconditions**
|
|
172
|
+
- the project needs to move to a new terminal or controller path
|
|
173
|
+
- the destination surface is understood and intended
|
|
97
174
|
|
|
98
|
-
**Flow**
|
|
175
|
+
**Main Flow**
|
|
99
176
|
1. Confirm the active ruleset permits migration and the destination surface is the intended successor.
|
|
100
177
|
2. Use `JBController.migrate(...)` and the terminal-store migration paths instead of manually repointing addresses.
|
|
101
178
|
3. Recheck directory routing and accepted accounting contexts after migration completes.
|
|
102
179
|
|
|
180
|
+
**Failure Modes**
|
|
181
|
+
- migration targets are wrong or only partially configured
|
|
182
|
+
- operators manually repoint routing without using the protocol's migration surfaces
|
|
183
|
+
|
|
184
|
+
**Postconditions**
|
|
185
|
+
- balances, permissions, and future routing stay coherent after migration
|
|
186
|
+
|
|
103
187
|
## Journey 8: Hand Off Authority Without Handing Out Root Access
|
|
104
188
|
|
|
105
|
-
**
|
|
189
|
+
**Actor:** project owner.
|
|
190
|
+
|
|
191
|
+
**Intent:** delegate project operations narrowly instead of transferring blanket control.
|
|
106
192
|
|
|
107
|
-
**
|
|
193
|
+
**Preconditions**
|
|
194
|
+
- the owner wants operators, delegates, or automation to manage only specific surfaces
|
|
108
195
|
|
|
109
|
-
**Flow**
|
|
196
|
+
**Main Flow**
|
|
110
197
|
1. The owner configures operator permissions in `JBPermissions`.
|
|
111
198
|
2. Downstream calls check those packed permission bits instead of assuming project ownership.
|
|
112
199
|
3. Integrations such as ownable wrappers, hook deployers, and router registries can now respect project-scoped delegation without custom ACL logic.
|
|
113
200
|
|
|
201
|
+
**Failure Modes**
|
|
202
|
+
- operators receive permissions broader than they need
|
|
203
|
+
- auditors assume downstream access still depends only on project ownership
|
|
204
|
+
|
|
205
|
+
**Postconditions**
|
|
206
|
+
- permissions are narrow, auditable, and scoped to the actions the operator actually needs
|
|
207
|
+
|
|
208
|
+
## Trust Boundaries
|
|
209
|
+
|
|
210
|
+
- `JBTerminalStore` is the accounting truth for balances, surplus, fees, and reclaim behavior
|
|
211
|
+
- hooks, approval hooks, pay hooks, and cash-out hooks are trusted extension surfaces, not cosmetic plugins
|
|
212
|
+
- price feeds and directory routing are critical external-context surfaces inherited by many downstream repos
|
|
213
|
+
|
|
114
214
|
## Hand-Offs
|
|
115
215
|
|
|
116
216
|
- Use [nana-permission-ids-v6](../nana-permission-ids-v6/USER_JOURNEYS.md) for the shared permission vocabulary that downstream repos import.
|
package/foundry.toml
CHANGED
package/package.json
CHANGED
package/src/JBERC20.sol
CHANGED
|
@@ -40,7 +40,6 @@ contract JBERC20 is ERC20Votes, ERC20Permit, JBPermissioned, IERC1271, IJBToken
|
|
|
40
40
|
|
|
41
41
|
/// @notice The JBTokens contract that owns this token.
|
|
42
42
|
/// @dev Set via `initialize` because JBERC20 is deployed before JBTokens (circular dependency).
|
|
43
|
-
// forge-lint: disable-next-line(mixed-case-variable)
|
|
44
43
|
IJBTokens public TOKENS;
|
|
45
44
|
|
|
46
45
|
//*********************************************************************//
|
|
@@ -5,7 +5,6 @@ pragma solidity ^0.8.0;
|
|
|
5
5
|
/// @custom:member decimals The number of decimals expected in that token's fixed point accounting.
|
|
6
6
|
/// @custom:member currency The currency that the token is priced in terms of. By convention, this is
|
|
7
7
|
/// `uint32(uint160(tokenAddress))` for tokens, or a constant ID from e.g. `JBCurrencyIds` for other currencies.
|
|
8
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
9
8
|
struct JBAccountingContext {
|
|
10
9
|
address token;
|
|
11
10
|
uint8 decimals;
|
|
@@ -16,7 +16,6 @@ import {JBTokenAmount} from "./JBTokenAmount.sol";
|
|
|
16
16
|
/// @custom:member beneficiary The address the reclaimed amount will be sent to.
|
|
17
17
|
/// @custom:member hookMetadata Extra data specified by the data hook, which is sent to the cash out hook.
|
|
18
18
|
/// @custom:member cashOutMetadata Extra data specified by the account cashing out, which is sent to the cash out hook.
|
|
19
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
20
19
|
struct JBAfterCashOutRecordedContext {
|
|
21
20
|
address holder;
|
|
22
21
|
uint256 projectId;
|
|
@@ -15,7 +15,6 @@ import {JBTokenAmount} from "./JBTokenAmount.sol";
|
|
|
15
15
|
/// @custom:member beneficiary The address which receives any tokens this payment yields.
|
|
16
16
|
/// @custom:member hookMetadata Extra data specified by the data hook, which is sent to the pay hook.
|
|
17
17
|
/// @custom:member payerMetadata Extra data specified by the payer, which is sent to the pay hook.
|
|
18
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
19
18
|
struct JBAfterPayRecordedContext {
|
|
20
19
|
address payer;
|
|
21
20
|
uint256 projectId;
|
|
@@ -20,7 +20,6 @@ import {JBTokenAmount} from "./JBTokenAmount.sol";
|
|
|
20
20
|
/// that charge their own fees — they can skip fees when value stays in the protocol (e.g. project-to-project
|
|
21
21
|
/// routing).
|
|
22
22
|
/// @custom:member metadata Extra data provided by the casher.
|
|
23
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
24
23
|
struct JBBeforeCashOutRecordedContext {
|
|
25
24
|
address terminal;
|
|
26
25
|
address holder;
|
|
@@ -15,7 +15,6 @@ import {JBTokenAmount} from "./JBTokenAmount.sol";
|
|
|
15
15
|
/// @custom:member weight The weight of the ruleset during which the payment is being made.
|
|
16
16
|
/// @custom:member reservedPercent The reserved percent of the ruleset the payment is being made during.
|
|
17
17
|
/// @custom:member metadata Extra data specified by the payer.
|
|
18
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
19
18
|
struct JBBeforePayRecordedContext {
|
|
20
19
|
address terminal;
|
|
21
20
|
address payer;
|
|
@@ -9,7 +9,6 @@ import {IJBCashOutHook} from "../interfaces/IJBCashOutHook.sol";
|
|
|
9
9
|
/// @custom:member noop A flag indicating if the hook callback should be skipped.
|
|
10
10
|
/// @custom:member amount The amount to send to the hook.
|
|
11
11
|
/// @custom:member metadata Metadata to pass to the hook.
|
|
12
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
13
12
|
struct JBCashOutHookSpecification {
|
|
14
13
|
IJBCashOutHook hook;
|
|
15
14
|
bool noop;
|
|
@@ -4,7 +4,6 @@ pragma solidity ^0.8.0;
|
|
|
4
4
|
/// @custom:member amount The amount of the currency.
|
|
5
5
|
/// @custom:member currency The currency. By convention, this is `uint32(uint160(tokenAddress))` for tokens, or a
|
|
6
6
|
/// constant ID from e.g. `JBCurrencyIds` for other currencies.
|
|
7
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
8
7
|
struct JBCurrencyAmount {
|
|
9
8
|
uint224 amount;
|
|
10
9
|
uint32 currency;
|
package/src/structs/JBFee.sol
CHANGED
|
@@ -5,7 +5,6 @@ pragma solidity ^0.8.0;
|
|
|
5
5
|
/// decimals as the terminal in which this struct was created.
|
|
6
6
|
/// @custom:member beneficiary The address that will receive the tokens that are minted as a result of the fee payment.
|
|
7
7
|
/// @custom:member unlockTimestamp The timestamp at which the fee is unlocked and can be processed.
|
|
8
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
9
8
|
struct JBFee {
|
|
10
9
|
uint256 amount;
|
|
11
10
|
address beneficiary;
|
|
@@ -20,7 +20,6 @@ import {JBCurrencyAmount} from "./JBCurrencyAmount.sol";
|
|
|
20
20
|
/// @custom:member surplusAllowances An array of surplus allowances. The surplus allowances cumulatively dictates the
|
|
21
21
|
/// maximum value of `token`s a project can pay out from its surplus (balance less payouts) in a terminal during a
|
|
22
22
|
/// ruleset. Each surplus allowance can have a unique currency and amount.
|
|
23
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
24
23
|
struct JBFundAccessLimitGroup {
|
|
25
24
|
address terminal;
|
|
26
25
|
address token;
|
|
@@ -9,7 +9,6 @@ import {IJBPayHook} from "../interfaces/IJBPayHook.sol";
|
|
|
9
9
|
/// @custom:member noop A flag indicating if the hook callback should be skipped.
|
|
10
10
|
/// @custom:member amount The amount to send to the hook.
|
|
11
11
|
/// @custom:member metadata Metadata to pass the hook.
|
|
12
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
13
12
|
struct JBPayHookSpecification {
|
|
14
13
|
IJBPayHook hook;
|
|
15
14
|
bool noop;
|
|
@@ -6,7 +6,6 @@ pragma solidity ^0.8.0;
|
|
|
6
6
|
/// permissions under this project's scope. An ID of 0 is a wildcard, which gives an operator permissions across all
|
|
7
7
|
/// projects.
|
|
8
8
|
/// @custom:member permissionIds The IDs of the permissions being given. See the `JBPermissionIds` library.
|
|
9
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
10
9
|
struct JBPermissionsData {
|
|
11
10
|
address operator;
|
|
12
11
|
uint64 projectId;
|
|
@@ -29,7 +29,6 @@ import {IJBRulesetApprovalHook} from "./../interfaces/IJBRulesetApprovalHook.sol
|
|
|
29
29
|
/// ruleset is rejected, it won't go into effect. An approval hook can be used to create rules which dictate how a
|
|
30
30
|
/// project owner can change their ruleset over time.
|
|
31
31
|
/// @custom:member metadata Extra data associated with a ruleset which can be used by other contracts.
|
|
32
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
33
32
|
struct JBRuleset {
|
|
34
33
|
uint48 cycleNumber;
|
|
35
34
|
uint48 id;
|
|
@@ -31,7 +31,6 @@ import {JBSplitGroup} from "./JBSplitGroup.sol";
|
|
|
31
31
|
/// its balance in each payment terminal while the ruleset is active. Amounts are fixed point numbers using the same
|
|
32
32
|
/// number of decimals as the corresponding terminal. The `_payoutLimit` and `_surplusAllowance` parameters must fit in
|
|
33
33
|
/// a `uint232`.
|
|
34
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
35
34
|
struct JBRulesetConfig {
|
|
36
35
|
uint48 mustStartAtOrAfter;
|
|
37
36
|
uint32 duration;
|
|
@@ -33,7 +33,6 @@ pragma solidity ^0.8.0;
|
|
|
33
33
|
/// @custom:member dataHook The data hook to use during this ruleset.
|
|
34
34
|
/// @custom:member metadata Metadata of the metadata, only the 14 least significant bits can be used, the 2 most
|
|
35
35
|
/// significant bits are disregarded.
|
|
36
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
37
36
|
struct JBRulesetMetadata {
|
|
38
37
|
uint16 reservedPercent;
|
|
39
38
|
uint16 cashOutTaxRate;
|
|
@@ -3,7 +3,6 @@ pragma solidity ^0.8.0;
|
|
|
3
3
|
|
|
4
4
|
/// @custom:member weight The cached weight value.
|
|
5
5
|
/// @custom:member weightCutMultiple The weight cut multiple that produces the given weight.
|
|
6
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
7
6
|
struct JBRulesetWeightCache {
|
|
8
7
|
uint112 weight;
|
|
9
8
|
uint168 weightCutMultiple;
|
|
@@ -6,7 +6,6 @@ import {JBRulesetMetadata} from "./JBRulesetMetadata.sol";
|
|
|
6
6
|
|
|
7
7
|
/// @custom:member ruleset The ruleset.
|
|
8
8
|
/// @custom:member metadata The ruleset's metadata.
|
|
9
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
10
9
|
struct JBRulesetWithMetadata {
|
|
11
10
|
JBRuleset ruleset;
|
|
12
11
|
JBRulesetMetadata metadata;
|
|
@@ -7,7 +7,6 @@ pragma solidity ^0.8.0;
|
|
|
7
7
|
/// @custom:member nonce An incrementing value indexed per owner,token,and spender for each signature.
|
|
8
8
|
/// @custom:member signature The signature over the permit data. Supports EOA signatures, compact signatures defined by
|
|
9
9
|
/// EIP-2098, and contract signatures defined by EIP-1271.
|
|
10
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
11
10
|
struct JBSingleAllowance {
|
|
12
11
|
uint256 sigDeadline;
|
|
13
12
|
uint160 amount;
|
package/src/structs/JBSplit.sol
CHANGED
|
@@ -30,7 +30,6 @@ import {IJBSplitHook} from "./../interfaces/IJBSplitHook.sol";
|
|
|
30
30
|
/// preserve those splits at the governance/configuration layer.
|
|
31
31
|
/// @custom:member hook A contract which will receive this split's tokens and properties, and can define custom
|
|
32
32
|
/// behavior.
|
|
33
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
34
33
|
struct JBSplit {
|
|
35
34
|
uint32 percent;
|
|
36
35
|
uint64 projectId;
|
|
@@ -6,7 +6,6 @@ import {JBSplit} from "./JBSplit.sol";
|
|
|
6
6
|
/// @custom:member groupId An identifier for the group. By convention, this ID is `uint256(uint160(tokenAddress))` for
|
|
7
7
|
/// payouts and `1` for reserved tokens.
|
|
8
8
|
/// @custom:member splits The splits in the group.
|
|
9
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
10
9
|
struct JBSplitGroup {
|
|
11
10
|
uint256 groupId;
|
|
12
11
|
JBSplit[] splits;
|
|
@@ -10,7 +10,6 @@ import {JBSplit} from "./JBSplit.sol";
|
|
|
10
10
|
/// @custom:member groupId The group the split belongs to. By convention, this ID is `uint256(uint160(tokenAddress))`
|
|
11
11
|
/// for payouts and `1` for reserved tokens.
|
|
12
12
|
/// @custom:member split The split which specified the hook.
|
|
13
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
14
13
|
struct JBSplitHookContext {
|
|
15
14
|
address token;
|
|
16
15
|
uint256 amount;
|
|
@@ -6,7 +6,6 @@ import {IJBTerminal} from "./../interfaces/IJBTerminal.sol";
|
|
|
6
6
|
|
|
7
7
|
/// @custom:member terminal The terminal to configure.
|
|
8
8
|
/// @custom:member accountingContextsToAccept The accounting contexts to accept from the terminal.
|
|
9
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
10
9
|
struct JBTerminalConfig {
|
|
11
10
|
IJBTerminal terminal;
|
|
12
11
|
JBAccountingContext[] accountingContextsToAccept;
|
|
@@ -6,7 +6,6 @@ pragma solidity ^0.8.0;
|
|
|
6
6
|
/// @custom:member currency The currency. By convention, this is `uint32(uint160(tokenAddress))` for tokens, or a
|
|
7
7
|
/// constant ID from e.g. `JBCurrencyIds` for other currencies.
|
|
8
8
|
/// @custom:member value The amount of tokens that was paid, as a fixed point number.
|
|
9
|
-
// forge-lint: disable-next-line(pascal-case-struct)
|
|
10
9
|
struct JBTokenAmount {
|
|
11
10
|
address token;
|
|
12
11
|
uint8 decimals;
|