@bananapus/suckers-v6 0.0.50 → 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/package.json +1 -2
- package/src/JBSuckerRegistry.sol +1 -1
- package/src/interfaces/IJBSuckerRegistry.sol +2 -2
- package/CHANGELOG.md +0 -116
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bananapus/suckers-v6",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.51",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/Bananapus/nana-suckers-v6"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
|
-
"CHANGELOG.md",
|
|
11
10
|
"foundry.lock",
|
|
12
11
|
"foundry.toml",
|
|
13
12
|
"references/",
|
package/src/JBSuckerRegistry.sol
CHANGED
|
@@ -485,7 +485,7 @@ contract JBSuckerRegistry is ERC2771Context, Ownable, JBPermissioned, IJBSuckerR
|
|
|
485
485
|
/// @notice Deploy one or more cross-chain suckers for a project in a single transaction. Each sucker is created via
|
|
486
486
|
/// its deployer, registered in this registry, and immediately configured with its token mappings. Multiple suckers
|
|
487
487
|
/// targeting the same peer chain are allowed for bridge resilience. The caller must have `DEPLOY_SUCKERS`
|
|
488
|
-
/// permission,
|
|
488
|
+
/// permission, which also authorizes the initial token mappings in each deployment configuration.
|
|
489
489
|
/// @param projectId The ID of the project to deploy suckers for.
|
|
490
490
|
/// @param salt The salt used to deploy the contract. For the suckers to be peers, this must be the same value on
|
|
491
491
|
/// each chain where suckers are deployed.
|
|
@@ -130,8 +130,8 @@ interface IJBSuckerRegistry {
|
|
|
130
130
|
function allowSuckerDeployers(address[] calldata deployers) external;
|
|
131
131
|
|
|
132
132
|
/// @notice Deploy one or more suckers for the specified project.
|
|
133
|
-
/// @dev This call also applies each configuration's token mappings on the deployed suckers.
|
|
134
|
-
///
|
|
133
|
+
/// @dev This call also applies each configuration's token mappings on the deployed suckers. `DEPLOY_SUCKERS`
|
|
134
|
+
/// authorizes those initial mappings; use `MAP_SUCKER_TOKEN` for post-deployment mapping changes.
|
|
135
135
|
/// @param projectId The ID of the project to deploy suckers for.
|
|
136
136
|
/// @param salt The salt used for deterministic deployment.
|
|
137
137
|
/// @param configurations The deployer configs to use.
|
package/CHANGELOG.md
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## Scope
|
|
4
|
-
|
|
5
|
-
This file describes the verified change from `nana-suckers-v5` to the current `nana-suckers-v6` repo.
|
|
6
|
-
|
|
7
|
-
## Current v6 surface
|
|
8
|
-
|
|
9
|
-
- `JBSucker`
|
|
10
|
-
- `JBSuckerRegistry`
|
|
11
|
-
- `JBOptimismSucker`
|
|
12
|
-
- `JBArbitrumSucker`
|
|
13
|
-
- `JBBaseSucker`
|
|
14
|
-
- `JBCCIPSucker`
|
|
15
|
-
- `JBCeloSucker`
|
|
16
|
-
- the deployers, structs, and interfaces under `src/`
|
|
17
|
-
|
|
18
|
-
## Unreleased — `JBLeaf.metadata` attribution field
|
|
19
|
-
|
|
20
|
-
The merkle leaf now carries a fifth field: a `bytes32 metadata` payload that travels inside the leaf hash but is
|
|
21
|
-
opaque to the sucker protocol itself.
|
|
22
|
-
|
|
23
|
-
**What changed**
|
|
24
|
-
|
|
25
|
-
- `JBLeaf` struct: new trailing `bytes32 metadata` field.
|
|
26
|
-
- `IJBSucker.prepare`: new trailing `bytes32 metadata` parameter. The metadata is included in the leaf hash, so it's
|
|
27
|
-
covered by the merkle root — receivers can trust it once the claim's merkle proof verifies.
|
|
28
|
-
- `_buildTreeHash` hashes 128 bytes (was 96): `keccak256(projectTokenCount || terminalTokenAmount || beneficiary || metadata)`.
|
|
29
|
-
- `_insertIntoTree`, `_validate`, `_validateBranchRoot`, `_validateForEmergencyExit` all thread `metadata` through.
|
|
30
|
-
- Events `InsertToOutboxTree` and `Claimed` carry the field so off-chain indexers can read it directly without
|
|
31
|
-
cracking the leaf.
|
|
32
|
-
- SVM leaf encoding widens from 96 bytes to 128 bytes; the new 32-byte suffix is the `metadata` field. The
|
|
33
|
-
`_svmBuildTreeHash` interop test mirrors the layout exactly so EVM↔SVM hash equality is preserved.
|
|
34
|
-
|
|
35
|
-
**Intended use**
|
|
36
|
-
|
|
37
|
-
The original motivator is the cross-chain referral split hook (`nana-referral-split-hook-v6`): when a referrer
|
|
38
|
-
on chain Y earns credit for fee-paying activity on chain X, the hook on X uses the fee project's sucker to
|
|
39
|
-
bridge the entitled fee-project tokens. The leaf's `metadata` carries `(originChainId, referralProjectId)` so the
|
|
40
|
-
sibling hook on chain Y can atomically claim, re-pay the fee project locally, and push to the local distributor
|
|
41
|
-
for the right referrer — all under the merkle proof's authentication, no off-chain coordination needed.
|
|
42
|
-
|
|
43
|
-
The field is generic: any future leaf consumer (NFT split hooks, buyback hooks, etc.) can use it for its own
|
|
44
|
-
attribution scheme without further sucker changes. Pass `bytes32(0)` for ordinary bridges that don't need it.
|
|
45
|
-
|
|
46
|
-
**Risk surface**
|
|
47
|
-
|
|
48
|
-
Zero new trust paths. The bridge protocol stays leaf-in-leaf-out; we just put one more 32-byte field under the
|
|
49
|
-
same root. Existing claim, emergency-exit, and root-relay flows behave identically when `metadata == bytes32(0)`.
|
|
50
|
-
The leaf-hash domain changes (96 → 128 bytes), but since nothing is deployed yet there's no on-chain
|
|
51
|
-
compatibility concern.
|
|
52
|
-
|
|
53
|
-
## 0.0.46 — Bump nana-core-v6 to 0.0.53
|
|
54
|
-
|
|
55
|
-
`@bananapus/core-v6@0.0.53` ([nana-core-v6 PR #145](https://github.com/Bananapus/nana-core-v6/pull/145)) drops the `via_ir` requirement on `JBCashOutHookSpecsLib`, which lets this package consume the cross-project cashout work (`payAfterCashOutTokensOf` / `addToBalanceAfterCashOutTokensOf`) without needing `via_ir = true` in its own foundry profile.
|
|
56
|
-
|
|
57
|
-
- No src changes — suckers doesn't reference `IJBFeeTerminal.FEE()` or any of the touched core surfaces.
|
|
58
|
-
- All `JBRulesetMetadata` test literals patched to include `pauseCrossProjectFeeFreeInflows: false`.
|
|
59
|
-
|
|
60
|
-
`package.json`: version `0.0.44 → 0.0.46` (skipping 0.0.45 because nothing shipped at that intermediate revision), core dep `^0.0.48 → ^0.0.53`.
|
|
61
|
-
|
|
62
|
-
## Summary
|
|
63
|
-
|
|
64
|
-
- Cross-chain identifiers are now modeled for a wider address space. The v6 repo uses `bytes32` where the v5 repo used EVM `address` assumptions.
|
|
65
|
-
- Message handling is versioned instead of implicitly trusting an older fixed format.
|
|
66
|
-
- The anti-spam and fee model changed materially. v5's per-token minimum-bridge assumptions were replaced by a registry-level `toRemoteFee` flow in v6.
|
|
67
|
-
- The old manual add-to-balance mode is gone from the current repo.
|
|
68
|
-
- Celo support is now part of the repo's first-class contract set.
|
|
69
|
-
- The repo moved from the v5 `0.8.23` baseline to `0.8.28`.
|
|
70
|
-
|
|
71
|
-
## Verified deltas
|
|
72
|
-
|
|
73
|
-
- `IJBSucker.peer()` now returns `bytes32`.
|
|
74
|
-
- `IJBSucker.prepare(...)` now takes a `bytes32 beneficiary`.
|
|
75
|
-
- `Claimed` and `InsertToOutboxTree` changed their `beneficiary` field from `address` to `bytes32`.
|
|
76
|
-
- The `Claimed` event no longer carries the old `autoAddedToBalance` boolean.
|
|
77
|
-
- The public `ADD_TO_BALANCE_MODE()` surface and the manual mode path are gone from the interface.
|
|
78
|
-
- `StaleRootRejected(...)` is a new event on the interface.
|
|
79
|
-
|
|
80
|
-
## Breaking ABI changes
|
|
81
|
-
|
|
82
|
-
- `JBRemoteToken.addr` changed from `address` to `bytes32`.
|
|
83
|
-
- `JBTokenMapping.remoteToken` changed from `address` to `bytes32`.
|
|
84
|
-
- `JBMessageRoot` gained `version` and changed `token` from `address` to `bytes32`.
|
|
85
|
-
- `IJBSucker.peer()` changed return type.
|
|
86
|
-
- `IJBSucker.prepare(...)` changed parameter type for `beneficiary`.
|
|
87
|
-
- The manual add-to-balance mode surface was removed.
|
|
88
|
-
|
|
89
|
-
## Indexer impact
|
|
90
|
-
|
|
91
|
-
- `Claimed` and `InsertToOutboxTree` require schema changes because `beneficiary` is no longer an EVM address.
|
|
92
|
-
- Remote token and peer identifiers should be stored as raw 32-byte values.
|
|
93
|
-
- `StaleRootRejected` is new and can be used to monitor out-of-order or duplicate delivery attempts.
|
|
94
|
-
|
|
95
|
-
## Migration notes
|
|
96
|
-
|
|
97
|
-
- Treat every cross-chain identifier schema as migrated, including indexers and bridge metadata.
|
|
98
|
-
- Rebuild integrations around the current fee and registry model. Old `minBridgeAmount` assumptions are stale.
|
|
99
|
-
- Use the current v6 structs and events for ABI regeneration. This repo has too many widened fields for manual patching to be safe.
|
|
100
|
-
|
|
101
|
-
## ABI appendix
|
|
102
|
-
|
|
103
|
-
- Changed functions
|
|
104
|
-
- `peer() -> bytes32`
|
|
105
|
-
- `prepare(..., bytes32 beneficiary, ...)`
|
|
106
|
-
- Changed events
|
|
107
|
-
- `Claimed`
|
|
108
|
-
- `InsertToOutboxTree`
|
|
109
|
-
- Added events
|
|
110
|
-
- `StaleRootRejected`
|
|
111
|
-
- Removed surface
|
|
112
|
-
- manual add-to-balance mode / `ADD_TO_BALANCE_MODE()`
|
|
113
|
-
- Changed structs
|
|
114
|
-
- `JBRemoteToken`
|
|
115
|
-
- `JBTokenMapping`
|
|
116
|
-
- `JBMessageRoot`
|