Major Changes
-
1970a32: Added inventory rebalancing via external bridges (LiFi), enabling token rebalancing across chains where Hyperlane warp routes alone are insufficient. This is a breaking change to the config schema, type system, and tracking interfaces.
Breaking: Config Schema
RebalancerBridgeConfigSchema.bridgechanged from required to optional — inventory chains don't use on-chain bridge contracts- Added
executionTypefield to chain config ('movableCollateral' | 'inventory'), defaults tomovableCollateralfor backward compatibility - Added
externalBridgefield to chain config ('lifi') for specifying which external bridge to use - Added top-level
inventorySignerfield (required when any chain uses inventory execution) - Added top-level
externalBridgesconfig block withLiFiBridgeConfigSchema({ integrator, defaultSlippage? }) - New Zod cross-field validations:
bridgerequired formovableCollateralchains,externalBridgerequired forinventorychains,inventorySignerandexternalBridges.lifirequired when inventory chains exist
Breaking: Route Types
- Deleted
RebalanceRoutetype (wasStrategyRoute & { intentId }) - Deleted
RebalanceExecutionResultandRebalanceMetricstypes StrategyRoutechanged fromRoute & { bridge }to discriminated union:MovableCollateralRoute | InventoryRoute, discriminated onexecutionType- Added
MovableCollateralRoute({ executionType: 'movableCollateral', bridge }) andInventoryRoute({ executionType: 'inventory', externalBridge }) - Added
RouteWithContextextendingRoutewithdeliveredAmountandawaitingDeliveryAmountfor inventory intent tracking InflightContext.pendingRebalancesandpendingTransferschanged fromRoute[]toRouteWithContext[]
Breaking: IRebalancer Interface
IRebalancerchanged from non-generic{ rebalance(routes: RebalanceRoute[]): Promise<RebalanceExecutionResult[]> }to genericIRebalancer<R extends Route, E extends ExecutionResult<R>>withrebalancerTypefield- Added
ExecutionResult<R>base type and specializedMovableCollateralExecutionResult/InventoryExecutionResult - Added
IMovableCollateralRebalancerandIInventoryRebalancertype aliases PreparedTransaction.routechanged fromRebalanceRoutetoMovableCollateralRoute & { intentId: string }
Breaking: IActionTracker Interface
CreateRebalanceIntentParams: addedexecutionMethodandexternalBridgefieldsCreateRebalanceActionParams: added requiredtype: ActionTypefield,messageIdchanged from required to optional, addedexternalBridgeTransferIdandexternalBridgeIdfieldsRebalanceIntent: removedfulfilledAmountfield, addedexecutionMethodandexternalBridgefieldsRebalanceAction: added requiredtype: ActionTypefield,messageIdchanged from required to optional, addedexternalBridgeTransferIdandexternalBridgeIdfields- New required methods on
IActionTracker:syncInventoryMovementActions(),getPartiallyFulfilledInventoryIntents(),getActionsByType(),getActionsForIntent(),getInflightInventoryMovements()
Breaking: Tracking Types
- Added
ExecutionMethodtype ('movable_collateral' | 'inventory') - Added
ActionTypetype ('rebalance_message' | 'inventory_movement' | 'inventory_deposit') - Added
PartialInventoryIntenttype for tracking partially fulfilled inventory intents
Breaking: Public API Exports
- Removed exports:
RebalanceRoute,RebalanceExecutionResult - Added exports:
ExecutionResult,IInventoryRebalancer,IMovableCollateralRebalancer,InventoryExecutionResult,MovableCollateralExecutionResult,RebalancerType,InventoryRoute,MovableCollateralRoute,Route,ActionType,PartialInventoryIntent,isMovableCollateralConfig,isInventoryConfig,MovableCollateralBridgeConfig,InventoryBridgeConfig
New: InventoryRebalancer
InventoryRebalancer— implementsIInventoryRebalancer, orchestrates external bridge transfers followed bytransferRemotedepositsIExternalBridgeinterface withquote(),execute(),getStatus()methods and associated types (BridgeQuoteParams,BridgeQuote,BridgeTransferResult,BridgeTransferStatus)LiFiBridge— LiFi SDK integration for route quoting, transaction execution, and status pollingExternalBridgeRegistry— mapsExternalBridgeTypetoIExternalBridgeimplementationsgasEstimationutilities using viemestimateGaswith configurable multiplier
New: Integration
RebalancerServicesupports dual signing keys (HYP_REBALANCER_KEY+ optionalHYP_INVENTORY_KEY) with separateMultiProviderinstancesRebalancerContextFactoryexpanded withcreateRebalancers()and bridge instance creationMonitorextended withInventoryMonitorConfigandfetchInventoryBalances()RebalancerOrchestratordispatches routes to appropriate rebalancer viaMap<string, IRebalancer>by type- Backward-compatible
HYP_KEYfallback in service entry point
Patch Changes
- 1970a32: Fixed inventory rebalancer to include tokenFeeQuote in transfer cost calculation, preventing UNPREDICTABLE_GAS_LIMIT failures when native token fees exceed tx gas costs.
- Updated dependencies [aea767c]
- @hyperlane-xyz/sdk@25.3.0
- @hyperlane-xyz/metrics@0.1.6
- @hyperlane-xyz/utils@25.3.0
- @hyperlane-xyz/provider-sdk@1.3.4
- @hyperlane-xyz/core@10.1.5