@bananapus/suckers-v6 1.1.0 → 1.1.2
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/README.md +1 -0
- package/package.json +1 -1
- package/references/entrypoints.md +2 -2
- package/src/interfaces/IGeomeanOracle.sol +0 -21
package/README.md
CHANGED
|
@@ -67,6 +67,7 @@ That means every bridge path has two trust surfaces:
|
|
|
67
67
|
- root ordering and message delivery semantics matter as much as proof format
|
|
68
68
|
- token mapping is part of the economic invariant
|
|
69
69
|
- native/native mappings and different-address local/remote token mappings must be approved by the registry owner for the specific `(localToken, remoteChainId, remoteToken)` route before a project can choose them; non-native same-address mappings and disabled mappings do not need owner approval
|
|
70
|
+
- OP Stack and Arbitrum ERC-20 mappings must name the exact bridge-registered counterpart delivered or burned by the native bridge in each direction; canonical token identity, equal addresses, and registry approval do not prove that pairing
|
|
70
71
|
- peer contexts are merged only when they share both currency and decimals; same-currency contexts with different decimals are kept separate and valued independently at read time, never summed across precisions — and this merge applies per source chain, since each chain's record is stored and folded on its own
|
|
71
72
|
- accounting propagates as a gossip bundle: a sucker sends its own chain's record plus every peer-chain record the project knows (gathered through the registry), so one sync round from a hub propagates every chain's data to every spoke without a direct sucker between each pair
|
|
72
73
|
- `syncAccountingData` pays no registry `toRemoteFee`, but bridge-specific transport costs still apply and duplicate bundles can still consume bridge/indexer resources
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@ A sucker bridges a Juicebox project's token economy between two chains. Cashed-o
|
|
|
29
29
|
|-------|------|---------|
|
|
30
30
|
| `localToken` | `address` | The local token address. |
|
|
31
31
|
| `minGas` | `uint32` | The minimum gas to use when bridging this token. |
|
|
32
|
-
| `remoteToken` | `bytes32` | The remote token address (bytes32 for cross-VM compatibility). |
|
|
32
|
+
| `remoteToken` | `bytes32` | The remote token address (bytes32 for cross-VM compatibility). For OP Stack and Arbitrum ERC-20 lanes, this must be the exact bridge-registered counterpart delivered on the destination, not merely an economically equivalent canonical token. |
|
|
33
33
|
|
|
34
34
|
### `JBClaim` (argument to `claim` / `exitThroughEmergencyHatch`)
|
|
35
35
|
|
|
@@ -81,7 +81,7 @@ The same `JBChainAccounting[] accounts` bundle is also carried by the root messa
|
|
|
81
81
|
| `fromRemoteAccounting(JBAccountingSnapshot calldata snapshot)` | Authenticated receive path for an accounting-only gossip bundle. Stores the freshest record per source chain, without touching any token-local inbox root. |
|
|
82
82
|
| `claim(JBClaim calldata claimData)` | Claim bridged project tokens for the leaf's beneficiary by proving inclusion against the inbox root. |
|
|
83
83
|
| `claim(JBClaim[] calldata claims)` | Claim multiple leaves in one call. Each leaf is routed through an external `this.claim` sub-call, so one failing leaf emits `ClaimFailed` and is reverted in isolation while the rest of the batch proceeds; the failed leaf stays claimable later. |
|
|
84
|
-
| `mapToken(JBTokenMapping calldata map) payable` | Map a single local token to a remote token for bridging. Mappings are immutable once the outbox tree has entries (can only be disabled, not remapped). Requires `MAP_SUCKER_TOKEN` permission (initial mappings are applied at deploy under `DEPLOY_SUCKERS`). Native/native mappings and different-address mappings must also be approved by the registry owner for this sucker's peer chain. |
|
|
84
|
+
| `mapToken(JBTokenMapping calldata map) payable` | Map a single local token to a remote token for bridging. Mappings are immutable once the outbox tree has entries (can only be disabled, not remapped). Requires `MAP_SUCKER_TOKEN` permission (initial mappings are applied at deploy under `DEPLOY_SUCKERS`). Native/native mappings and different-address mappings must also be approved by the registry owner for this sucker's peer chain. Mapping and registry checks do not validate an external native bridge's ERC-20 pair; OP Stack and Arbitrum routes must be verified against the live bridge in both directions before use. |
|
|
85
85
|
| `mapTokens(JBTokenMapping[] calldata maps) payable` | Map multiple local tokens to remote tokens in one call. |
|
|
86
86
|
|
|
87
87
|
### JBSucker — deprecation & emergency (`IJBSuckerExtended`)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity ^0.8.0;
|
|
3
|
-
|
|
4
|
-
import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol";
|
|
5
|
-
|
|
6
|
-
/// @notice Minimal interface for a Uniswap V4 TWAP oracle hook (e.g. GeomeanOracle).
|
|
7
|
-
/// @dev Used to attempt TWAP-based quoting on V4 pools whose hook supports it.
|
|
8
|
-
interface IGeomeanOracle {
|
|
9
|
-
/// @notice Returns cumulative tick and seconds-per-liquidity values for the given observation timestamps.
|
|
10
|
-
/// @param key The pool key to observe.
|
|
11
|
-
/// @param secondsAgos An array of seconds-ago offsets (e.g., [30, 0] for a 30-second TWAP).
|
|
12
|
-
/// @return tickCumulatives The cumulative tick values at each observation point.
|
|
13
|
-
/// @return secondsPerLiquidityCumulativeX128s The cumulative seconds-per-liquidity values.
|
|
14
|
-
function observe(
|
|
15
|
-
PoolKey calldata key,
|
|
16
|
-
uint32[] calldata secondsAgos
|
|
17
|
-
)
|
|
18
|
-
external
|
|
19
|
-
view
|
|
20
|
-
returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);
|
|
21
|
-
}
|