@bananapus/omnichain-deployers-v6 0.0.19 → 0.0.21

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 DELETED
@@ -1,341 +0,0 @@
1
- # nana-omnichain-deployers-v6 Changelog (v5 -> v6)
2
-
3
- This document describes all changes between `nana-omnichain-deployers` (v5) and `nana-omnichain-deployers-v6` (v6).
4
-
5
- ## Summary
6
-
7
- - **Every project gets a 721 hook**: All projects launched through the omnichain deployer now receive a 721 hook (even without tiers), unifying the deployment model.
8
- - **Dual-hook architecture**: Separate tracking of 721 hooks (`_tiered721HookOf`) and extra data hooks (`_extraDataHookOf`) enables composing both in `beforePayRecordedWith` with proportional weight scaling.
9
- - **v5 ownership bug fixed**: `queue721RulesetsOf` in v5 deployed 721 hooks but never transferred ownership to the project — v6 properly calls `transferOwnershipToProject` on all paths.
10
- - **Function consolidation**: `launch721ProjectFor`, `launch721RulesetsFor`, and `queue721RulesetsOf` merged into overloads of their non-721 counterparts using `JBOmnichain721Config`.
11
- - **New safety checks**: Controller validation, ruleset ID collision protection, and explicit reverts replace `assert()`.
12
-
13
- ---
14
-
15
- ## 1. Breaking Changes
16
-
17
- ### 1.1 `launchProjectFor` signature completely reworked
18
-
19
- **v5** had two separate entry points for launching projects: `launchProjectFor` (without 721 hook) and `launch721ProjectFor` (with 721 hook). v6 merges these into two overloads of `launchProjectFor`:
20
-
21
- - **v5 `launchProjectFor`**: Accepted raw `JBRulesetConfig[]` and returned `(uint256 projectId, address[] suckers)`. No 721 hook was deployed.
22
- - **v5 `launch721ProjectFor`**: Accepted `JBDeploy721TiersHookConfig`, `JBLaunchProjectConfig`, and a `bytes32 salt`. Returned `(uint256 projectId, IJB721TiersHook hook, address[] suckers)`.
23
- - **v6 `launchProjectFor` (with 721 config)**: Accepts `JBOmnichain721Config`, `JBRulesetConfig[]`, `JBTerminalConfig[]`, `string memo`, `JBSuckerDeploymentConfig`, `IJBController`. Returns `(uint256 projectId, IJB721TiersHook hook, address[] suckers)`.
24
- - **v6 `launchProjectFor` (default 721)**: Same parameters as v5's `launchProjectFor` but now also deploys a default empty-tier 721 hook. Returns `(uint256 projectId, IJB721TiersHook hook, address[] suckers)` -- note the added `IJB721TiersHook hook` return value.
25
-
26
- Every project launched through v6 now gets a 721 hook, even if no tiers are configured. Projects that previously launched without a 721 hook via v5's `launchProjectFor` will now receive a default empty-tier 721 hook.
27
-
28
- ### 1.2 `launch721ProjectFor` removed
29
-
30
- Replaced by the `launchProjectFor(... JBOmnichain721Config ...)` overload described above.
31
-
32
- ### 1.3 `launchRulesetsFor` signature reworked
33
-
34
- **v5** had two entry points: `launchRulesetsFor` (without 721 hook) and `launch721RulesetsFor` (with 721 hook).
35
-
36
- - **v5 `launchRulesetsFor`**: Accepted `JBRulesetConfig[]`, `JBTerminalConfig[]`, `string memo`, `IJBController`. No 721 hook deployed.
37
- - **v5 `launch721RulesetsFor`**: Accepted `JBDeploy721TiersHookConfig`, `JBLaunchRulesetsConfig`, `IJBController`, `bytes32 salt`. Deployed a 721 hook.
38
- - **v6 `launchRulesetsFor` (with 721 config)**: Accepts `JBOmnichain721Config`, `JBRulesetConfig[]`, `JBTerminalConfig[]`, `string memo`, `IJBController`. Returns `(uint256 rulesetId, IJB721TiersHook hook)`.
39
- - **v6 `launchRulesetsFor` (default 721)**: Accepts `JBRulesetConfig[]`, `JBTerminalConfig[]`, `string memo`, `IJBController`. Returns `(uint256 rulesetId, IJB721TiersHook hook)`.
40
-
41
- Both v6 overloads now return `IJB721TiersHook hook` alongside `rulesetId`.
42
-
43
- v6 also uses the newly separated `LAUNCH_RULESETS` permission for `_launchRulesetsFor`. In v5, both `launchRulesetsFor` and `queueRulesetsOf` shared the same `QUEUE_RULESETS` permission ID. v6 splits these into two distinct permission IDs (`LAUNCH_RULESETS` and `QUEUE_RULESETS`), so `_launchRulesetsFor` now correctly requires `LAUNCH_RULESETS` since it calls `controller.launchRulesetsFor` (which sets terminals).
44
-
45
- ### 1.4 `launch721RulesetsFor` removed
46
-
47
- Replaced by the `launchRulesetsFor(... JBOmnichain721Config ...)` overload described above.
48
-
49
- ### 1.5 `queueRulesetsOf` signature reworked
50
-
51
- **v5** had two entry points: `queueRulesetsOf` (without 721 hook) and `queue721RulesetsOf` (with 721 hook).
52
-
53
- - **v5 `queueRulesetsOf`**: Accepted `JBRulesetConfig[]`, `string memo`, `IJBController`. No 721 hook. Returned `uint256 rulesetId`.
54
- - **v5 `queue721RulesetsOf`**: Accepted `JBDeploy721TiersHookConfig`, `JBQueueRulesetsConfig`, `IJBController`, `bytes32 salt`. Returned `(uint256 rulesetId, IJB721TiersHook hook)`.
55
- - **v6 `queueRulesetsOf` (with 721 config)**: Accepts `JBOmnichain721Config`, `JBRulesetConfig[]`, `string memo`, `IJBController`. Returns `(uint256 rulesetId, IJB721TiersHook hook)`.
56
- - **v6 `queueRulesetsOf` (default 721)**: Accepts `JBRulesetConfig[]`, `string memo`, `IJBController`. Returns `(uint256 rulesetId, IJB721TiersHook hook)`.
57
-
58
- Both v6 overloads now return `IJB721TiersHook hook` alongside `rulesetId`.
59
-
60
- v6 also fixes v5's `queue721RulesetsOf` which deployed the 721 hook but never called `JBOwnable(hook).transferOwnershipToProject(projectId)`, leaving the hook owned by the deployer contract rather than the project. In v6, all paths that deploy a 721 hook — including `_queueRulesetsOf` — properly transfer hook ownership to the project.
61
-
62
- > **⚠️ This was a v5 bug**: Any project that used v5's `queue721RulesetsOf` to deploy a 721 hook has that hook owned by the deployer contract, not the project. Projects affected should manually transfer hook ownership.
63
-
64
- ### 1.6 `queue721RulesetsOf` removed
65
-
66
- Replaced by the `queueRulesetsOf(... JBOmnichain721Config ...)` overload described above.
67
-
68
- ### 1.7 `dataHookOf` view replaced by `extraDataHookOf` and `tiered721HookOf`
69
-
70
- **v5** had a single `dataHookOf(uint256 projectId, uint256 rulesetId)` view returning `(bool useDataHookForPay, bool useDataHookForCashout, IJBRulesetDataHook dataHook)`.
71
-
72
- **v6** replaces this with two separate views:
73
- - `extraDataHookOf(uint256 projectId, uint256 rulesetId)` returns `JBDeployerHookConfig memory hook` -- the non-721 data hook (e.g., buyback hook).
74
- - `tiered721HookOf(uint256 projectId, uint256 rulesetId)` returns `(IJB721TiersHook hook, bool useDataHookForCashOut)` -- the 721 tiers hook.
75
-
76
- ### 1.8 `JBDeployerHookConfig` field order changed
77
-
78
- **v5**: `{ bool useDataHookForPay, bool useDataHookForCashOut, IJBRulesetDataHook dataHook }`
79
- **v6**: `{ IJBRulesetDataHook dataHook, bool useDataHookForPay, bool useDataHookForCashOut }`
80
-
81
- The `dataHook` field moved from last to first. This changes ABI encoding and is a breaking change for any code constructing this struct positionally.
82
-
83
- ### 1.9 Solidity version bumped
84
-
85
- **v5**: `pragma solidity 0.8.23`
86
- **v6**: `pragma solidity 0.8.28`
87
-
88
- ### 1.10 721 hook config types replaced
89
-
90
- **v5** used `JBDeploy721TiersHookConfig`, `JBLaunchProjectConfig`, `JBLaunchRulesetsConfig`, `JBQueueRulesetsConfig`, and `JBPayDataHookRulesetConfig` from `@bananapus/721-hook-v5`.
91
-
92
- **v6** removes `JBLaunchProjectConfig`, `JBLaunchRulesetsConfig`, `JBQueueRulesetsConfig`, and `JBPayDataHookRulesetConfig` — the deployer now accepts standard `JBRulesetConfig[]` directly instead of those 721-specific config wrappers. `JBDeploy721TiersHookConfig` is still used but is now wrapped inside the new `JBOmnichain721Config` struct (see Section 5) rather than passed as a standalone parameter.
93
-
94
- ---
95
-
96
- ## 2. New Features
97
-
98
- ### 2.1 Default empty-tier 721 hook deployment
99
-
100
- v6 introduces overloads of `launchProjectFor`, `launchRulesetsFor`, and `queueRulesetsOf` that accept standard `JBRulesetConfig[]` without any 721 configuration. These overloads automatically deploy a default empty-tier 721 hook using `_default721Config()`, which derives `currency` from the first ruleset's `baseCurrency` and sets `decimals = 18`. This ensures every project deployed through the omnichain deployer has a 721 hook, even if no tiers are configured.
101
-
102
- ### 2.2 721 hook carry-forward on queue
103
-
104
- When queueing rulesets via `queueRulesetsOf`, if `deploy721Config.deployTiersHookConfig.tiersConfig.tiers.length == 0`, the 721 hook from the latest ruleset is carried forward instead of deploying a new one. This avoids unnecessary hook deployments when tiers haven't changed. If no previous hook exists (project was not launched through this deployer), the call reverts with `JBOmnichainDeployer_InvalidHook`.
105
-
106
- ### 2.3 Controller validation
107
-
108
- v6 adds `_validateController()` which checks that the provided `IJBController` matches the project's controller registered in the directory. This is called by `_launchRulesetsFor` and `_queueRulesetsOf`. v5 had no such validation.
109
-
110
- ### 2.4 Ruleset ID collision protection
111
-
112
- v6 adds a check in `_queueRulesetsOf` that reverts with `JBOmnichainDeployer_RulesetIdsUnpredictable()` if the project's `latestRulesetIdOf >= block.timestamp`, which would mean rulesets were already queued in the same block, making the `block.timestamp + i` ruleset ID prediction unreliable.
113
-
114
- ### 2.5 Dual-hook architecture (721 + extra data hook)
115
-
116
- v5 stored a single `_dataHookOf` per project/ruleset. v6 introduces a dual-hook system:
117
- - `_tiered721HookOf`: Stores the 721 tiers hook per project/ruleset (new).
118
- - `_extraDataHookOf`: Stores any additional data hook (e.g., buyback hook) per project/ruleset (renamed from `_dataHookOf`).
119
-
120
- The `beforePayRecordedWith` function now merges results from both hooks: the 721 hook contributes pay hook specifications (tier splits), while the extra data hook contributes weight adjustments. Weight is scaled using `mulDiv` to account for the portion of payment going to 721 tier splits vs. the project treasury.
121
-
122
- ### 2.6 `useDataHookForPay` forced to `true`
123
-
124
- v5's `_setup` only forced `useDataHookForCashOut = true` on the wrapping metadata. v6's `_setup721` forces both `useDataHookForPay = true` and `useDataHookForCashOut = true`, ensuring all payments are routed through the deployer's `beforePayRecordedWith` wrapper.
125
-
126
- ### 2.7 `IERC165` support added to `supportsInterface`
127
-
128
- v6 adds `interfaceId == type(IERC165).interfaceId` to the `supportsInterface` check, which was missing in v5.
129
-
130
- ### 2.8 Weight scaling with `mulDiv`
131
-
132
- v6 imports `mulDiv` from `@prb/math` to scale the data hook's weight proportionally when 721 tier splits consume part of the payment amount. This prevents double-counting: tokens are only minted for the portion of the payment that enters the project treasury (after tier splits).
133
-
134
- ---
135
-
136
- ## 3. Event Changes
137
-
138
- No events are defined directly in this contract or its interface in either v5 or v6. All events are emitted by downstream contracts (controller, sucker registry, etc.).
139
-
140
- Indexer note:
141
- - model this repo primarily through downstream event correlation;
142
- - a project can now have both a stored 721 hook and an extra data hook, so one deployer/project entity may need to reference multiple downstream hook addresses.
143
-
144
- ---
145
-
146
- ## 4. Error Changes
147
-
148
- ### 4.1 New errors in v6
149
-
150
- | Error | Description |
151
- |---|---|
152
- | `JBOmnichainDeployer_ControllerMismatch()` | Thrown when the provided controller does not match the project's controller in the directory. |
153
- | `JBOmnichainDeployer_ProjectIdMismatch()` | Thrown when the project ID returned by the controller does not match the expected project ID. Replaces the v5 `assert()` pattern. |
154
- | `JBOmnichainDeployer_RulesetIdsUnpredictable()` | Thrown when queueing rulesets in the same block as a previous queue, making `block.timestamp + i` predictions unreliable. |
155
- | `JBOmnichainDeployer_UnexpectedNFTReceived()` | Thrown in `onERC721Received` when the NFT is not from `JBProjects`. Replaces the bare `revert()` in v5. |
156
-
157
- ### 4.2 Retained errors
158
-
159
- | Error | Notes |
160
- |---|---|
161
- | `JBOmnichainDeployer_InvalidHook()` | Expanded. Also thrown when `queueRulesetsOf` tries to carry forward a null hook (no tiers provided and no previous hook deployed through this contract). |
162
-
163
- ### 4.3 Removed patterns
164
-
165
- - v5 used `assert()` for the project ID sanity check in `launchProjectFor` and `launch721ProjectFor`. v6 replaces this with an explicit `if (...) revert JBOmnichainDeployer_ProjectIdMismatch()`.
166
- - v5 used bare `revert()` in `onERC721Received`. v6 uses `revert JBOmnichainDeployer_UnexpectedNFTReceived()`.
167
-
168
- ---
169
-
170
- ## 5. Struct Changes
171
-
172
- ### 5.1 New: `JBOmnichain721Config`
173
-
174
- ```solidity
175
- struct JBOmnichain721Config {
176
- JBDeploy721TiersHookConfig deployTiersHookConfig;
177
- bool useDataHookForCashOut;
178
- bytes32 salt;
179
- }
180
- ```
181
-
182
- Bundles the 721 hook deployment config, cash-out flag, and deterministic deployment salt into a single struct. This replaces the separate `JBDeploy721TiersHookConfig` + `bytes32 salt` parameters used in v5. It also adds a `useDataHookForCashOut` flag that was not configurable in v5 (previously derived from the 721-specific metadata).
183
-
184
- ### 5.2 New: `JBTiered721HookConfig`
185
-
186
- ```solidity
187
- struct JBTiered721HookConfig {
188
- IJB721TiersHook hook;
189
- bool useDataHookForCashOut;
190
- }
191
- ```
192
-
193
- Internal storage struct for tracking the 721 hook and its cash-out behavior per project/ruleset. This is new in v6 -- v5 did not separately track the 721 hook.
194
-
195
- ### 5.3 Modified: `JBDeployerHookConfig`
196
-
197
- **v5:**
198
- ```solidity
199
- struct JBDeployerHookConfig {
200
- bool useDataHookForPay;
201
- bool useDataHookForCashOut;
202
- IJBRulesetDataHook dataHook;
203
- }
204
- ```
205
-
206
- **v6:**
207
- ```solidity
208
- struct JBDeployerHookConfig {
209
- IJBRulesetDataHook dataHook;
210
- bool useDataHookForPay;
211
- bool useDataHookForCashOut;
212
- }
213
- ```
214
-
215
- Field order changed: `dataHook` moved from third to first position. No fields added or removed.
216
-
217
- ### 5.4 Unchanged: `JBSuckerDeploymentConfig`
218
-
219
- The struct is unchanged. Only the import path changed from `@bananapus/suckers-v5` to `@bananapus/suckers-v6`.
220
-
221
- ### 5.5 Removed 721-hook-specific config types
222
-
223
- v5 relied on the following structs from `@bananapus/721-hook-v5`, which are no longer used by the deployer in v6:
224
- - `JBLaunchProjectConfig`
225
- - `JBLaunchRulesetsConfig`
226
- - `JBQueueRulesetsConfig`
227
- - `JBPayDataHookRulesetConfig`
228
- - `JBPayDataHookRulesetMetadata`
229
-
230
- v6 uses standard `JBRulesetConfig[]` directly, combined with `JBOmnichain721Config` for 721-specific settings.
231
-
232
- ---
233
-
234
- ## 6. Implementation Changes (Non-Interface)
235
-
236
- ### 6.1 Internal storage split
237
-
238
- v5 had a single mapping:
239
- ```solidity
240
- mapping(uint256 => mapping(uint256 => JBDeployerHookConfig)) internal _dataHookOf;
241
- ```
242
-
243
- v6 splits this into two:
244
- ```solidity
245
- mapping(uint256 => mapping(uint256 => JBDeployerHookConfig)) internal _extraDataHookOf;
246
- mapping(uint256 => mapping(uint256 => JBTiered721HookConfig)) internal _tiered721HookOf;
247
- ```
248
-
249
- ### 6.2 `_setup` replaced by `_setup721`
250
-
251
- v5's `_setup` stored the caller-provided data hook and replaced it with `address(this)`, forcing `useDataHookForCashOut = true`.
252
-
253
- v6's `_setup721` does the same but additionally:
254
- - Stores the 721 hook in `_tiered721HookOf` per ruleset.
255
- - Stores the caller's original data hook (if any) in `_extraDataHookOf`.
256
- - Forces both `useDataHookForPay = true` and `useDataHookForCashOut = true` on the wrapping metadata.
257
-
258
- ### 6.3 `_from721Config` removed
259
-
260
- v5 had an internal `_from721Config` function that converted `JBPayDataHookRulesetConfig[]` to `JBRulesetConfig[]`, manually mapping each field from the 721-specific metadata struct to the standard `JBRulesetMetadata`. This entire conversion layer is removed in v6 because the deployer now accepts standard `JBRulesetConfig[]` directly.
261
-
262
- ### 6.4 `beforePayRecordedWith` rewritten
263
-
264
- **v5**: Simply forwarded the call to the stored data hook (if any) and returned the original values otherwise.
265
-
266
- **v6**: Implements a multi-hook composition:
267
- 1. Calls the 721 hook's `beforePayRecordedWith` to get tier split specs and total split amount.
268
- 2. Computes `projectAmount = context.amount.value - totalSplitAmount`.
269
- 3. Calls the extra data hook (if any) with a modified context where `amount.value = projectAmount`.
270
- 4. Scales the extra hook's weight using `mulDiv(weight, projectAmount, context.amount.value)` to prevent minting tokens for amounts going to tier splits.
271
- 5. Merges hook specifications from both hooks (721 specs first, then extra data hook specs).
272
-
273
- ### 6.5 `beforeCashOutRecordedWith` updated for dual hooks
274
-
275
- **v5**: Checked for sucker (tax-free), then forwarded to the single data hook.
276
-
277
- **v6**: Composes both hooks sequentially:
278
- 1. Sucker check (tax-free, unchanged).
279
- 2. 721 hook (if configured and `useDataHookForCashOut` is true) — updates cash out parameters.
280
- 3. Extra data hook (if configured and `useDataHookForCashOut` is true) — called with the already-updated values from the 721 hook.
281
- 4. Both hooks' specifications are merged (721 first, then extra).
282
- 5. Falls back to original context values if neither hook has the flag set.
283
-
284
- ### 6.6 `hasMintPermissionFor` simplified
285
-
286
- **v5**: Checked sucker, then forwarded to the data hook.
287
-
288
- **v6**: Checks sucker, then only checks the extra data hook (not the 721 hook, since "the 721 hook doesn't grant mint permission" per the code comment).
289
-
290
- ### 6.7 `assert()` replaced with explicit reverts
291
-
292
- v5 used `assert(projectId == controller.launchProjectFor(...))`. v6 replaces this with `if (projectId != ...) revert JBOmnichainDeployer_ProjectIdMismatch()`, which provides a named error and does not consume all gas on failure.
293
-
294
- ### 6.8 Public functions refactored into internal implementations
295
-
296
- v6 extracts the core logic into internal functions with a leading underscore:
297
- - `_launchProjectFor` (shared by both `launchProjectFor` overloads)
298
- - `_launchRulesetsFor` (shared by both `launchRulesetsFor` overloads)
299
- - `_queueRulesetsOf` (shared by both `queueRulesetsOf` overloads)
300
- - `_deploy721Hook` (extracts 721 hook deployment logic)
301
- - `_default721Config` (generates default empty-tier 721 config)
302
-
303
- v5 had all logic inline in the external functions.
304
-
305
- ### 6.9 `_validateController` added
306
-
307
- New internal function that checks `controller.DIRECTORY().controllerOf(projectId) == controller`. Called from `_launchRulesetsFor` and `_queueRulesetsOf` but not from `_launchProjectFor` (since the project doesn't exist yet at validation time).
308
-
309
- ### 6.10 `onERC721Received` improved error
310
-
311
- v5: `if (msg.sender != address(PROJECTS)) revert();`
312
- v6: `if (msg.sender != address(PROJECTS)) revert JBOmnichainDeployer_UnexpectedNFTReceived();`
313
-
314
- ---
315
-
316
- ## 7. Migration Table
317
-
318
- | v5 Function/View | v6 Equivalent | Notes |
319
- |---|---|---|
320
- | `launchProjectFor(owner, projectUri, rulesetConfigs, terminalConfigs, memo, suckerConfig, controller)` | `launchProjectFor(owner, projectUri, rulesetConfigs, terminalConfigs, memo, suckerConfig, controller)` | Same parameters but now also deploys a default 721 hook. Return type adds `IJB721TiersHook hook`. |
321
- | `launch721ProjectFor(owner, deployTiersHookConfig, launchProjectConfig, salt, suckerConfig, controller)` | `launchProjectFor(owner, projectUri, deploy721Config, rulesetConfigs, terminalConfigs, memo, suckerConfig, controller)` | 721 config bundled into `JBOmnichain721Config`. Standard `JBRulesetConfig[]` replaces `JBLaunchProjectConfig`. |
322
- | `launchRulesetsFor(projectId, rulesetConfigs, terminalConfigs, memo, controller)` | `launchRulesetsFor(projectId, rulesetConfigs, terminalConfigs, memo, controller)` | Return type adds `IJB721TiersHook hook`. Controller validation added. |
323
- | `launch721RulesetsFor(projectId, deployTiersHookConfig, launchRulesetsConfig, controller, salt)` | `launchRulesetsFor(projectId, deploy721Config, rulesetConfigs, terminalConfigs, memo, controller)` | 721 config bundled into `JBOmnichain721Config`. Standard `JBRulesetConfig[]` replaces `JBLaunchRulesetsConfig`. |
324
- | `queueRulesetsOf(projectId, rulesetConfigs, memo, controller)` | `queueRulesetsOf(projectId, rulesetConfigs, memo, controller)` | Return type adds `IJB721TiersHook hook`. Controller validation and ruleset ID collision check added. |
325
- | `queue721RulesetsOf(projectId, deployTiersHookConfig, queueRulesetsConfig, controller, salt)` | `queueRulesetsOf(projectId, deploy721Config, rulesetConfigs, memo, controller)` | 721 config bundled into `JBOmnichain721Config`. Standard `JBRulesetConfig[]` replaces `JBQueueRulesetsConfig`. |
326
- | `dataHookOf(projectId, rulesetId)` | `extraDataHookOf(projectId, rulesetId)` + `tiered721HookOf(projectId, rulesetId)` | Split into two views. `extraDataHookOf` returns `JBDeployerHookConfig memory`. `tiered721HookOf` returns `(IJB721TiersHook, bool)`. |
327
- | `deploySuckersFor(projectId, suckerConfig)` | `deploySuckersFor(projectId, suckerConfig)` | Unchanged. |
328
-
329
- > **Cross-repo impact**: Uses `LAUNCH_RULESETS` from `nana-permission-ids-v6` (split from `QUEUE_RULESETS`). The dual-hook composition pattern in `beforePayRecordedWith` uses `mulDiv` from `@prb/math` to scale weight proportionally — `revnet-core-v6` implements a similar pattern for its buyback hook + 721 hook composition.
330
-
331
- ---
332
-
333
- ## 8. Bug Fixes (Post-Audit)
334
-
335
- ### 8.1 NEW-M-3: Queue carry-forward preserves `useDataHookForCashOut` flag
336
-
337
- **Severity**: Medium
338
-
339
- **Bug**: When `_queueRulesetsOf` carried forward the previous 721 hook (no new tiers), the `useDataHookForCashOut` flag was read from the fresh `deploy721Config` parameter instead of the stored previous value. The simplified `queueRulesetsOf` overload uses `_default721Config()` which defaults `useDataHookForCashOut` to `false`, silently disabling 721-mediated cash-outs at the next ruleset boundary.
340
-
341
- **Fix**: When carrying forward the previous 721 hook, the `useDataHookForCashOut` flag is now read from the stored `_tiered721HookOf` config for the previous ruleset, preserving the original intent. The caller-provided flag is only used when deploying a new 721 hook (i.e., when tiers are provided).
@@ -1,39 +0,0 @@
1
- # 🔐 Security Review — nana-omnichain-deployers-v6
2
-
3
- ---
4
-
5
- ## Scope
6
-
7
- | | |
8
- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
9
- | **Mode** | ALL / default |
10
- | **Files reviewed** | `script/Deploy.s.sol` · `script/helpers/DeployersDeploymentLib.sol` · `src/JBOmnichainDeployer.sol`<br>`src/structs/JBDeployerHookConfig.sol` · `src/structs/JBOmnichain721Config.sol` · `src/structs/JBSuckerDeploymentConfig.sol`<br>`src/structs/JBTiered721HookConfig.sol` |
11
- | **Confidence threshold (1-100)** | 75 |
12
-
13
- ---
14
-
15
- ## Findings
16
-
17
- None.
18
-
19
- ---
20
-
21
- Findings List
22
-
23
- | # | Confidence | Title |
24
- |---|---|---|
25
- | - | - | None |
26
-
27
- ---
28
-
29
- ## Leads
30
-
31
- _Vulnerability trails with concrete code smells where the full exploit path could not be completed in one analysis pass. These are not false positives — they are high-signal leads for manual review. Not scored._
32
-
33
- - **Reflexive controller validation overstates what it proves** — `JBOmnichainDeployer._validateController` — Code smells: validation is anchored to `controller.DIRECTORY()` supplied by the same controller being checked, rather than to an immutable trusted directory — This did not survive to a finding because the path does not update the canonical project rulesets or directory, so I could not complete a live exploit that changes real terminal execution. It is still worth tightening or clarifying because the current comment implies stronger authenticity guarantees than the code actually enforces.
34
- - **`launchRulesetsFor` semantics depend on upstream “first launch only” behavior** — `JBOmnichainDeployer._launchRulesetsFor` — Code smells: the wrapper presents a generic launch entrypoint, but upstream `JBController.launchRulesetsFor` reverts once a project already has rulesets — I did not confirm a security impact, but the API/documentation boundary is easy to misuse and should remain regression-tested so integrations do not assume it can relaunch arbitrary existing projects.
35
- - **Pay-hook composition assumes the 721 hook preserves its current return-shape invariants** — `JBOmnichainDeployer.beforePayRecordedWith` — Code smells: only `tiered721HookSpecs[0]` is consumed and `projectAmount` is clamped to zero if the returned split amount exceeds the payment amount — I could not prove an exploitable path in the current dependency set because the bundled 721 hook maintains the expected single-spec invariant. This remains a dependency-sensitive integration trail if the upstream hook contract or interface expectations ever change.
36
-
37
- ---
38
-
39
- > ⚠️ This review was performed by an AI assistant. AI analysis can never verify the complete absence of vulnerabilities and no guarantee of security is given. Team security reviews, bug bounty programs, and on-chain monitoring are strongly recommended. For a consultation regarding your projects' security, visit [https://www.pashov.com](https://www.pashov.com)