@bananapus/core-v6 0.0.53 → 0.0.54

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 CHANGED
@@ -13,17 +13,6 @@ This file describes the verified change from `nana-core-v5` to the current `nana
13
13
  - `JBTokens`
14
14
  - the shared core interfaces, structs, and libraries under `src/`
15
15
 
16
- ## 0.0.53 — Drop the `via_ir` requirement
17
-
18
- `JBCashOutHookSpecsLib.fulfill` originally took 10 named arguments. When `JBMultiTerminal._cashOutTokensOf` and `_payAfterCashOutTokensOf` called it, the call site ran past solc 0.8.28's 16-slot Yul stack ceiling, which forced every consumer of `@bananapus/core-v6` to enable `via_ir = true` in their own `foundry.toml` profile. That cascaded into stack-too-deep failures in downstream packages whose own functions couldn't tolerate `via_ir` (notably `nana-721-hook-v6`'s `JB721TiersHookStore.tiersOf`).
19
-
20
- This release reshapes `fulfill` to accept the existing `JBAfterCashOutRecordedContext` directly — the same struct the hook receives — so no parallel arg bundle is needed. The new signature is `fulfill(IJBFeelessAddresses, JBAfterCashOutRecordedContext, JBCashOutHookSpecification[])`. The per-iteration loop body is extracted into a private `_fulfillOne` helper so its locals don't share `fulfill`'s stack frame. Both call sites in `JBMultiTerminal` build the context field-by-field (one stack slot per assignment) instead of via a struct literal (which would push all ten fields onto the stack at once and trip the same ceiling at the caller).
21
-
22
- Integrator impact:
23
- - `JBCashOutHookSpecsLib.fulfill(IJBFeelessAddresses, uint256, JBTokenAmount, address, uint256, bytes, JBRuleset, uint256, address payable, JBCashOutHookSpecification[])` → `fulfill(IJBFeelessAddresses, JBAfterCashOutRecordedContext, JBCashOutHookSpecification[])`. The only on-chain caller is `JBMultiTerminal` (this PR updates both call sites), so the public ABI surface of `JBMultiTerminal` is unchanged.
24
- - Consumers of `@bananapus/core-v6@^0.0.53` can drop `via_ir = true` from their `foundry.toml` profiles if they only enabled it because of `JBCashOutHookSpecsLib`. `nana-core-v6`'s own profile flips `via_ir` to `false` to lock in the property.
25
- - All 997 unit/non-fork tests pass on the refactored library + call sites.
26
-
27
16
  ## Summary
28
17
 
29
18
  - v6 adds explicit preview APIs for pay and cash-out flows. Integrations can simulate more of the terminal path directly from the core contracts.
@@ -41,23 +30,6 @@ Integrator impact:
41
30
  - `IJBController.addPriceFeed(...)` became `addPriceFeedFor(...)`.
42
31
  - `IJBTerminal.currentSurplusOf(...)` now takes `address[] calldata tokens` instead of the old accounting-context array input.
43
32
  - The interface surface adds explicit hook-spec return types to preview flows, which changes what off-chain callers can and should decode.
44
- - `IJBCashOutTerminal.payAfterCashOutTokensOf(...)` is new. It burns source-project tokens and pays the
45
- reclaim into another project via that project's primary terminal for the reclaim token (which may itself
46
- be a router that swaps before paying). Source-side cashout fee is skipped; the equivalent fee is bound on
47
- the destination project's side by crediting `_feeFreeSurplusOf[beneficiaryProjectId][token]` on the first of the destination project's accounting contexts on this
48
- terminal whose balance grows during the routing. Reverts if no delivery lands on this terminal under any
49
- of the destination project's accounting contexts.
50
- - `IJBCashOutTerminal.addToBalanceAfterCashOutTokensOf(...)` is new. Sibling of
51
- `payAfterCashOutTokensOf` that adds the reclaim to the destination project's balance instead of paying
52
- (no destination tokens minted). Same source-side fee-skip + destination-side `_feeFreeSurplusOf` credit
53
- semantics, same opt-out via `pauseCrossProjectFeeFreeInflows`. Held-fee return on the destination side
54
- is hardcoded to `false` so this entrypoint cannot unlock B's held fees.
55
- - `JBRulesetMetadata.pauseCrossProjectFeeFreeInflows` is new (bit 80 in the packed metadata word). Opt-out
56
- flag on the destination project's current ruleset; when set, `payAfterCashOutTokensOf` and
57
- `addToBalanceAfterCashOutTokensOf` calls targeting the destination project revert. Default
58
- `false` allows inflows — matching the existing intra-terminal payout semantic where receiving projects
59
- accumulate `_feeFreeSurplusOf` credits from other projects' outflows. The trailing `metadata` field
60
- narrowed from 14 to 13 bits to make room.
61
33
 
62
34
  ## Breaking ABI changes
63
35
 
@@ -66,16 +38,8 @@ Integrator impact:
66
38
  - `IJBController.previewMintOf(...)` is new.
67
39
  - `IJBTerminal.previewPayFor(...)` is new.
68
40
  - `IJBCashOutTerminal.previewCashOutFrom(...)` is new.
69
- - `IJBCashOutTerminal.payAfterCashOutTokensOf(...)` is new.
70
- - `IJBCashOutTerminal.addToBalanceAfterCashOutTokensOf(...)` is new.
71
- - `IJBFeeTerminal.FEE()` is REMOVED. The terminal no longer re-exports the protocol fee constant; read
72
- `JBConstants.FEE` directly. Off-chain integrators that previously called `terminal.FEE()` must switch to
73
- reading the constant from `JBConstants`.
74
41
  - `IJBTerminalStore.previewPayFrom(...)` and `previewCashOutFrom(...)` are new.
75
42
  - `IJBTerminal.currentSurplusOf(...)` changed parameter shape.
76
- - `JBRulesetMetadata` adds `pauseCrossProjectFeeFreeInflows` and narrows `metadata` from 14 to 13 bits.
77
- Packed `JBRuleset.metadata` layout has shifted accordingly. Integrators that read the packed word directly
78
- must rebuild against the new layout.
79
43
 
80
44
  ## Indexer impact
81
45
 
@@ -94,24 +58,12 @@ Integrator impact:
94
58
  - Added functions
95
59
  - `IJBTerminal.previewPayFor(...)`
96
60
  - `IJBCashOutTerminal.previewCashOutFrom(...)`
97
- - `IJBCashOutTerminal.payAfterCashOutTokensOf(...)`
98
- - `IJBCashOutTerminal.addToBalanceAfterCashOutTokensOf(...)`
99
61
  - `IJBTerminalStore.previewPayFrom(...)`
100
62
  - `IJBTerminalStore.previewCashOutFrom(...)`
101
63
  - `IJBController.previewMintOf(...)`
102
64
  - `IJBController.setTokenMetadataOf(...)`
103
- - Added ruleset metadata flags
104
- - `JBRulesetMetadata.pauseCrossProjectFeeFreeInflows` (bit 80; narrowed `metadata` field from 14 to 13 bits)
105
- - Added libraries
106
- - `JBHeldFeesLib` (held-fee bookkeeping extracted from `JBMultiTerminal` to relieve bytecode budget;
107
- called via delegatecall, storage refs preserved)
108
- - `JBCashOutHookSpecsLib` (cash-out hook specification fulfillment extracted from `JBMultiTerminal` to
109
- relieve bytecode budget after adding `addToBalanceAfterCashOutTokensOf`; called via delegatecall, emits
110
- `HookAfterRecordCashOut` from the terminal address)
111
65
  - Renamed functions
112
66
  - `IJBController.addPriceFeed(...)` -> `addPriceFeedFor(...)`
113
- - Removed functions
114
- - `IJBFeeTerminal.FEE()` (read `JBConstants.FEE` directly)
115
67
  - Changed function shapes
116
68
  - `IJBTerminal.currentSurplusOf(...)`
117
69
  - Added events
package/foundry.toml CHANGED
@@ -3,7 +3,6 @@ solc = '0.8.28'
3
3
  bytecode_hash = "none"
4
4
  evm_version = 'cancun'
5
5
  optimizer_runs = 200
6
- via_ir = false
7
6
  libs = ["node_modules", "lib"]
8
7
  fs_permissions = [{ access = "read-write", path = "./"}]
9
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bananapus/core-v6",
3
- "version": "0.0.53",
3
+ "version": "0.0.54",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",