@rev-net/core-v6 0.0.64 → 0.0.66
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/package.json +10 -12
- package/CHANGELOG.md +0 -120
package/package.json
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rev-net/core-v6",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.66",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/rev-net/revnet-core-v6"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
|
-
"CHANGELOG.md",
|
|
11
10
|
"foundry.toml",
|
|
12
11
|
"references/",
|
|
13
12
|
"remappings.txt",
|
|
14
|
-
"script/
|
|
15
|
-
"script/helpers/",
|
|
13
|
+
"script/",
|
|
16
14
|
"src/"
|
|
17
15
|
],
|
|
18
16
|
"engines": {
|
|
@@ -26,14 +24,14 @@
|
|
|
26
24
|
"artifacts": "source ./.env && npx sphinx artifacts --org-id 'ea165b21-7cdc-4d7b-be59-ecdd4c26bee4' --project-name 'revnet-core-v6'"
|
|
27
25
|
},
|
|
28
26
|
"dependencies": {
|
|
29
|
-
"@bananapus/721-hook-v6": "^0.0.
|
|
30
|
-
"@bananapus/buyback-hook-v6": "^0.0.
|
|
31
|
-
"@bananapus/core-v6": "^0.0.
|
|
32
|
-
"@bananapus/ownable-v6": "^0.0.
|
|
33
|
-
"@bananapus/permission-ids-v6": "^0.0.
|
|
34
|
-
"@bananapus/router-terminal-v6": "^0.0.
|
|
35
|
-
"@bananapus/suckers-v6": "^0.0.
|
|
36
|
-
"@croptop/core-v6": "^0.0.
|
|
27
|
+
"@bananapus/721-hook-v6": "^0.0.55",
|
|
28
|
+
"@bananapus/buyback-hook-v6": "^0.0.51",
|
|
29
|
+
"@bananapus/core-v6": "^0.0.60",
|
|
30
|
+
"@bananapus/ownable-v6": "^0.0.28",
|
|
31
|
+
"@bananapus/permission-ids-v6": "^0.0.27",
|
|
32
|
+
"@bananapus/router-terminal-v6": "^0.0.49",
|
|
33
|
+
"@bananapus/suckers-v6": "^0.0.52",
|
|
34
|
+
"@croptop/core-v6": "^0.0.53",
|
|
37
35
|
"@openzeppelin/contracts": "5.6.1",
|
|
38
36
|
"@uniswap/permit2": "github:Uniswap/permit2#cc56ad0f3439c502c246fc5cfcc3db92bb8b7219"
|
|
39
37
|
},
|
package/CHANGELOG.md
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## 0.0.64 — Owner-settable referral target on `REVLoans`
|
|
4
|
-
|
|
5
|
-
- New `referralProjectId()` view returning the packed `(chainId << 48) | projectId` reference credited as the referrer on every `useAllowanceOf` call this contract makes.
|
|
6
|
-
- New `setReferralProjectId(uint256 projectId, uint256 chainId)` (`onlyOwner`): takes the two fields unpacked, packs and stores them. Bounded so the pack is lossless — `projectId <= type(uint48).max`, `chainId <= type(uint208).max`. Reverts with `REVLoans_ReferralProjectIdTooLarge` / `REVLoans_ReferralChainIdTooLarge` otherwise. Emits `SetReferralProjectId(referralChainId, referralProjectId, caller)`.
|
|
7
|
-
- Default at construction: `(chainId = 1, projectId = REV_ID)` — fee-volume credit still lands on the REV revnet on Ethereum mainnet regardless of which chain a loan originates from. Owner can repoint this if REV ever migrates chains, or pass `(0, 0)` to disable referral credit entirely.
|
|
8
|
-
- The inline `(uint256(1) << 48) | REV_ID` pack inside `_borrowAmountFrom` is replaced by a read of the new storage slot. No external behavior change for default deployments.
|
|
9
|
-
- Storage layout: `referralProjectId` was inserted at slot 8 in alphabetical order between `isLoanSourceOf` and `tokenUriResolver` (per `STYLE_GUIDE.md`), shifting all subsequent public slots by 1. `LoanIdOverflowGuard.t.sol`'s `TOTAL_LOANS_BORROWED_FOR_SLOT` was bumped 11 → 12 and `StorageLayoutStable.t.sol` was updated in lockstep. **External slot-based tooling reading `totalLoansBorrowedFor`/`totalCollateralOf`/`totalBorrowedFrom`/`tokenUriResolver` directly via raw storage must be re-pointed.**
|
|
10
|
-
|
|
11
|
-
## 0.0.62 — Omit unset router terminal registry
|
|
12
|
-
|
|
13
|
-
- `REVDeployer` now omits `ROUTER_TERMINAL_REGISTRY` from the canonical terminal configuration when it was
|
|
14
|
-
constructed with `address(0)`.
|
|
15
|
-
- This supports chains where the router terminal stack is unavailable while still launching revnets with the canonical
|
|
16
|
-
multi terminal.
|
|
17
|
-
|
|
18
|
-
## 0.0.56 — Bump v6 deps to nana-core-v6 0.0.53 cohort
|
|
19
|
-
|
|
20
|
-
- `@bananapus/core-v6`: `^0.0.48 → ^0.0.53` ([PR #145](https://github.com/Bananapus/nana-core-v6/pull/145)).
|
|
21
|
-
- `@bananapus/721-hook-v6`: `^0.0.47 → ^0.0.50`.
|
|
22
|
-
- `@bananapus/buyback-hook-v6`: `^0.0.39 → ^0.0.46`.
|
|
23
|
-
- `@bananapus/router-terminal-v6`: `^0.0.37 → ^0.0.43`.
|
|
24
|
-
- `@bananapus/suckers-v6`: `^0.0.37 → ^0.0.46`.
|
|
25
|
-
- `@bananapus/permission-ids-v6`: `^0.0.24 → ^0.0.25`.
|
|
26
|
-
- Test updates:
|
|
27
|
-
- `jbMultiTerminal().FEE()` → `JBConstants.FEE` (FEE moved to a compile-time constant in core 0.0.52+).
|
|
28
|
-
- `JBBuybackHook` constructor signature changed in 0.0.45 (V4 PoolManager + Hooks moved to a one-shot setter). Updated `ForkTestBase` and `TestSplitWeightFork` to construct then call `setChainSpecificConstants`.
|
|
29
|
-
- All `JBRulesetMetadata` test literals patched to include `pauseCrossProjectFeeFreeInflows: false`. `REVConfig` and `JBBeforeCashOutRecordedContext` literals are unchanged (no new fields).
|
|
30
|
-
|
|
31
|
-
## Scope
|
|
32
|
-
|
|
33
|
-
This file describes the verified change from `revnet-core-v5` to the current `revnet-core-v6` repo.
|
|
34
|
-
|
|
35
|
-
## Current v6 surface
|
|
36
|
-
|
|
37
|
-
- `REVDeployer`
|
|
38
|
-
- `REVOwner`
|
|
39
|
-
- `REVLoans`
|
|
40
|
-
- `IREVDeployer`
|
|
41
|
-
- `IREVOwner`
|
|
42
|
-
- `IREVLoans`
|
|
43
|
-
|
|
44
|
-
## Summary
|
|
45
|
-
|
|
46
|
-
- The current repo assumes 721 hooks are part of the normal revnet deployment path rather than a separate special case.
|
|
47
|
-
- Buyback and loans configuration are more centralized than in v5. The repo is oriented around shared infrastructure instead of repeating per-revnet setup.
|
|
48
|
-
- `REVOwner` is now a real part of the repo's runtime surface. That split matters because the hook behavior no longer lives only on `REVDeployer`.
|
|
49
|
-
- The v6 test tree is substantially broader than the v5 tree, with dedicated regression, fork, attack, and invariant coverage for loans, cash-outs, split weights, and lifecycle edges.
|
|
50
|
-
- The repo moved from the v5 `0.8.23` baseline to `0.8.28`.
|
|
51
|
-
|
|
52
|
-
## In-v6 changes
|
|
53
|
-
|
|
54
|
-
### `0.0.52` — Cap reported surplus on `REVOwner.beforeCashOutRecordedWith` to fit local liquidity
|
|
55
|
-
|
|
56
|
-
PR #149 scaled the fee + reclaim proportionally when the gross global outflow exceeded local terminal liquidity, preserving a nonzero fee. But the data hook still returned the **unscaled** `effectiveSurplusValue` to `JBTerminalStore._cashOutWithDataHook`, which recomputes the beneficiary reclaim as `cashOutFrom(effSurplus, cashOutCount, totalSupply, taxRate)` and caps it at local surplus before adding the fee spec — so `balanceDiff = localSurplus + feeAmount > localSurplus` reverted with `InadequateTerminalStoreBalance`. Omnichain holders could not cash out locally when global surplus dominated.
|
|
57
|
-
|
|
58
|
-
`cashOutFrom` is linear in `surplus`. After the existing PR #149 scaling, `REVOwner` now lowers the reported `effectiveSurplusValue` proportionally so the store's recomputed reclaim is at most `localSurplus - feeAmount`, leaving exact room for the (preserved) fee spec. The buyback hook still receives the full pre-cap global surplus for its routing decision — only the store-facing return is capped.
|
|
59
|
-
|
|
60
|
-
The fee is **never** trimmed or zeroed: that was the regression PR #149 fixed.
|
|
61
|
-
|
|
62
|
-
Integrator impact: omnichain cash-outs that previously reverted with `InadequateTerminalStoreBalance` when local liquidity was the binding cap now settle. The beneficiary receives `localSurplus - feeAmount` and the fee revnet receives `feeAmount`. The user still burns the full `context.cashOutCount` tokens — semantics are the same as the pre-existing local-cap protocol behavior, just now reachable end-to-end.
|
|
63
|
-
|
|
64
|
-
## Operator delegation
|
|
65
|
-
|
|
66
|
-
- Added new `JBPermissionIds` for operator delegation in `@bananapus/permission-ids-v6`:
|
|
67
|
-
- `OPEN_LOAN` — open a loan on behalf of a token holder via `REVLoans.borrowFrom`
|
|
68
|
-
- `REALLOCATE_LOAN` — reallocate loan collateral on behalf of a loan owner via `REVLoans.reallocateCollateralFromLoan`
|
|
69
|
-
- `REPAY_LOAN` — repay a loan on behalf of a loan owner via `REVLoans.repayLoan`
|
|
70
|
-
- `REVLoans.borrowFrom` now accepts a `holder` parameter. The loan NFT is minted to `holder`, and collateral is burned from `holder`. An operator with `OPEN_LOAN` permission can borrow on behalf of a holder.
|
|
71
|
-
- `REVLoans.repayLoan` now allows permissioned operators with `REPAY_LOAN` to repay on behalf of the loan NFT owner. Replacement loans are minted to the original loan owner.
|
|
72
|
-
- `REVLoans.reallocateCollateralFromLoan` now allows permissioned operators with `REALLOCATE_LOAN` to reallocate on behalf of the loan NFT owner. Returned collateral and replacement loans go to the original loan owner.
|
|
73
|
-
- `REVLoans` stores a `PERMISSIONS` immutable for inline permission checks (cannot inherit `JBPermissioned` due to existing `ERC721 + ERC2771Context + Ownable` inheritance).
|
|
74
|
-
|
|
75
|
-
### Breaking ABI changes from delegation
|
|
76
|
-
|
|
77
|
-
- `IREVLoans.borrowFrom` signature changed: added `address holder` as last parameter
|
|
78
|
-
|
|
79
|
-
## Verified deltas
|
|
80
|
-
|
|
81
|
-
- `IREVDeployer.deployWith721sFor(...)` is gone.
|
|
82
|
-
- `IREVDeployer.deployFor(...)` now has overloads that return `(uint256, IJB721TiersHook)`.
|
|
83
|
-
- `IREVDeployer.BUYBACK_HOOK()`, `LOANS()`, and `OWNER()` are explicit v6 surface area.
|
|
84
|
-
- `IREVOwner` is a new interface and runtime counterpart to the deployer.
|
|
85
|
-
- The old caller-supplied `REVBuybackHookConfig` path is no longer part of the deployer interface.
|
|
86
|
-
|
|
87
|
-
## Breaking ABI changes
|
|
88
|
-
|
|
89
|
-
- `deployWith721sFor(...)` was removed.
|
|
90
|
-
- `deployFor(...)` overloads changed shape and return the deployed 721 hook.
|
|
91
|
-
- `REVConfig` no longer carries `loanSources` or `loans`.
|
|
92
|
-
- `REVDeploy721TiersHookConfig` now uses `REVBaseline721HookConfig` and inverted `preventOperator*` booleans.
|
|
93
|
-
- `IREVOwner` is a new interface that some integrations must track separately from `IREVDeployer`.
|
|
94
|
-
|
|
95
|
-
## Indexer impact
|
|
96
|
-
|
|
97
|
-
- Runtime hook activity may now come from `REVOwner`, not only `REVDeployer`.
|
|
98
|
-
- Deployment indexing should assume a 721 hook is returned and present by default.
|
|
99
|
-
- Any schema built around caller-supplied buyback-hook config in deploy events needs to be revisited.
|
|
100
|
-
|
|
101
|
-
## Migration notes
|
|
102
|
-
|
|
103
|
-
- Re-check any integration that assumed `REVDeployer` was the only important runtime address. `REVOwner` now matters.
|
|
104
|
-
- Update deployment and indexing code for the default-721-hook assumption.
|
|
105
|
-
- Rebuild ABI expectations from the current interfaces and structs. The revnet surface is not a light-touch v5 upgrade.
|
|
106
|
-
|
|
107
|
-
## ABI appendix
|
|
108
|
-
|
|
109
|
-
- Removed functions
|
|
110
|
-
- `deployWith721sFor(...)`
|
|
111
|
-
- Changed functions
|
|
112
|
-
- `deployFor(...)` overloads now return the 721 hook
|
|
113
|
-
- Added interfaces / runtime addresses
|
|
114
|
-
- `IREVOwner`
|
|
115
|
-
- `OWNER()`
|
|
116
|
-
- Changed structs
|
|
117
|
-
- `REVConfig`
|
|
118
|
-
- `REVDeploy721TiersHookConfig`
|
|
119
|
-
- Removed config path
|
|
120
|
-
- caller-supplied `REVBuybackHookConfig`
|