@hyperlane-xyz/cli 33.1.0 → 34.0.0
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/bundle/index.js +1285 -488
- package/package.json +15 -15
- package/bundle/466.index.js +0 -74
package/bundle/index.js
CHANGED
|
@@ -563016,6 +563016,8 @@ __nccwpck_require__.d(__webpack_exports__, {
|
|
|
563016
563016
|
teD: () => (/* reexport */ ProtocolFee__factory),
|
|
563017
563017
|
Aig: () => (/* reexport */ ProxyAdmin__factory),
|
|
563018
563018
|
s8K: () => (/* reexport */ QuotedCalls__factory),
|
|
563019
|
+
euF: () => (/* reexport */ RateLimitedHook__factory),
|
|
563020
|
+
YMX: () => (/* reexport */ RateLimitedIsm__factory),
|
|
563019
563021
|
qw$: () => (/* reexport */ RegressiveFee__factory),
|
|
563020
563022
|
SKq: () => (/* reexport */ Router__factory),
|
|
563021
563023
|
bjh: () => (/* reexport */ RoutingFee__factory),
|
|
@@ -563047,7 +563049,7 @@ __nccwpck_require__.d(__webpack_exports__, {
|
|
|
563047
563049
|
ze0: () => (/* reexport */ loadAllZKSyncArtifacts)
|
|
563048
563050
|
});
|
|
563049
563051
|
|
|
563050
|
-
// UNUSED EXPORTS: AbstractAggregationIsm__factory, AbstractDomainRoutingIsmFactory__factory, AbstractInterchainAccountRouter__factory, AbstractMerkleRootMultisigIsm__factory, AbstractMessageIdAuthHook__factory, AbstractMessageIdMultisigIsm__factory, AbstractMetaProxyMultisigIsm__factory, AbstractMetaProxyWeightedMultisigIsm__factory, AbstractMultisigIsm__factory, AbstractMultisig__factory, AbstractOffchainQuoter__factory, AbstractPostDispatchHook__factory, AbstractPredicateWrapper__factory, AbstractStaticWeightedMultisigIsm__factory, AccessControl__factory, AmountPartition__factory, AttributeCheckpointFraud__factory, CCIPReceiver__factory, CctpMessageV1__factory, CctpService__factory, CheckpointFraudProofs__factory, Client__factory, CommitmentReadIsmService__factory, CommitmentReadIsm__factory, ContextUpgradeable__factory, DestinationRecipientRoutingHook__factory, ECDSAServiceManagerBase__factory, ECDSAStakeRegistryStorage__factory, ERC165Upgradeable__factory, ERC165__factory, ERC1967Proxy__factory, ERC1967Upgrade__factory, ERC20Test__factory, ERC20Upgradeable__factory, ERC4626Test__factory, ERC4626Upgradeable__factory, ERC5164Hook__factory, ERC5164Ism__factory, ERC721EnumerableUpgradeable__factory, ERC721Test__factory, ERC721URIStorageUpgradeable__factory, ERC721Upgradeable__factory, ERC721__factory, EnumerableDomainSet__factory, EnumerableMapEnrollment__factory, EverclearBridge__factory, FalseReturningERC20Mock__factory, FiatTokenTest__factory, HyperlaneServiceManager__factory, IAVSDirectory__factory, IAccessControl__factory, IAllowanceTransfer__factory, IAny2EVMMessageReceiver__factory, IBeacon__factory, IBridge__factory, ICcipReadIsm__factory, ICrossCollateralFee__factory, ICrossCollateralRouter__factory, ICrossDomainMessenger__factory, IECDSAStakeRegistryEventsAndErrors__factory, IEIP712__factory, IERC1155Receiver__factory, IERC1271Upgradeable__factory, IERC165Upgradeable__factory, IERC165__factory, IERC1822Proxiable__factory, IERC1967__factory, IERC20MetadataUpgradeable__factory, IERC20Metadata__factory, IERC20PermitUpgradeable__factory, IERC20Permit__factory, IERC20Upgradeable__factory, IERC4626Upgradeable__factory, IERC4906Upgradeable__factory, IERC721EnumerableUpgradeable__factory, IERC721Enumerable__factory, IERC721MetadataUpgradeable__factory, IERC721Metadata__factory, IERC721ReceiverUpgradeable__factory, IERC721Receiver__factory, IERC721Upgradeable__factory, IERC721__factory, IEnumerableDomains__factory, IEverclearAdapter__factory, IEverclearSpoke__factory, IGasOracle__factory, IInterchainAccountRouter__factory, IInterchainGasPaymaster__factory, IL2CrossDomainMessenger__factory, IL2ToL1MessagePasser__factory, IMailbox__factory, IMessageDispatcher__factory, IMessageHandlerV2__factory, IMessageHandler__factory, IMessageTransmitterV2__factory, IOFT__factory, IOffchainQuoter__factory, IOptimismPortal2__factory, IOptimismPortal__factory, IOwnable__factory, IOwnerManager__factory, IPaymentCoordinator__factory, IPredicateClient__factory, IPredicateRegistry__factory, IPredicateWrapper__factory, IReceiverV2__factory, IReceiver__factory, IRelayerV2__factory, IRelayer__factory, IRemoteChallenger__factory, IRouterClient__factory, IRouter__factory, IRoutingHook__factory, IServiceManagerUI__factory, IServiceManager__factory, ISlasher__factory, ISpecifiesInterchainSecurityModule__factory, IStandardBridge__factory, IStaticWeightedMultisigIsm__factory, IStrategy__factory, IThresholdAddressFactory__factory, ITokenFee__factory, ITokenMessengerV1__factory, ITokenMessengerV2__factory, ITokenMessenger__factory, ITransparentUpgradeableProxy__factory, IValidatorAnnounce__factory, Indexed__factory, Initializable__factory, InterchainQueryRouter__factory, LightTestRecipient__factory, LpCollateralRouter__factory, MockArbBridge__factory, MockArbSys__factory, MockCircleMessageTransmitter__factory, MockCircleTokenMessenger__factory, MockERC4626YieldSharing__factory, MockEverclearAdapter__factory, MockHyperlaneEnvironment__factory, MockL2ToL1MessagePasser__factory, MockMailbox__factory, MockMessageDispatcher__factory, MockMessageExecutor__factory, MockOptimismMessenger__factory, MockOptimismPortal__factory, MockOptimismStandardBridge__factory, MockPredicateRegistry__factory, MockSafe__factory, MockToken__factory, MockValueTransferBridge__factory, MockWETH__factory, NonCompliantERC20Test__factory, NoopIsm__factory, OPL2ToL1CcipReadIsm__factory, OPL2ToL1Hook__factory, OPL2ToL1V1CcipReadIsm__factory, OPL2ToL1V2CcipReadIsm__factory, OffchainQuotedIGP__factory, OpL1V2NativeTokenBridge__factory, OpL2toL1Service__factory, OpTokenBridgeStorage__factory, Ownable2StepUpgradeable__factory, OwnableMulticall__factory, OwnableUpgradeable__factory, Pausable__factory, PredicateClient__factory, Proxy__factory,
|
|
563052
|
+
// UNUSED EXPORTS: AbstractAggregationIsm__factory, AbstractDomainRoutingIsmFactory__factory, AbstractInterchainAccountRouter__factory, AbstractMerkleRootMultisigIsm__factory, AbstractMessageIdAuthHook__factory, AbstractMessageIdMultisigIsm__factory, AbstractMetaProxyMultisigIsm__factory, AbstractMetaProxyWeightedMultisigIsm__factory, AbstractMultisigIsm__factory, AbstractMultisig__factory, AbstractOffchainQuoter__factory, AbstractPostDispatchHook__factory, AbstractPredicateWrapper__factory, AbstractStaticWeightedMultisigIsm__factory, AccessControl__factory, AmountPartition__factory, AttributeCheckpointFraud__factory, CCIPReceiver__factory, CctpMessageV1__factory, CctpService__factory, CheckpointFraudProofs__factory, Client__factory, CommitmentReadIsmService__factory, CommitmentReadIsm__factory, ContextUpgradeable__factory, DestinationRecipientRoutingHook__factory, ECDSAServiceManagerBase__factory, ECDSAStakeRegistryStorage__factory, ERC165Upgradeable__factory, ERC165__factory, ERC1967Proxy__factory, ERC1967Upgrade__factory, ERC20Test__factory, ERC20Upgradeable__factory, ERC4626Test__factory, ERC4626Upgradeable__factory, ERC5164Hook__factory, ERC5164Ism__factory, ERC721EnumerableUpgradeable__factory, ERC721Test__factory, ERC721URIStorageUpgradeable__factory, ERC721Upgradeable__factory, ERC721__factory, EnumerableDomainSet__factory, EnumerableMapEnrollment__factory, EverclearBridge__factory, FalseReturningERC20Mock__factory, FiatTokenTest__factory, HyperlaneServiceManager__factory, IAVSDirectory__factory, IAccessControl__factory, IAllowanceTransfer__factory, IAny2EVMMessageReceiver__factory, IBeacon__factory, IBridge__factory, ICcipReadIsm__factory, ICrossCollateralFee__factory, ICrossCollateralRouter__factory, ICrossDomainMessenger__factory, IECDSAStakeRegistryEventsAndErrors__factory, IEIP712__factory, IERC1155Receiver__factory, IERC1271Upgradeable__factory, IERC165Upgradeable__factory, IERC165__factory, IERC1822Proxiable__factory, IERC1967__factory, IERC20MetadataUpgradeable__factory, IERC20Metadata__factory, IERC20PermitUpgradeable__factory, IERC20Permit__factory, IERC20Upgradeable__factory, IERC4626Upgradeable__factory, IERC4906Upgradeable__factory, IERC721EnumerableUpgradeable__factory, IERC721Enumerable__factory, IERC721MetadataUpgradeable__factory, IERC721Metadata__factory, IERC721ReceiverUpgradeable__factory, IERC721Receiver__factory, IERC721Upgradeable__factory, IERC721__factory, IEnumerableDomains__factory, IEverclearAdapter__factory, IEverclearSpoke__factory, IGasOracle__factory, IInterchainAccountRouter__factory, IInterchainGasPaymaster__factory, IL2CrossDomainMessenger__factory, IL2ToL1MessagePasser__factory, IMailbox__factory, IMessageDispatcher__factory, IMessageHandlerV2__factory, IMessageHandler__factory, IMessageTransmitterV2__factory, IOFT__factory, IOffchainQuoter__factory, IOptimismPortal2__factory, IOptimismPortal__factory, IOwnable__factory, IOwnerManager__factory, IPaymentCoordinator__factory, IPredicateClient__factory, IPredicateRegistry__factory, IPredicateWrapper__factory, IReceiverV2__factory, IReceiver__factory, IRelayerV2__factory, IRelayer__factory, IRemoteChallenger__factory, IRouterClient__factory, IRouter__factory, IRoutingHook__factory, IServiceManagerUI__factory, IServiceManager__factory, ISlasher__factory, ISpecifiesInterchainSecurityModule__factory, IStandardBridge__factory, IStaticWeightedMultisigIsm__factory, IStrategy__factory, IThresholdAddressFactory__factory, ITokenFee__factory, ITokenMessengerV1__factory, ITokenMessengerV2__factory, ITokenMessenger__factory, ITransparentUpgradeableProxy__factory, IValidatorAnnounce__factory, Indexed__factory, Initializable__factory, InterchainQueryRouter__factory, LightTestRecipient__factory, LpCollateralRouter__factory, MockArbBridge__factory, MockArbSys__factory, MockCircleMessageTransmitter__factory, MockCircleTokenMessenger__factory, MockERC4626YieldSharing__factory, MockEverclearAdapter__factory, MockHyperlaneEnvironment__factory, MockL2ToL1MessagePasser__factory, MockMailbox__factory, MockMessageDispatcher__factory, MockMessageExecutor__factory, MockOptimismMessenger__factory, MockOptimismPortal__factory, MockOptimismStandardBridge__factory, MockPredicateRegistry__factory, MockSafe__factory, MockToken__factory, MockValueTransferBridge__factory, MockWETH__factory, NonCompliantERC20Test__factory, NoopIsm__factory, OPL2ToL1CcipReadIsm__factory, OPL2ToL1Hook__factory, OPL2ToL1V1CcipReadIsm__factory, OPL2ToL1V2CcipReadIsm__factory, OffchainQuotedIGP__factory, OpL1V2NativeTokenBridge__factory, OpL2toL1Service__factory, OpTokenBridgeStorage__factory, Ownable2StepUpgradeable__factory, OwnableMulticall__factory, OwnableUpgradeable__factory, Pausable__factory, PredicateClient__factory, Proxy__factory, RateLimited__factory, ReentrancyGuardTransient__factory, SafeERC20Harness__factory, StandardHookMetadata__factory, StaticAddressSetFactory__factory, StaticMerkleRootMultisigIsm__factory, StaticMerkleRootWeightedMultisigIsm__factory, StaticMessageIdMultisigIsm__factory, StaticMessageIdWeightedMultisigIsm__factory, StaticThresholdAddressSetFactory__factory, StaticWeightedValidatorSetFactory__factory, StorageAggregationIsmFactory__factory, StorageMerkleRootMultisigIsmFactory__factory, StorageMessageIdMultisigIsmFactory__factory, StorageMultisigIsmFactory__factory, TestCcipReadIsm__factory, TestDelegationManager__factory, TestGasRouter__factory, TestHyperlaneServiceManager__factory, TestInterchainGasPaymaster__factory, TestLpCollateralRouter__factory, TestMailbox__factory, TestMerkleTreeHook__factory, TestMerkle__factory, TestMessage__factory, TestPaymentCoordinator__factory, TestPostDispatchHook__factory, TestQuerySender__factory, TestQuery__factory, TestRemoteChallenger__factory, TestRouter__factory, TestSendReceiver__factory, TestSlasher__factory, TestStorage__factory, TimelockRouter__factory, TokenBridgeCctpBaseStorage__factory, TronUSDTMock__factory, TypedMemView__factory, Versioned__factory, WHypERC4626__factory, XERC20LockboxTest__factory, XERC20Test__factory, XERC20VSTest__factory, buildArtifact, factories, getZKSyncArtifactByName, zkSyncContractArtifacts
|
|
563051
563053
|
|
|
563052
563054
|
;// CONCATENATED MODULE: ../../solidity/dist/typechain/factories/@arbitrum/nitro-contracts/src/bridge/IBridge__factory.js
|
|
563053
563055
|
/* Autogenerated file. Do not edit manually. */
|
|
@@ -677365,17 +677367,24 @@ async function getOperatorSignature(domain, serviceManager, avsDirectory, operat
|
|
|
677365
677367
|
|
|
677366
677368
|
__nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
677367
677369
|
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
677368
|
-
/* harmony export */
|
|
677369
|
-
/* harmony export */
|
|
677370
|
+
/* harmony export */ WN: () => (/* binding */ runWarpIcaOwnerCheck),
|
|
677371
|
+
/* harmony export */ l$: () => (/* binding */ checkCrossCollateralWarpRoute),
|
|
677372
|
+
/* harmony export */ xr: () => (/* binding */ runWarpRouteCheck)
|
|
677370
677373
|
/* harmony export */ });
|
|
677371
677374
|
/* harmony import */ var yaml__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(10684);
|
|
677372
|
-
/* harmony import */ var
|
|
677373
|
-
/* harmony import */ var
|
|
677374
|
-
/* harmony import */ var
|
|
677375
|
-
/* harmony import */ var
|
|
677376
|
-
/* harmony import */ var
|
|
677377
|
-
/* harmony import */ var
|
|
677378
|
-
/* harmony import */ var
|
|
677375
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(91039);
|
|
677376
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(4879);
|
|
677377
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(47265);
|
|
677378
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(21387);
|
|
677379
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(16639);
|
|
677380
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(93142);
|
|
677381
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(73938);
|
|
677382
|
+
/* harmony import */ var _config_warp_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(10392);
|
|
677383
|
+
/* harmony import */ var _logger_js__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(54321);
|
|
677384
|
+
/* harmony import */ var _utils_output_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(61494);
|
|
677385
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_config_warp_js__WEBPACK_IMPORTED_MODULE_1__]);
|
|
677386
|
+
_config_warp_js__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
|
677387
|
+
|
|
677379
677388
|
|
|
677380
677389
|
|
|
677381
677390
|
|
|
@@ -677383,15 +677392,15 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
|
|
|
677383
677392
|
|
|
677384
677393
|
async function runWarpRouteCheck({ result, }) {
|
|
677385
677394
|
if (Object.keys(result.diff).length > 0) {
|
|
677386
|
-
(0,
|
|
677395
|
+
(0,_logger_js__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm)((0,_utils_output_js__WEBPACK_IMPORTED_MODULE_2__/* .formatYamlViolationsOutput */ ._4)((0,yaml__WEBPACK_IMPORTED_MODULE_0__/* .stringify */ .As)(result.diff, null, 2)));
|
|
677387
677396
|
}
|
|
677388
677397
|
if (result.scaleViolations.length > 0) {
|
|
677389
|
-
(0,
|
|
677398
|
+
(0,_logger_js__WEBPACK_IMPORTED_MODULE_3__/* .logRed */ .SU)(`Found invalid or missing scale for inconsistent decimals`);
|
|
677390
677399
|
}
|
|
677391
677400
|
if (!result.isValid) {
|
|
677392
677401
|
process.exit(1);
|
|
677393
677402
|
}
|
|
677394
|
-
(0,
|
|
677403
|
+
(0,_logger_js__WEBPACK_IMPORTED_MODULE_3__/* .logGreen */ .In)(`No violations found`);
|
|
677395
677404
|
}
|
|
677396
677405
|
/**
|
|
677397
677406
|
* Checks that destination chain owners match expected ICA addresses
|
|
@@ -677401,32 +677410,32 @@ async function runWarpIcaOwnerCheck({ context, warpDeployConfig, origin, originO
|
|
|
677401
677410
|
const { registry, multiProvider } = context;
|
|
677402
677411
|
const configChains = new Set(Object.keys(warpDeployConfig));
|
|
677403
677412
|
const originOwner = originOwnerOverride ?? warpDeployConfig[origin]?.owner;
|
|
677404
|
-
(0,
|
|
677413
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .assert */ .v)(originOwner, `Origin chain "${origin}" does not have an owner configured and --originOwner was not provided`);
|
|
677405
677414
|
// Filter chains: must be in config, EVM, and not the origin chain
|
|
677406
677415
|
const chainsToCheck = (chains ?? [...configChains]).filter((chain) => {
|
|
677407
677416
|
if (chain === origin) {
|
|
677408
677417
|
return false;
|
|
677409
677418
|
}
|
|
677410
677419
|
if (!configChains.has(chain)) {
|
|
677411
|
-
(0,
|
|
677420
|
+
(0,_logger_js__WEBPACK_IMPORTED_MODULE_3__/* .warnYellow */ .dE)(`Chain "${chain}" is not part of the warp config, skipping`);
|
|
677412
677421
|
return false;
|
|
677413
677422
|
}
|
|
677414
|
-
if (!(0,
|
|
677415
|
-
(0,
|
|
677423
|
+
if (!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .isEVMLike */ .Us)(multiProvider.tryGetProtocol(chain))) {
|
|
677424
|
+
(0,_logger_js__WEBPACK_IMPORTED_MODULE_3__/* .warnYellow */ .dE)(`Skipping non-EVM destination chain "${chain}"`);
|
|
677416
677425
|
return false;
|
|
677417
677426
|
}
|
|
677418
677427
|
return true;
|
|
677419
677428
|
});
|
|
677420
|
-
(0,
|
|
677421
|
-
(0,
|
|
677429
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .assert */ .v)(chainsToCheck.length > 0, 'No EVM destination chains to check');
|
|
677430
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .assert */ .v)((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .isEVMLike */ .Us)(multiProvider.tryGetProtocol(origin)), `origin ${origin} must be EVM chain`);
|
|
677422
677431
|
// Get ICA router addresses from registry
|
|
677423
677432
|
const chainAddresses = {};
|
|
677424
677433
|
for (const chain of [origin, ...chainsToCheck]) {
|
|
677425
677434
|
const addresses = await registry.getChainAddresses(chain);
|
|
677426
|
-
(0,
|
|
677435
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .assert */ .v)(addresses?.interchainAccountRouter, `No interchainAccountRouter found for chain ${chain}`);
|
|
677427
677436
|
chainAddresses[chain] = addresses;
|
|
677428
677437
|
}
|
|
677429
|
-
const ica =
|
|
677438
|
+
const ica = _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_6__/* .InterchainAccount */ .N0.fromAddressesMap(chainAddresses, multiProvider);
|
|
677430
677439
|
const ownerConfig = {
|
|
677431
677440
|
origin,
|
|
677432
677441
|
owner: originOwner,
|
|
@@ -677437,20 +677446,69 @@ async function runWarpIcaOwnerCheck({ context, warpDeployConfig, origin, originO
|
|
|
677437
677446
|
for (const destination of chainsToCheck) {
|
|
677438
677447
|
const configuredOwner = warpDeployConfig[destination].owner;
|
|
677439
677448
|
const expectedIcaAddress = await ica.getAccount(destination, ownerConfig);
|
|
677440
|
-
if (!(0,
|
|
677449
|
+
if (!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__/* .eqAddress */ .fv)(configuredOwner, expectedIcaAddress)) {
|
|
677441
677450
|
violations[destination] = {
|
|
677442
677451
|
owner: {
|
|
677443
|
-
actual: (0,
|
|
677444
|
-
expected: (0,
|
|
677452
|
+
actual: (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__/* .normalizeAddressEvm */ .Ek)(configuredOwner),
|
|
677453
|
+
expected: (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__/* .normalizeAddressEvm */ .Ek)(expectedIcaAddress),
|
|
677445
677454
|
},
|
|
677446
677455
|
};
|
|
677447
677456
|
}
|
|
677448
677457
|
}
|
|
677449
677458
|
if (Object.keys(violations).length > 0) {
|
|
677450
|
-
(0,
|
|
677459
|
+
(0,_logger_js__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm)((0,_utils_output_js__WEBPACK_IMPORTED_MODULE_2__/* .formatYamlViolationsOutput */ ._4)((0,yaml__WEBPACK_IMPORTED_MODULE_0__/* .stringify */ .As)((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .keepOnlyDiffObjects */ .Fz)(violations), null, 2)));
|
|
677451
677460
|
process.exit(1);
|
|
677452
677461
|
}
|
|
677453
|
-
(0,
|
|
677462
|
+
(0,_logger_js__WEBPACK_IMPORTED_MODULE_3__/* .logGreen */ .In)('No violations found');
|
|
677463
|
+
}
|
|
677464
|
+
/**
|
|
677465
|
+
* Checks a combined CROSS warp route by finding its constituent routes (those whose
|
|
677466
|
+
* tokens are a subset of the CROSS config's tokens) and checking each one separately.
|
|
677467
|
+
* Used when a CROSS route has no deploy config of its own.
|
|
677468
|
+
*/
|
|
677469
|
+
async function checkCrossCollateralWarpRoute({ context, warpCoreConfig, warpRouteId, }) {
|
|
677470
|
+
const crossAddresses = new Set(warpCoreConfig.tokens.flatMap((t) => t.addressOrDenom ? [t.addressOrDenom.toLowerCase()] : []));
|
|
677471
|
+
const allRoutes = await context.registry.getWarpRoutes();
|
|
677472
|
+
const constituentRouteIds = [];
|
|
677473
|
+
for (const [routeId, routeCoreConfig] of Object.entries(allRoutes)) {
|
|
677474
|
+
if (routeId === warpRouteId)
|
|
677475
|
+
continue;
|
|
677476
|
+
if (routeCoreConfig.tokens.length === 0)
|
|
677477
|
+
continue;
|
|
677478
|
+
if (routeCoreConfig.tokens.every((t) => t.addressOrDenom &&
|
|
677479
|
+
crossAddresses.has(t.addressOrDenom.toLowerCase()) &&
|
|
677480
|
+
t.standard &&
|
|
677481
|
+
_hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_9__/* .TOKEN_CROSS_COLLATERAL_STANDARDS */ .kK.has(t.standard))) {
|
|
677482
|
+
constituentRouteIds.push(routeId);
|
|
677483
|
+
}
|
|
677484
|
+
}
|
|
677485
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .assert */ .v)(constituentRouteIds.length > 0, `No deploy config found for "${warpRouteId}" and no constituent routes could be identified. ` +
|
|
677486
|
+
`Ensure constituent routes have deploy configs in the registry.`);
|
|
677487
|
+
const combinedResult = {
|
|
677488
|
+
isValid: true,
|
|
677489
|
+
violations: [],
|
|
677490
|
+
diff: {},
|
|
677491
|
+
scaleViolations: [],
|
|
677492
|
+
};
|
|
677493
|
+
for (const constituentId of constituentRouteIds) {
|
|
677494
|
+
const constituentCoreConfig = allRoutes[constituentId];
|
|
677495
|
+
const constituentDeployConfig = await (0,_config_warp_js__WEBPACK_IMPORTED_MODULE_1__/* .readWarpRouteDeployConfig */ .Pr)({
|
|
677496
|
+
context,
|
|
677497
|
+
warpRouteId: constituentId,
|
|
677498
|
+
});
|
|
677499
|
+
const result = await (0,_hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_10__/* .checkWarpRouteDeployConfig */ .TU)({
|
|
677500
|
+
multiProvider: context.multiProvider,
|
|
677501
|
+
warpCoreConfig: constituentCoreConfig,
|
|
677502
|
+
warpDeployConfig: constituentDeployConfig,
|
|
677503
|
+
});
|
|
677504
|
+
combinedResult.isValid = combinedResult.isValid && result.isValid;
|
|
677505
|
+
combinedResult.violations.push(...result.violations);
|
|
677506
|
+
combinedResult.scaleViolations.push(...result.scaleViolations);
|
|
677507
|
+
for (const [chain, diff] of Object.entries(result.diff)) {
|
|
677508
|
+
combinedResult.diff[`${constituentId}/${chain}`] = diff;
|
|
677509
|
+
}
|
|
677510
|
+
}
|
|
677511
|
+
return combinedResult;
|
|
677454
677512
|
}
|
|
677455
677513
|
//# sourceMappingURL=warp.js.map
|
|
677456
677514
|
__webpack_async_result__();
|
|
@@ -679813,6 +679871,19 @@ const check = {
|
|
|
679813
679871
|
},
|
|
679814
679872
|
handler: async ({ context, warpRouteId, ica, origin, originOwner, chains, }) => {
|
|
679815
679873
|
(0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logCommandHeader */ .dp)('Hyperlane Warp Check');
|
|
679874
|
+
// CROSS route case: resolver set warpCoreConfig but not warpDeployConfig
|
|
679875
|
+
// (combined CROSS routes have no deploy config of their own)
|
|
679876
|
+
if (context.warpCoreConfig && !context.warpDeployConfig) {
|
|
679877
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_17__/* .assert */ .v)(!ica, 'Cannot perform ICA owner check for combined CROSS routes (no deploy config)');
|
|
679878
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_17__/* .assert */ .v)(context.resolvedWarpRouteId, 'resolvedWarpRouteId must be set for CROSS routes');
|
|
679879
|
+
const result = await (0,_check_warp_js__WEBPACK_IMPORTED_MODULE_3__/* .checkCrossCollateralWarpRoute */ .l$)({
|
|
679880
|
+
context,
|
|
679881
|
+
warpCoreConfig: context.warpCoreConfig,
|
|
679882
|
+
warpRouteId: context.resolvedWarpRouteId,
|
|
679883
|
+
});
|
|
679884
|
+
await (0,_check_warp_js__WEBPACK_IMPORTED_MODULE_3__/* .runWarpRouteCheck */ .xr)({ result });
|
|
679885
|
+
process.exit(0);
|
|
679886
|
+
}
|
|
679816
679887
|
let { warpCoreConfig, warpDeployConfig } = await getWarpConfigsFromContextOrRegistry({
|
|
679817
679888
|
context,
|
|
679818
679889
|
warpRouteId,
|
|
@@ -679821,7 +679892,7 @@ const check = {
|
|
|
679821
679892
|
// Note: ICA check uses full warpDeployConfig (not filtered) to support pre-deployed chains
|
|
679822
679893
|
if (ica) {
|
|
679823
679894
|
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_17__/* .assert */ .v)(origin, '--origin is required when using --ica');
|
|
679824
|
-
await (0,_check_warp_js__WEBPACK_IMPORTED_MODULE_3__/* .runWarpIcaOwnerCheck */ .
|
|
679895
|
+
await (0,_check_warp_js__WEBPACK_IMPORTED_MODULE_3__/* .runWarpIcaOwnerCheck */ .WN)({
|
|
679825
679896
|
context,
|
|
679826
679897
|
warpDeployConfig,
|
|
679827
679898
|
origin,
|
|
@@ -679836,7 +679907,7 @@ const check = {
|
|
|
679836
679907
|
warpCoreConfig,
|
|
679837
679908
|
warpDeployConfig,
|
|
679838
679909
|
});
|
|
679839
|
-
await (0,_check_warp_js__WEBPACK_IMPORTED_MODULE_3__/* .runWarpRouteCheck */ .
|
|
679910
|
+
await (0,_check_warp_js__WEBPACK_IMPORTED_MODULE_3__/* .runWarpRouteCheck */ .xr)({
|
|
679840
679911
|
result,
|
|
679841
679912
|
});
|
|
679842
679913
|
process.exit(0);
|
|
@@ -682272,17 +682343,18 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
|
|
|
682272
682343
|
/* harmony export */ });
|
|
682273
682344
|
/* unused harmony export getSubmitterChains */
|
|
682274
682345
|
/* harmony import */ var _hyperlane_xyz_rebalancer__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(97772);
|
|
682275
|
-
/* harmony import */ var
|
|
682276
|
-
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(
|
|
682277
|
-
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_13__ = __nccwpck_require__(
|
|
682346
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(95778);
|
|
682347
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(74670);
|
|
682348
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_13__ = __nccwpck_require__(6643);
|
|
682349
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(59138);
|
|
682278
682350
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(21387);
|
|
682279
|
-
/* harmony import */ var
|
|
682351
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(16639);
|
|
682280
682352
|
/* harmony import */ var _commands_signCommands_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(29781);
|
|
682281
682353
|
/* harmony import */ var _config_core_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(36789);
|
|
682282
682354
|
/* harmony import */ var _config_submit_js__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(21106);
|
|
682283
682355
|
/* harmony import */ var _deploy_warp_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(41687);
|
|
682284
682356
|
/* harmony import */ var _utils_chains_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(80881);
|
|
682285
|
-
/* harmony import */ var
|
|
682357
|
+
/* harmony import */ var _utils_warp_send_js__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(96192);
|
|
682286
682358
|
/* harmony import */ var _utils_warp_js__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(85361);
|
|
682287
682359
|
/* harmony import */ var _apiKeys_js__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(95433);
|
|
682288
682360
|
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_hyperlane_xyz_rebalancer__WEBPACK_IMPORTED_MODULE_0__, _config_core_js__WEBPACK_IMPORTED_MODULE_2__, _config_submit_js__WEBPACK_IMPORTED_MODULE_3__, _deploy_warp_js__WEBPACK_IMPORTED_MODULE_4__, _utils_chains_js__WEBPACK_IMPORTED_MODULE_5__, _utils_warp_js__WEBPACK_IMPORTED_MODULE_6__, _apiKeys_js__WEBPACK_IMPORTED_MODULE_7__]);
|
|
@@ -682319,8 +682391,9 @@ async function resolveChains(argv) {
|
|
|
682319
682391
|
case _commands_signCommands_js__WEBPACK_IMPORTED_MODULE_1__/* .CommandType */ .g4.WARP_READ:
|
|
682320
682392
|
return resolveWarpReadChains(argv);
|
|
682321
682393
|
case _commands_signCommands_js__WEBPACK_IMPORTED_MODULE_1__/* .CommandType */ .g4.WARP_APPLY:
|
|
682322
|
-
case _commands_signCommands_js__WEBPACK_IMPORTED_MODULE_1__/* .CommandType */ .g4.WARP_CHECK:
|
|
682323
682394
|
return resolveWarpConfigChains(argv);
|
|
682395
|
+
case _commands_signCommands_js__WEBPACK_IMPORTED_MODULE_1__/* .CommandType */ .g4.WARP_CHECK:
|
|
682396
|
+
return resolveWarpCheckChains(argv);
|
|
682324
682397
|
case _commands_signCommands_js__WEBPACK_IMPORTED_MODULE_1__/* .CommandType */ .g4.WARP_REBALANCER:
|
|
682325
682398
|
return resolveWarpRebalancerChains(argv);
|
|
682326
682399
|
case _commands_signCommands_js__WEBPACK_IMPORTED_MODULE_1__/* .CommandType */ .g4.SUBMIT:
|
|
@@ -682383,6 +682456,29 @@ async function resolveWarpConfigChains(argv) {
|
|
|
682383
682456
|
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .v)(argv.context.chains.length !== 0, 'No chains found in warp route deployment config');
|
|
682384
682457
|
return argv.context.chains;
|
|
682385
682458
|
}
|
|
682459
|
+
async function resolveWarpCheckChains(argv) {
|
|
682460
|
+
const context = argv.context;
|
|
682461
|
+
const resolvedId = await (0,_utils_warp_js__WEBPACK_IMPORTED_MODULE_6__/* .resolveWarpRouteId */ .NV)({
|
|
682462
|
+
context,
|
|
682463
|
+
warpRouteId: argv.warpRouteId,
|
|
682464
|
+
});
|
|
682465
|
+
const rawDeployConfig = await context.registry.getWarpDeployConfig(resolvedId);
|
|
682466
|
+
if (!rawDeployConfig) {
|
|
682467
|
+
// CROSS route: no deploy config, get chains from core config
|
|
682468
|
+
const warpCoreConfigRaw = await context.registry.getWarpRoute(resolvedId);
|
|
682469
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .v)(warpCoreConfigRaw, `No warp route config found for "${resolvedId}"`);
|
|
682470
|
+
const warpCoreConfig = _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_9__/* .WarpCoreConfigSchema */ .$.parse(warpCoreConfigRaw);
|
|
682471
|
+
const uniqueChains = [
|
|
682472
|
+
...new Set(warpCoreConfig.tokens.map((t) => t.chainName)),
|
|
682473
|
+
];
|
|
682474
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .v)(uniqueChains.length > 0, `No chains found for warp route "${resolvedId}"`);
|
|
682475
|
+
context.warpCoreConfig = warpCoreConfig;
|
|
682476
|
+
context.resolvedWarpRouteId = resolvedId;
|
|
682477
|
+
context.chains = uniqueChains;
|
|
682478
|
+
return uniqueChains;
|
|
682479
|
+
}
|
|
682480
|
+
return resolveWarpConfigChains(argv);
|
|
682481
|
+
}
|
|
682386
682482
|
async function resolveWarpSendChains(argv) {
|
|
682387
682483
|
const { multiProvider } = argv.context;
|
|
682388
682484
|
const chainPath = [];
|
|
@@ -682401,7 +682497,7 @@ async function resolveWarpSendChains(argv) {
|
|
|
682401
682497
|
});
|
|
682402
682498
|
argv.context.warpCoreConfig = warpCoreConfig;
|
|
682403
682499
|
const supportedChains = warpCoreConfig.tokens.map((token) => token.chainName);
|
|
682404
|
-
chainPath.push(...(0,
|
|
682500
|
+
chainPath.push(...(0,_utils_warp_send_js__WEBPACK_IMPORTED_MODULE_10__/* .getOrderedWarpSendChains */ .M)(supportedChains, multiProvider));
|
|
682405
682501
|
}
|
|
682406
682502
|
// Cache warpCoreConfig on context so the handler doesn't re-fetch it.
|
|
682407
682503
|
// This ensures signers and execution use the same resolved config.
|
|
@@ -682430,7 +682526,7 @@ async function resolveWarpSendChains(argv) {
|
|
|
682430
682526
|
if (!normalizedRecipient || argv.relay) {
|
|
682431
682527
|
for (let i = 1; i < chainPath.length; i += 1) {
|
|
682432
682528
|
const destination = chainPath[i];
|
|
682433
|
-
if ((0,
|
|
682529
|
+
if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_11__/* .isEVMLike */ .Us)(multiProvider.getProtocol(destination))) {
|
|
682434
682530
|
signerChains.add(destination);
|
|
682435
682531
|
}
|
|
682436
682532
|
}
|
|
@@ -682456,7 +682552,7 @@ async function resolveSendMessageChains(argv) {
|
|
|
682456
682552
|
const { multiProvider } = argv.context;
|
|
682457
682553
|
const selectedChains = [argv.origin, argv.destination].filter(Boolean);
|
|
682458
682554
|
if (selectedChains.length > 0) {
|
|
682459
|
-
const nonEvmChains = selectedChains.filter((chain) => !(0,
|
|
682555
|
+
const nonEvmChains = selectedChains.filter((chain) => !(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_11__/* .isEVMLike */ .Us)(multiProvider.getProtocol(chain)));
|
|
682460
682556
|
if (nonEvmChains.length > 0) {
|
|
682461
682557
|
const chainDetails = nonEvmChains
|
|
682462
682558
|
.map((chain) => `'${chain}' (${multiProvider.getProtocol(chain)})`)
|
|
@@ -682493,7 +682589,7 @@ async function resolveRelayerChains(argv) {
|
|
|
682493
682589
|
// If no destination is specified, return all EVM chains only
|
|
682494
682590
|
if (!argv.destination) {
|
|
682495
682591
|
const chains = Object.keys((0,_utils_chains_js__WEBPACK_IMPORTED_MODULE_5__/* .filterOutDisabledChains */ .zC)(chainMetadata));
|
|
682496
|
-
return chains.filter((chain) => (0,
|
|
682592
|
+
return chains.filter((chain) => (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_11__/* .isEVMLike */ .Us)(multiProvider.getProtocol(chain)));
|
|
682497
682593
|
}
|
|
682498
682594
|
chains.add(argv.destination);
|
|
682499
682595
|
return Array.from(chains);
|
|
@@ -682505,12 +682601,12 @@ async function resolveCoreApplyChains(argv) {
|
|
|
682505
682601
|
return [argv.chain];
|
|
682506
682602
|
}
|
|
682507
682603
|
const addresses = await argv.context.registry.getChainAddresses(argv.chain);
|
|
682508
|
-
const coreAddresses =
|
|
682604
|
+
const coreAddresses = _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_12__/* .DeployedCoreAddressesSchema */ .Vd.parse(addresses);
|
|
682509
682605
|
const protocolType = argv.context.multiProvider.getProtocol(argv.chain);
|
|
682510
682606
|
switch (protocolType) {
|
|
682511
|
-
case
|
|
682512
|
-
case
|
|
682513
|
-
const evmCoreModule = new
|
|
682607
|
+
case _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_11__/* .ProtocolType */ .Hb.Tron:
|
|
682608
|
+
case _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_11__/* .ProtocolType */ .Hb.Ethereum: {
|
|
682609
|
+
const evmCoreModule = new _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_13__/* .EvmCoreModule */ .a(argv.context.multiProvider, {
|
|
682514
682610
|
chain: argv.chain,
|
|
682515
682611
|
config,
|
|
682516
682612
|
addresses: coreAddresses,
|
|
@@ -682591,13 +682687,13 @@ async function resolveSubmitChains(argv) {
|
|
|
682591
682687
|
// Recursively extracts all chain names referenced by a submitter (e.g. ICA origin, destination, nested submitters).
|
|
682592
682688
|
function getSubmitterChains(submitter) {
|
|
682593
682689
|
const chains = submitter.chain ? [submitter.chain] : [];
|
|
682594
|
-
if (submitter.type ===
|
|
682690
|
+
if (submitter.type === _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_14__/* .TxSubmitterType */ .u.INTERCHAIN_ACCOUNT) {
|
|
682595
682691
|
if (submitter.destinationChain)
|
|
682596
682692
|
chains.push(submitter.destinationChain);
|
|
682597
682693
|
if (submitter.internalSubmitter)
|
|
682598
682694
|
chains.push(...getSubmitterChains(submitter.internalSubmitter));
|
|
682599
682695
|
}
|
|
682600
|
-
else if (submitter.type ===
|
|
682696
|
+
else if (submitter.type === _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_14__/* .TxSubmitterType */ .u.TIMELOCK_CONTROLLER) {
|
|
682601
682697
|
if (submitter.proposerSubmitter)
|
|
682602
682698
|
chains.push(...getSubmitterChains(submitter.proposerSubmitter));
|
|
682603
682699
|
}
|
|
@@ -683448,7 +683544,7 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
|
|
|
683448
683544
|
/* harmony import */ var yaml__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(10684);
|
|
683449
683545
|
/* harmony import */ var _hyperlane_xyz_core_buildArtifact_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(74119);
|
|
683450
683546
|
/* harmony import */ var _hyperlane_xyz_deploy_sdk__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(56854);
|
|
683451
|
-
/* harmony import */ var
|
|
683547
|
+
/* harmony import */ var _hyperlane_xyz_deploy_sdk_AltVMFileSubmitter__WEBPACK_IMPORTED_MODULE_37__ = __nccwpck_require__(49988);
|
|
683452
683548
|
/* harmony import */ var _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(92201);
|
|
683453
683549
|
/* harmony import */ var _hyperlane_xyz_provider_sdk_artifact__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(4287);
|
|
683454
683550
|
/* harmony import */ var _hyperlane_xyz_provider_sdk_warp__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(17791);
|
|
@@ -683459,22 +683555,23 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
|
|
|
683459
683555
|
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_23__ = __nccwpck_require__(38466);
|
|
683460
683556
|
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_24__ = __nccwpck_require__(95778);
|
|
683461
683557
|
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_25__ = __nccwpck_require__(63776);
|
|
683462
|
-
/* harmony import */ var
|
|
683463
|
-
/* harmony import */ var
|
|
683464
|
-
/* harmony import */ var
|
|
683465
|
-
/* harmony import */ var
|
|
683466
|
-
/* harmony import */ var
|
|
683467
|
-
/* harmony import */ var
|
|
683468
|
-
/* harmony import */ var
|
|
683469
|
-
/* harmony import */ var
|
|
683470
|
-
/* harmony import */ var
|
|
683471
|
-
/* harmony import */ var
|
|
683558
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_27__ = __nccwpck_require__(93035);
|
|
683559
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_28__ = __nccwpck_require__(76939);
|
|
683560
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_29__ = __nccwpck_require__(26492);
|
|
683561
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_31__ = __nccwpck_require__(48807);
|
|
683562
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_32__ = __nccwpck_require__(764);
|
|
683563
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_33__ = __nccwpck_require__(22887);
|
|
683564
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_34__ = __nccwpck_require__(69352);
|
|
683565
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_36__ = __nccwpck_require__(59138);
|
|
683566
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_38__ = __nccwpck_require__(74694);
|
|
683567
|
+
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_39__ = __nccwpck_require__(27043);
|
|
683472
683568
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__ = __nccwpck_require__(16639);
|
|
683473
683569
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__ = __nccwpck_require__(14918);
|
|
683474
683570
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__ = __nccwpck_require__(73938);
|
|
683475
|
-
/* harmony import */ var
|
|
683476
|
-
/* harmony import */ var
|
|
683477
|
-
/* harmony import */ var
|
|
683571
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_26__ = __nccwpck_require__(18508);
|
|
683572
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_30__ = __nccwpck_require__(21387);
|
|
683573
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_35__ = __nccwpck_require__(94523);
|
|
683574
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_40__ = __nccwpck_require__(93142);
|
|
683478
683575
|
/* harmony import */ var _context_apiKeys_js__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(95433);
|
|
683479
683576
|
/* harmony import */ var _logger_js__WEBPACK_IMPORTED_MODULE_16__ = __nccwpck_require__(54321);
|
|
683480
683577
|
/* harmony import */ var _send_transfer_js__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(67793);
|
|
@@ -683484,8 +683581,8 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
|
|
|
683484
683581
|
/* harmony import */ var _utils_relay_js__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(92941);
|
|
683485
683582
|
/* harmony import */ var _configValidation_js__WEBPACK_IMPORTED_MODULE_13__ = __nccwpck_require__(34804);
|
|
683486
683583
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(62356);
|
|
683487
|
-
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_context_apiKeys_js__WEBPACK_IMPORTED_MODULE_7__, _send_transfer_js__WEBPACK_IMPORTED_MODULE_8__, _submitters_EV5FileSubmitter_js__WEBPACK_IMPORTED_MODULE_9__, _submitters_types_js__WEBPACK_IMPORTED_MODULE_10__, _utils_relay_js__WEBPACK_IMPORTED_MODULE_12__, _configValidation_js__WEBPACK_IMPORTED_MODULE_13__, _utils_js__WEBPACK_IMPORTED_MODULE_14__, _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_17__,
|
|
683488
|
-
([_context_apiKeys_js__WEBPACK_IMPORTED_MODULE_7__, _send_transfer_js__WEBPACK_IMPORTED_MODULE_8__, _submitters_EV5FileSubmitter_js__WEBPACK_IMPORTED_MODULE_9__, _submitters_types_js__WEBPACK_IMPORTED_MODULE_10__, _utils_relay_js__WEBPACK_IMPORTED_MODULE_12__, _configValidation_js__WEBPACK_IMPORTED_MODULE_13__, _utils_js__WEBPACK_IMPORTED_MODULE_14__, _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_17__,
|
|
683584
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_context_apiKeys_js__WEBPACK_IMPORTED_MODULE_7__, _send_transfer_js__WEBPACK_IMPORTED_MODULE_8__, _submitters_EV5FileSubmitter_js__WEBPACK_IMPORTED_MODULE_9__, _submitters_types_js__WEBPACK_IMPORTED_MODULE_10__, _utils_relay_js__WEBPACK_IMPORTED_MODULE_12__, _configValidation_js__WEBPACK_IMPORTED_MODULE_13__, _utils_js__WEBPACK_IMPORTED_MODULE_14__, _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_17__, _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_31__]);
|
|
683585
|
+
([_context_apiKeys_js__WEBPACK_IMPORTED_MODULE_7__, _send_transfer_js__WEBPACK_IMPORTED_MODULE_8__, _submitters_EV5FileSubmitter_js__WEBPACK_IMPORTED_MODULE_9__, _submitters_types_js__WEBPACK_IMPORTED_MODULE_10__, _utils_relay_js__WEBPACK_IMPORTED_MODULE_12__, _configValidation_js__WEBPACK_IMPORTED_MODULE_13__, _utils_js__WEBPACK_IMPORTED_MODULE_14__, _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_17__, _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_31__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
|
683489
683586
|
|
|
683490
683587
|
|
|
683491
683588
|
|
|
@@ -683780,7 +683877,7 @@ async function extendWarpRoute(params, apiKeys, warpCoreConfig) {
|
|
|
683780
683877
|
newDeployedContracts = { ...newDeployedContracts, ...contracts };
|
|
683781
683878
|
}
|
|
683782
683879
|
for (const [chain, error] of rejected) {
|
|
683783
|
-
(0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .errorRed */ .aq)(`Failed to deploy extension to ${chain}: ${error
|
|
683880
|
+
(0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .errorRed */ .aq)(`Failed to deploy extension to ${chain}: ${(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_26__/* .formatError */ .Wk)(error)}`);
|
|
683784
683881
|
allRejected.set(chain, error);
|
|
683785
683882
|
}
|
|
683786
683883
|
}
|
|
@@ -683791,9 +683888,8 @@ async function extendWarpRoute(params, apiKeys, warpCoreConfig) {
|
|
|
683791
683888
|
newDeployedContracts = { ...newDeployedContracts, ...contracts };
|
|
683792
683889
|
}
|
|
683793
683890
|
catch (error) {
|
|
683794
|
-
|
|
683795
|
-
(
|
|
683796
|
-
allRejected.set(chain, error instanceof Error ? error : new Error(message));
|
|
683891
|
+
(0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .errorRed */ .aq)(`Failed to deploy extension to ${chain}: ${(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_26__/* .formatError */ .Wk)(error)}`);
|
|
683892
|
+
allRejected.set(chain, error instanceof Error ? error : new Error(String(error)));
|
|
683797
683893
|
}
|
|
683798
683894
|
}
|
|
683799
683895
|
if (Object.keys(newDeployedContracts).length === 0 && allRejected.size > 0) {
|
|
@@ -683837,8 +683933,8 @@ async function updateExistingWarpRoute(params, apiKeys, warpDeployConfig, warpCo
|
|
|
683837
683933
|
(0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logBlue */ .RK)('Updating deployed Warp Routes');
|
|
683838
683934
|
const { multiProvider, altVmSigners, registry } = params.context;
|
|
683839
683935
|
const registryAddresses = (await registry.getAddresses());
|
|
683840
|
-
const ccipContractCache = new
|
|
683841
|
-
const contractVerifier = new
|
|
683936
|
+
const ccipContractCache = new _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_27__/* .CCIPContractCache */ .G5(registryAddresses);
|
|
683937
|
+
const contractVerifier = new _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_28__/* .ContractVerifier */ .j(multiProvider, apiKeys, _hyperlane_xyz_core_buildArtifact_js__WEBPACK_IMPORTED_MODULE_2__/* .buildArtifact */ .L, _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_29__/* .ExplorerLicenseType */ .p8.MIT);
|
|
683842
683938
|
const updateTransactions = {};
|
|
683843
683939
|
// Get all deployed router addresses
|
|
683844
683940
|
const deployedRoutersAddresses = (0,_hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_25__/* .getRouterAddressesFromWarpCoreConfig */ .Ji)(warpCoreConfig);
|
|
@@ -683855,7 +683951,7 @@ async function updateExistingWarpRoute(params, apiKeys, warpDeployConfig, warpCo
|
|
|
683855
683951
|
return;
|
|
683856
683952
|
}
|
|
683857
683953
|
const deployedTokenRoute = deployedRoutersAddresses[chain];
|
|
683858
|
-
(0,
|
|
683954
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_30__/* .assert */ .v)(deployedTokenRoute, `Missing artifacts for ${chain}.`);
|
|
683859
683955
|
const configWithMailbox = {
|
|
683860
683956
|
...config,
|
|
683861
683957
|
mailbox: registryAddresses[chain].mailbox,
|
|
@@ -683863,12 +683959,12 @@ async function updateExistingWarpRoute(params, apiKeys, warpDeployConfig, warpCo
|
|
|
683863
683959
|
switch (protocolType) {
|
|
683864
683960
|
case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_4__/* .ProtocolType */ .Hb.Tron:
|
|
683865
683961
|
case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_4__/* .ProtocolType */ .Hb.Ethereum: {
|
|
683866
|
-
const evmERC20WarpModule = new
|
|
683962
|
+
const evmERC20WarpModule = new _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_31__/* .EvmWarpModule */ .N(multiProvider, {
|
|
683867
683963
|
config: configWithMailbox,
|
|
683868
683964
|
chain,
|
|
683869
683965
|
addresses: {
|
|
683870
683966
|
deployedTokenRoute,
|
|
683871
|
-
...(0,
|
|
683967
|
+
...(0,_hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_32__/* .extractIsmAndHookFactoryAddresses */ .zs)(registryAddresses[chain]),
|
|
683872
683968
|
},
|
|
683873
683969
|
}, ccipContractCache, contractVerifier);
|
|
683874
683970
|
const transactions = await evmERC20WarpModule.update(configWithMailbox);
|
|
@@ -683878,7 +683974,7 @@ async function updateExistingWarpRoute(params, apiKeys, warpDeployConfig, warpCo
|
|
|
683878
683974
|
default: {
|
|
683879
683975
|
const signer = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .mustGet */ .Qd)(altVmSigners, chain);
|
|
683880
683976
|
const validatedConfig = (0,_configValidation_js__WEBPACK_IMPORTED_MODULE_13__/* .validateWarpConfigForAltVM */ .u)(configWithMailbox, chain);
|
|
683881
|
-
const chainLookup = (0,
|
|
683977
|
+
const chainLookup = (0,_hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_33__/* .altVmChainLookup */ .O)(multiProvider);
|
|
683882
683978
|
const chainMetadata = chainLookup.getChainMetadata(chain);
|
|
683883
683979
|
const writer = (0,_hyperlane_xyz_deploy_sdk__WEBPACK_IMPORTED_MODULE_3__/* .createWarpTokenWriter */ .l5)(chainMetadata, chainLookup, signer);
|
|
683884
683980
|
const artifact = (0,_hyperlane_xyz_provider_sdk_warp__WEBPACK_IMPORTED_MODULE_6__/* .warpConfigToArtifact */ .ku)(validatedConfig, chainLookup);
|
|
@@ -683971,7 +684067,7 @@ function transformDeployConfigForDisplay(deployConfig) {
|
|
|
683971
684067
|
function transformIsmConfigForDisplay(ismConfig) {
|
|
683972
684068
|
const ismConfigs = [];
|
|
683973
684069
|
switch (ismConfig.type) {
|
|
683974
|
-
case
|
|
684070
|
+
case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_34__/* .IsmType */ .GO.AGGREGATION:
|
|
683975
684071
|
ismConfigs.push({
|
|
683976
684072
|
Type: ismConfig.type,
|
|
683977
684073
|
Threshold: ismConfig.threshold,
|
|
@@ -683981,7 +684077,7 @@ function transformIsmConfigForDisplay(ismConfig) {
|
|
|
683981
684077
|
ismConfigs.push(...transformIsmConfigForDisplay(module));
|
|
683982
684078
|
});
|
|
683983
684079
|
return ismConfigs;
|
|
683984
|
-
case
|
|
684080
|
+
case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_34__/* .IsmType */ .GO.ROUTING:
|
|
683985
684081
|
return [
|
|
683986
684082
|
{
|
|
683987
684083
|
Type: ismConfig.type,
|
|
@@ -683990,7 +684086,7 @@ function transformIsmConfigForDisplay(ismConfig) {
|
|
|
683990
684086
|
Domains: 'See warp config for domain specification.',
|
|
683991
684087
|
},
|
|
683992
684088
|
];
|
|
683993
|
-
case
|
|
684089
|
+
case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_34__/* .IsmType */ .GO.FALLBACK_ROUTING:
|
|
683994
684090
|
return [
|
|
683995
684091
|
{
|
|
683996
684092
|
Type: ismConfig.type,
|
|
@@ -683999,7 +684095,7 @@ function transformIsmConfigForDisplay(ismConfig) {
|
|
|
683999
684095
|
Domains: 'See warp config for domain specification.',
|
|
684000
684096
|
},
|
|
684001
684097
|
];
|
|
684002
|
-
case
|
|
684098
|
+
case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_34__/* .IsmType */ .GO.MERKLE_ROOT_MULTISIG:
|
|
684003
684099
|
return [
|
|
684004
684100
|
{
|
|
684005
684101
|
Type: ismConfig.type,
|
|
@@ -684007,7 +684103,7 @@ function transformIsmConfigForDisplay(ismConfig) {
|
|
|
684007
684103
|
Threshold: ismConfig.threshold,
|
|
684008
684104
|
},
|
|
684009
684105
|
];
|
|
684010
|
-
case
|
|
684106
|
+
case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_34__/* .IsmType */ .GO.MESSAGE_ID_MULTISIG:
|
|
684011
684107
|
return [
|
|
684012
684108
|
{
|
|
684013
684109
|
Type: ismConfig.type,
|
|
@@ -684015,7 +684111,7 @@ function transformIsmConfigForDisplay(ismConfig) {
|
|
|
684015
684111
|
Threshold: ismConfig.threshold,
|
|
684016
684112
|
},
|
|
684017
684113
|
];
|
|
684018
|
-
case
|
|
684114
|
+
case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_34__/* .IsmType */ .GO.OP_STACK:
|
|
684019
684115
|
return [
|
|
684020
684116
|
{
|
|
684021
684117
|
Type: ismConfig.type,
|
|
@@ -684023,7 +684119,7 @@ function transformIsmConfigForDisplay(ismConfig) {
|
|
|
684023
684119
|
'Native Bridge': ismConfig.nativeBridge,
|
|
684024
684120
|
},
|
|
684025
684121
|
];
|
|
684026
|
-
case
|
|
684122
|
+
case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_34__/* .IsmType */ .GO.PAUSABLE:
|
|
684027
684123
|
return [
|
|
684028
684124
|
{
|
|
684029
684125
|
Type: ismConfig.type,
|
|
@@ -684032,7 +684128,7 @@ function transformIsmConfigForDisplay(ismConfig) {
|
|
|
684032
684128
|
'Owner Overrides': ismConfig.ownerOverrides ?? 'Undefined',
|
|
684033
684129
|
},
|
|
684034
684130
|
];
|
|
684035
|
-
case
|
|
684131
|
+
case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_34__/* .IsmType */ .GO.TRUSTED_RELAYER:
|
|
684036
684132
|
return [
|
|
684037
684133
|
{
|
|
684038
684134
|
Type: ismConfig.type,
|
|
@@ -684105,7 +684201,7 @@ async function submitWarpApplyTransactions(params, updateTransactions) {
|
|
|
684105
684201
|
if (evmChains.length > 0) {
|
|
684106
684202
|
const { rejected } = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__/* .mapAllSettled */ .bh)(evmChains, (chain) => submitChainTransactions(params, chain, updateTransactions[chain], isExtended(chain)), (chain) => chain);
|
|
684107
684203
|
for (const [chain, error] of rejected) {
|
|
684108
|
-
|
|
684204
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_35__/* .rootLogger */ .Jk.debug(`Error in submitWarpApplyTransactions for ${chain}`, error);
|
|
684109
684205
|
(0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .errorRed */ .aq)(`Failed to submit warp apply transactions for ${chain}: ${error.message}`);
|
|
684110
684206
|
failures.push(chain);
|
|
684111
684207
|
}
|
|
@@ -684117,7 +684213,7 @@ async function submitWarpApplyTransactions(params, updateTransactions) {
|
|
|
684117
684213
|
}
|
|
684118
684214
|
catch (e) {
|
|
684119
684215
|
const errorMessage = e instanceof Error ? e.message : String(e);
|
|
684120
|
-
|
|
684216
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_35__/* .rootLogger */ .Jk.debug(`Error in submitWarpApplyTransactions for ${chain}`, e);
|
|
684121
684217
|
(0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .errorRed */ .aq)(`Failed to submit warp apply transactions for ${chain}: ${errorMessage}`);
|
|
684122
684218
|
failures.push(chain);
|
|
684123
684219
|
}
|
|
@@ -684136,7 +684232,7 @@ async function getSubmitterByStrategy({ chain, context, strategyUrl, isExtendedC
|
|
|
684136
684232
|
const defaultSubmitter = {
|
|
684137
684233
|
submitter: {
|
|
684138
684234
|
chain,
|
|
684139
|
-
type:
|
|
684235
|
+
type: _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_36__/* .TxSubmitterType */ .u.JSON_RPC,
|
|
684140
684236
|
},
|
|
684141
684237
|
};
|
|
684142
684238
|
// if the requested chain is not defined in the config, transaction submission will crash
|
|
@@ -684167,12 +684263,12 @@ async function getSubmitterByStrategy({ chain, context, strategyUrl, isExtendedC
|
|
|
684167
684263
|
});
|
|
684168
684264
|
},
|
|
684169
684265
|
[_submitters_types_js__WEBPACK_IMPORTED_MODULE_10__/* .CustomTxSubmitterType */ .pW.FILE]: (_multiProvider, metadata) => {
|
|
684170
|
-
return new
|
|
684266
|
+
return new _hyperlane_xyz_deploy_sdk_AltVMFileSubmitter__WEBPACK_IMPORTED_MODULE_37__/* .AltVMFileSubmitter */ .U(signer, metadata);
|
|
684171
684267
|
},
|
|
684172
684268
|
};
|
|
684173
684269
|
}
|
|
684174
684270
|
return {
|
|
684175
|
-
submitter: await (0,
|
|
684271
|
+
submitter: await (0,_hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_38__/* .getSubmitterBuilder */ .x)({
|
|
684176
684272
|
submissionStrategy: strategyToUse, // TODO: fix this
|
|
684177
684273
|
multiProvider,
|
|
684178
684274
|
coreAddressesByChain: await registry.getAddresses(),
|
|
@@ -684184,14 +684280,14 @@ async function getSubmitterByStrategy({ chain, context, strategyUrl, isExtendedC
|
|
|
684184
684280
|
function formatScaleForLogs(scale) {
|
|
684185
684281
|
if (!scale)
|
|
684186
684282
|
return '1';
|
|
684187
|
-
const normalizedScale = (0,
|
|
684283
|
+
const normalizedScale = (0,_hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_39__/* .normalizeScale */ .EM)(scale);
|
|
684188
684284
|
if (normalizedScale.denominator === 1n) {
|
|
684189
684285
|
return normalizedScale.numerator.toString();
|
|
684190
684286
|
}
|
|
684191
684287
|
return `${normalizedScale.numerator}/${normalizedScale.denominator}`;
|
|
684192
684288
|
}
|
|
684193
684289
|
function getCanonicalWholeTokenRatio(token) {
|
|
684194
|
-
const normalizedScale = (0,
|
|
684290
|
+
const normalizedScale = (0,_hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_39__/* .normalizeScale */ .EM)(token.scale);
|
|
684195
684291
|
const oneTokenBaseUnits = 10n ** BigInt(token.decimals);
|
|
684196
684292
|
return {
|
|
684197
684293
|
numerator: oneTokenBaseUnits * normalizedScale.numerator,
|
|
@@ -684203,9 +684299,9 @@ function assertCombineRoutesAreValid(routes) {
|
|
|
684203
684299
|
const invalidDeployChains = Object.entries(route.deployConfig)
|
|
684204
684300
|
.filter(([, chainConfig]) => !(0,_hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_23__/* .isCrossCollateralTokenConfig */ .v3)(chainConfig))
|
|
684205
684301
|
.map(([chain]) => chain);
|
|
684206
|
-
(0,
|
|
684302
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_30__/* .assert */ .v)(invalidDeployChains.length === 0, `Route "${route.id}" contains non-CrossCollateralRouter deploy configs for chain(s): ${invalidDeployChains.join(', ')}`);
|
|
684207
684303
|
const invalidCoreTokens = route.coreConfig.tokens.filter((token) => !_hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_21__/* .TOKEN_CROSS_COLLATERAL_STANDARDS */ .kK.has(token.standard));
|
|
684208
|
-
(0,
|
|
684304
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_30__/* .assert */ .v)(invalidCoreTokens.length === 0, `Route "${route.id}" contains non-CrossCollateralRouter warp config token(s): ${invalidCoreTokens
|
|
684209
684305
|
.map((token) => `${token.chainName}:${token.addressOrDenom}`)
|
|
684210
684306
|
.join(', ')}`);
|
|
684211
684307
|
}
|
|
@@ -684226,7 +684322,7 @@ function assertCombineRoutesAreValid(routes) {
|
|
|
684226
684322
|
const candidateRatio = getCanonicalWholeTokenRatio(candidate.token);
|
|
684227
684323
|
const isCompatible = baseRatio.numerator * candidateRatio.denominator ===
|
|
684228
684324
|
candidateRatio.numerator * baseRatio.denominator;
|
|
684229
|
-
(0,
|
|
684325
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_30__/* .assert */ .v)(isCompatible, `Incompatible decimals/scale on chain "${chainName}" between route "${base.routeId}" (${base.token.symbol}, decimals=${base.token.decimals}, scale=${formatScaleForLogs(base.token.scale)}) and route "${candidate.routeId}" (${candidate.token.symbol}, decimals=${candidate.token.decimals}, scale=${formatScaleForLogs(candidate.token.scale)}).`);
|
|
684230
684326
|
}
|
|
684231
684327
|
}
|
|
684232
684328
|
}
|
|
@@ -684235,14 +684331,14 @@ function assertCombineRoutesAreValid(routes) {
|
|
|
684235
684331
|
* each route's deploy config with cross-route crossCollateralRouters.
|
|
684236
684332
|
*/
|
|
684237
684333
|
async function runWarpRouteCombine({ context, routeIds, outputWarpRouteId, }) {
|
|
684238
|
-
(0,
|
|
684239
|
-
(0,
|
|
684240
|
-
(0,
|
|
684334
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_30__/* .assert */ .v)(routeIds.length >= 2, 'At least 2 route IDs are required to combine');
|
|
684335
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_30__/* .assert */ .v)(routeIds.every((id) => id.length > 0), 'Route IDs must be non-empty strings');
|
|
684336
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_30__/* .assert */ .v)(new Set(routeIds).size === routeIds.length, 'Duplicate route IDs are not allowed');
|
|
684241
684337
|
// 1. Read each route's WarpCoreConfig and deploy config
|
|
684242
684338
|
const routes = [];
|
|
684243
684339
|
for (const id of routeIds) {
|
|
684244
684340
|
const coreConfig = await context.registry.getWarpRoute(id);
|
|
684245
|
-
(0,
|
|
684341
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_30__/* .assert */ .v)(coreConfig, `Warp route "${id}" not found in registry`);
|
|
684246
684342
|
const deployConfigRaw = await context.registry.getWarpDeployConfig(id);
|
|
684247
684343
|
const deployConfig = _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_23__/* .WarpRouteDeployConfigSchema */ .Wl.parse(deployConfigRaw);
|
|
684248
684344
|
routes.push({
|
|
@@ -684267,8 +684363,8 @@ async function runWarpRouteCombine({ context, routeIds, outputWarpRouteId, }) {
|
|
|
684267
684363
|
const otherDomain = context.multiProvider
|
|
684268
684364
|
.getDomainId(otherToken.chainName)
|
|
684269
684365
|
.toString();
|
|
684270
|
-
(0,
|
|
684271
|
-
const otherRouter = (0,
|
|
684366
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_30__/* .assert */ .v)(otherToken.addressOrDenom, `CrossCollateralRouter token missing addressOrDenom on ${otherToken.chainName}`);
|
|
684367
|
+
const otherRouter = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_40__/* .addressToBytes32 */ .In)(otherToken.addressOrDenom);
|
|
684272
684368
|
crossCollateralRouters[otherDomain] ??= new Set();
|
|
684273
684369
|
crossCollateralRouters[otherDomain].add(otherRouter);
|
|
684274
684370
|
}
|
|
@@ -684302,7 +684398,7 @@ async function runWarpRouteCombine({ context, routeIds, outputWarpRouteId, }) {
|
|
|
684302
684398
|
for (const route of routes) {
|
|
684303
684399
|
for (const token of route.coreConfig.tokens) {
|
|
684304
684400
|
const key = `${token.chainName}:${token.addressOrDenom}`;
|
|
684305
|
-
(0,
|
|
684401
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_30__/* .assert */ .v)(!seenTokens.has(key), `Duplicate token ${key} across input routes`);
|
|
684306
684402
|
seenTokens.add(key);
|
|
684307
684403
|
mergedConfig.tokens.push({ ...token, connections: [] });
|
|
684308
684404
|
}
|
|
@@ -693533,12 +693629,12 @@ function getOrderedWarpSendChains(chains, multiProvider) {
|
|
|
693533
693629
|
|
|
693534
693630
|
__nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
693535
693631
|
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
693632
|
+
/* harmony export */ NV: () => (/* binding */ resolveWarpRouteId),
|
|
693536
693633
|
/* harmony export */ Rj: () => (/* binding */ getWarpRouteDeployConfig),
|
|
693537
693634
|
/* harmony export */ Yb: () => (/* binding */ getWarpConfigs),
|
|
693538
693635
|
/* harmony export */ ff: () => (/* binding */ getWarpCoreConfigOrExit),
|
|
693539
693636
|
/* harmony export */ mg: () => (/* binding */ filterWarpConfigsToMatchingChains)
|
|
693540
693637
|
/* harmony export */ });
|
|
693541
|
-
/* unused harmony export resolveWarpRouteId */
|
|
693542
693638
|
/* harmony import */ var _inquirer_search__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(89458);
|
|
693543
693639
|
/* harmony import */ var _hyperlane_xyz_registry__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(5692);
|
|
693544
693640
|
/* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(63776);
|
|
@@ -694097,7 +694193,7 @@ __webpack_async_result__();
|
|
|
694097
694193
|
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
694098
694194
|
/* harmony export */ x: () => (/* binding */ VERSION)
|
|
694099
694195
|
/* harmony export */ });
|
|
694100
|
-
const VERSION = '
|
|
694196
|
+
const VERSION = '34.0.0';
|
|
694101
694197
|
//# sourceMappingURL=version.js.map
|
|
694102
694198
|
|
|
694103
694199
|
/***/ }),
|
|
@@ -694202,12 +694298,14 @@ class CosmosNativeProtocolProvider {
|
|
|
694202
694298
|
/* harmony import */ var _cosmjs_proto_signing__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(5505);
|
|
694203
694299
|
/* harmony import */ var _cosmjs_stargate__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(69403);
|
|
694204
694300
|
/* harmony import */ var _cosmjs_tendermint_rpc__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(83071);
|
|
694205
|
-
/* harmony import */ var
|
|
694206
|
-
/* harmony import */ var
|
|
694301
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(21387);
|
|
694302
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(93142);
|
|
694207
694303
|
/* harmony import */ var _hyperlane_core_query_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(30801);
|
|
694208
694304
|
/* harmony import */ var _hyperlane_warp_query_js__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(15220);
|
|
694209
694305
|
/* harmony import */ var _registry_js__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(21360);
|
|
694210
694306
|
/* harmony import */ var _warp_warp_query_js__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(69162);
|
|
694307
|
+
/* harmony import */ var _stargate_js__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(54114);
|
|
694308
|
+
|
|
694211
694309
|
|
|
694212
694310
|
|
|
694213
694311
|
|
|
@@ -694223,8 +694321,9 @@ class CosmosNativeProvider {
|
|
|
694223
694321
|
registry;
|
|
694224
694322
|
cometClient;
|
|
694225
694323
|
rpcUrls;
|
|
694324
|
+
stargateClients = new _stargate_js__WEBPACK_IMPORTED_MODULE_9__/* .StargateClientCache */ .dc(1);
|
|
694226
694325
|
static async connect(rpcUrls, _chainId) {
|
|
694227
|
-
(0,
|
|
694326
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(rpcUrls.length > 0, `got no rpcUrls`);
|
|
694228
694327
|
const client = await (0,_cosmjs_tendermint_rpc__WEBPACK_IMPORTED_MODULE_4__.connectComet)(rpcUrls[0]);
|
|
694229
694328
|
return new CosmosNativeProvider(client, rpcUrls);
|
|
694230
694329
|
}
|
|
@@ -694251,33 +694350,57 @@ class CosmosNativeProvider {
|
|
|
694251
694350
|
return status.syncInfo.latestBlockHeight;
|
|
694252
694351
|
}
|
|
694253
694352
|
async getBalance(req) {
|
|
694254
|
-
(0,
|
|
694353
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(req.denom, `denom required by ${CosmosNativeProvider.name}`);
|
|
694255
694354
|
const coin = await this.query.bank.balance(req.address, req.denom);
|
|
694256
694355
|
return BigInt(coin.amount);
|
|
694257
694356
|
}
|
|
694258
694357
|
async getTotalSupply(req) {
|
|
694259
|
-
(0,
|
|
694358
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(req.denom, `denom required by ${CosmosNativeProvider.name}`);
|
|
694260
694359
|
const coin = await this.query.bank.supplyOf(req.denom);
|
|
694261
694360
|
return BigInt(coin.amount);
|
|
694262
694361
|
}
|
|
694263
694362
|
async estimateTransactionFee(req) {
|
|
694264
|
-
(0,
|
|
694265
|
-
(0,
|
|
694266
|
-
(0,
|
|
694267
|
-
const
|
|
694268
|
-
|
|
694269
|
-
|
|
694270
|
-
|
|
694271
|
-
|
|
694272
|
-
|
|
694273
|
-
|
|
694274
|
-
|
|
694275
|
-
|
|
694276
|
-
|
|
694277
|
-
|
|
694278
|
-
|
|
694279
|
-
|
|
694280
|
-
|
|
694363
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(req.estimatedGasPrice, `Cosmos Native requires a estimatedGasPrice to estimate the transaction fee`);
|
|
694364
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(req.senderAddress, `Cosmos Native requires a senderAddress to estimate the transaction fee`);
|
|
694365
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(req.senderPubKey, `Cosmos Native requires a sender public key to estimate the transaction fee`);
|
|
694366
|
+
const stargateClientPromise = this.getStargateClient();
|
|
694367
|
+
let stargateClient;
|
|
694368
|
+
try {
|
|
694369
|
+
stargateClient = await stargateClientPromise;
|
|
694370
|
+
const message = this.registry.encodeAsAny(req.transaction);
|
|
694371
|
+
const pubKey = (0,_cosmjs_amino__WEBPACK_IMPORTED_MODULE_0__.encodeSecp256k1Pubkey)(new Uint8Array(Buffer.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_11__/* .strip0x */ .LL)(req.senderPubKey), 'hex')));
|
|
694372
|
+
const queryClient = stargateClient
|
|
694373
|
+
// @ts-ignore force access to protected method
|
|
694374
|
+
.forceGetQueryClient();
|
|
694375
|
+
const { sequence } = await stargateClient.getSequence(req.senderAddress);
|
|
694376
|
+
const { gasInfo } = await queryClient.tx.simulate([message], undefined, pubKey, sequence);
|
|
694377
|
+
const gasUnits = _cosmjs_math__WEBPACK_IMPORTED_MODULE_1__.Uint53.fromString(gasInfo?.gasUsed.toString() ?? '0').toNumber();
|
|
694378
|
+
const gasPrice = parseFloat(req.estimatedGasPrice.toString());
|
|
694379
|
+
return {
|
|
694380
|
+
gasUnits: BigInt(gasUnits),
|
|
694381
|
+
gasPrice,
|
|
694382
|
+
fee: BigInt(Math.floor(gasUnits * gasPrice)),
|
|
694383
|
+
};
|
|
694384
|
+
}
|
|
694385
|
+
catch (error) {
|
|
694386
|
+
this.stargateClients.evict(this.rpcUrls[0], stargateClientPromise);
|
|
694387
|
+
throw error;
|
|
694388
|
+
}
|
|
694389
|
+
finally {
|
|
694390
|
+
if ((0,_stargate_js__WEBPACK_IMPORTED_MODULE_9__/* .shouldCacheStargateClient */ .y8)(this.rpcUrls[0])) {
|
|
694391
|
+
this.stargateClients.release(stargateClientPromise);
|
|
694392
|
+
}
|
|
694393
|
+
else if (stargateClient) {
|
|
694394
|
+
(0,_stargate_js__WEBPACK_IMPORTED_MODULE_9__/* .disconnectStargateClient */ .zo)(Promise.resolve(stargateClient));
|
|
694395
|
+
}
|
|
694396
|
+
}
|
|
694397
|
+
}
|
|
694398
|
+
getStargateClient() {
|
|
694399
|
+
return this.stargateClients.get(this.rpcUrls[0]);
|
|
694400
|
+
}
|
|
694401
|
+
disconnect() {
|
|
694402
|
+
this.cometClient.disconnect();
|
|
694403
|
+
this.stargateClients.clear();
|
|
694281
694404
|
}
|
|
694282
694405
|
async isMessageDelivered(req) {
|
|
694283
694406
|
const { delivered } = await this.query.core.Delivered({
|
|
@@ -694291,7 +694414,7 @@ class CosmosNativeProvider {
|
|
|
694291
694414
|
const { token } = await this.query.warp.Token({
|
|
694292
694415
|
id: req.tokenAddress,
|
|
694293
694416
|
});
|
|
694294
|
-
(0,
|
|
694417
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(token, `found no token for id ${req.tokenAddress}`);
|
|
694295
694418
|
const token_type = await (0,_warp_warp_query_js__WEBPACK_IMPORTED_MODULE_8__/* .getWarpTokenType */ .W$)(this.query, req.tokenAddress);
|
|
694296
694419
|
return {
|
|
694297
694420
|
address: token.id,
|
|
@@ -694323,7 +694446,7 @@ class CosmosNativeProvider {
|
|
|
694323
694446
|
const { bridged_supply } = await this.query.warp.BridgedSupply({
|
|
694324
694447
|
id: req.tokenAddress,
|
|
694325
694448
|
});
|
|
694326
|
-
(0,
|
|
694449
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(bridged_supply, `found no bridged supply for token id ${req.tokenAddress}`);
|
|
694327
694450
|
return BigInt(bridged_supply.amount);
|
|
694328
694451
|
}
|
|
694329
694452
|
async quoteRemoteTransfer(req) {
|
|
@@ -694333,14 +694456,14 @@ class CosmosNativeProvider {
|
|
|
694333
694456
|
custom_hook_id: req.customHookAddress || '',
|
|
694334
694457
|
custom_hook_metadata: req.customHookMetadata || '',
|
|
694335
694458
|
});
|
|
694336
|
-
(0,
|
|
694459
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(gas_payment && gas_payment[0], `found no quote for token id ${req.tokenAddress} and destination domain ${req.destinationDomainId}`);
|
|
694337
694460
|
return {
|
|
694338
694461
|
denom: gas_payment[0].denom,
|
|
694339
694462
|
amount: BigInt(gas_payment[0].amount),
|
|
694340
694463
|
};
|
|
694341
694464
|
}
|
|
694342
694465
|
async getTransferTransaction(req) {
|
|
694343
|
-
(0,
|
|
694466
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(req.denom, `denom required by ${CosmosNativeProvider.name}`);
|
|
694344
694467
|
return {
|
|
694345
694468
|
typeUrl: '/cosmos.bank.v1beta1.MsgSend',
|
|
694346
694469
|
value: {
|
|
@@ -694504,6 +694627,10 @@ class CosmosNativeSigner extends provider/* CosmosNativeProvider */.z {
|
|
|
694504
694627
|
getSignerAddress() {
|
|
694505
694628
|
return this.account.address;
|
|
694506
694629
|
}
|
|
694630
|
+
disconnect() {
|
|
694631
|
+
super.disconnect();
|
|
694632
|
+
this.signer.disconnect();
|
|
694633
|
+
}
|
|
694507
694634
|
supportsTransactionBatching() {
|
|
694508
694635
|
return true;
|
|
694509
694636
|
}
|
|
@@ -694525,6 +694652,100 @@ class CosmosNativeSigner extends provider/* CosmosNativeProvider */.z {
|
|
|
694525
694652
|
|
|
694526
694653
|
/***/ }),
|
|
694527
694654
|
|
|
694655
|
+
/***/ 54114:
|
|
694656
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
694657
|
+
|
|
694658
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
694659
|
+
/* harmony export */ dc: () => (/* binding */ StargateClientCache),
|
|
694660
|
+
/* harmony export */ y8: () => (/* binding */ shouldCacheStargateClient),
|
|
694661
|
+
/* harmony export */ zo: () => (/* binding */ disconnectStargateClient)
|
|
694662
|
+
/* harmony export */ });
|
|
694663
|
+
/* harmony import */ var _cosmjs_stargate__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(69403);
|
|
694664
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(94523);
|
|
694665
|
+
|
|
694666
|
+
|
|
694667
|
+
function shouldCacheStargateClient(url) {
|
|
694668
|
+
return !url.startsWith('ws://') && !url.startsWith('wss://');
|
|
694669
|
+
}
|
|
694670
|
+
function disconnectStargateClient(client) {
|
|
694671
|
+
void client
|
|
694672
|
+
.then((stargateClient) => stargateClient.disconnect())
|
|
694673
|
+
.catch((error) => {
|
|
694674
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_1__/* .rootLogger */ .Jk.debug({ error }, 'Failed to disconnect Stargate client');
|
|
694675
|
+
});
|
|
694676
|
+
}
|
|
694677
|
+
class StargateClientCache {
|
|
694678
|
+
maxSize;
|
|
694679
|
+
clients = new Map();
|
|
694680
|
+
entries = new Map();
|
|
694681
|
+
constructor(maxSize) {
|
|
694682
|
+
this.maxSize = maxSize;
|
|
694683
|
+
}
|
|
694684
|
+
get(url) {
|
|
694685
|
+
if (!shouldCacheStargateClient(url))
|
|
694686
|
+
return _cosmjs_stargate__WEBPACK_IMPORTED_MODULE_0__.StargateClient.connect(url);
|
|
694687
|
+
let entry = this.clients.get(url);
|
|
694688
|
+
if (!entry) {
|
|
694689
|
+
let pendingEntry;
|
|
694690
|
+
const client = _cosmjs_stargate__WEBPACK_IMPORTED_MODULE_0__.StargateClient.connect(url).catch((error) => {
|
|
694691
|
+
const entry = pendingEntry;
|
|
694692
|
+
entry.evicted = true;
|
|
694693
|
+
if (this.clients.get(url) === entry) {
|
|
694694
|
+
this.clients.delete(url);
|
|
694695
|
+
}
|
|
694696
|
+
this.disconnectIfIdle(entry);
|
|
694697
|
+
throw error;
|
|
694698
|
+
});
|
|
694699
|
+
pendingEntry = { client, evicted: false, leases: 0 };
|
|
694700
|
+
entry = pendingEntry;
|
|
694701
|
+
this.entries.set(client, entry);
|
|
694702
|
+
}
|
|
694703
|
+
else {
|
|
694704
|
+
this.clients.delete(url);
|
|
694705
|
+
}
|
|
694706
|
+
entry.leases += 1;
|
|
694707
|
+
this.clients.set(url, entry);
|
|
694708
|
+
while (this.clients.size > this.maxSize) {
|
|
694709
|
+
const oldestUrl = this.clients.keys().next().value;
|
|
694710
|
+
if (!oldestUrl)
|
|
694711
|
+
break;
|
|
694712
|
+
this.evict(oldestUrl);
|
|
694713
|
+
}
|
|
694714
|
+
return entry.client;
|
|
694715
|
+
}
|
|
694716
|
+
evict(url, client) {
|
|
694717
|
+
const entry = this.clients.get(url);
|
|
694718
|
+
if (!entry || (client && entry.client !== client))
|
|
694719
|
+
return;
|
|
694720
|
+
this.clients.delete(url);
|
|
694721
|
+
entry.evicted = true;
|
|
694722
|
+
this.disconnectIfIdle(entry);
|
|
694723
|
+
}
|
|
694724
|
+
release(client) {
|
|
694725
|
+
const entry = this.entries.get(client);
|
|
694726
|
+
if (!entry)
|
|
694727
|
+
return;
|
|
694728
|
+
entry.leases -= 1;
|
|
694729
|
+
this.disconnectIfIdle(entry);
|
|
694730
|
+
}
|
|
694731
|
+
clear() {
|
|
694732
|
+
for (const entry of this.clients.values()) {
|
|
694733
|
+
entry.evicted = true;
|
|
694734
|
+
this.disconnectIfIdle(entry);
|
|
694735
|
+
}
|
|
694736
|
+
this.clients.clear();
|
|
694737
|
+
}
|
|
694738
|
+
disconnectIfIdle(entry) {
|
|
694739
|
+
if (!entry.evicted || entry.leases > 0)
|
|
694740
|
+
return;
|
|
694741
|
+
this.entries.delete(entry.client);
|
|
694742
|
+
disconnectStargateClient(entry.client);
|
|
694743
|
+
}
|
|
694744
|
+
}
|
|
694745
|
+
//# sourceMappingURL=stargate.js.map
|
|
694746
|
+
|
|
694747
|
+
/***/ }),
|
|
694748
|
+
|
|
694528
694749
|
/***/ 46918:
|
|
694529
694750
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
694530
694751
|
|
|
@@ -695271,6 +695492,80 @@ function setupWarpExtension(base) {
|
|
|
695271
695492
|
|
|
695272
695493
|
/***/ }),
|
|
695273
695494
|
|
|
695495
|
+
/***/ 46466:
|
|
695496
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
695497
|
+
|
|
695498
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
695499
|
+
/* harmony export */ CosmosNativeProtocolProvider: () => (/* reexport safe */ _clients_protocol_js__WEBPACK_IMPORTED_MODULE_0__.r),
|
|
695500
|
+
/* harmony export */ dc: () => (/* reexport safe */ _clients_stargate_js__WEBPACK_IMPORTED_MODULE_3__.dc),
|
|
695501
|
+
/* harmony export */ y8: () => (/* reexport safe */ _clients_stargate_js__WEBPACK_IMPORTED_MODULE_3__.y8),
|
|
695502
|
+
/* harmony export */ zo: () => (/* reexport safe */ _clients_stargate_js__WEBPACK_IMPORTED_MODULE_3__.zo)
|
|
695503
|
+
/* harmony export */ });
|
|
695504
|
+
/* harmony import */ var _clients_protocol_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(72641);
|
|
695505
|
+
/* harmony import */ var _clients_provider_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(71768);
|
|
695506
|
+
/* harmony import */ var _clients_signer_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(93591);
|
|
695507
|
+
/* harmony import */ var _clients_stargate_js__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(54114);
|
|
695508
|
+
/* harmony import */ var _registry_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(21360);
|
|
695509
|
+
/* harmony import */ var _hyperlane_core_query_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(30801);
|
|
695510
|
+
/* harmony import */ var _hyperlane_interchain_security_query_js__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(43584);
|
|
695511
|
+
/* harmony import */ var _hyperlane_post_dispatch_query_js__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(18831);
|
|
695512
|
+
/* harmony import */ var _hyperlane_warp_query_js__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(15220);
|
|
695513
|
+
/* harmony import */ var _ism_ism_artifact_manager_js__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(12966);
|
|
695514
|
+
/* harmony import */ var _ism_ism_query_js__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(37044);
|
|
695515
|
+
/* harmony import */ var _ism_test_ism_js__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(22806);
|
|
695516
|
+
/* harmony import */ var _ism_multisig_ism_js__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(36264);
|
|
695517
|
+
/* harmony import */ var _ism_routing_ism_js__WEBPACK_IMPORTED_MODULE_13__ = __nccwpck_require__(34234);
|
|
695518
|
+
/* harmony import */ var _hook_hook_artifact_manager_js__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(46918);
|
|
695519
|
+
/* harmony import */ var _hook_hook_query_js__WEBPACK_IMPORTED_MODULE_15__ = __nccwpck_require__(74484);
|
|
695520
|
+
/* harmony import */ var _hook_hook_tx_js__WEBPACK_IMPORTED_MODULE_16__ = __nccwpck_require__(40886);
|
|
695521
|
+
/* harmony import */ var _hook_igp_hook_js__WEBPACK_IMPORTED_MODULE_17__ = __nccwpck_require__(22026);
|
|
695522
|
+
/* harmony import */ var _hook_merkle_tree_hook_js__WEBPACK_IMPORTED_MODULE_18__ = __nccwpck_require__(42425);
|
|
695523
|
+
/* harmony import */ var _warp_warp_artifact_manager_js__WEBPACK_IMPORTED_MODULE_19__ = __nccwpck_require__(78852);
|
|
695524
|
+
/* harmony import */ var _warp_collateral_token_js__WEBPACK_IMPORTED_MODULE_20__ = __nccwpck_require__(85596);
|
|
695525
|
+
/* harmony import */ var _warp_synthetic_token_js__WEBPACK_IMPORTED_MODULE_21__ = __nccwpck_require__(20778);
|
|
695526
|
+
/* harmony import */ var _mailbox_mailbox_artifact_manager_js__WEBPACK_IMPORTED_MODULE_22__ = __nccwpck_require__(81450);
|
|
695527
|
+
/* harmony import */ var _mailbox_mailbox_js__WEBPACK_IMPORTED_MODULE_23__ = __nccwpck_require__(35434);
|
|
695528
|
+
/* harmony import */ var _mailbox_mailbox_tx_js__WEBPACK_IMPORTED_MODULE_24__ = __nccwpck_require__(6882);
|
|
695529
|
+
|
|
695530
|
+
|
|
695531
|
+
|
|
695532
|
+
|
|
695533
|
+
|
|
695534
|
+
|
|
695535
|
+
|
|
695536
|
+
|
|
695537
|
+
|
|
695538
|
+
|
|
695539
|
+
|
|
695540
|
+
|
|
695541
|
+
|
|
695542
|
+
// ISM Artifact Management
|
|
695543
|
+
|
|
695544
|
+
|
|
695545
|
+
// ISM Readers
|
|
695546
|
+
|
|
695547
|
+
|
|
695548
|
+
|
|
695549
|
+
// Hook Artifact Management
|
|
695550
|
+
|
|
695551
|
+
|
|
695552
|
+
|
|
695553
|
+
// Hook Readers and Writers
|
|
695554
|
+
|
|
695555
|
+
|
|
695556
|
+
// Warp Artifact Management
|
|
695557
|
+
|
|
695558
|
+
|
|
695559
|
+
|
|
695560
|
+
// Mailbox Artifact Management
|
|
695561
|
+
|
|
695562
|
+
|
|
695563
|
+
|
|
695564
|
+
|
|
695565
|
+
//# sourceMappingURL=index.js.map
|
|
695566
|
+
|
|
695567
|
+
/***/ }),
|
|
695568
|
+
|
|
695274
695569
|
/***/ 12966:
|
|
695275
695570
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
695276
695571
|
|
|
@@ -713297,7 +713592,7 @@ async function loadProtocolProviders(neededProtocols) {
|
|
|
713297
713592
|
}
|
|
713298
713593
|
switch (protocol) {
|
|
713299
713594
|
case dist/* ProtocolType */.Hb.CosmosNative: {
|
|
713300
|
-
const { CosmosNativeProtocolProvider } = await
|
|
713595
|
+
const { CosmosNativeProtocolProvider } = await Promise.resolve(/* import() */).then(__nccwpck_require__.bind(__nccwpck_require__, 46466));
|
|
713301
713596
|
(0,dist/* registerProtocol */.oD)(protocol, () => new CosmosNativeProtocolProvider());
|
|
713302
713597
|
break;
|
|
713303
713598
|
}
|
|
@@ -742912,6 +743207,7 @@ class BaseMetadataBuilder {
|
|
|
742912
743207
|
case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_9__/* .IsmType */ .GO.OP_STACK:
|
|
742913
743208
|
case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_9__/* .IsmType */ .GO.PAUSABLE:
|
|
742914
743209
|
case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_9__/* .IsmType */ .GO.CCIP:
|
|
743210
|
+
case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_9__/* .IsmType */ .GO.RATE_LIMITED:
|
|
742915
743211
|
return this.nullMetadataBuilder.build({ ...context, ism });
|
|
742916
743212
|
case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_9__/* .IsmType */ .GO.MERKLE_ROOT_MULTISIG:
|
|
742917
743213
|
case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_9__/* .IsmType */ .GO.MESSAGE_ID_MULTISIG:
|
|
@@ -750482,6 +750778,8 @@ __nccwpck_require__.d(__webpack_exports__, {
|
|
|
750482
750778
|
|
|
750483
750779
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js + 4 modules
|
|
750484
750780
|
var types = __nccwpck_require__(49355);
|
|
750781
|
+
// EXTERNAL MODULE: ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js
|
|
750782
|
+
var ZodError = __nccwpck_require__(23630);
|
|
750485
750783
|
;// CONCATENATED MODULE: ../sdk/dist/deploy/types.js
|
|
750486
750784
|
|
|
750487
750785
|
const ProxyFactoryFactoriesSchema = types/* object */.Ik({
|
|
@@ -750513,6 +750811,8 @@ var ica_types = __nccwpck_require__(89972);
|
|
|
750513
750811
|
var ism_types = __nccwpck_require__(69352);
|
|
750514
750812
|
// EXTERNAL MODULE: ../sdk/dist/types.js
|
|
750515
750813
|
var dist_types = __nccwpck_require__(88832);
|
|
750814
|
+
// EXTERNAL MODULE: ../sdk/dist/utils/ism.js
|
|
750815
|
+
var ism = __nccwpck_require__(764);
|
|
750516
750816
|
;// CONCATENATED MODULE: ../sdk/dist/core/types.js
|
|
750517
750817
|
|
|
750518
750818
|
|
|
@@ -750520,7 +750820,8 @@ var dist_types = __nccwpck_require__(88832);
|
|
|
750520
750820
|
|
|
750521
750821
|
|
|
750522
750822
|
|
|
750523
|
-
|
|
750823
|
+
|
|
750824
|
+
const CoreConfigBaseSchema = dist_types/* OwnableSchema */.wv.extend({
|
|
750524
750825
|
defaultIsm: ism_types/* IsmConfigSchema */.nb,
|
|
750525
750826
|
defaultHook: hook_types/* HookConfigSchema */.vC,
|
|
750526
750827
|
requiredHook: hook_types/* HookConfigSchema */.vC,
|
|
@@ -750531,9 +750832,19 @@ const CoreConfigSchema = dist_types/* OwnableSchema */.wv.extend({
|
|
|
750531
750832
|
// Override canonical Permit2 address for QuotedCalls deployment
|
|
750532
750833
|
permit2: types/* string */.Yj().optional(),
|
|
750533
750834
|
});
|
|
750534
|
-
const
|
|
750835
|
+
const rejectRateLimitedDefaultIsm = (val, ctx) => {
|
|
750836
|
+
if ((0,ism/* ismTreeContainsRateLimited */.Bh)(val.defaultIsm)) {
|
|
750837
|
+
ctx.addIssue({
|
|
750838
|
+
code: ZodError/* ZodIssueCode */.eq.custom,
|
|
750839
|
+
message: 'RateLimitedIsm cannot be used as a core default ISM',
|
|
750840
|
+
path: ['defaultIsm'],
|
|
750841
|
+
});
|
|
750842
|
+
}
|
|
750843
|
+
};
|
|
750844
|
+
const CoreConfigSchema = CoreConfigBaseSchema.superRefine(rejectRateLimitedDefaultIsm);
|
|
750845
|
+
const DerivedCoreConfigSchema = CoreConfigBaseSchema.merge(types/* object */.Ik({
|
|
750535
750846
|
interchainAccountRouter: ica_types/* DerivedIcaRouterConfigSchema */.XN.optional(),
|
|
750536
|
-
}));
|
|
750847
|
+
})).superRefine(rejectRateLimitedDefaultIsm);
|
|
750537
750848
|
const DeployedCoreAddressesSchema = ProxyFactoryFactoriesSchema.extend({
|
|
750538
750849
|
mailbox: types/* string */.Yj(),
|
|
750539
750850
|
validatorAnnounce: types/* string */.Yj(),
|
|
@@ -751120,9 +751431,10 @@ const proxyFactoryImplementations = {
|
|
|
751120
751431
|
/* harmony export */ Ey: () => (/* binding */ proxyAdmin),
|
|
751121
751432
|
/* harmony export */ Pl: () => (/* binding */ proxyImplementation),
|
|
751122
751433
|
/* harmony export */ SY: () => (/* binding */ proxyConstructorArgs),
|
|
751434
|
+
/* harmony export */ h$: () => (/* binding */ isStorageEmpty),
|
|
751123
751435
|
/* harmony export */ ju: () => (/* binding */ isProxy)
|
|
751124
751436
|
/* harmony export */ });
|
|
751125
|
-
/* unused harmony
|
|
751437
|
+
/* unused harmony export isProxyAdminFromBytecode */
|
|
751126
751438
|
/* harmony import */ var ethers__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(61934);
|
|
751127
751439
|
/* harmony import */ var _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(50653);
|
|
751128
751440
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(93142);
|
|
@@ -751974,26 +752286,28 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
|
|
|
751974
752286
|
/* harmony import */ var _hyperlane_xyz_provider_sdk_warp__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(17791);
|
|
751975
752287
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(73689);
|
|
751976
752288
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(21387);
|
|
751977
|
-
/* harmony import */ var
|
|
751978
|
-
/* harmony import */ var
|
|
751979
|
-
/* harmony import */ var
|
|
751980
|
-
/* harmony import */ var
|
|
751981
|
-
/* harmony import */ var
|
|
751982
|
-
/* harmony import */ var
|
|
751983
|
-
/* harmony import */ var
|
|
751984
|
-
/* harmony import */ var
|
|
751985
|
-
/* harmony import */ var
|
|
751986
|
-
/* harmony import */ var
|
|
751987
|
-
/* harmony import */ var
|
|
751988
|
-
/* harmony import */ var
|
|
752289
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(73938);
|
|
752290
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__ = __nccwpck_require__(94523);
|
|
752291
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_24__ = __nccwpck_require__(14918);
|
|
752292
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_26__ = __nccwpck_require__(93142);
|
|
752293
|
+
/* harmony import */ var _block_explorer_etherscan_js__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(26492);
|
|
752294
|
+
/* harmony import */ var _ccip_utils_js__WEBPACK_IMPORTED_MODULE_21__ = __nccwpck_require__(93035);
|
|
752295
|
+
/* harmony import */ var _hook_EvmHookModule_js__WEBPACK_IMPORTED_MODULE_19__ = __nccwpck_require__(10256);
|
|
752296
|
+
/* harmony import */ var _hook_utils_js__WEBPACK_IMPORTED_MODULE_23__ = __nccwpck_require__(13912);
|
|
752297
|
+
/* harmony import */ var _ism_EvmIsmModule_js__WEBPACK_IMPORTED_MODULE_22__ = __nccwpck_require__(3612);
|
|
752298
|
+
/* harmony import */ var _ism_HyperlaneIsmFactory_js__WEBPACK_IMPORTED_MODULE_17__ = __nccwpck_require__(44886);
|
|
752299
|
+
/* harmony import */ var _metadata_ChainMetadataManager_js__WEBPACK_IMPORTED_MODULE_18__ = __nccwpck_require__(22887);
|
|
752300
|
+
/* harmony import */ var _router_types_js__WEBPACK_IMPORTED_MODULE_25__ = __nccwpck_require__(38230);
|
|
752301
|
+
/* harmony import */ var _token_EvmWarpModule_js__WEBPACK_IMPORTED_MODULE_27__ = __nccwpck_require__(48807);
|
|
751989
752302
|
/* harmony import */ var _token_config_js__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(4169);
|
|
751990
|
-
/* harmony import */ var
|
|
751991
|
-
/* harmony import */ var
|
|
751992
|
-
/* harmony import */ var
|
|
751993
|
-
/* harmony import */ var
|
|
751994
|
-
/* harmony import */ var
|
|
751995
|
-
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([
|
|
751996
|
-
|
|
752303
|
+
/* harmony import */ var _token_contracts_js__WEBPACK_IMPORTED_MODULE_28__ = __nccwpck_require__(81504);
|
|
752304
|
+
/* harmony import */ var _token_deploy_js__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(19186);
|
|
752305
|
+
/* harmony import */ var _utils_ism_js__WEBPACK_IMPORTED_MODULE_16__ = __nccwpck_require__(764);
|
|
752306
|
+
/* harmony import */ var _HyperlaneProxyFactoryDeployer_js__WEBPACK_IMPORTED_MODULE_15__ = __nccwpck_require__(84387);
|
|
752307
|
+
/* harmony import */ var _verify_ContractVerifier_js__WEBPACK_IMPORTED_MODULE_13__ = __nccwpck_require__(76939);
|
|
752308
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_token_EvmWarpModule_js__WEBPACK_IMPORTED_MODULE_27__]);
|
|
752309
|
+
_token_EvmWarpModule_js__WEBPACK_IMPORTED_MODULE_27__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
|
752310
|
+
|
|
751997
752311
|
|
|
751998
752312
|
|
|
751999
752313
|
|
|
@@ -752095,45 +752409,95 @@ function validateWarpConfigForAltVM(config, chain) {
|
|
|
752095
752409
|
throw new Error(`Unhandled token type '${config.type}' for Alt-VM chain '${chain}'.`);
|
|
752096
752410
|
}
|
|
752097
752411
|
}
|
|
752412
|
+
// Subclass that injects rate-limited hook deployment between configureClients and
|
|
752413
|
+
// transferOwnership so that setHook() is called while the deployer signer still owns the token.
|
|
752414
|
+
class RateLimitedHookERC20Deployer extends _token_deploy_js__WEBPACK_IMPORTED_MODULE_11__/* .HypERC20Deployer */ .A7 {
|
|
752415
|
+
preTransferFn;
|
|
752416
|
+
constructor(multiProvider, ismFactory, contractVerifier, preTransferFn) {
|
|
752417
|
+
super(multiProvider, ismFactory, contractVerifier);
|
|
752418
|
+
this.preTransferFn = preTransferFn;
|
|
752419
|
+
}
|
|
752420
|
+
async beforeTransferOwnership(contractsMap) {
|
|
752421
|
+
await this.preTransferFn((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objMap */ .Yp)(contractsMap, (_, contracts) => getRouter(contracts).address));
|
|
752422
|
+
}
|
|
752423
|
+
}
|
|
752098
752424
|
async function executeWarpDeploy(warpDeployConfig, multiProvider, altVmSigners, registryAddresses, apiKeys) {
|
|
752099
|
-
const contractVerifier = new
|
|
752100
|
-
const ismFactoryDeployer = new
|
|
752425
|
+
const contractVerifier = new _verify_ContractVerifier_js__WEBPACK_IMPORTED_MODULE_13__/* .ContractVerifier */ .j(multiProvider, apiKeys, _hyperlane_xyz_core_buildArtifact_js__WEBPACK_IMPORTED_MODULE_1__/* .buildArtifact */ .L, _block_explorer_etherscan_js__WEBPACK_IMPORTED_MODULE_14__/* .ExplorerLicenseType */ .p8.MIT);
|
|
752426
|
+
const ismFactoryDeployer = new _HyperlaneProxyFactoryDeployer_js__WEBPACK_IMPORTED_MODULE_15__/* .HyperlaneProxyFactoryDeployer */ .h(multiProvider, contractVerifier);
|
|
752427
|
+
// Capture ISM configs that contain a RATE_LIMITED node before resolveWarpIsmAndHook
|
|
752428
|
+
// runs — that function replaces each chain's ISM field with the deployed address,
|
|
752429
|
+
// but RATE_LIMITED ISMs (and any composite ISM containing one) are skipped there
|
|
752430
|
+
// because the constructor requires the token address (recipient), which doesn't
|
|
752431
|
+
// exist yet. They are wired inside TokenDeployer.deploy() before ownership is
|
|
752432
|
+
// transferred so that setInterchainSecurityModule succeeds regardless of config.owner.
|
|
752433
|
+
const rateLimitedSnapshot = {};
|
|
752434
|
+
for (const [chain, config] of Object.entries(warpDeployConfig)) {
|
|
752435
|
+
if (typeof config.interchainSecurityModule !== 'object')
|
|
752436
|
+
continue;
|
|
752437
|
+
const ism = config.interchainSecurityModule;
|
|
752438
|
+
if (!(0,_utils_ism_js__WEBPACK_IMPORTED_MODULE_16__/* .ismTreeContainsRateLimited */ .Bh)(ism))
|
|
752439
|
+
continue;
|
|
752440
|
+
const protocol = multiProvider.getProtocol(chain);
|
|
752441
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(protocol === _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Ethereum || protocol === _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Tron, `RateLimitedIsm is only supported on Ethereum and Tron chains, but chain ${chain} has protocol ${protocol}`);
|
|
752442
|
+
// Store the full ISM tree as-is; recipient + owner defaults are applied
|
|
752443
|
+
// uniformly in setRateLimitedIsms via setRateLimitedIsmRecipient.
|
|
752444
|
+
rateLimitedSnapshot[chain] = ism;
|
|
752445
|
+
}
|
|
752446
|
+
// Hooks containing RATE_LIMITED need the token router address as sender, so they are deferred
|
|
752447
|
+
// until after token deployment. resolveWarpIsmAndHook populates this map (EVM/Tron only) and
|
|
752448
|
+
// returns undefined for those hooks, causing them to be set later via setHook().
|
|
752449
|
+
const rateLimitedHookSnapshots = {};
|
|
752101
752450
|
// For each chain in WarpRouteConfig, deploy each Ism Factory, if it's not in the registry
|
|
752102
752451
|
// Then return a modified config with the ism and/or hook address as a string
|
|
752103
|
-
const modifiedConfig = await resolveWarpIsmAndHook(warpDeployConfig, multiProvider, altVmSigners, registryAddresses, ismFactoryDeployer, contractVerifier);
|
|
752452
|
+
const modifiedConfig = await resolveWarpIsmAndHook(warpDeployConfig, multiProvider, altVmSigners, registryAddresses, ismFactoryDeployer, contractVerifier, rateLimitedHookSnapshots);
|
|
752104
752453
|
// Initialize with unsupported chains so that they are enrolled
|
|
752105
|
-
let deployedContracts = (0,
|
|
752454
|
+
let deployedContracts = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objMap */ .Yp)((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objFilter */ .s3)(warpDeployConfig, (_chain, config) => !!config.foreignDeployment), (chain, config) => {
|
|
752106
752455
|
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(config.foreignDeployment, `Expected foreignDeployment field to be defined on ${chain} after filtering`);
|
|
752107
752456
|
return config.foreignDeployment;
|
|
752108
752457
|
});
|
|
752109
752458
|
// get unique list of protocols
|
|
752110
752459
|
const protocols = Array.from(new Set(Object.keys(modifiedConfig).map((chainName) => multiProvider.getProtocol(chainName))));
|
|
752111
752460
|
for (const protocol of protocols) {
|
|
752112
|
-
const protocolSpecificConfig = (0,
|
|
752461
|
+
const protocolSpecificConfig = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objFilter */ .s3)(modifiedConfig, (chainName, config) => multiProvider.getProtocol(chainName) === protocol &&
|
|
752113
752462
|
!config.foreignDeployment);
|
|
752114
|
-
if ((0,
|
|
752463
|
+
if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .isObjEmpty */ .XY)(protocolSpecificConfig)) {
|
|
752115
752464
|
continue;
|
|
752116
752465
|
}
|
|
752117
752466
|
switch (protocol) {
|
|
752118
752467
|
case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Tron:
|
|
752119
752468
|
case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Ethereum: {
|
|
752469
|
+
const ismFactory = _ism_HyperlaneIsmFactory_js__WEBPACK_IMPORTED_MODULE_17__/* .HyperlaneIsmFactory */ .K.fromAddressesMap(registryAddresses, multiProvider, undefined, contractVerifier);
|
|
752470
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(!warpDeployConfig.isNft || (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .isObjEmpty */ .XY)(rateLimitedHookSnapshots), 'RATE_LIMITED hooks are not supported for NFT warp routes (HypERC721Deployer has no beforeTransferOwnership override)');
|
|
752120
752471
|
const deployer = warpDeployConfig.isNft
|
|
752121
|
-
? new
|
|
752122
|
-
:
|
|
752123
|
-
|
|
752124
|
-
|
|
752472
|
+
? new _token_deploy_js__WEBPACK_IMPORTED_MODULE_11__/* .HypERC721Deployer */ .il(multiProvider)
|
|
752473
|
+
: (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .isObjEmpty */ .XY)(rateLimitedHookSnapshots)
|
|
752474
|
+
? new _token_deploy_js__WEBPACK_IMPORTED_MODULE_11__/* .HypERC20Deployer */ .A7(multiProvider, ismFactory, contractVerifier) // TODO: replace with EvmERC20WarpModule
|
|
752475
|
+
: new RateLimitedHookERC20Deployer(multiProvider, ismFactory, contractVerifier,
|
|
752476
|
+
// Called BEFORE transferOwnership — deployer signer still owns the token here.
|
|
752477
|
+
async (deployedTokens) => {
|
|
752478
|
+
const chainSnapshots = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objFilter */ .s3)(rateLimitedHookSnapshots, (chain, _v) => chain in deployedTokens);
|
|
752479
|
+
if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .isObjEmpty */ .XY)(chainSnapshots))
|
|
752480
|
+
return;
|
|
752481
|
+
const deployedHooks = await deployAndWireRateLimitedHooks(chainSnapshots, deployedTokens, multiProvider, contractVerifier);
|
|
752482
|
+
for (const [chain, hookAddress] of Object.entries(deployedHooks)) {
|
|
752483
|
+
warpDeployConfig[chain].hook = hookAddress;
|
|
752484
|
+
}
|
|
752485
|
+
});
|
|
752486
|
+
const chainSet = new Set(Object.keys(protocolSpecificConfig));
|
|
752487
|
+
const rateLimitedForBatch = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objFilter */ .s3)(rateLimitedSnapshot, (_chain, _ismConfig) => chainSet.has(_chain));
|
|
752488
|
+
const evmContracts = await deployer.deploy(protocolSpecificConfig, rateLimitedForBatch);
|
|
752125
752489
|
deployedContracts = {
|
|
752126
752490
|
...deployedContracts,
|
|
752127
|
-
...(0,
|
|
752491
|
+
...(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objMap */ .Yp)(evmContracts, (_, contracts) => getRouter(contracts).address),
|
|
752128
752492
|
};
|
|
752129
752493
|
break;
|
|
752130
752494
|
}
|
|
752131
752495
|
default: {
|
|
752132
|
-
const chainLookup = (0,
|
|
752496
|
+
const chainLookup = (0,_metadata_ChainMetadataManager_js__WEBPACK_IMPORTED_MODULE_18__/* .altVmChainLookup */ .O)(multiProvider);
|
|
752133
752497
|
const deployResults = {};
|
|
752134
|
-
for (const chain of (0,
|
|
752135
|
-
const config = (0,
|
|
752136
|
-
const signer = (0,
|
|
752498
|
+
for (const chain of (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objKeys */ .cG)(protocolSpecificConfig)) {
|
|
752499
|
+
const config = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .mustGet */ .Qd)(protocolSpecificConfig, chain);
|
|
752500
|
+
const signer = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .mustGet */ .Qd)(altVmSigners, chain);
|
|
752137
752501
|
const chainMetadata = chainLookup.getChainMetadata(chain);
|
|
752138
752502
|
const writer = (0,_hyperlane_xyz_deploy_sdk__WEBPACK_IMPORTED_MODULE_2__/* .createWarpTokenWriter */ .l5)(chainMetadata, chainLookup, signer);
|
|
752139
752503
|
const artifact = (0,_hyperlane_xyz_provider_sdk_warp__WEBPACK_IMPORTED_MODULE_7__/* .warpConfigToArtifact */ .ku)(validateWarpConfigForAltVM(config, chain), chainLookup);
|
|
@@ -752150,14 +752514,43 @@ async function executeWarpDeploy(warpDeployConfig, multiProvider, altVmSigners,
|
|
|
752150
752514
|
}
|
|
752151
752515
|
return deployedContracts;
|
|
752152
752516
|
}
|
|
752153
|
-
async function
|
|
752154
|
-
return (0,
|
|
752155
|
-
const
|
|
752517
|
+
async function deployAndWireRateLimitedHooks(snapshots, deployedTokens, multiProvider, contractVerifier) {
|
|
752518
|
+
return (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .promiseObjAll */ .a1)((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objMap */ .Yp)(snapshots, async (chain, { hookConfig, chainAddresses, ccipContractCache, proxyAdminAddress }) => {
|
|
752519
|
+
const tokenAddress = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .mustGet */ .Qd)(deployedTokens, chain);
|
|
752520
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(chainAddresses, `No registry addresses for ${chain}`);
|
|
752521
|
+
const resolvedProxyAdminAddress = proxyAdminAddress ??
|
|
752522
|
+
(await multiProvider.handleDeploy(chain, new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .ProxyAdmin__factory */ .Aig(), [])).address;
|
|
752523
|
+
const evmHookModule = await _hook_EvmHookModule_js__WEBPACK_IMPORTED_MODULE_19__/* .EvmHookModule */ .o.create({
|
|
752524
|
+
chain,
|
|
752525
|
+
multiProvider,
|
|
752526
|
+
coreAddresses: {
|
|
752527
|
+
mailbox: chainAddresses.mailbox,
|
|
752528
|
+
proxyAdmin: resolvedProxyAdminAddress,
|
|
752529
|
+
rateLimitedSender: tokenAddress,
|
|
752530
|
+
},
|
|
752531
|
+
config: hookConfig,
|
|
752532
|
+
ccipContractCache,
|
|
752533
|
+
proxyFactoryFactories: (0,_utils_ism_js__WEBPACK_IMPORTED_MODULE_16__/* .extractIsmAndHookFactoryAddresses */ .zs)(chainAddresses),
|
|
752534
|
+
contractVerifier,
|
|
752535
|
+
});
|
|
752536
|
+
const { deployedHook } = evmHookModule.serialize();
|
|
752537
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(deployedHook, `Failed to get deployed hook address for ${chain}`);
|
|
752538
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`Wiring RateLimitedHook ${deployedHook} to token ${tokenAddress} on ${chain}`);
|
|
752539
|
+
const txOverrides = multiProvider.getTransactionOverrides(chain);
|
|
752540
|
+
const signer = multiProvider.getSigner(chain);
|
|
752541
|
+
const token = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .MailboxClient__factory */ .mG7.connect(tokenAddress, signer);
|
|
752542
|
+
await multiProvider.handleTx(chain, token.setHook(deployedHook, txOverrides));
|
|
752543
|
+
return deployedHook;
|
|
752544
|
+
}));
|
|
752545
|
+
}
|
|
752546
|
+
async function resolveWarpIsmAndHook(warpConfig, multiProvider, altVmSigners, registryAddresses, ismFactoryDeployer, contractVerifier, rateLimitedHookSnapshots) {
|
|
752547
|
+
return (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .promiseObjAll */ .a1)((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objMap */ .Yp)(warpConfig, async (chain, config) => {
|
|
752548
|
+
const ccipContractCache = new _ccip_utils_js__WEBPACK_IMPORTED_MODULE_21__/* .CCIPContractCache */ .G5(registryAddresses);
|
|
752156
752549
|
const chainAddresses = registryAddresses[chain];
|
|
752157
752550
|
if (!chainAddresses) {
|
|
752158
752551
|
throw new Error(`Registry factory addresses not found for ${chain}.`);
|
|
752159
752552
|
}
|
|
752160
|
-
|
|
752553
|
+
const ism = await createWarpIsm({
|
|
752161
752554
|
ccipContractCache,
|
|
752162
752555
|
chain,
|
|
752163
752556
|
chainAddresses,
|
|
@@ -752167,7 +752560,7 @@ async function resolveWarpIsmAndHook(warpConfig, multiProvider, altVmSigners, re
|
|
|
752167
752560
|
ismFactoryDeployer,
|
|
752168
752561
|
warpConfig: config,
|
|
752169
752562
|
}); // TODO write test
|
|
752170
|
-
|
|
752563
|
+
const hook = await createWarpHook({
|
|
752171
752564
|
ccipContractCache,
|
|
752172
752565
|
chain,
|
|
752173
752566
|
chainAddresses,
|
|
@@ -752176,8 +752569,16 @@ async function resolveWarpIsmAndHook(warpConfig, multiProvider, altVmSigners, re
|
|
|
752176
752569
|
contractVerifier,
|
|
752177
752570
|
ismFactoryDeployer,
|
|
752178
752571
|
warpConfig: config,
|
|
752572
|
+
rateLimitedHookSnapshots,
|
|
752179
752573
|
});
|
|
752180
|
-
|
|
752574
|
+
// Spread instead of mutating config in place — the caller holds a reference
|
|
752575
|
+
// to warpDeployConfig[chain] and uses it for registry persistence; mutating
|
|
752576
|
+
// would wipe the RATE_LIMITED stanza from the persisted YAML.
|
|
752577
|
+
return {
|
|
752578
|
+
...config,
|
|
752579
|
+
interchainSecurityModule: ism,
|
|
752580
|
+
hook,
|
|
752581
|
+
};
|
|
752181
752582
|
}));
|
|
752182
752583
|
}
|
|
752183
752584
|
/**
|
|
@@ -752189,21 +752590,30 @@ async function createWarpIsm({ ccipContractCache, chain, chainAddresses, multiPr
|
|
|
752189
752590
|
const { interchainSecurityModule } = warpConfig;
|
|
752190
752591
|
if (!interchainSecurityModule ||
|
|
752191
752592
|
typeof interchainSecurityModule === 'string') {
|
|
752192
|
-
|
|
752593
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`Config Ism is ${!interchainSecurityModule ? 'empty' : interchainSecurityModule}, skipping deployment.`);
|
|
752193
752594
|
return interchainSecurityModule;
|
|
752194
752595
|
}
|
|
752195
|
-
|
|
752196
|
-
|
|
752197
|
-
|
|
752596
|
+
// RateLimitedIsm has a chicken-and-egg problem: the constructor requires the
|
|
752597
|
+
// token (recipient) address, but ISMs are deployed here — before the token exists.
|
|
752598
|
+
// We skip any ISM tree that contains a RATE_LIMITED node and deploy it later in
|
|
752599
|
+
// setRateLimitedIsms() (after the token is deployed), then wire it up via
|
|
752600
|
+
// setInterchainSecurityModule().
|
|
752601
|
+
if ((0,_utils_ism_js__WEBPACK_IMPORTED_MODULE_16__/* .ismTreeContainsRateLimited */ .Bh)(interchainSecurityModule)) {
|
|
752602
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`Skipping ISM deployment for ${chain} (contains RateLimitedIsm), will deploy after token.`);
|
|
752603
|
+
return undefined;
|
|
752604
|
+
}
|
|
752605
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`Loading registry factory addresses for ${chain}...`);
|
|
752606
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`Creating ${interchainSecurityModule.type} ISM for token on ${chain} chain...`);
|
|
752607
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`Finished creating ${interchainSecurityModule.type} ISM for token on ${chain} chain.`);
|
|
752198
752608
|
const protocolType = multiProvider.getProtocol(chain);
|
|
752199
752609
|
switch (protocolType) {
|
|
752200
752610
|
case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Tron:
|
|
752201
752611
|
case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Ethereum: {
|
|
752202
|
-
const evmIsmModule = await
|
|
752612
|
+
const evmIsmModule = await _ism_EvmIsmModule_js__WEBPACK_IMPORTED_MODULE_22__/* .EvmIsmModule */ .a.create({
|
|
752203
752613
|
chain,
|
|
752204
752614
|
mailbox: chainAddresses.mailbox,
|
|
752205
752615
|
multiProvider: multiProvider,
|
|
752206
|
-
proxyFactoryFactories: (0,
|
|
752616
|
+
proxyFactoryFactories: (0,_utils_ism_js__WEBPACK_IMPORTED_MODULE_16__/* .extractIsmAndHookFactoryAddresses */ .zs)(chainAddresses),
|
|
752207
752617
|
config: interchainSecurityModule,
|
|
752208
752618
|
ccipContractCache,
|
|
752209
752619
|
contractVerifier,
|
|
@@ -752212,8 +752622,8 @@ async function createWarpIsm({ ccipContractCache, chain, chainAddresses, multiPr
|
|
|
752212
752622
|
return deployedIsm;
|
|
752213
752623
|
}
|
|
752214
752624
|
default: {
|
|
752215
|
-
const signer = (0,
|
|
752216
|
-
const chainLookup = (0,
|
|
752625
|
+
const signer = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .mustGet */ .Qd)(altVmSigners, chain);
|
|
752626
|
+
const chainLookup = (0,_metadata_ChainMetadataManager_js__WEBPACK_IMPORTED_MODULE_18__/* .altVmChainLookup */ .O)(multiProvider);
|
|
752217
752627
|
const chainMetadata = chainLookup.getChainMetadata(chain);
|
|
752218
752628
|
const writer = (0,_hyperlane_xyz_deploy_sdk__WEBPACK_IMPORTED_MODULE_2__/* .createIsmWriter */ .lN)(chainMetadata, chainLookup, signer);
|
|
752219
752629
|
const artifact = (0,_hyperlane_xyz_provider_sdk_ism__WEBPACK_IMPORTED_MODULE_6__/* .ismConfigToArtifact */ .HL)(
|
|
@@ -752224,25 +752634,40 @@ async function createWarpIsm({ ccipContractCache, chain, chainAddresses, multiPr
|
|
|
752224
752634
|
}
|
|
752225
752635
|
}
|
|
752226
752636
|
}
|
|
752227
|
-
async function createWarpHook({ ccipContractCache, chain, chainAddresses, multiProvider, altVmSigners, contractVerifier, warpConfig, }) {
|
|
752637
|
+
async function createWarpHook({ ccipContractCache, chain, chainAddresses, multiProvider, altVmSigners, contractVerifier, warpConfig, rateLimitedHookSnapshots, }) {
|
|
752228
752638
|
const { hook } = warpConfig;
|
|
752229
752639
|
if (!hook || typeof hook === 'string') {
|
|
752230
|
-
|
|
752640
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`Config Hook is ${!hook ? 'empty' : hook}, skipping deployment.`);
|
|
752231
752641
|
return hook;
|
|
752232
752642
|
}
|
|
752233
|
-
|
|
752234
|
-
|
|
752643
|
+
// RATE_LIMITED hooks need the token router address as sender — defer until post-token deploy.
|
|
752644
|
+
// Only EVM/Tron support EvmHookModule; foreignDeployment and non-EVM chains cannot wire the hook.
|
|
752645
|
+
if ((0,_hook_utils_js__WEBPACK_IMPORTED_MODULE_23__/* .hookTreeContainsRateLimited */ .r$)(hook)) {
|
|
752646
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(!warpConfig.foreignDeployment, `RATE_LIMITED hook configured on ${chain} but it is a foreignDeployment — hook cannot be wired post-deploy`);
|
|
752647
|
+
const protocol = multiProvider.getProtocol(chain);
|
|
752648
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(protocol === _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Ethereum || protocol === _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Tron, `RATE_LIMITED hook is only supported on EVM/Tron chains; ${chain} uses protocol ${protocol}`);
|
|
752649
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`RATE_LIMITED hook on ${chain} — deferring deployment until after token deployment`);
|
|
752650
|
+
rateLimitedHookSnapshots[chain] = {
|
|
752651
|
+
hookConfig: hook,
|
|
752652
|
+
chainAddresses,
|
|
752653
|
+
ccipContractCache,
|
|
752654
|
+
proxyAdminAddress: warpConfig.proxyAdmin?.address,
|
|
752655
|
+
};
|
|
752656
|
+
return undefined;
|
|
752657
|
+
}
|
|
752658
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`Loading registry factory addresses for ${chain}...`);
|
|
752659
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`Creating ${hook.type} Hook for token on ${chain} chain...`);
|
|
752235
752660
|
const protocolType = multiProvider.getProtocol(chain);
|
|
752236
752661
|
switch (protocolType) {
|
|
752237
752662
|
case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Tron:
|
|
752238
752663
|
case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Ethereum: {
|
|
752239
|
-
|
|
752240
|
-
|
|
752664
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`Loading registry factory addresses for ${chain}...`);
|
|
752665
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`Creating ${hook.type} Hook for token on ${chain} chain...`);
|
|
752241
752666
|
// If config.proxyadmin.address exists, then use that. otherwise deploy a new proxyAdmin
|
|
752242
752667
|
const proxyAdminAddress = warpConfig.proxyAdmin?.address ??
|
|
752243
752668
|
(await multiProvider.handleDeploy(chain, new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .ProxyAdmin__factory */ .Aig(), []))
|
|
752244
752669
|
.address;
|
|
752245
|
-
const evmHookModule = await
|
|
752670
|
+
const evmHookModule = await _hook_EvmHookModule_js__WEBPACK_IMPORTED_MODULE_19__/* .EvmHookModule */ .o.create({
|
|
752246
752671
|
chain,
|
|
752247
752672
|
multiProvider: multiProvider,
|
|
752248
752673
|
coreAddresses: {
|
|
@@ -752252,15 +752677,15 @@ async function createWarpHook({ ccipContractCache, chain, chainAddresses, multiP
|
|
|
752252
752677
|
config: hook,
|
|
752253
752678
|
ccipContractCache,
|
|
752254
752679
|
contractVerifier,
|
|
752255
|
-
proxyFactoryFactories: (0,
|
|
752680
|
+
proxyFactoryFactories: (0,_utils_ism_js__WEBPACK_IMPORTED_MODULE_16__/* .extractIsmAndHookFactoryAddresses */ .zs)(chainAddresses),
|
|
752256
752681
|
});
|
|
752257
|
-
|
|
752682
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`Finished creating ${hook.type} Hook for token on ${chain} chain.`);
|
|
752258
752683
|
const { deployedHook } = evmHookModule.serialize();
|
|
752259
752684
|
return deployedHook;
|
|
752260
752685
|
}
|
|
752261
752686
|
default: {
|
|
752262
|
-
const signer = (0,
|
|
752263
|
-
const chainLookup = (0,
|
|
752687
|
+
const signer = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .mustGet */ .Qd)(altVmSigners, chain);
|
|
752688
|
+
const chainLookup = (0,_metadata_ChainMetadataManager_js__WEBPACK_IMPORTED_MODULE_18__/* .altVmChainLookup */ .O)(multiProvider);
|
|
752264
752689
|
const metadata = multiProvider.getChainMetadata(chain);
|
|
752265
752690
|
// Deploy new hook using artifact writer with mailbox context
|
|
752266
752691
|
const writer = (0,_hyperlane_xyz_deploy_sdk__WEBPACK_IMPORTED_MODULE_2__/* .createHookWriter */ .JM)(metadata, chainLookup, signer, {
|
|
@@ -752273,17 +752698,18 @@ async function createWarpHook({ ccipContractCache, chain, chainAddresses, multiP
|
|
|
752273
752698
|
}
|
|
752274
752699
|
}
|
|
752275
752700
|
async function enrollCrossChainRouters({ multiProvider, altVmSigners, registryAddresses, warpDeployConfig, }, deployedContracts) {
|
|
752276
|
-
|
|
752277
|
-
const resolvedConfigMap = (0,
|
|
752701
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`Start enrolling cross chain routers`);
|
|
752702
|
+
const resolvedConfigMap = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objMap */ .Yp)(warpDeployConfig, (_, config) => ({
|
|
752278
752703
|
gas: (0,_token_config_js__WEBPACK_IMPORTED_MODULE_8__/* .gasOverhead */ .yv)(config.type),
|
|
752279
752704
|
...config,
|
|
752280
752705
|
}));
|
|
752281
|
-
const supportedChains = Object.keys((0,
|
|
752706
|
+
const supportedChains = Object.keys((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objFilter */ .s3)(resolvedConfigMap, (_, config) => !config.foreignDeployment &&
|
|
752707
|
+
config.type !== _token_config_js__WEBPACK_IMPORTED_MODULE_8__/* .TokenType */ .ks.collateralDepositAddress));
|
|
752282
752708
|
// Process all chains in parallel since they are independent
|
|
752283
|
-
const { fulfilled, rejected } = await (0,
|
|
752709
|
+
const { fulfilled, rejected } = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_24__/* .mapAllSettled */ .bh)(supportedChains, async (currentChain) => {
|
|
752284
752710
|
const protocol = multiProvider.getProtocol(currentChain);
|
|
752285
752711
|
// Start with user-specified remote routers (for chains not in the deployment)
|
|
752286
|
-
const userRemoteRouters = (0,
|
|
752712
|
+
const userRemoteRouters = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objMap */ .Yp)((0,_router_types_js__WEBPACK_IMPORTED_MODULE_25__/* .resolveRouterMapConfig */ .c0)(multiProvider, resolvedConfigMap[currentChain].remoteRouters ?? {}), (_, value) => ({ address: (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_26__/* .addressToBytes32 */ .In)(value.address) }));
|
|
752287
752713
|
// Merge: deployed routers take precedence over user-specified
|
|
752288
752714
|
const remoteRouters = {
|
|
752289
752715
|
...userRemoteRouters,
|
|
@@ -752292,14 +752718,14 @@ async function enrollCrossChainRouters({ multiProvider, altVmSigners, registryAd
|
|
|
752292
752718
|
.map(([chain, address]) => [
|
|
752293
752719
|
multiProvider.getDomainId(chain).toString(),
|
|
752294
752720
|
{
|
|
752295
|
-
address: (0,
|
|
752721
|
+
address: (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_26__/* .addressToBytes32 */ .In)(address),
|
|
752296
752722
|
},
|
|
752297
752723
|
])),
|
|
752298
752724
|
};
|
|
752299
752725
|
// Start with user-specified destination gas
|
|
752300
|
-
const userDestinationGas = (0,
|
|
752726
|
+
const userDestinationGas = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_25__/* .resolveRouterMapConfig */ .c0)(multiProvider, resolvedConfigMap[currentChain].destinationGas ?? {});
|
|
752301
752727
|
// Default to MAX_GAS_OVERHEAD for user-specified remote routers without explicit destinationGas
|
|
752302
|
-
const defaultGasForUserRouters = (0,
|
|
752728
|
+
const defaultGasForUserRouters = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objMap */ .Yp)(userRemoteRouters, (domainId) => userDestinationGas[domainId] ?? _token_config_js__WEBPACK_IMPORTED_MODULE_8__/* .MAX_GAS_OVERHEAD */ .mA.toString());
|
|
752303
752729
|
// Merge: deployed chain gas takes precedence over defaults and user-specified
|
|
752304
752730
|
const destinationGas = {
|
|
752305
752731
|
...defaultGasForUserRouters,
|
|
@@ -752311,14 +752737,14 @@ async function enrollCrossChainRouters({ multiProvider, altVmSigners, registryAd
|
|
|
752311
752737
|
])),
|
|
752312
752738
|
};
|
|
752313
752739
|
for (const domainId of Object.keys(remoteRouters)) {
|
|
752314
|
-
|
|
752740
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.debug(`Creating enroll remote router transactions with remote domain id ${domainId} and address ${remoteRouters[domainId]} on chain ${currentChain}`);
|
|
752315
752741
|
}
|
|
752316
752742
|
let transactions = [];
|
|
752317
752743
|
switch (protocol) {
|
|
752318
752744
|
case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Tron:
|
|
752319
752745
|
case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Ethereum: {
|
|
752320
752746
|
const { domainRoutingIsmFactory, incrementalDomainRoutingIsmFactory, staticMerkleRootMultisigIsmFactory, staticMessageIdMultisigIsmFactory, staticAggregationIsmFactory, staticAggregationHookFactory, staticMerkleRootWeightedMultisigIsmFactory, staticMessageIdWeightedMultisigIsmFactory, } = registryAddresses[currentChain];
|
|
752321
|
-
const evmWarpModule = new
|
|
752747
|
+
const evmWarpModule = new _token_EvmWarpModule_js__WEBPACK_IMPORTED_MODULE_27__/* .EvmWarpModule */ .N(multiProvider, {
|
|
752322
752748
|
chain: currentChain,
|
|
752323
752749
|
config: resolvedConfigMap[currentChain],
|
|
752324
752750
|
addresses: {
|
|
@@ -752357,8 +752783,8 @@ async function enrollCrossChainRouters({ multiProvider, altVmSigners, registryAd
|
|
|
752357
752783
|
break;
|
|
752358
752784
|
}
|
|
752359
752785
|
default: {
|
|
752360
|
-
const signer = (0,
|
|
752361
|
-
const chainLookup = (0,
|
|
752786
|
+
const signer = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .mustGet */ .Qd)(altVmSigners, currentChain);
|
|
752787
|
+
const chainLookup = (0,_metadata_ChainMetadataManager_js__WEBPACK_IMPORTED_MODULE_18__/* .altVmChainLookup */ .O)(multiProvider);
|
|
752362
752788
|
const chainMetadata = chainLookup.getChainMetadata(currentChain);
|
|
752363
752789
|
const writer = (0,_hyperlane_xyz_deploy_sdk__WEBPACK_IMPORTED_MODULE_2__/* .createWarpTokenWriter */ .l5)(chainMetadata, chainLookup, signer);
|
|
752364
752790
|
const expectedConfig = {
|
|
@@ -752375,7 +752801,7 @@ async function enrollCrossChainRouters({ multiProvider, altVmSigners, registryAd
|
|
|
752375
752801
|
transactions = await writer.update(deployedArtifact);
|
|
752376
752802
|
}
|
|
752377
752803
|
}
|
|
752378
|
-
|
|
752804
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.debug(`Created enroll router update transactions for chain ${currentChain}`);
|
|
752379
752805
|
return { chain: currentChain, transactions };
|
|
752380
752806
|
}, (chain) => chain);
|
|
752381
752807
|
// Process settled results and collect transactions
|
|
@@ -752387,7 +752813,7 @@ async function enrollCrossChainRouters({ multiProvider, altVmSigners, registryAd
|
|
|
752387
752813
|
}
|
|
752388
752814
|
}
|
|
752389
752815
|
for (const [chain, error] of rejected) {
|
|
752390
|
-
|
|
752816
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.error(`Failed to create enroll router transactions for chain ${chain}: ${error.message}`);
|
|
752391
752817
|
errors.push(`${chain}: ${error.message}`);
|
|
752392
752818
|
}
|
|
752393
752819
|
if (errors.length > 0) {
|
|
@@ -752396,7 +752822,7 @@ async function enrollCrossChainRouters({ multiProvider, altVmSigners, registryAd
|
|
|
752396
752822
|
return updateTransactions;
|
|
752397
752823
|
}
|
|
752398
752824
|
function getRouter(contracts) {
|
|
752399
|
-
for (const key of (0,
|
|
752825
|
+
for (const key of (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objKeys */ .cG)(_token_contracts_js__WEBPACK_IMPORTED_MODULE_28__/* .hypERC20factories */ .AE)) {
|
|
752400
752826
|
if (contracts[key])
|
|
752401
752827
|
return contracts[key];
|
|
752402
752828
|
}
|
|
@@ -752566,10 +752992,12 @@ class EvmTokenFeeDeployer extends HyperlaneDeployer/* HyperlaneDeployer */.J {
|
|
|
752566
752992
|
const feeAddresses = [];
|
|
752567
752993
|
for (const [destinationChain, destinationConfig] of Object.entries(config.feeContracts)) {
|
|
752568
752994
|
for (const [routerKey, routerFeeConfig] of Object.entries(destinationConfig)) {
|
|
752569
|
-
const
|
|
752995
|
+
const { address } = routerFeeConfig.type === fee_types/* TokenFeeType */.cA.OffchainQuotedLinearFee
|
|
752996
|
+
? await this.deployOffchainQuotedLinearFee(chain, routerFeeConfig)
|
|
752997
|
+
: await this.deployFee(chain, routerFeeConfig);
|
|
752570
752998
|
destinationDomains.push(this.multiProvider.getDomainId(destinationChain));
|
|
752571
752999
|
routerKeys.push(routerKey);
|
|
752572
|
-
feeAddresses.push(
|
|
753000
|
+
feeAddresses.push(address);
|
|
752573
753001
|
}
|
|
752574
753002
|
}
|
|
752575
753003
|
if (destinationDomains.length > 0) {
|
|
@@ -755437,6 +755865,13 @@ class EvmHookModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
755437
755865
|
targetConfig: target,
|
|
755438
755866
|
});
|
|
755439
755867
|
}
|
|
755868
|
+
else if (current.type === _types_js__WEBPACK_IMPORTED_MODULE_6__/* .HookType */ .WD.RATE_LIMITED &&
|
|
755869
|
+
target.type === _types_js__WEBPACK_IMPORTED_MODULE_6__/* .HookType */ .WD.RATE_LIMITED) {
|
|
755870
|
+
updateTxs = await this.updateRateLimitedHook({
|
|
755871
|
+
currentConfig: current,
|
|
755872
|
+
targetConfig: target,
|
|
755873
|
+
});
|
|
755874
|
+
}
|
|
755440
755875
|
else {
|
|
755441
755876
|
throw new Error(`Unsupported hook type: ${target.type}`);
|
|
755442
755877
|
}
|
|
@@ -755471,6 +755906,18 @@ class EvmHookModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
755471
755906
|
}
|
|
755472
755907
|
return updateTxs;
|
|
755473
755908
|
}
|
|
755909
|
+
async updateRateLimitedHook({ currentConfig, targetConfig, }) {
|
|
755910
|
+
const updateTxs = [];
|
|
755911
|
+
if (currentConfig.maxCapacity !== targetConfig.maxCapacity) {
|
|
755912
|
+
updateTxs.push({
|
|
755913
|
+
annotation: `Setting refill rate on RateLimitedHook on chain "${this.chain}" and address "${this.args.addresses.deployedHook}"`,
|
|
755914
|
+
chainId: this.chainId,
|
|
755915
|
+
to: this.args.addresses.deployedHook,
|
|
755916
|
+
data: _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_1__/* .RateLimitedHook__factory */ .euF.createInterface().encodeFunctionData('setRefillRate', [targetConfig.maxCapacity]),
|
|
755917
|
+
});
|
|
755918
|
+
}
|
|
755919
|
+
return updateTxs;
|
|
755920
|
+
}
|
|
755474
755921
|
async updateIgpHook({ currentConfig, targetConfig, }) {
|
|
755475
755922
|
const updateTxs = [];
|
|
755476
755923
|
const igpAddress = this.args.addresses.deployedHook;
|
|
@@ -755740,6 +756187,8 @@ class EvmHookModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
755740
756187
|
// we can remove the ts-ignore once we have a proper type for address Hooks
|
|
755741
756188
|
// @ts-ignore
|
|
755742
756189
|
return _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_1__/* .IPostDispatchHook__factory */ .ZUR.connect(config.address, this.multiProvider.getSignerOrProvider(this.args.chain));
|
|
756190
|
+
case _types_js__WEBPACK_IMPORTED_MODULE_6__/* .HookType */ .WD.RATE_LIMITED:
|
|
756191
|
+
return this.deployRateLimitedHook({ config });
|
|
755743
756192
|
default:
|
|
755744
756193
|
throw new Error(`Unsupported hook config: ${config}`);
|
|
755745
756194
|
}
|
|
@@ -755762,6 +756211,17 @@ class EvmHookModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
755762
756211
|
await this.multiProvider.handleTx(this.chain, hook.transferOwnership(config.owner, this.txOverrides));
|
|
755763
756212
|
return hook;
|
|
755764
756213
|
}
|
|
756214
|
+
async deployRateLimitedHook({ config, }) {
|
|
756215
|
+
this.logger.debug('Deploying RateLimitedHook...');
|
|
756216
|
+
const deployer = new HookDeployer(this.multiProvider, _contracts_js__WEBPACK_IMPORTED_MODULE_9__/* .hookFactories */ .k);
|
|
756217
|
+
const sender = this.args.addresses.rateLimitedSender;
|
|
756218
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .assert */ .v)(sender, 'rateLimitedSender is required to deploy RateLimitedHook');
|
|
756219
|
+
const hook = await deployer.deployContract(this.chain, _types_js__WEBPACK_IMPORTED_MODULE_6__/* .HookType */ .WD.RATE_LIMITED, [this.args.addresses.mailbox, config.maxCapacity, sender]);
|
|
756220
|
+
if (config.owner) {
|
|
756221
|
+
await this.multiProvider.handleTx(this.chain, hook.transferOwnership(config.owner, this.txOverrides));
|
|
756222
|
+
}
|
|
756223
|
+
return hook;
|
|
756224
|
+
}
|
|
755765
756225
|
async deployAggregationHook({ config, }) {
|
|
755766
756226
|
this.logger.debug('Deploying AggregationHook...');
|
|
755767
756227
|
// deploy subhooks
|
|
@@ -756078,6 +756538,9 @@ class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1
|
|
|
756078
756538
|
derivedHookConfig = { type: _types_js__WEBPACK_IMPORTED_MODULE_4__/* .HookType */ .WD.CCTP, address };
|
|
756079
756539
|
this._cache.set(address, derivedHookConfig);
|
|
756080
756540
|
break;
|
|
756541
|
+
case _types_js__WEBPACK_IMPORTED_MODULE_4__/* .OnchainHookType */ .c0.RATE_LIMITED:
|
|
756542
|
+
derivedHookConfig = await this.deriveRateLimitedHookConfig(address);
|
|
756543
|
+
break;
|
|
756081
756544
|
default:
|
|
756082
756545
|
throw new Error(`Unsupported HookType: ${_types_js__WEBPACK_IMPORTED_MODULE_4__/* .OnchainHookType */ .c0[onchainHookType]}`);
|
|
756083
756546
|
}
|
|
@@ -756179,6 +756642,23 @@ class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1
|
|
|
756179
756642
|
this._cache.set(address, config);
|
|
756180
756643
|
return config;
|
|
756181
756644
|
}
|
|
756645
|
+
async deriveRateLimitedHookConfig(address) {
|
|
756646
|
+
const hook = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .RateLimitedHook__factory */ .euF.connect(address, this.provider);
|
|
756647
|
+
const [hookType, maxCapacity, owner] = await Promise.all([
|
|
756648
|
+
hook.hookType(),
|
|
756649
|
+
hook.maxCapacity(),
|
|
756650
|
+
hook.owner(),
|
|
756651
|
+
]);
|
|
756652
|
+
this.assertHookType(hookType, _types_js__WEBPACK_IMPORTED_MODULE_4__/* .OnchainHookType */ .c0.RATE_LIMITED);
|
|
756653
|
+
const config = {
|
|
756654
|
+
address,
|
|
756655
|
+
type: _types_js__WEBPACK_IMPORTED_MODULE_4__/* .HookType */ .WD.RATE_LIMITED,
|
|
756656
|
+
maxCapacity: maxCapacity.toString(),
|
|
756657
|
+
owner,
|
|
756658
|
+
};
|
|
756659
|
+
this._cache.set(address, config);
|
|
756660
|
+
return config;
|
|
756661
|
+
}
|
|
756182
756662
|
async deriveMerkleTreeConfig(address) {
|
|
756183
756663
|
const hook = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .MerkleTreeHook__factory */ .IFf.connect(address, this.provider);
|
|
756184
756664
|
this.assertHookType(await hook.hookType(), _types_js__WEBPACK_IMPORTED_MODULE_4__/* .OnchainHookType */ .c0.MERKLE_TREE);
|
|
@@ -756466,6 +756946,7 @@ const hookFactories = {
|
|
|
756466
756946
|
[_types_js__WEBPACK_IMPORTED_MODULE_1__/* .HookType */ .WD.AMOUNT_ROUTING]: new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .AmountRoutingHook__factory */ ._ff(),
|
|
756467
756947
|
[_types_js__WEBPACK_IMPORTED_MODULE_1__/* .HookType */ .WD.MAILBOX_DEFAULT]: new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .DefaultHook__factory */ .hR3(),
|
|
756468
756948
|
[_types_js__WEBPACK_IMPORTED_MODULE_1__/* .HookType */ .WD.CCIP]: new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .CCIPHook__factory */ .TaE(),
|
|
756949
|
+
[_types_js__WEBPACK_IMPORTED_MODULE_1__/* .HookType */ .WD.RATE_LIMITED]: new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .RateLimitedHook__factory */ .euF(),
|
|
756469
756950
|
};
|
|
756470
756951
|
//# sourceMappingURL=contracts.js.map
|
|
756471
756952
|
|
|
@@ -756481,9 +756962,10 @@ const hookFactories = {
|
|
|
756481
756962
|
/* harmony export */ vC: () => (/* binding */ HookConfigSchema),
|
|
756482
756963
|
/* harmony export */ yx: () => (/* binding */ MUTABLE_HOOK_TYPE)
|
|
756483
756964
|
/* harmony export */ });
|
|
756484
|
-
/* unused harmony exports ProtocolFeeSchema, MerkleTreeSchema, PredicateHookSchema, PausableHookSchema, MailboxDefaultHookSchema, OpStackHookSchema, ArbL2ToL1HookSchema, IgpSchema, DomainRoutingHookConfigSchema, FallbackRoutingHookConfigSchema, AmountRoutingHookConfigSchema, AggregationHookConfigSchema, CCIPHookSchema, CctpHookSchema, UnknownHookSchema, normalizeUnknownHookTypes, SafeParseHookConfigSchema, HooksConfigSchema, HooksConfigMapSchema */
|
|
756965
|
+
/* unused harmony exports ProtocolFeeSchema, MerkleTreeSchema, PredicateHookSchema, PausableHookSchema, MailboxDefaultHookSchema, OpStackHookSchema, ArbL2ToL1HookSchema, IgpSchema, DomainRoutingHookConfigSchema, FallbackRoutingHookConfigSchema, AmountRoutingHookConfigSchema, AggregationHookConfigSchema, CCIPHookSchema, CctpHookSchema, UnknownHookSchema, RateLimitedHookSchema, normalizeUnknownHookTypes, SafeParseHookConfigSchema, HooksConfigSchema, HooksConfigMapSchema */
|
|
756485
756966
|
/* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(49355);
|
|
756486
|
-
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(
|
|
756967
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(94523);
|
|
756968
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(73689);
|
|
756487
756969
|
/* harmony import */ var _gas_oracle_types_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(73847);
|
|
756488
756970
|
/* harmony import */ var _metadata_customZodTypes_js__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(47690);
|
|
756489
756971
|
/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(88832);
|
|
@@ -756539,6 +757021,11 @@ const HookType = {
|
|
|
756539
757021
|
* `EvmHookModule.deploy` path just connects to `config.address`.
|
|
756540
757022
|
*/
|
|
756541
757023
|
CCTP: 'cctpHook',
|
|
757024
|
+
/**
|
|
757025
|
+
* Rate-limits outbound token volume on the origin chain at dispatch time.
|
|
757026
|
+
* Warp-route only. Not valid for core required/default hooks.
|
|
757027
|
+
*/
|
|
757028
|
+
RATE_LIMITED: 'rateLimitedHook',
|
|
756542
757029
|
UNKNOWN: 'unknownHook',
|
|
756543
757030
|
PREDICATE: 'predicateHook',
|
|
756544
757031
|
};
|
|
@@ -756555,6 +757042,7 @@ const HookTypeToContractNameMap = {
|
|
|
756555
757042
|
[HookType.ARB_L2_TO_L1]: 'arbL2ToL1Hook',
|
|
756556
757043
|
[HookType.MAILBOX_DEFAULT]: 'defaultHook',
|
|
756557
757044
|
[HookType.CCIP]: 'ccipHook',
|
|
757045
|
+
[HookType.RATE_LIMITED]: 'rateLimitedHook',
|
|
756558
757046
|
};
|
|
756559
757047
|
// Hook types that can be updated in-place
|
|
756560
757048
|
const MUTABLE_HOOK_TYPE = [
|
|
@@ -756563,6 +757051,7 @@ const MUTABLE_HOOK_TYPE = [
|
|
|
756563
757051
|
HookType.ROUTING,
|
|
756564
757052
|
HookType.FALLBACK_ROUTING,
|
|
756565
757053
|
HookType.PAUSABLE,
|
|
757054
|
+
HookType.RATE_LIMITED,
|
|
756566
757055
|
];
|
|
756567
757056
|
const ProtocolFeeSchema = _types_js__WEBPACK_IMPORTED_MODULE_0__/* .OwnableSchema */ .wv.extend({
|
|
756568
757057
|
type: zod__WEBPACK_IMPORTED_MODULE_1__/* .literal */ .eu(HookType.PROTOCOL_FEE),
|
|
@@ -756638,6 +757127,24 @@ const UnknownHookSchema = zod__WEBPACK_IMPORTED_MODULE_1__/* .object */ .Ik({
|
|
|
756638
757127
|
type: zod__WEBPACK_IMPORTED_MODULE_1__/* .literal */ .eu(HookType.UNKNOWN),
|
|
756639
757128
|
})
|
|
756640
757129
|
.passthrough();
|
|
757130
|
+
const RateLimitedHookSchema = _types_js__WEBPACK_IMPORTED_MODULE_0__/* .OwnableSchema */ .wv.extend({
|
|
757131
|
+
type: zod__WEBPACK_IMPORTED_MODULE_1__/* .literal */ .eu(HookType.RATE_LIMITED),
|
|
757132
|
+
maxCapacity: zod__WEBPACK_IMPORTED_MODULE_1__/* .string */ .Yj()
|
|
757133
|
+
.regex(/^\d+$/, 'maxCapacity must be a base-10 integer string'),
|
|
757134
|
+
})
|
|
757135
|
+
.refine((val) => BigInt(val.maxCapacity) >= 86400n, {
|
|
757136
|
+
message: 'maxCapacity must be at least 86400',
|
|
757137
|
+
path: ['maxCapacity'],
|
|
757138
|
+
})
|
|
757139
|
+
.transform((val) => {
|
|
757140
|
+
const capacity = BigInt(val.maxCapacity);
|
|
757141
|
+
if (capacity % 86400n !== 0n) {
|
|
757142
|
+
const rounded = ((capacity / 86400n) * 86400n).toString();
|
|
757143
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .rootLogger */ .Jk.warn(`RateLimitedHook maxCapacity ${val.maxCapacity} is not divisible by 86400; rounding down to ${rounded}`);
|
|
757144
|
+
return { ...val, maxCapacity: rounded };
|
|
757145
|
+
}
|
|
757146
|
+
return val;
|
|
757147
|
+
});
|
|
756641
757148
|
const KnownHookTypes = Object.values(HookType).filter((t) => t !== HookType.UNKNOWN);
|
|
756642
757149
|
/**
|
|
756643
757150
|
* Recursively normalizes unknown hook type values to HookType.UNKNOWN.
|
|
@@ -756649,7 +757156,7 @@ const KnownHookTypes = Object.values(HookType).filter((t) => t !== HookType.UNKN
|
|
|
756649
757156
|
*/
|
|
756650
757157
|
function normalizeUnknownHookTypes(config) {
|
|
756651
757158
|
// Handle nullish values and primitives (including string addresses)
|
|
756652
|
-
if ((0,
|
|
757159
|
+
if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .isNullish */ .u)(config) || typeof config !== 'object') {
|
|
756653
757160
|
return config;
|
|
756654
757161
|
}
|
|
756655
757162
|
if (Array.isArray(config)) {
|
|
@@ -756664,7 +757171,7 @@ function normalizeUnknownHookTypes(config) {
|
|
|
756664
757171
|
? value
|
|
756665
757172
|
: HookType.UNKNOWN;
|
|
756666
757173
|
}
|
|
756667
|
-
else if (typeof value === 'object' && !(0,
|
|
757174
|
+
else if (typeof value === 'object' && !(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .isNullish */ .u)(value)) {
|
|
756668
757175
|
normalized[key] = normalizeUnknownHookTypes(value);
|
|
756669
757176
|
}
|
|
756670
757177
|
else {
|
|
@@ -756688,6 +757195,7 @@ const HookConfigSchema = zod__WEBPACK_IMPORTED_MODULE_1__/* .union */ .KC([
|
|
|
756688
757195
|
MailboxDefaultHookSchema,
|
|
756689
757196
|
CCIPHookSchema,
|
|
756690
757197
|
CctpHookSchema,
|
|
757198
|
+
RateLimitedHookSchema,
|
|
756691
757199
|
UnknownHookSchema,
|
|
756692
757200
|
PredicateHookSchema,
|
|
756693
757201
|
]);
|
|
@@ -756719,7 +757227,7 @@ const HooksConfigMapSchema = zod__WEBPACK_IMPORTED_MODULE_1__/* .record */ .g1(H
|
|
|
756719
757227
|
|
|
756720
757228
|
|
|
756721
757229
|
async function getEvmHookUpdateTransactions(clientContractAddress, updateHookParams) {
|
|
756722
|
-
const { actualConfig: actualHookConfig, evmChainName, mailbox, proxyAdminAddress, expectedConfig, logger, hookAndIsmFactories, multiProvider, ccipContractCache, contractVerifier, } = updateHookParams;
|
|
757230
|
+
const { actualConfig: actualHookConfig, evmChainName, mailbox, proxyAdminAddress, expectedConfig, logger, hookAndIsmFactories, multiProvider, ccipContractCache, contractVerifier, rateLimitedSender, } = updateHookParams;
|
|
756723
757231
|
const hookModule = new _EvmHookModule_js__WEBPACK_IMPORTED_MODULE_0__/* .EvmHookModule */ .o(multiProvider, {
|
|
756724
757232
|
chain: evmChainName,
|
|
756725
757233
|
config: actualHookConfig,
|
|
@@ -756730,6 +757238,7 @@ async function getEvmHookUpdateTransactions(clientContractAddress, updateHookPar
|
|
|
756730
757238
|
deployedHook: typeof actualHookConfig === 'string'
|
|
756731
757239
|
? actualHookConfig
|
|
756732
757240
|
: actualHookConfig.address,
|
|
757241
|
+
...(rateLimitedSender ? { rateLimitedSender } : {}),
|
|
756733
757242
|
},
|
|
756734
757243
|
}, ccipContractCache, contractVerifier);
|
|
756735
757244
|
// Get the current hook address before applying the txs to identify if
|
|
@@ -756757,19 +757266,13 @@ async function getEvmHookUpdateTransactions(clientContractAddress, updateHookPar
|
|
|
756757
757266
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
756758
757267
|
|
|
756759
757268
|
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
756760
|
-
/* harmony export */
|
|
757269
|
+
/* harmony export */ Bl: () => (/* binding */ stripPredicateSubHook),
|
|
757270
|
+
/* harmony export */ r$: () => (/* binding */ hookTreeContainsRateLimited)
|
|
756761
757271
|
/* harmony export */ });
|
|
756762
757272
|
/* unused harmony export isHookCompatible */
|
|
756763
757273
|
/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(52116);
|
|
756764
757274
|
|
|
756765
757275
|
|
|
756766
|
-
/**
|
|
756767
|
-
* Checks if the given hook type is compatible with the chain's technical stack.
|
|
756768
|
-
*
|
|
756769
|
-
* @param {HookType} params.hookType - The type of hook
|
|
756770
|
-
* @param {ChainTechnicalStack | undefined} params.chainTechnicalStack - The technical stack of the chain
|
|
756771
|
-
* @returns {boolean} True if the hook type is compatible with the chain, false otherwise
|
|
756772
|
-
*/
|
|
756773
757276
|
/**
|
|
756774
757277
|
* Strips the PREDICATE sub-hook from an aggregation hook config.
|
|
756775
757278
|
* If the aggregation contains exactly one non-predicate hook, unwraps it.
|
|
@@ -756788,6 +757291,30 @@ function stripPredicateSubHook(hook) {
|
|
|
756788
757291
|
// Multiple non-predicate hooks remain — can't construct without on-chain address
|
|
756789
757292
|
return hook;
|
|
756790
757293
|
}
|
|
757294
|
+
function hookTreeContainsRateLimited(hook) {
|
|
757295
|
+
if (!hook || typeof hook === 'string')
|
|
757296
|
+
return false;
|
|
757297
|
+
if (hook.type === _types_js__WEBPACK_IMPORTED_MODULE_0__/* .HookType */ .WD.RATE_LIMITED)
|
|
757298
|
+
return true;
|
|
757299
|
+
if (hook.type === _types_js__WEBPACK_IMPORTED_MODULE_0__/* .HookType */ .WD.AGGREGATION) {
|
|
757300
|
+
return hook.hooks.some(hookTreeContainsRateLimited);
|
|
757301
|
+
}
|
|
757302
|
+
if (hook.type === _types_js__WEBPACK_IMPORTED_MODULE_0__/* .HookType */ .WD.ROUTING) {
|
|
757303
|
+
return Object.values(hook.domains).some(hookTreeContainsRateLimited);
|
|
757304
|
+
}
|
|
757305
|
+
if (hook.type === _types_js__WEBPACK_IMPORTED_MODULE_0__/* .HookType */ .WD.FALLBACK_ROUTING) {
|
|
757306
|
+
return (Object.values(hook.domains).some(hookTreeContainsRateLimited) ||
|
|
757307
|
+
hookTreeContainsRateLimited(hook.fallback));
|
|
757308
|
+
}
|
|
757309
|
+
if (hook.type === _types_js__WEBPACK_IMPORTED_MODULE_0__/* .HookType */ .WD.AMOUNT_ROUTING) {
|
|
757310
|
+
return (hookTreeContainsRateLimited(hook.lowerHook) ||
|
|
757311
|
+
hookTreeContainsRateLimited(hook.upperHook));
|
|
757312
|
+
}
|
|
757313
|
+
if (hook.type === _types_js__WEBPACK_IMPORTED_MODULE_0__/* .HookType */ .WD.ARB_L2_TO_L1) {
|
|
757314
|
+
return hookTreeContainsRateLimited(hook.childHook);
|
|
757315
|
+
}
|
|
757316
|
+
return false;
|
|
757317
|
+
}
|
|
756791
757318
|
const isHookCompatible = ({ hookType, chainTechnicalStack, }) => !(hookType === HookType.AGGREGATION &&
|
|
756792
757319
|
chainTechnicalStack === ChainTechnicalStack.ZkSync);
|
|
756793
757320
|
//# sourceMappingURL=utils.js.map
|
|
@@ -756977,7 +757504,14 @@ class EvmIsmModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_MO
|
|
|
756977
757504
|
// - If it is not a mutable ISM.
|
|
756978
757505
|
// Else, we have to figure out what an update for this ISM entails
|
|
756979
757506
|
// Check if we need to deploy a new ISM
|
|
756980
|
-
|
|
757507
|
+
//
|
|
757508
|
+
// Special case: RATE_LIMITED recipient is immutable — must redeploy if it changes.
|
|
757509
|
+
const rateLimitedRecipientChanged = typeof normalizedCurrentConfig !== 'string' &&
|
|
757510
|
+
normalizedCurrentConfig.type === _types_js__WEBPACK_IMPORTED_MODULE_4__/* .IsmType */ .GO.RATE_LIMITED &&
|
|
757511
|
+
normalizedTargetConfig.type === _types_js__WEBPACK_IMPORTED_MODULE_4__/* .IsmType */ .GO.RATE_LIMITED &&
|
|
757512
|
+
normalizedCurrentConfig.recipient !== normalizedTargetConfig.recipient;
|
|
757513
|
+
if (rateLimitedRecipientChanged ||
|
|
757514
|
+
typeof normalizedCurrentConfig === 'string' ||
|
|
756981
757515
|
normalizedCurrentConfig.type !== normalizedTargetConfig.type ||
|
|
756982
757516
|
!_types_js__WEBPACK_IMPORTED_MODULE_4__/* .MUTABLE_ISM_TYPE */ .mJ.includes(normalizedTargetConfig.type)) {
|
|
756983
757517
|
const contract = await this.deploy({
|
|
@@ -757040,6 +757574,12 @@ class EvmIsmModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_MO
|
|
|
757040
757574
|
target,
|
|
757041
757575
|
}));
|
|
757042
757576
|
}
|
|
757577
|
+
else if (current.type === _types_js__WEBPACK_IMPORTED_MODULE_4__/* .IsmType */ .GO.RATE_LIMITED &&
|
|
757578
|
+
target.type === _types_js__WEBPACK_IMPORTED_MODULE_4__/* .IsmType */ .GO.RATE_LIMITED) {
|
|
757579
|
+
// owner is optional on RateLimitedIsmConfig — handle ownership here
|
|
757580
|
+
// rather than falling through to the generic transferOwnershipTransactions call
|
|
757581
|
+
return this.updateRateLimitedIsm({ current, target });
|
|
757582
|
+
}
|
|
757043
757583
|
else {
|
|
757044
757584
|
throw new Error(`Unsupported update to mutable ISM of type ${target.type}`);
|
|
757045
757585
|
}
|
|
@@ -757126,6 +757666,24 @@ class EvmIsmModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_MO
|
|
|
757126
757666
|
},
|
|
757127
757667
|
];
|
|
757128
757668
|
}
|
|
757669
|
+
updateRateLimitedIsm({ current, target, }) {
|
|
757670
|
+
const txs = [];
|
|
757671
|
+
if (current.maxCapacity !== target.maxCapacity) {
|
|
757672
|
+
txs.push({
|
|
757673
|
+
annotation: `Setting maxCapacity on RateLimitedIsm on chain "${this.chain}" and address "${this.args.addresses.deployedIsm}"`,
|
|
757674
|
+
chainId: this.multiProvider.getEvmChainId(this.chain),
|
|
757675
|
+
to: this.args.addresses.deployedIsm,
|
|
757676
|
+
data: _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .RateLimitedIsm__factory */ .YMX.createInterface().encodeFunctionData('setRefillRate', [target.maxCapacity]),
|
|
757677
|
+
});
|
|
757678
|
+
}
|
|
757679
|
+
if (current.owner != null && target.owner == null) {
|
|
757680
|
+
this.logger.warn(`target.owner is undefined for RateLimitedIsm on chain "${this.chain}" at address "${this.args.addresses.deployedIsm}"; ownership transfer will be skipped`);
|
|
757681
|
+
}
|
|
757682
|
+
else if (current.owner != null && target.owner != null) {
|
|
757683
|
+
txs.push(...(0,_contracts_contracts_js__WEBPACK_IMPORTED_MODULE_12__/* .transferOwnershipTransactions */ .Yg)(this.chainId, this.args.addresses.deployedIsm, { owner: current.owner }, { owner: target.owner }));
|
|
757684
|
+
}
|
|
757685
|
+
return txs;
|
|
757686
|
+
}
|
|
757129
757687
|
async deploy({ config, }) {
|
|
757130
757688
|
config = _types_js__WEBPACK_IMPORTED_MODULE_4__/* .IsmConfigSchema */ .nb.parse(config);
|
|
757131
757689
|
return this.ismFactory.deploy({
|
|
@@ -757508,6 +758066,26 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
|
|
|
757508
758066
|
catch {
|
|
757509
758067
|
this.logger.debug('Error accessing "VERIFIED_MASK_INDEX" property, implying this is not an OP Stack ISM.', address);
|
|
757510
758068
|
}
|
|
758069
|
+
// Detect RateLimitedIsm by probing for its unique recipient() selector.
|
|
758070
|
+
// Safe today because no other NULL-type ISM in this repo exposes recipient().
|
|
758071
|
+
// TODO: replace with bytecode or unique-selector matching if custom NULL ISMs
|
|
758072
|
+
// with the same interface are ever introduced.
|
|
758073
|
+
const rateLimitedIsm = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .RateLimitedIsm__factory */ .YMX.connect(address, this.provider);
|
|
758074
|
+
try {
|
|
758075
|
+
const recipient = await rateLimitedIsm.recipient();
|
|
758076
|
+
const maxCapacity = (await rateLimitedIsm.maxCapacity()).toString();
|
|
758077
|
+
const owner = await rateLimitedIsm.owner();
|
|
758078
|
+
return {
|
|
758079
|
+
address,
|
|
758080
|
+
type: _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.RATE_LIMITED,
|
|
758081
|
+
recipient,
|
|
758082
|
+
maxCapacity,
|
|
758083
|
+
owner,
|
|
758084
|
+
};
|
|
758085
|
+
}
|
|
758086
|
+
catch {
|
|
758087
|
+
this.logger.debug('Error accessing "recipient" property, implying this is not a Rate Limited ISM.', address);
|
|
758088
|
+
}
|
|
757511
758089
|
// no specific properties, must be Test ISM
|
|
757512
758090
|
return {
|
|
757513
758091
|
address,
|
|
@@ -757542,8 +758120,8 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
|
|
|
757542
758120
|
/* harmony import */ var _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(50653);
|
|
757543
758121
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(94523);
|
|
757544
758122
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(21387);
|
|
757545
|
-
/* harmony import */ var
|
|
757546
|
-
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(
|
|
758123
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(93142);
|
|
758124
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(73938);
|
|
757547
758125
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(39196);
|
|
757548
758126
|
/* harmony import */ var _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(63942);
|
|
757549
758127
|
/* harmony import */ var _ccip_utils_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(93035);
|
|
@@ -757551,7 +758129,7 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
|
|
|
757551
758129
|
/* harmony import */ var _deploy_HyperlaneDeployer_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(6609);
|
|
757552
758130
|
/* harmony import */ var _deploy_contracts_js__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(98370);
|
|
757553
758131
|
/* harmony import */ var _metadata_chainMetadataTypes_js__WEBPACK_IMPORTED_MODULE_13__ = __nccwpck_require__(1430);
|
|
757554
|
-
/* harmony import */ var
|
|
758132
|
+
/* harmony import */ var _utils_zksync_js__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(68927);
|
|
757555
758133
|
/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(69352);
|
|
757556
758134
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(37748);
|
|
757557
758135
|
|
|
@@ -757572,6 +758150,7 @@ const ismFactories = {
|
|
|
757572
758150
|
[_types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.OP_STACK]: new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .OPStackIsm__factory */ .NR9(),
|
|
757573
758151
|
[_types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.ARB_L2_TO_L1]: new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .ArbL2ToL1Ism__factory */ .D$C(),
|
|
757574
758152
|
[_types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.CCIP]: new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .CCIPIsm__factory */ .phq(),
|
|
758153
|
+
[_types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.RATE_LIMITED]: new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .RateLimitedIsm__factory */ .YMX(),
|
|
757575
758154
|
};
|
|
757576
758155
|
const domainRoutingInitializationSize = (destination) => {
|
|
757577
758156
|
if (destination === 'tempo') {
|
|
@@ -757694,6 +758273,23 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
|
|
|
757694
758273
|
case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.ARB_L2_TO_L1:
|
|
757695
758274
|
contract = await this.deployer.deployContract(destination, _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.ARB_L2_TO_L1, [config.bridge]);
|
|
757696
758275
|
break;
|
|
758276
|
+
case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.RATE_LIMITED: {
|
|
758277
|
+
const rateLimitedConfig = config;
|
|
758278
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .v)(mailbox, `Mailbox address is required for deploying ${ismType}`);
|
|
758279
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .v)(rateLimitedConfig.recipient, `Recipient address is required for deploying ${ismType}`);
|
|
758280
|
+
contract = await this.deployer.deployContract(destination, _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.RATE_LIMITED, [mailbox, rateLimitedConfig.maxCapacity, rateLimitedConfig.recipient]);
|
|
758281
|
+
if (rateLimitedConfig.owner) {
|
|
758282
|
+
const signer = this.multiProvider.getSigner(destination);
|
|
758283
|
+
const signerAddress = await signer.getAddress();
|
|
758284
|
+
if (!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .eqAddress */ .fv)(signerAddress, rateLimitedConfig.owner)) {
|
|
758285
|
+
const overrides = this.multiProvider.getTransactionOverrides(destination);
|
|
758286
|
+
const rateLimitedIsm = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .RateLimitedIsm__factory */ .YMX.connect(contract.address, signer);
|
|
758287
|
+
const tx = await rateLimitedIsm.transferOwnership(rateLimitedConfig.owner, overrides);
|
|
758288
|
+
await this.multiProvider.handleTx(destination, tx);
|
|
758289
|
+
}
|
|
758290
|
+
}
|
|
758291
|
+
break;
|
|
758292
|
+
}
|
|
757697
758293
|
case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.CCIP:
|
|
757698
758294
|
contract = await this.deployCCIPIsm(destination, config);
|
|
757699
758295
|
break;
|
|
@@ -757744,10 +758340,10 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
|
|
|
757744
758340
|
break;
|
|
757745
758341
|
// TODO: support using minimal proxy factories for storage multisig ISMs too
|
|
757746
758342
|
case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.STORAGE_MERKLE_ROOT_MULTISIG:
|
|
757747
|
-
address = await deployStorage(new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .StorageMerkleRootMultisigIsm__factory */ .PCg(), await (0,
|
|
758343
|
+
address = await deployStorage(new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .StorageMerkleRootMultisigIsm__factory */ .PCg(), await (0,_utils_zksync_js__WEBPACK_IMPORTED_MODULE_11__/* .getZKSyncArtifactByContractName */ .z)(config.type));
|
|
757748
758344
|
break;
|
|
757749
758345
|
case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.STORAGE_MESSAGE_ID_MULTISIG:
|
|
757750
|
-
address = await deployStorage(new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .StorageMessageIdMultisigIsm__factory */ .vYr(), await (0,
|
|
758346
|
+
address = await deployStorage(new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .StorageMessageIdMultisigIsm__factory */ .vYr(), await (0,_utils_zksync_js__WEBPACK_IMPORTED_MODULE_11__/* .getZKSyncArtifactByContractName */ .z)(config.type));
|
|
757751
758347
|
break;
|
|
757752
758348
|
default:
|
|
757753
758349
|
throw new Error(`Unsupported multisig ISM type ${config.type}`);
|
|
@@ -757807,7 +758403,7 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
|
|
|
757807
758403
|
: contracts.domainRoutingIsmFactory;
|
|
757808
758404
|
let routingIsm;
|
|
757809
758405
|
// filtering out domains which are not part of the multiprovider
|
|
757810
|
-
config.domains = (0,
|
|
758406
|
+
config.domains = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objFilter */ .s3)(config.domains, (domain, _) => {
|
|
757811
758407
|
const domainId = this.multiProvider.tryGetDomainId(domain);
|
|
757812
758408
|
if (domainId === null) {
|
|
757813
758409
|
logger.warn(`Domain ${domain} doesn't have chain metadata provided, skipping ...`);
|
|
@@ -757826,7 +758422,7 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
|
|
|
757826
758422
|
let isOwner = false;
|
|
757827
758423
|
if (existingIsmAddress) {
|
|
757828
758424
|
const owner = await _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .DomainRoutingIsm__factory */ .ayM.connect(existingIsmAddress, provider).owner();
|
|
757829
|
-
isOwner = (0,
|
|
758425
|
+
isOwner = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .eqAddress */ .fv)(await signer.getAddress(), owner);
|
|
757830
758426
|
}
|
|
757831
758427
|
// reconfiguring existing routing ISM
|
|
757832
758428
|
if (existingIsmAddress && isOwner && !delta.mailbox) {
|
|
@@ -757878,7 +758474,7 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
|
|
|
757878
758474
|
throw new Error('Mailbox address is required for deploying fallback routing ISM');
|
|
757879
758475
|
}
|
|
757880
758476
|
logger.debug('Deploying fallback routing ISM ...');
|
|
757881
|
-
routingIsm = await this.multiProvider.handleDeploy(destination, new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .DefaultFallbackRoutingIsm__factory */ .fol(), [mailbox], await (0,
|
|
758477
|
+
routingIsm = await this.multiProvider.handleDeploy(destination, new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .DefaultFallbackRoutingIsm__factory */ .fol(), [mailbox], await (0,_utils_zksync_js__WEBPACK_IMPORTED_MODULE_11__/* .getZKSyncArtifactByContractName */ .z)(config.type));
|
|
757882
758478
|
// TODO: Should verify contract here
|
|
757883
758479
|
logger.debug('Initialising fallback routing ISM ...');
|
|
757884
758480
|
receipt = await this.multiProvider.handleTx(destination, routingIsm['initialize(address,uint32[],address[])'](config.owner, safeConfigDomains, submoduleAddresses, overrides));
|
|
@@ -757947,7 +758543,7 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
|
|
|
757947
758543
|
}
|
|
757948
758544
|
// Transfer ownership after all enrollments are complete, unless the
|
|
757949
758545
|
// signer is already the target owner (common for self-owned deploys).
|
|
757950
|
-
if (!(0,
|
|
758546
|
+
if (!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .eqAddress */ .fv)(signerAddress, config.owner)) {
|
|
757951
758547
|
const transferTxEstimatedGas = await routingIsm.estimateGas.transferOwnership(config.owner, overrides);
|
|
757952
758548
|
const transferTx = await routingIsm.transferOwnership(config.owner, {
|
|
757953
758549
|
gasLimit: (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .addBufferToGasLimit */ .Zp)(transferTxEstimatedGas, 15),
|
|
@@ -757992,7 +758588,7 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
|
|
|
757992
758588
|
const sorted = [...values].sort();
|
|
757993
758589
|
const getAddressResult = await factory['getAddress(address[],uint8)'](sorted, threshold);
|
|
757994
758590
|
const address = (await this.previewFactoryDeployAddress(chain, factory, 'deploy(address[],uint8)', [sorted, threshold])) ?? getAddressResult;
|
|
757995
|
-
if (!(0,
|
|
758591
|
+
if (!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .eqAddress */ .fv)(address, getAddressResult)) {
|
|
757996
758592
|
logger.debug(`Factory getAddress mismatch on ${chain}, using deploy simulation address ${address}`);
|
|
757997
758593
|
}
|
|
757998
758594
|
const code = await this.multiProvider.getProvider(chain).getCode(address);
|
|
@@ -758018,7 +758614,7 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
|
|
|
758018
758614
|
const sorted = [...values].sort();
|
|
758019
758615
|
const getAddressResult = await factory['getAddress((address,uint96)[],uint96)'](sorted, thresholdWeight);
|
|
758020
758616
|
const address = (await this.previewFactoryDeployAddress(chain, factory, 'deploy((address,uint96)[],uint96)', [sorted, thresholdWeight])) ?? getAddressResult;
|
|
758021
|
-
if (!(0,
|
|
758617
|
+
if (!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .eqAddress */ .fv)(address, getAddressResult)) {
|
|
758022
758618
|
logger.debug(`Weighted factory getAddress mismatch on ${chain}, using deploy simulation address ${address}`);
|
|
758023
758619
|
}
|
|
758024
758620
|
const code = await this.multiProvider.getProvider(chain).getCode(address);
|
|
@@ -758080,12 +758676,13 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
|
|
|
758080
758676
|
/* harmony export */ nR: () => (/* binding */ ModuleType),
|
|
758081
758677
|
/* harmony export */ nb: () => (/* binding */ IsmConfigSchema)
|
|
758082
758678
|
/* harmony export */ });
|
|
758083
|
-
/* unused harmony exports DYNAMICALLY_ROUTED_ISM_TYPES, InterchainAccountRouterIsmSchema, TestIsmConfigSchema, MultisigConfigSchema, WeightedMultisigConfigSchema, TrustedRelayerIsmConfigSchema, CCIPIsmConfigSchema, isOffchainLookupIsmConfig, OpStackIsmConfigSchema, ArbL2ToL1IsmConfigSchema, PausableIsmConfigSchema, WeightedMultisigIsmConfigSchema, RoutingIsmConfigSchema, AggregationIsmConfigSchema, UnknownIsmConfigSchema, normalizeUnknownIsmTypes, SafeParseIsmConfigSchema */
|
|
758679
|
+
/* unused harmony exports DYNAMICALLY_ROUTED_ISM_TYPES, InterchainAccountRouterIsmSchema, TestIsmConfigSchema, MultisigConfigSchema, WeightedMultisigConfigSchema, TrustedRelayerIsmConfigSchema, RateLimitedIsmConfigSchema, CCIPIsmConfigSchema, isOffchainLookupIsmConfig, OpStackIsmConfigSchema, ArbL2ToL1IsmConfigSchema, PausableIsmConfigSchema, WeightedMultisigIsmConfigSchema, RoutingIsmConfigSchema, AggregationIsmConfigSchema, UnknownIsmConfigSchema, normalizeUnknownIsmTypes, SafeParseIsmConfigSchema */
|
|
758084
758680
|
/* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(49355);
|
|
758085
|
-
/* harmony import */ var
|
|
758681
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(94523);
|
|
758682
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(73689);
|
|
758086
758683
|
/* harmony import */ var _metadata_customZodTypes_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(47690);
|
|
758087
758684
|
/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(88832);
|
|
758088
|
-
/* harmony import */ var
|
|
758685
|
+
/* harmony import */ var _utils_schemas_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(73535);
|
|
758089
758686
|
|
|
758090
758687
|
|
|
758091
758688
|
|
|
@@ -758131,6 +758728,7 @@ const IsmType = {
|
|
|
758131
758728
|
WEIGHTED_MESSAGE_ID_MULTISIG: 'weightedMessageIdMultisigIsm',
|
|
758132
758729
|
CCIP: 'ccipIsm',
|
|
758133
758730
|
OFFCHAIN_LOOKUP: 'offchainLookupIsm',
|
|
758731
|
+
RATE_LIMITED: 'rateLimitedIsm',
|
|
758134
758732
|
UNKNOWN: 'unknownIsm',
|
|
758135
758733
|
};
|
|
758136
758734
|
// ISM types that can be updated in-place
|
|
@@ -758140,6 +758738,7 @@ const MUTABLE_ISM_TYPE = [
|
|
|
758140
758738
|
IsmType.PAUSABLE,
|
|
758141
758739
|
IsmType.OFFCHAIN_LOOKUP,
|
|
758142
758740
|
IsmType.INCREMENTAL_ROUTING,
|
|
758741
|
+
IsmType.RATE_LIMITED,
|
|
758143
758742
|
];
|
|
758144
758743
|
/**
|
|
758145
758744
|
* @notice Statically deployed ISM types
|
|
@@ -758184,6 +758783,7 @@ function ismTypeToModuleType(ismType) {
|
|
|
758184
758783
|
case IsmType.CUSTOM:
|
|
758185
758784
|
case IsmType.TRUSTED_RELAYER:
|
|
758186
758785
|
case IsmType.CCIP:
|
|
758786
|
+
case IsmType.RATE_LIMITED:
|
|
758187
758787
|
return ModuleType.NULL;
|
|
758188
758788
|
case IsmType.ARB_L2_TO_L1:
|
|
758189
758789
|
return ModuleType.ARB_L2_TO_L1;
|
|
@@ -758220,6 +758820,26 @@ const TrustedRelayerIsmConfigSchema = zod__WEBPACK_IMPORTED_MODULE_1__/* .object
|
|
|
758220
758820
|
type: zod__WEBPACK_IMPORTED_MODULE_1__/* .literal */ .eu(IsmType.TRUSTED_RELAYER),
|
|
758221
758821
|
relayer: zod__WEBPACK_IMPORTED_MODULE_1__/* .string */ .Yj(),
|
|
758222
758822
|
});
|
|
758823
|
+
const RateLimitedIsmConfigSchema = zod__WEBPACK_IMPORTED_MODULE_1__/* .object */ .Ik({
|
|
758824
|
+
type: zod__WEBPACK_IMPORTED_MODULE_1__/* .literal */ .eu(IsmType.RATE_LIMITED),
|
|
758825
|
+
maxCapacity: zod__WEBPACK_IMPORTED_MODULE_1__/* .string */ .Yj()
|
|
758826
|
+
.regex(/^\d+$/, 'maxCapacity must be a base-10 integer string'),
|
|
758827
|
+
recipient: _metadata_customZodTypes_js__WEBPACK_IMPORTED_MODULE_2__/* .ZHash */ .l.optional(),
|
|
758828
|
+
owner: _metadata_customZodTypes_js__WEBPACK_IMPORTED_MODULE_2__/* .ZHash */ .l.optional(),
|
|
758829
|
+
})
|
|
758830
|
+
.refine((val) => BigInt(val.maxCapacity) >= 86400n, {
|
|
758831
|
+
message: 'maxCapacity must be at least 86400',
|
|
758832
|
+
path: ['maxCapacity'],
|
|
758833
|
+
})
|
|
758834
|
+
.transform((val) => {
|
|
758835
|
+
const capacity = BigInt(val.maxCapacity);
|
|
758836
|
+
if (capacity % 86400n !== 0n) {
|
|
758837
|
+
const rounded = ((capacity / 86400n) * 86400n).toString();
|
|
758838
|
+
_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .rootLogger */ .Jk.warn(`RateLimitedIsm maxCapacity ${val.maxCapacity} is not divisible by 86400; rounding down to ${rounded}`);
|
|
758839
|
+
return { ...val, maxCapacity: rounded };
|
|
758840
|
+
}
|
|
758841
|
+
return val;
|
|
758842
|
+
});
|
|
758223
758843
|
const CCIPIsmConfigSchema = zod__WEBPACK_IMPORTED_MODULE_1__/* .object */ .Ik({
|
|
758224
758844
|
type: zod__WEBPACK_IMPORTED_MODULE_1__/* .literal */ .eu(IsmType.CCIP),
|
|
758225
758845
|
originChain: zod__WEBPACK_IMPORTED_MODULE_1__/* .string */ .Yj(),
|
|
@@ -758228,7 +758848,7 @@ const OffchainLookupIsmConfigSchema = _types_js__WEBPACK_IMPORTED_MODULE_0__/* .
|
|
|
758228
758848
|
type: zod__WEBPACK_IMPORTED_MODULE_1__/* .literal */ .eu(IsmType.OFFCHAIN_LOOKUP),
|
|
758229
758849
|
urls: zod__WEBPACK_IMPORTED_MODULE_1__/* .array */ .YO(zod__WEBPACK_IMPORTED_MODULE_1__/* .string */ .Yj().url()),
|
|
758230
758850
|
});
|
|
758231
|
-
const isOffchainLookupIsmConfig = (0,
|
|
758851
|
+
const isOffchainLookupIsmConfig = (0,_utils_schemas_js__WEBPACK_IMPORTED_MODULE_4__/* .isCompliant */ .M)(OffchainLookupIsmConfigSchema);
|
|
758232
758852
|
const OpStackIsmConfigSchema = zod__WEBPACK_IMPORTED_MODULE_1__/* .object */ .Ik({
|
|
758233
758853
|
type: zod__WEBPACK_IMPORTED_MODULE_1__/* .literal */ .eu(IsmType.OP_STACK),
|
|
758234
758854
|
origin: zod__WEBPACK_IMPORTED_MODULE_1__/* .string */ .Yj(),
|
|
@@ -758298,7 +758918,7 @@ const KnownIsmTypes = Object.values(IsmType).filter((t) => t !== IsmType.UNKNOWN
|
|
|
758298
758918
|
*/
|
|
758299
758919
|
function normalizeUnknownIsmTypes(config) {
|
|
758300
758920
|
// Handle nullish values and primitives (including string addresses)
|
|
758301
|
-
if ((0,
|
|
758921
|
+
if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .isNullish */ .u)(config) || typeof config !== 'object') {
|
|
758302
758922
|
return config;
|
|
758303
758923
|
}
|
|
758304
758924
|
if (Array.isArray(config)) {
|
|
@@ -758311,7 +758931,7 @@ function normalizeUnknownIsmTypes(config) {
|
|
|
758311
758931
|
if (key === 'type' && typeof value === 'string') {
|
|
758312
758932
|
normalized[key] = KnownIsmTypes.includes(value) ? value : IsmType.UNKNOWN;
|
|
758313
758933
|
}
|
|
758314
|
-
else if (typeof value === 'object' && !(0,
|
|
758934
|
+
else if (typeof value === 'object' && !(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .isNullish */ .u)(value)) {
|
|
758315
758935
|
normalized[key] = normalizeUnknownIsmTypes(value);
|
|
758316
758936
|
}
|
|
758317
758937
|
else {
|
|
@@ -758327,6 +758947,7 @@ const IsmConfigSchema = zod__WEBPACK_IMPORTED_MODULE_1__/* .union */ .KC([
|
|
|
758327
758947
|
PausableIsmConfigSchema,
|
|
758328
758948
|
TrustedRelayerIsmConfigSchema,
|
|
758329
758949
|
CCIPIsmConfigSchema,
|
|
758950
|
+
RateLimitedIsmConfigSchema,
|
|
758330
758951
|
MultisigIsmConfigSchema,
|
|
758331
758952
|
WeightedMultisigIsmConfigSchema,
|
|
758332
758953
|
RoutingIsmConfigSchema,
|
|
@@ -758655,6 +759276,22 @@ async function moduleMatchesConfig(chain, moduleAddress, config, multiProvider,
|
|
|
758655
759276
|
matches = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .eqAddress */ .fv)(expectedAddress, module.address);
|
|
758656
759277
|
break;
|
|
758657
759278
|
}
|
|
759279
|
+
case _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.RATE_LIMITED: {
|
|
759280
|
+
const rateLimitedIsm = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .RateLimitedIsm__factory */ .YMX.connect(moduleAddress, provider);
|
|
759281
|
+
const [onChainMaxCapacity, onChainRecipient] = await Promise.all([
|
|
759282
|
+
rateLimitedIsm.maxCapacity(),
|
|
759283
|
+
rateLimitedIsm.recipient(),
|
|
759284
|
+
]);
|
|
759285
|
+
matches &&= onChainMaxCapacity.eq(config.maxCapacity);
|
|
759286
|
+
if (config.recipient) {
|
|
759287
|
+
matches &&= (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .eqAddress */ .fv)(onChainRecipient, config.recipient);
|
|
759288
|
+
}
|
|
759289
|
+
if (config.owner) {
|
|
759290
|
+
const onChainOwner = await rateLimitedIsm.owner();
|
|
759291
|
+
matches &&= (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .eqAddress */ .fv)(onChainOwner, config.owner);
|
|
759292
|
+
}
|
|
759293
|
+
break;
|
|
759294
|
+
}
|
|
758658
759295
|
default: {
|
|
758659
759296
|
throw new Error('Unsupported ModuleType');
|
|
758660
759297
|
}
|
|
@@ -760349,14 +760986,10 @@ __nccwpck_require__.d(__webpack_exports__, {
|
|
|
760349
760986
|
ij: () => (/* binding */ buildInterchainAccountApp)
|
|
760350
760987
|
});
|
|
760351
760988
|
|
|
760352
|
-
// UNUSED EXPORTS:
|
|
760989
|
+
// UNUSED EXPORTS: deployInterchainAccount, shareCallsWithPrivateRelayer
|
|
760353
760990
|
|
|
760354
760991
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/index.js
|
|
760355
760992
|
var lib = __nccwpck_require__(61934);
|
|
760356
|
-
// EXTERNAL MODULE: ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js + 4 modules
|
|
760357
|
-
var types = __nccwpck_require__(49355);
|
|
760358
|
-
// EXTERNAL MODULE: ../sdk/dist/metadata/customZodTypes.js
|
|
760359
|
-
var customZodTypes = __nccwpck_require__(47690);
|
|
760360
760993
|
// EXTERNAL MODULE: ../../solidity/dist/index.js + 845 modules
|
|
760361
760994
|
var dist = __nccwpck_require__(50653);
|
|
760362
760995
|
// EXTERNAL MODULE: ../utils/dist/addresses.js
|
|
@@ -760370,7 +761003,7 @@ var objects = __nccwpck_require__(73938);
|
|
|
760370
761003
|
// EXTERNAL MODULE: ../sdk/dist/contracts/contracts.js
|
|
760371
761004
|
var contracts = __nccwpck_require__(15570);
|
|
760372
761005
|
// EXTERNAL MODULE: ../utils/dist/types.js
|
|
760373
|
-
var
|
|
761006
|
+
var types = __nccwpck_require__(16639);
|
|
760374
761007
|
// EXTERNAL MODULE: ../sdk/dist/app/HyperlaneApp.js
|
|
760375
761008
|
var HyperlaneApp = __nccwpck_require__(63942);
|
|
760376
761009
|
;// CONCATENATED MODULE: ../sdk/dist/router/RouterApps.js
|
|
@@ -760383,7 +761016,7 @@ class RouterApp extends HyperlaneApp/* HyperlaneApp */.E {
|
|
|
760383
761016
|
this.foreignDeployments = foreignDeployments;
|
|
760384
761017
|
}
|
|
760385
761018
|
routerAddress(chainName) {
|
|
760386
|
-
if ((0,
|
|
761019
|
+
if ((0,types/* isEVMLike */.Us)(this.multiProvider.getChainMetadata(chainName).protocol)) {
|
|
760387
761020
|
return this.router(this.contractsMap[chainName]).address;
|
|
760388
761021
|
}
|
|
760389
761022
|
return this.foreignDeployments[chainName];
|
|
@@ -760425,8 +761058,6 @@ var account_contracts = __nccwpck_require__(29817);
|
|
|
760425
761058
|
|
|
760426
761059
|
|
|
760427
761060
|
|
|
760428
|
-
|
|
760429
|
-
|
|
760430
761061
|
const IGP_DEFAULT_GAS = lib.BigNumber.from(50_000);
|
|
760431
761062
|
const ICA_OVERHEAD = lib.BigNumber.from(50_000);
|
|
760432
761063
|
const PER_CALL_OVERHEAD = lib.BigNumber.from(5_000);
|
|
@@ -760668,73 +761299,6 @@ async function deployInterchainAccount(multiProvider, chain, config, coreAddress
|
|
|
760668
761299
|
const interchainAccountApp = await buildInterchainAccountApp(multiProvider, chain, config, coreAddressesByChain);
|
|
760669
761300
|
return interchainAccountApp.deployAccount(chain, config);
|
|
760670
761301
|
}
|
|
760671
|
-
function encodeIcaCalls(calls, salt) {
|
|
760672
|
-
return (salt +
|
|
760673
|
-
utils.defaultAbiCoder
|
|
760674
|
-
.encode(['tuple(bytes32 to,uint256 value,bytes data)[]'], [
|
|
760675
|
-
calls.map((c) => ({
|
|
760676
|
-
to: addressToBytes32(c.to),
|
|
760677
|
-
value: c.value || 0,
|
|
760678
|
-
data: c.data,
|
|
760679
|
-
})),
|
|
760680
|
-
])
|
|
760681
|
-
.slice(2));
|
|
760682
|
-
}
|
|
760683
|
-
function normalizeCalls(calls) {
|
|
760684
|
-
return calls.map((call) => ({
|
|
760685
|
-
to: addressToBytes32(call.to),
|
|
760686
|
-
value: BigNumber.from(call.value || 0),
|
|
760687
|
-
data: call.data,
|
|
760688
|
-
}));
|
|
760689
|
-
}
|
|
760690
|
-
function commitmentFromIcaCalls(calls, salt) {
|
|
760691
|
-
return utils.keccak256(encodeIcaCalls(calls, salt));
|
|
760692
|
-
}
|
|
760693
|
-
/**
|
|
760694
|
-
* Format of REVEAL message:
|
|
760695
|
-
* [ 0: 1] MessageType.REVEAL (uint8)
|
|
760696
|
-
* [ 1: 33] ICA ISM (bytes32)
|
|
760697
|
-
* [ 33: 65] Commitment (bytes32)
|
|
760698
|
-
*/
|
|
760699
|
-
function commitmentFromRevealMessage(message) {
|
|
760700
|
-
const messageBuffer = fromHexString(message);
|
|
760701
|
-
// Validate minimum length (65 bytes: 1 byte type + 32 bytes ISM + 32 bytes commitment)
|
|
760702
|
-
if (messageBuffer.length < 65) {
|
|
760703
|
-
throw new Error(`Invalid reveal message: expected at least 65 bytes, got ${messageBuffer.length} bytes`);
|
|
760704
|
-
}
|
|
760705
|
-
// Extract commitment from bytes 33-65 (32 bytes)
|
|
760706
|
-
const commitment = messageBuffer.subarray(33, 65);
|
|
760707
|
-
return toHexString(commitment);
|
|
760708
|
-
}
|
|
760709
|
-
const PostCallsBaseSchema = types/* object */.Ik({
|
|
760710
|
-
calls: types/* array */.YO(types/* object */.Ik({
|
|
760711
|
-
to: customZodTypes/* ZHash */.l,
|
|
760712
|
-
data: types/* string */.Yj(),
|
|
760713
|
-
value: types/* string */.Yj().optional(),
|
|
760714
|
-
}))
|
|
760715
|
-
.min(1),
|
|
760716
|
-
relayers: types/* array */.YO(customZodTypes/* ZHash */.l),
|
|
760717
|
-
salt: customZodTypes/* ZHash */.l,
|
|
760718
|
-
ismOverride: customZodTypes/* ZHash */.l.optional(),
|
|
760719
|
-
originDomain: types/* number */.ai(),
|
|
760720
|
-
});
|
|
760721
|
-
// Legacy shape: ICA derived from dispatch tx receipt events
|
|
760722
|
-
const PostCallsLegacySchema = PostCallsBaseSchema.extend({
|
|
760723
|
-
commitmentDispatchTx: customZodTypes/* ZHash */.l,
|
|
760724
|
-
});
|
|
760725
|
-
// New shape: ICA derived directly from destination + owner
|
|
760726
|
-
const PostCallsIcaSchema = PostCallsBaseSchema.extend({
|
|
760727
|
-
destinationDomain: types/* number */.ai(),
|
|
760728
|
-
owner: customZodTypes/* ZHash */.l,
|
|
760729
|
-
userSalt: customZodTypes/* ZHash */.l.optional(),
|
|
760730
|
-
});
|
|
760731
|
-
const PostCallsSchema = types/* union */.KC([
|
|
760732
|
-
PostCallsIcaSchema,
|
|
760733
|
-
PostCallsLegacySchema,
|
|
760734
|
-
]);
|
|
760735
|
-
function isPostCallsIca(data) {
|
|
760736
|
-
return 'destinationDomain' in data && 'owner' in data;
|
|
760737
|
-
}
|
|
760738
761302
|
async function shareCallsWithPrivateRelayer(serverUrl, payload) {
|
|
760739
761303
|
const resp = await fetch(serverUrl, {
|
|
760740
761304
|
method: 'POST',
|
|
@@ -763269,7 +763833,7 @@ __webpack_async_result__();
|
|
|
763269
763833
|
/* harmony export */ RN: () => (/* binding */ estimateTransactionFee),
|
|
763270
763834
|
/* harmony export */ sI: () => (/* binding */ estimateTransactionFeeEthersV5ForGasUnits)
|
|
763271
763835
|
/* harmony export */ });
|
|
763272
|
-
/* unused harmony exports estimateTransactionFeeEthersV5, estimateTransactionFeeViem, estimateTransactionFeeSolanaWeb3, estimateTransactionFeeCosmJs, estimateTransactionFeeCosmJsWasm, estimateTransactionFeeCosmJsNative, estimateTransactionFeeStarknet, estimateTransactionFeeRadix, estimateTransactionFeeAleo */
|
|
763836
|
+
/* unused harmony exports clearCachedStargateClients, estimateTransactionFeeEthersV5, estimateTransactionFeeViem, estimateTransactionFeeSolanaWeb3, estimateTransactionFeeCosmJs, estimateTransactionFeeCosmJsWasm, estimateTransactionFeeCosmJsNative, estimateTransactionFeeStarknet, estimateTransactionFeeRadix, estimateTransactionFeeAleo */
|
|
763273
763837
|
/* harmony import */ var _cosmjs_amino__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(46661);
|
|
763274
763838
|
/* harmony import */ var _cosmjs_cosmwasm_stargate__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(81729);
|
|
763275
763839
|
/* harmony import */ var _cosmjs_encoding__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(35813);
|
|
@@ -763277,10 +763841,11 @@ __webpack_async_result__();
|
|
|
763277
763841
|
/* harmony import */ var _cosmjs_proto_signing__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(5505);
|
|
763278
763842
|
/* harmony import */ var _cosmjs_stargate__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(69403);
|
|
763279
763843
|
/* harmony import */ var cosmjs_types_cosmwasm_wasm_v1_tx_js__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(79234);
|
|
763280
|
-
/* harmony import */ var
|
|
763281
|
-
/* harmony import */ var
|
|
763282
|
-
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(
|
|
763283
|
-
/* harmony import */ var
|
|
763844
|
+
/* harmony import */ var _hyperlane_xyz_cosmos_sdk__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(46466);
|
|
763845
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(21387);
|
|
763846
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(93142);
|
|
763847
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(16639);
|
|
763848
|
+
/* harmony import */ var _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(25047);
|
|
763284
763849
|
|
|
763285
763850
|
|
|
763286
763851
|
|
|
@@ -763290,6 +763855,14 @@ __webpack_async_result__();
|
|
|
763290
763855
|
|
|
763291
763856
|
|
|
763292
763857
|
|
|
763858
|
+
|
|
763859
|
+
const stargateClientCache = new _hyperlane_xyz_cosmos_sdk__WEBPACK_IMPORTED_MODULE_7__/* .StargateClientCache */ .dc(32);
|
|
763860
|
+
function clearCachedStargateClients() {
|
|
763861
|
+
stargateClientCache.clear();
|
|
763862
|
+
}
|
|
763863
|
+
function getStargateClient(url) {
|
|
763864
|
+
return stargateClientCache.get(url);
|
|
763865
|
+
}
|
|
763293
763866
|
async function estimateTransactionFeeEthersV5({ transaction, provider, sender, }) {
|
|
763294
763867
|
const gasUnits = await provider.estimateGas({
|
|
763295
763868
|
...transaction,
|
|
@@ -763336,7 +763909,7 @@ function computeEvmTxFee(gasUnits, gasPrice, maxFeePerGas, maxPriorityFeePerGas)
|
|
|
763336
763909
|
async function estimateTransactionFeeSolanaWeb3({ provider, transaction, }) {
|
|
763337
763910
|
const connection = provider.provider;
|
|
763338
763911
|
const { value } = await connection.simulateTransaction(transaction.transaction);
|
|
763339
|
-
(0,
|
|
763912
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .v)(!value.err, `Solana gas estimation failed: ${JSON.stringify(value)}`);
|
|
763340
763913
|
const gasUnits = BigInt(value.unitsConsumed || 0);
|
|
763341
763914
|
const recentFees = await connection.getRecentPrioritizationFees();
|
|
763342
763915
|
const gasPrice = BigInt(recentFees[0].prioritizationFee);
|
|
@@ -763361,7 +763934,7 @@ async function estimateTransactionFeeCosmJs({ transaction, provider, estimatedGa
|
|
|
763361
763934
|
// @ts-ignore force access to protected method
|
|
763362
763935
|
.forceGetQueryClient()
|
|
763363
763936
|
.tx.simulate([encodedMsg], memo, encodedPubkey, sequence);
|
|
763364
|
-
(0,
|
|
763937
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .v)(gasInfo, 'Gas estimation failed');
|
|
763365
763938
|
const gasUnits = _cosmjs_math__WEBPACK_IMPORTED_MODULE_3__.Uint53.fromString(gasInfo.gasUsed.toString()).toNumber();
|
|
763366
763939
|
const gasPrice = parseFloat(estimatedGasPrice.toString());
|
|
763367
763940
|
return {
|
|
@@ -763383,15 +763956,29 @@ async function estimateTransactionFeeCosmJsWasm({ transaction, provider, estimat
|
|
|
763383
763956
|
const wasmClient = await provider.provider;
|
|
763384
763957
|
// @ts-ignore access a private field here to extract client URL
|
|
763385
763958
|
const url = wasmClient.cometClient.client.url;
|
|
763386
|
-
const stargateClient =
|
|
763387
|
-
|
|
763388
|
-
|
|
763389
|
-
|
|
763390
|
-
|
|
763391
|
-
|
|
763392
|
-
|
|
763393
|
-
|
|
763394
|
-
|
|
763959
|
+
const stargateClient = getStargateClient(url);
|
|
763960
|
+
try {
|
|
763961
|
+
return await estimateTransactionFeeCosmJs({
|
|
763962
|
+
transaction: { type: _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.CosmJs, transaction: message },
|
|
763963
|
+
provider: { type: _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.CosmJs, provider: stargateClient },
|
|
763964
|
+
estimatedGasPrice,
|
|
763965
|
+
sender,
|
|
763966
|
+
senderPubKey,
|
|
763967
|
+
memo,
|
|
763968
|
+
});
|
|
763969
|
+
}
|
|
763970
|
+
catch (error) {
|
|
763971
|
+
stargateClientCache.evict(url, stargateClient);
|
|
763972
|
+
throw error;
|
|
763973
|
+
}
|
|
763974
|
+
finally {
|
|
763975
|
+
if (!(0,_hyperlane_xyz_cosmos_sdk__WEBPACK_IMPORTED_MODULE_7__/* .shouldCacheStargateClient */ .y8)(url)) {
|
|
763976
|
+
(0,_hyperlane_xyz_cosmos_sdk__WEBPACK_IMPORTED_MODULE_7__/* .disconnectStargateClient */ .zo)(stargateClient);
|
|
763977
|
+
}
|
|
763978
|
+
else {
|
|
763979
|
+
stargateClientCache.release(stargateClient);
|
|
763980
|
+
}
|
|
763981
|
+
}
|
|
763395
763982
|
}
|
|
763396
763983
|
async function estimateTransactionFeeCosmJsNative({ transaction, provider, estimatedGasPrice, senderAddress, senderPubKey, }) {
|
|
763397
763984
|
const client = await provider.provider;
|
|
@@ -763418,28 +764005,28 @@ async function estimateTransactionFeeAleo({ transaction, provider, }) {
|
|
|
763418
764005
|
});
|
|
763419
764006
|
}
|
|
763420
764007
|
function estimateTransactionFee({ transaction, provider, chainMetadata, sender, senderPubKey, }) {
|
|
763421
|
-
if (transaction.type ===
|
|
763422
|
-
provider.type ===
|
|
764008
|
+
if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.EthersV5 &&
|
|
764009
|
+
provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.EthersV5) {
|
|
763423
764010
|
return estimateTransactionFeeEthersV5({
|
|
763424
764011
|
transaction: transaction.transaction,
|
|
763425
764012
|
provider: provider.provider,
|
|
763426
764013
|
sender,
|
|
763427
764014
|
});
|
|
763428
764015
|
}
|
|
763429
|
-
else if (transaction.type ===
|
|
763430
|
-
provider.type ===
|
|
764016
|
+
else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.Viem &&
|
|
764017
|
+
provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.Viem) {
|
|
763431
764018
|
return estimateTransactionFeeViem({ transaction, provider, sender });
|
|
763432
764019
|
}
|
|
763433
|
-
else if (transaction.type ===
|
|
763434
|
-
provider.type ===
|
|
764020
|
+
else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.SolanaWeb3 &&
|
|
764021
|
+
provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.SolanaWeb3) {
|
|
763435
764022
|
return estimateTransactionFeeSolanaWeb3({ transaction, provider });
|
|
763436
764023
|
}
|
|
763437
|
-
else if (transaction.type ===
|
|
763438
|
-
provider.type ===
|
|
764024
|
+
else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.CosmJs &&
|
|
764025
|
+
provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.CosmJs) {
|
|
763439
764026
|
const { transactionOverrides } = chainMetadata;
|
|
763440
764027
|
const estimatedGasPrice = transactionOverrides?.gasPrice;
|
|
763441
|
-
(0,
|
|
763442
|
-
(0,
|
|
764028
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .v)(estimatedGasPrice, 'gasPrice required for CosmJS gas estimation');
|
|
764029
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .v)(senderPubKey, 'senderPubKey required for CosmJS gas estimation');
|
|
763443
764030
|
return estimateTransactionFeeCosmJs({
|
|
763444
764031
|
transaction,
|
|
763445
764032
|
provider,
|
|
@@ -763448,12 +764035,12 @@ function estimateTransactionFee({ transaction, provider, chainMetadata, sender,
|
|
|
763448
764035
|
senderPubKey,
|
|
763449
764036
|
});
|
|
763450
764037
|
}
|
|
763451
|
-
else if (transaction.type ===
|
|
763452
|
-
provider.type ===
|
|
764038
|
+
else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.CosmJsWasm &&
|
|
764039
|
+
provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.CosmJsWasm) {
|
|
763453
764040
|
const { transactionOverrides } = chainMetadata;
|
|
763454
764041
|
const estimatedGasPrice = transactionOverrides?.gasPrice;
|
|
763455
|
-
(0,
|
|
763456
|
-
(0,
|
|
764042
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .v)(estimatedGasPrice, 'gasPrice required for CosmJS gas estimation');
|
|
764043
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .v)(senderPubKey, 'senderPubKey required for CosmJS gas estimation');
|
|
763457
764044
|
return estimateTransactionFeeCosmJsWasm({
|
|
763458
764045
|
transaction,
|
|
763459
764046
|
provider,
|
|
@@ -763462,12 +764049,12 @@ function estimateTransactionFee({ transaction, provider, chainMetadata, sender,
|
|
|
763462
764049
|
senderPubKey,
|
|
763463
764050
|
});
|
|
763464
764051
|
}
|
|
763465
|
-
else if (transaction.type ===
|
|
763466
|
-
provider.type ===
|
|
764052
|
+
else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.CosmJsNative &&
|
|
764053
|
+
provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.CosmJsNative) {
|
|
763467
764054
|
const { transactionOverrides } = chainMetadata;
|
|
763468
764055
|
const estimatedGasPrice = transactionOverrides?.gasPrice;
|
|
763469
|
-
(0,
|
|
763470
|
-
(0,
|
|
764056
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .v)(estimatedGasPrice, 'gasPrice required for CosmJS gas estimation');
|
|
764057
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .v)(senderPubKey, 'senderPubKey required for CosmJS gas estimation');
|
|
763471
764058
|
return estimateTransactionFeeCosmJsNative({
|
|
763472
764059
|
transaction,
|
|
763473
764060
|
provider,
|
|
@@ -763476,28 +764063,28 @@ function estimateTransactionFee({ transaction, provider, chainMetadata, sender,
|
|
|
763476
764063
|
senderPubKey,
|
|
763477
764064
|
});
|
|
763478
764065
|
}
|
|
763479
|
-
else if (transaction.type ===
|
|
763480
|
-
provider.type ===
|
|
764066
|
+
else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.Starknet &&
|
|
764067
|
+
provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.Starknet) {
|
|
763481
764068
|
return estimateTransactionFeeStarknet({ transaction, provider, sender });
|
|
763482
764069
|
}
|
|
763483
|
-
else if (transaction.type ===
|
|
763484
|
-
provider.type ===
|
|
764070
|
+
else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.Radix &&
|
|
764071
|
+
provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.Radix) {
|
|
763485
764072
|
return estimateTransactionFeeRadix({
|
|
763486
764073
|
transaction,
|
|
763487
764074
|
provider,
|
|
763488
764075
|
});
|
|
763489
764076
|
}
|
|
763490
|
-
else if (transaction.type ===
|
|
763491
|
-
provider.type ===
|
|
764077
|
+
else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.Aleo &&
|
|
764078
|
+
provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.Aleo) {
|
|
763492
764079
|
return estimateTransactionFeeAleo({
|
|
763493
764080
|
transaction,
|
|
763494
764081
|
provider,
|
|
763495
764082
|
});
|
|
763496
764083
|
}
|
|
763497
|
-
else if (transaction.type ===
|
|
763498
|
-
provider.type ===
|
|
764084
|
+
else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.Tron &&
|
|
764085
|
+
provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_9__/* .ProviderType */ .c.Tron) {
|
|
763499
764086
|
// Tron is EVM-compatible; its typed transaction/provider use EthersV5 underlying types
|
|
763500
|
-
sender = (0,
|
|
764087
|
+
sender = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .convertToProtocolAddress */ .Vj)(sender, _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_11__/* .ProtocolType */ .Hb.Ethereum);
|
|
763501
764088
|
return estimateTransactionFeeEthersV5({
|
|
763502
764089
|
transaction: transaction.transaction,
|
|
763503
764090
|
provider: provider.provider,
|
|
@@ -800592,6 +801179,7 @@ class HyperlaneRouterDeployer extends _deploy_HyperlaneDeployer_js__WEBPACK_IMPO
|
|
|
800592
801179
|
});
|
|
800593
801180
|
}));
|
|
800594
801181
|
}
|
|
801182
|
+
async beforeTransferOwnership(_contractsMap, _configMap) { }
|
|
800595
801183
|
async transferOwnership(contractsMap, configMap) {
|
|
800596
801184
|
this.logger.debug(`Transferring ownership of ownables...`);
|
|
800597
801185
|
for (const chain of Object.keys(contractsMap)) {
|
|
@@ -800609,6 +801197,7 @@ class HyperlaneRouterDeployer extends _deploy_HyperlaneDeployer_js__WEBPACK_IMPO
|
|
|
800609
801197
|
await this.enrollRemoteRouters(deployedContractsMap, configMap, foreignDeployments);
|
|
800610
801198
|
await this.deployAndConfigureTokenFees(deployedContractsMap, configMap);
|
|
800611
801199
|
await this.configureClients(deployedContractsMap, configMap);
|
|
801200
|
+
await this.beforeTransferOwnership(deployedContractsMap, configMap);
|
|
800612
801201
|
await this.transferOwnership(deployedContractsMap, configMap);
|
|
800613
801202
|
this.logger.debug(`Finished deploying router contracts for all chains.`);
|
|
800614
801203
|
return deployedContractsMap;
|
|
@@ -801141,40 +801730,41 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
|
|
|
801141
801730
|
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
801142
801731
|
/* harmony export */ N: () => (/* binding */ EvmWarpModule)
|
|
801143
801732
|
/* harmony export */ });
|
|
801144
|
-
/* harmony import */ var
|
|
801145
|
-
/* harmony import */ var
|
|
801733
|
+
/* harmony import */ var compare_versions__WEBPACK_IMPORTED_MODULE_29__ = __nccwpck_require__(95416);
|
|
801734
|
+
/* harmony import */ var ethers__WEBPACK_IMPORTED_MODULE_21__ = __nccwpck_require__(61934);
|
|
801146
801735
|
/* harmony import */ var starknet__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(98954);
|
|
801147
801736
|
/* harmony import */ var _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(50653);
|
|
801148
801737
|
/* harmony import */ var _hyperlane_xyz_core_buildArtifact_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(74119);
|
|
801149
801738
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(73938);
|
|
801150
801739
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(93142);
|
|
801151
801740
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(94523);
|
|
801152
|
-
/* harmony import */ var
|
|
801153
|
-
/* harmony import */ var
|
|
801154
|
-
/* harmony import */ var
|
|
801741
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__ = __nccwpck_require__(21387);
|
|
801742
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_16__ = __nccwpck_require__(52193);
|
|
801743
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__ = __nccwpck_require__(73689);
|
|
801155
801744
|
/* harmony import */ var _block_explorer_etherscan_js__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(26492);
|
|
801156
|
-
/* harmony import */ var
|
|
801745
|
+
/* harmony import */ var _contracts_contracts_js__WEBPACK_IMPORTED_MODULE_26__ = __nccwpck_require__(15570);
|
|
801157
801746
|
/* harmony import */ var _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(53387);
|
|
801158
|
-
/* harmony import */ var
|
|
801747
|
+
/* harmony import */ var _deploy_proxy_js__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(83697);
|
|
801159
801748
|
/* harmony import */ var _deploy_verify_ContractVerifier_js__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(76939);
|
|
801160
|
-
/* harmony import */ var
|
|
801161
|
-
/* harmony import */ var
|
|
801162
|
-
/* harmony import */ var
|
|
801163
|
-
/* harmony import */ var
|
|
801164
|
-
/* harmony import */ var
|
|
801165
|
-
/* harmony import */ var
|
|
801166
|
-
/* harmony import */ var
|
|
801167
|
-
/* harmony import */ var
|
|
801168
|
-
/* harmony import */ var
|
|
801749
|
+
/* harmony import */ var _fee_EvmTokenFeeModule_js__WEBPACK_IMPORTED_MODULE_25__ = __nccwpck_require__(43313);
|
|
801750
|
+
/* harmony import */ var _hook_updates_js__WEBPACK_IMPORTED_MODULE_20__ = __nccwpck_require__(69203);
|
|
801751
|
+
/* harmony import */ var _hook_utils_js__WEBPACK_IMPORTED_MODULE_19__ = __nccwpck_require__(13912);
|
|
801752
|
+
/* harmony import */ var _hook_types_js__WEBPACK_IMPORTED_MODULE_22__ = __nccwpck_require__(52116);
|
|
801753
|
+
/* harmony import */ var _ism_EvmIsmModule_js__WEBPACK_IMPORTED_MODULE_27__ = __nccwpck_require__(3612);
|
|
801754
|
+
/* harmony import */ var _predicate_PredicateDeployer_js__WEBPACK_IMPORTED_MODULE_23__ = __nccwpck_require__(550);
|
|
801755
|
+
/* harmony import */ var _router_types_js__WEBPACK_IMPORTED_MODULE_17__ = __nccwpck_require__(38230);
|
|
801756
|
+
/* harmony import */ var _utils_decimals_js__WEBPACK_IMPORTED_MODULE_30__ = __nccwpck_require__(27043);
|
|
801757
|
+
/* harmony import */ var _ism_types_js__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(69352);
|
|
801758
|
+
/* harmony import */ var _utils_ism_js__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(764);
|
|
801169
801759
|
/* harmony import */ var _EvmWarpRouteReader_js__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(40945);
|
|
801170
|
-
/* harmony import */ var
|
|
801171
|
-
/* harmony import */ var
|
|
801172
|
-
/* harmony import */ var
|
|
801173
|
-
/* harmony import */ var
|
|
801174
|
-
/* harmony import */ var
|
|
801175
|
-
/* harmony import */ var
|
|
801176
|
-
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([
|
|
801177
|
-
|
|
801760
|
+
/* harmony import */ var _EvmXERC20Module_js__WEBPACK_IMPORTED_MODULE_13__ = __nccwpck_require__(5715);
|
|
801761
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_28__ = __nccwpck_require__(4169);
|
|
801762
|
+
/* harmony import */ var _configUtils_js__WEBPACK_IMPORTED_MODULE_24__ = __nccwpck_require__(63776);
|
|
801763
|
+
/* harmony import */ var _contracts_js__WEBPACK_IMPORTED_MODULE_32__ = __nccwpck_require__(81504);
|
|
801764
|
+
/* harmony import */ var _deploy_js__WEBPACK_IMPORTED_MODULE_31__ = __nccwpck_require__(19186);
|
|
801765
|
+
/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(38466);
|
|
801766
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_EvmXERC20Module_js__WEBPACK_IMPORTED_MODULE_13__]);
|
|
801767
|
+
_EvmXERC20Module_js__WEBPACK_IMPORTED_MODULE_13__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
|
801178
801768
|
// import { expect } from 'chai';
|
|
801179
801769
|
|
|
801180
801770
|
|
|
@@ -801201,6 +801791,7 @@ _EvmXERC20Module_js__WEBPACK_IMPORTED_MODULE_11__ = (__webpack_async_dependencie
|
|
|
801201
801791
|
|
|
801202
801792
|
|
|
801203
801793
|
|
|
801794
|
+
|
|
801204
801795
|
|
|
801205
801796
|
|
|
801206
801797
|
const getAllowedRebalancingBridgesByDomain = (allowedRebalancingBridgesByDomain) => {
|
|
@@ -801238,7 +801829,31 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801238
801829
|
* @returns A promise that resolves to the token router configuration.
|
|
801239
801830
|
*/
|
|
801240
801831
|
async read() {
|
|
801241
|
-
|
|
801832
|
+
const config = await this.reader.deriveWarpRouteConfig(this.args.addresses.deployedTokenRoute);
|
|
801833
|
+
// recipient is always the token address itself — implicit in the warp
|
|
801834
|
+
// context, so omit it from read() output to keep configs clean.
|
|
801835
|
+
// Mutate in place to preserve the DerivedIsmConfig type (WithAddress<...>).
|
|
801836
|
+
const stripRecipient = (node) => {
|
|
801837
|
+
if (typeof node !== 'object' || node === null)
|
|
801838
|
+
return;
|
|
801839
|
+
const n = node;
|
|
801840
|
+
if (n.type === _ism_types_js__WEBPACK_IMPORTED_MODULE_10__/* .IsmType */ .GO.RATE_LIMITED) {
|
|
801841
|
+
delete n.recipient;
|
|
801842
|
+
return;
|
|
801843
|
+
}
|
|
801844
|
+
if (Array.isArray(n.modules))
|
|
801845
|
+
n.modules.forEach(stripRecipient);
|
|
801846
|
+
if (typeof n.domains === 'object' && n.domains !== null)
|
|
801847
|
+
Object.values(n.domains).forEach(stripRecipient);
|
|
801848
|
+
if (n.lowerIsm)
|
|
801849
|
+
stripRecipient(n.lowerIsm);
|
|
801850
|
+
if (n.upperIsm)
|
|
801851
|
+
stripRecipient(n.upperIsm);
|
|
801852
|
+
};
|
|
801853
|
+
const ism = config.interchainSecurityModule;
|
|
801854
|
+
if (typeof ism !== 'string' && (0,_utils_ism_js__WEBPACK_IMPORTED_MODULE_11__/* .ismTreeContainsRateLimited */ .Bh)(ism))
|
|
801855
|
+
stripRecipient(ism);
|
|
801856
|
+
return config;
|
|
801242
801857
|
}
|
|
801243
801858
|
/**
|
|
801244
801859
|
* Updates the Warp Route contract with the provided configuration.
|
|
@@ -801252,12 +801867,12 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801252
801867
|
* @returns An array of Ethereum transactions that were executed to update the contract, or an error if the update failed.
|
|
801253
801868
|
*/
|
|
801254
801869
|
async update(expectedConfig, tokenReaderParams) {
|
|
801255
|
-
|
|
801870
|
+
_types_js__WEBPACK_IMPORTED_MODULE_12__/* .HypTokenRouterConfigSchema */ .db.parse(expectedConfig);
|
|
801256
801871
|
const actualConfig = await this.read();
|
|
801257
801872
|
const transactions = [];
|
|
801258
801873
|
let xerc20Txs = [];
|
|
801259
|
-
if ((0,
|
|
801260
|
-
const { module, config } = await
|
|
801874
|
+
if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isXERC20TokenConfig */ .Kh)(expectedConfig)) {
|
|
801875
|
+
const { module, config } = await _EvmXERC20Module_js__WEBPACK_IMPORTED_MODULE_13__/* .EvmXERC20Module */ .J.fromWarpRouteConfig(this.multiProvider, this.chainName, expectedConfig, this.args.addresses.deployedTokenRoute);
|
|
801261
801876
|
xerc20Txs = await module.update(config);
|
|
801262
801877
|
}
|
|
801263
801878
|
/**
|
|
@@ -801272,7 +801887,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801272
801887
|
transactions.push(...(await this.upgradeWarpRouteImplementationTx(actualConfig, expectedConfig)), ...(await this.createIsmUpdateTxs(actualConfig, expectedConfig)), ...(await this.createHookAndPredicateUpdateTxs(actualConfig, expectedConfig)), ...(await this.createTokenFeeUpdateTxs(actualConfig, expectedConfig, tokenReaderParams)), ...this.createUnenrollRemoteRoutersUpdateTxs(actualConfig, expectedConfig), ...this.createEnrollRemoteRoutersUpdateTxs(actualConfig, expectedConfig),
|
|
801273
801888
|
// MC unenroll before enroll for consistency with remote routers.
|
|
801274
801889
|
// MC enrollment must come before gas setting so that MC-only domains
|
|
801275
|
-
...this.createUnenrollCrossCollateralRoutersTxs(actualConfig, expectedConfig), ...this.createEnrollCrossCollateralRoutersTxs(actualConfig, expectedConfig), ...this.createSetDestinationGasUpdateTxs(actualConfig, expectedConfig), ...this.createAddRebalancersUpdateTxs(actualConfig, expectedConfig), ...this.createRemoveRebalancersUpdateTxs(actualConfig, expectedConfig), ...(await this.createAddAllowedBridgesUpdateTxs(actualConfig, expectedConfig)), ...this.createRemoveBridgesTxs(actualConfig, expectedConfig), ...this.createAddRemoteOutputAssetsTxs(actualConfig, expectedConfig), ...this.createRemoveRemoteOutputAssetsTxs(actualConfig, expectedConfig), ...this.createUpdateEverclearFeeParamsTxs(actualConfig, expectedConfig), ...this.createRemoveEverclearFeeParamsTxs(actualConfig, expectedConfig), ...this.createSetMaxFeePpmTxs(actualConfig, expectedConfig), ...xerc20Txs, ...this.createOwnershipUpdateTxs(actualConfig, expectedConfig), ...(0,
|
|
801890
|
+
...this.createUnenrollCrossCollateralRoutersTxs(actualConfig, expectedConfig), ...this.createEnrollCrossCollateralRoutersTxs(actualConfig, expectedConfig), ...this.createSetDestinationGasUpdateTxs(actualConfig, expectedConfig), ...this.createAddRebalancersUpdateTxs(actualConfig, expectedConfig), ...this.createRemoveRebalancersUpdateTxs(actualConfig, expectedConfig), ...(await this.createAddAllowedBridgesUpdateTxs(actualConfig, expectedConfig)), ...this.createRemoveBridgesTxs(actualConfig, expectedConfig), ...this.createAddRemoteOutputAssetsTxs(actualConfig, expectedConfig), ...this.createRemoveRemoteOutputAssetsTxs(actualConfig, expectedConfig), ...this.createUpdateEverclearFeeParamsTxs(actualConfig, expectedConfig), ...this.createRemoveEverclearFeeParamsTxs(actualConfig, expectedConfig), ...this.createSetMaxFeePpmTxs(actualConfig, expectedConfig), ...xerc20Txs, ...this.createOwnershipUpdateTxs(actualConfig, expectedConfig), ...(0,_deploy_proxy_js__WEBPACK_IMPORTED_MODULE_14__/* .proxyAdminUpdateTxs */ .CK)(this.chainId, this.args.addresses.deployedTokenRoute, actualConfig, expectedConfig));
|
|
801276
801891
|
return transactions;
|
|
801277
801892
|
}
|
|
801278
801893
|
/**
|
|
@@ -801284,15 +801899,15 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801284
801899
|
*/
|
|
801285
801900
|
createEnrollRemoteRoutersUpdateTxs(actualConfig, expectedConfig) {
|
|
801286
801901
|
// OFT contracts don't have Router interface — no remote router enrollment
|
|
801287
|
-
if ((0,
|
|
801902
|
+
if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isOftTokenConfig */ .vo)(expectedConfig)) {
|
|
801288
801903
|
return [];
|
|
801289
801904
|
}
|
|
801290
801905
|
const updateTransactions = [];
|
|
801291
801906
|
if (!expectedConfig.remoteRouters) {
|
|
801292
801907
|
return [];
|
|
801293
801908
|
}
|
|
801294
|
-
(0,
|
|
801295
|
-
(0,
|
|
801909
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)(actualConfig.remoteRouters, 'actualRemoteRouters is undefined');
|
|
801910
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)(expectedConfig.remoteRouters, 'actualRemoteRouters is undefined');
|
|
801296
801911
|
const { remoteRouters: actualRemoteRouters } = actualConfig;
|
|
801297
801912
|
const { remoteRouters: expectedRemoteRouters } = expectedConfig;
|
|
801298
801913
|
const routesToEnroll = Object.entries(expectedRemoteRouters)
|
|
@@ -801323,18 +801938,18 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801323
801938
|
}
|
|
801324
801939
|
createUnenrollRemoteRoutersUpdateTxs(actualConfig, expectedConfig) {
|
|
801325
801940
|
// OFT contracts don't have Router interface — no remote router unenrollment
|
|
801326
|
-
if ((0,
|
|
801941
|
+
if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isOftTokenConfig */ .vo)(expectedConfig)) {
|
|
801327
801942
|
return [];
|
|
801328
801943
|
}
|
|
801329
801944
|
const updateTransactions = [];
|
|
801330
801945
|
if (!expectedConfig.remoteRouters) {
|
|
801331
801946
|
return [];
|
|
801332
801947
|
}
|
|
801333
|
-
(0,
|
|
801334
|
-
(0,
|
|
801948
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)(actualConfig.remoteRouters, 'actualRemoteRouters is undefined');
|
|
801949
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)(expectedConfig.remoteRouters, 'actualRemoteRouters is undefined');
|
|
801335
801950
|
const { remoteRouters: actualRemoteRouters } = actualConfig;
|
|
801336
801951
|
const { remoteRouters: expectedRemoteRouters } = expectedConfig;
|
|
801337
|
-
const routesToUnenroll = Array.from((0,
|
|
801952
|
+
const routesToUnenroll = Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_16__/* .difference */ .iv)(new Set(Object.keys(actualRemoteRouters)), new Set(Object.keys(expectedRemoteRouters))));
|
|
801338
801953
|
if (routesToUnenroll.length === 0) {
|
|
801339
801954
|
return updateTransactions;
|
|
801340
801955
|
}
|
|
@@ -801348,8 +801963,8 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801348
801963
|
return updateTransactions;
|
|
801349
801964
|
}
|
|
801350
801965
|
createAddRebalancersUpdateTxs(actualConfig, expectedConfig) {
|
|
801351
|
-
if (!(0,
|
|
801352
|
-
!(0,
|
|
801966
|
+
if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(expectedConfig) ||
|
|
801967
|
+
!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(actualConfig)) {
|
|
801353
801968
|
return [];
|
|
801354
801969
|
}
|
|
801355
801970
|
if (!expectedConfig.allowedRebalancers) {
|
|
@@ -801357,7 +801972,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801357
801972
|
}
|
|
801358
801973
|
const formattedExpectedRebalancers = new Set(expectedConfig.allowedRebalancers.map(_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .normalizeAddressEvm */ .Ek));
|
|
801359
801974
|
const formattedActualRebalancers = new Set((actualConfig.allowedRebalancers ?? []).map(_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .normalizeAddressEvm */ .Ek));
|
|
801360
|
-
const rebalancersToAdd = Array.from((0,
|
|
801975
|
+
const rebalancersToAdd = Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_16__/* .difference */ .iv)(formattedExpectedRebalancers, formattedActualRebalancers));
|
|
801361
801976
|
if (rebalancersToAdd.length === 0) {
|
|
801362
801977
|
return [];
|
|
801363
801978
|
}
|
|
@@ -801369,8 +801984,8 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801369
801984
|
}));
|
|
801370
801985
|
}
|
|
801371
801986
|
createRemoveRebalancersUpdateTxs(actualConfig, expectedConfig) {
|
|
801372
|
-
if (!(0,
|
|
801373
|
-
!(0,
|
|
801987
|
+
if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(expectedConfig) ||
|
|
801988
|
+
!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(actualConfig)) {
|
|
801374
801989
|
return [];
|
|
801375
801990
|
}
|
|
801376
801991
|
if (!expectedConfig.allowedRebalancers) {
|
|
@@ -801378,7 +801993,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801378
801993
|
}
|
|
801379
801994
|
const formattedExpectedRebalancers = new Set(expectedConfig.allowedRebalancers.map(_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .normalizeAddressEvm */ .Ek));
|
|
801380
801995
|
const formattedActualRebalancers = new Set((actualConfig.allowedRebalancers ?? []).map(_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .normalizeAddressEvm */ .Ek));
|
|
801381
|
-
const rebalancersToRemove = Array.from((0,
|
|
801996
|
+
const rebalancersToRemove = Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_16__/* .difference */ .iv)(formattedActualRebalancers, formattedExpectedRebalancers));
|
|
801382
801997
|
if (rebalancersToRemove.length === 0) {
|
|
801383
801998
|
return [];
|
|
801384
801999
|
}
|
|
@@ -801393,15 +802008,15 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801393
802008
|
* Create transactions to enroll CrossCollateralRouter routers.
|
|
801394
802009
|
*/
|
|
801395
802010
|
createEnrollCrossCollateralRoutersTxs(actualConfig, expectedConfig) {
|
|
801396
|
-
if (!(0,
|
|
801397
|
-
!(0,
|
|
802011
|
+
if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCrossCollateralTokenConfig */ .v3)(expectedConfig) ||
|
|
802012
|
+
!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCrossCollateralTokenConfig */ .v3)(actualConfig)) {
|
|
801398
802013
|
return [];
|
|
801399
802014
|
}
|
|
801400
802015
|
if (!expectedConfig.crossCollateralRouters) {
|
|
801401
802016
|
return [];
|
|
801402
802017
|
}
|
|
801403
|
-
const actualEnrolled = (0,
|
|
801404
|
-
const expectedEnrolled = (0,
|
|
802018
|
+
const actualEnrolled = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.crossCollateralRouters ?? {});
|
|
802019
|
+
const expectedEnrolled = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.crossCollateralRouters);
|
|
801405
802020
|
const domainsToEnroll = [];
|
|
801406
802021
|
const routersToEnroll = [];
|
|
801407
802022
|
for (const [domain, expectedRouters] of Object.entries(expectedEnrolled)) {
|
|
@@ -801431,13 +802046,13 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801431
802046
|
* Create transactions to unenroll CrossCollateralRouter routers.
|
|
801432
802047
|
*/
|
|
801433
802048
|
createUnenrollCrossCollateralRoutersTxs(actualConfig, expectedConfig) {
|
|
801434
|
-
if (!(0,
|
|
801435
|
-
!(0,
|
|
802049
|
+
if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCrossCollateralTokenConfig */ .v3)(expectedConfig) ||
|
|
802050
|
+
!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCrossCollateralTokenConfig */ .v3)(actualConfig)) {
|
|
801436
802051
|
return [];
|
|
801437
802052
|
}
|
|
801438
802053
|
const expectedCrossCollateralRouters = expectedConfig.crossCollateralRouters ?? {};
|
|
801439
|
-
const actualEnrolled = (0,
|
|
801440
|
-
const expectedEnrolled = (0,
|
|
802054
|
+
const actualEnrolled = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.crossCollateralRouters ?? {});
|
|
802055
|
+
const expectedEnrolled = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedCrossCollateralRouters);
|
|
801441
802056
|
const domainsToUnenroll = [];
|
|
801442
802057
|
const routersToUnenroll = [];
|
|
801443
802058
|
for (const [domain, actualRouters] of Object.entries(actualEnrolled)) {
|
|
@@ -801471,8 +802086,8 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801471
802086
|
return lower;
|
|
801472
802087
|
}
|
|
801473
802088
|
async getAllowedBridgesApprovalTxs(actualConfig, expectedConfig) {
|
|
801474
|
-
if (!(0,
|
|
801475
|
-
!(0,
|
|
802089
|
+
if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(expectedConfig) ||
|
|
802090
|
+
!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(actualConfig)) {
|
|
801476
802091
|
return [];
|
|
801477
802092
|
}
|
|
801478
802093
|
if (!expectedConfig.allowedRebalancingBridges) {
|
|
@@ -801506,18 +802121,18 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801506
802121
|
})));
|
|
801507
802122
|
}
|
|
801508
802123
|
async createAddAllowedBridgesUpdateTxs(actualConfig, expectedConfig) {
|
|
801509
|
-
if (!(0,
|
|
801510
|
-
!(0,
|
|
802124
|
+
if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(expectedConfig) ||
|
|
802125
|
+
!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(actualConfig)) {
|
|
801511
802126
|
return [];
|
|
801512
802127
|
}
|
|
801513
802128
|
if (!expectedConfig.allowedRebalancingBridges) {
|
|
801514
802129
|
return [];
|
|
801515
802130
|
}
|
|
801516
|
-
const actualAllowedBridges = getAllowedRebalancingBridgesByDomain((0,
|
|
801517
|
-
const expectedAllowedBridges = getAllowedRebalancingBridgesByDomain((0,
|
|
802131
|
+
const actualAllowedBridges = getAllowedRebalancingBridgesByDomain((0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.allowedRebalancingBridges ?? {}));
|
|
802132
|
+
const expectedAllowedBridges = getAllowedRebalancingBridgesByDomain((0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.allowedRebalancingBridges));
|
|
801518
802133
|
const rebalancingBridgesToAddByDomain = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .objMap */ .Yp)(expectedAllowedBridges, (domain, bridges) => {
|
|
801519
802134
|
const actualBridges = actualAllowedBridges[domain] ?? new Set();
|
|
801520
|
-
return Array.from((0,
|
|
802135
|
+
return Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_16__/* .difference */ .iv)(bridges, actualBridges));
|
|
801521
802136
|
});
|
|
801522
802137
|
const bridgesToAllow = Object.entries(rebalancingBridgesToAddByDomain).flatMap(([domain, allowedBridgesToAdd]) => {
|
|
801523
802138
|
return allowedBridgesToAdd.map((bridgeToAdd) => {
|
|
@@ -801533,18 +802148,18 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801533
802148
|
return [...bridgesToAllow, ...approvalTxs];
|
|
801534
802149
|
}
|
|
801535
802150
|
createRemoveBridgesTxs(actualConfig, expectedConfig) {
|
|
801536
|
-
if (!(0,
|
|
801537
|
-
!(0,
|
|
802151
|
+
if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(expectedConfig) ||
|
|
802152
|
+
!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(actualConfig)) {
|
|
801538
802153
|
return [];
|
|
801539
802154
|
}
|
|
801540
802155
|
if (!expectedConfig.allowedRebalancingBridges) {
|
|
801541
802156
|
return [];
|
|
801542
802157
|
}
|
|
801543
|
-
const actualAllowedBridges = getAllowedRebalancingBridgesByDomain((0,
|
|
801544
|
-
const expectedAllowedBridges = getAllowedRebalancingBridgesByDomain((0,
|
|
802158
|
+
const actualAllowedBridges = getAllowedRebalancingBridgesByDomain((0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.allowedRebalancingBridges ?? {}));
|
|
802159
|
+
const expectedAllowedBridges = getAllowedRebalancingBridgesByDomain((0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.allowedRebalancingBridges));
|
|
801545
802160
|
const rebalancingBridgesToAddByDomain = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .objMap */ .Yp)(actualAllowedBridges, (domain, bridges) => {
|
|
801546
802161
|
const expectedBridges = expectedAllowedBridges[domain] ?? new Set();
|
|
801547
|
-
return Array.from((0,
|
|
802162
|
+
return Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_16__/* .difference */ .iv)(bridges, expectedBridges));
|
|
801548
802163
|
});
|
|
801549
802164
|
return Object.entries(rebalancingBridgesToAddByDomain).flatMap(([domain, allowedBridgesToAdd]) => {
|
|
801550
802165
|
return allowedBridgesToAdd.map((bridgeToAdd) => {
|
|
@@ -801558,12 +802173,12 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801558
802173
|
});
|
|
801559
802174
|
}
|
|
801560
802175
|
createAddRemoteOutputAssetsTxs(actualConfig, expectedConfig) {
|
|
801561
|
-
if (!(0,
|
|
801562
|
-
!(0,
|
|
802176
|
+
if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(expectedConfig) ||
|
|
802177
|
+
!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(actualConfig)) {
|
|
801563
802178
|
return [];
|
|
801564
802179
|
}
|
|
801565
|
-
const actualOutputAssets = (0,
|
|
801566
|
-
const expectedOutputAssets = (0,
|
|
802180
|
+
const actualOutputAssets = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.outputAssets);
|
|
802181
|
+
const expectedOutputAssets = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.outputAssets);
|
|
801567
802182
|
const outputAssetsToAdd = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .objDiff */ .bJ)(expectedOutputAssets, actualOutputAssets, (address, address2) => (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .addressToBytes32 */ .In)(address) === (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .addressToBytes32 */ .In)(address2));
|
|
801568
802183
|
if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .isObjEmpty */ .XY)(outputAssetsToAdd)) {
|
|
801569
802184
|
return [];
|
|
@@ -801582,13 +802197,13 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801582
802197
|
];
|
|
801583
802198
|
}
|
|
801584
802199
|
createRemoveRemoteOutputAssetsTxs(actualConfig, expectedConfig) {
|
|
801585
|
-
if (!(0,
|
|
801586
|
-
!(0,
|
|
802200
|
+
if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(expectedConfig) ||
|
|
802201
|
+
!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(actualConfig)) {
|
|
801587
802202
|
return [];
|
|
801588
802203
|
}
|
|
801589
|
-
const actualOutputAssets = (0,
|
|
801590
|
-
const expectedOutputAssets = (0,
|
|
801591
|
-
const outputAssetsToRemove = Array.from((0,
|
|
802204
|
+
const actualOutputAssets = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.outputAssets);
|
|
802205
|
+
const expectedOutputAssets = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.outputAssets);
|
|
802206
|
+
const outputAssetsToRemove = Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_16__/* .difference */ .iv)(new Set((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .objKeys */ .cG)(actualOutputAssets)), new Set((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .objKeys */ .cG)(expectedOutputAssets))));
|
|
801592
802207
|
if (outputAssetsToRemove.length === 0) {
|
|
801593
802208
|
return [];
|
|
801594
802209
|
}
|
|
@@ -801606,17 +802221,17 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801606
802221
|
];
|
|
801607
802222
|
}
|
|
801608
802223
|
createUpdateEverclearFeeParamsTxs(actualConfig, expectedConfig) {
|
|
801609
|
-
if (!(0,
|
|
801610
|
-
!(0,
|
|
802224
|
+
if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(expectedConfig) ||
|
|
802225
|
+
!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(actualConfig)) {
|
|
801611
802226
|
return [];
|
|
801612
802227
|
}
|
|
801613
802228
|
if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .deepEquals */ .c2)(expectedConfig.everclearFeeParams, actualConfig.everclearFeeParams)) {
|
|
801614
802229
|
return [];
|
|
801615
802230
|
}
|
|
801616
|
-
const resolvedEverclearExpectedFeeConfig = (0,
|
|
801617
|
-
const resolvedActualEverclearFeeConfig = (0,
|
|
802231
|
+
const resolvedEverclearExpectedFeeConfig = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.everclearFeeParams);
|
|
802232
|
+
const resolvedActualEverclearFeeConfig = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.everclearFeeParams);
|
|
801618
802233
|
const feesToSet = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .objFilter */ .s3)(resolvedEverclearExpectedFeeConfig, (domainId, currentDomainConfig) => {
|
|
801619
|
-
return ((0,
|
|
802234
|
+
return ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__/* .isNullish */ .u)(resolvedActualEverclearFeeConfig[Number(domainId)]) ||
|
|
801620
802235
|
!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .deepEquals */ .c2)(currentDomainConfig, resolvedActualEverclearFeeConfig[Number(domainId)]));
|
|
801621
802236
|
});
|
|
801622
802237
|
return Object.entries(feesToSet).map(([domainId, feeConfig]) => {
|
|
@@ -801632,13 +802247,13 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801632
802247
|
});
|
|
801633
802248
|
}
|
|
801634
802249
|
createRemoveEverclearFeeParamsTxs(actualConfig, expectedConfig) {
|
|
801635
|
-
if (!(0,
|
|
801636
|
-
!(0,
|
|
802250
|
+
if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(expectedConfig) ||
|
|
802251
|
+
!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(actualConfig)) {
|
|
801637
802252
|
return [];
|
|
801638
802253
|
}
|
|
801639
|
-
const resolvedEverclearExpectedFeeConfig = (0,
|
|
801640
|
-
const resolvedActualEverclearFeeConfig = (0,
|
|
801641
|
-
const outputAssetsToRemove = Array.from((0,
|
|
802254
|
+
const resolvedEverclearExpectedFeeConfig = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.everclearFeeParams);
|
|
802255
|
+
const resolvedActualEverclearFeeConfig = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.everclearFeeParams);
|
|
802256
|
+
const outputAssetsToRemove = Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_16__/* .difference */ .iv)(new Set((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .objKeys */ .cG)(resolvedActualEverclearFeeConfig)), new Set((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .objKeys */ .cG)(resolvedEverclearExpectedFeeConfig))));
|
|
801642
802257
|
if (outputAssetsToRemove.length === 0) {
|
|
801643
802258
|
return [];
|
|
801644
802259
|
}
|
|
@@ -801662,24 +802277,24 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801662
802277
|
*/
|
|
801663
802278
|
createSetDestinationGasUpdateTxs(actualConfig, expectedConfig) {
|
|
801664
802279
|
// OFT contracts don't have GasRouter interface — no destination gas config
|
|
801665
|
-
if ((0,
|
|
802280
|
+
if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isOftTokenConfig */ .vo)(expectedConfig)) {
|
|
801666
802281
|
return [];
|
|
801667
802282
|
}
|
|
801668
802283
|
const updateTransactions = [];
|
|
801669
802284
|
if (!expectedConfig.destinationGas) {
|
|
801670
802285
|
return [];
|
|
801671
802286
|
}
|
|
801672
|
-
(0,
|
|
801673
|
-
(0,
|
|
802287
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)(actualConfig.destinationGas, 'actualDestinationGas is undefined');
|
|
802288
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)(expectedConfig.destinationGas, 'expectedDestinationGas is undefined');
|
|
801674
802289
|
// Only set gas for domains that will have routers enrolled after the update.
|
|
801675
802290
|
// For CrossCollateralRouter configs, also include domains from crossCollateralRouters.
|
|
801676
|
-
const resolvedExpectedRemoteRouters = (0,
|
|
802291
|
+
const resolvedExpectedRemoteRouters = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.remoteRouters ?? {});
|
|
801677
802292
|
const expectedRouterDomains = new Set(Object.keys(resolvedExpectedRemoteRouters).map(Number));
|
|
801678
802293
|
// Include MC-enrolled router domains
|
|
801679
|
-
if ((0,
|
|
802294
|
+
if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCrossCollateralTokenConfig */ .v3)(expectedConfig) &&
|
|
801680
802295
|
expectedConfig.crossCollateralRouters) {
|
|
801681
802296
|
const localDomain = this.multiProvider.getDomainId(this.chainName);
|
|
801682
|
-
const resolvedEnrolled = (0,
|
|
802297
|
+
const resolvedEnrolled = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.crossCollateralRouters);
|
|
801683
802298
|
for (const domain of Object.keys(resolvedEnrolled).map(Number)) {
|
|
801684
802299
|
if (domain === localDomain)
|
|
801685
802300
|
continue;
|
|
@@ -801691,8 +802306,8 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801691
802306
|
throw new Error(`destinationGas is set but remoteRouters and crossCollateralRouters are empty. ` +
|
|
801692
802307
|
`Cannot configure gas for domains without corresponding router enrollments.`);
|
|
801693
802308
|
}
|
|
801694
|
-
const actualDestinationGas = (0,
|
|
801695
|
-
const expectedDestinationGas = (0,
|
|
802309
|
+
const actualDestinationGas = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.destinationGas);
|
|
802310
|
+
const expectedDestinationGas = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.destinationGas);
|
|
801696
802311
|
// Filter to only domains that will have routers enrolled
|
|
801697
802312
|
const filteredExpectedGas = Object.fromEntries(Object.entries(expectedDestinationGas).filter(([domain]) => expectedRouterDomains.has(Number(domain))));
|
|
801698
802313
|
// Filter actual gas to the same domains for comparison
|
|
@@ -801728,7 +802343,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801728
802343
|
if (!expectedConfig.interchainSecurityModule) {
|
|
801729
802344
|
return [];
|
|
801730
802345
|
}
|
|
801731
|
-
const actualDeployedIsm = (0,
|
|
802346
|
+
const actualDeployedIsm = (0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .derivedIsmAddress */ .Zr)(actualConfig);
|
|
801732
802347
|
// Try to update (may also deploy) Ism with the expected config
|
|
801733
802348
|
const { deployedIsm: expectedDeployedIsm, updateTransactions: ismUpdateTransactions, } = await this.deployOrUpdateIsm(actualConfig, expectedConfig);
|
|
801734
802349
|
// If an ISM is updated in-place, push the update txs
|
|
@@ -801776,7 +802391,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801776
802391
|
(typeof expectedConfig.hook !== 'string' ||
|
|
801777
802392
|
!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .isZeroishAddress */ .Hi)(expectedConfig.hook))) {
|
|
801778
802393
|
const proxyAdminAddress = expectedConfig.proxyAdmin?.address ?? actualConfig.proxyAdmin?.address;
|
|
801779
|
-
(0,
|
|
802394
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)(proxyAdminAddress, 'ProxyAdmin address is undefined');
|
|
801780
802395
|
// The reader leaves the PREDICATE sub-hook inside actualConfig.hook
|
|
801781
802396
|
// (e.g. Agg([Predicate, IGP])). When expectedConfig is derived from
|
|
801782
802397
|
// actualConfig (e.g. during the enrollment step after initial deploy, OR
|
|
@@ -801787,23 +802402,24 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801787
802402
|
// The needsPredicateRemoval block below then fires to clear the hook to zero.
|
|
801788
802403
|
const shouldStripHookForComparison = !!expectedConfig.predicateWrapper || needsPredicateRemoval;
|
|
801789
802404
|
const actualHookForComparison = shouldStripHookForComparison
|
|
801790
|
-
? (0,
|
|
802405
|
+
? (0,_hook_utils_js__WEBPACK_IMPORTED_MODULE_19__/* .stripPredicateSubHook */ .Bl)(actualHook)
|
|
801791
802406
|
: actualHook;
|
|
801792
802407
|
const expectedHookForComparison = shouldStripHookForComparison && expectedConfig.hook
|
|
801793
|
-
? (0,
|
|
802408
|
+
? (0,_hook_utils_js__WEBPACK_IMPORTED_MODULE_19__/* .stripPredicateSubHook */ .Bl)(expectedConfig.hook)
|
|
801794
802409
|
: expectedConfig.hook;
|
|
801795
|
-
const result = await (0,
|
|
802410
|
+
const result = await (0,_hook_updates_js__WEBPACK_IMPORTED_MODULE_20__/* .getEvmHookUpdateTransactions */ .m)(this.args.addresses.deployedTokenRoute, {
|
|
801796
802411
|
actualConfig: actualHookForComparison,
|
|
801797
802412
|
expectedConfig: expectedHookForComparison,
|
|
801798
802413
|
ccipContractCache: this.ccipContractCache,
|
|
801799
802414
|
contractVerifier: this.contractVerifier,
|
|
801800
802415
|
evmChainName: this.chainName,
|
|
801801
|
-
hookAndIsmFactories: (0,
|
|
802416
|
+
hookAndIsmFactories: (0,_utils_ism_js__WEBPACK_IMPORTED_MODULE_11__/* .extractIsmAndHookFactoryAddresses */ .zs)(this.args.addresses),
|
|
801802
802417
|
setHookFunctionCallEncoder: (addr) => _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_1__/* .MailboxClient__factory */ .mG7.createInterface().encodeFunctionData('setHook', [addr]),
|
|
801803
802418
|
logger: this.logger,
|
|
801804
802419
|
mailbox: actualConfig.mailbox,
|
|
801805
802420
|
multiProvider: this.multiProvider,
|
|
801806
802421
|
proxyAdminAddress,
|
|
802422
|
+
rateLimitedSender: this.args.addresses.deployedTokenRoute,
|
|
801807
802423
|
});
|
|
801808
802424
|
hookTransactions = result.transactions;
|
|
801809
802425
|
newHookAddress = result.newHookAddress;
|
|
@@ -801820,7 +802436,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801820
802436
|
annotation: 'Remove predicate wrapper: clear custom hook (router will use mailbox default)',
|
|
801821
802437
|
chainId: this.chainId,
|
|
801822
802438
|
to: this.args.addresses.deployedTokenRoute,
|
|
801823
|
-
data: _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_1__/* .MailboxClient__factory */ .mG7.createInterface().encodeFunctionData('setHook', [
|
|
802439
|
+
data: _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_1__/* .MailboxClient__factory */ .mG7.createInterface().encodeFunctionData('setHook', [ethers__WEBPACK_IMPORTED_MODULE_21__.constants.AddressZero]),
|
|
801824
802440
|
});
|
|
801825
802441
|
}
|
|
801826
802442
|
}
|
|
@@ -801849,7 +802465,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801849
802465
|
* EvmTokenAdapter.findPredicateWrapperInHook and EvmWarpRouteReader.findPredicateAddressInHook).
|
|
801850
802466
|
*/
|
|
801851
802467
|
async findDeployedPredicateWrapper(actualConfig, expectedPredicateConfig) {
|
|
801852
|
-
const hookAddress = (0,
|
|
802468
|
+
const hookAddress = (0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .derivedHookAddress */ .Lm)(actualConfig);
|
|
801853
802469
|
if (!hookAddress || (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .isZeroishAddress */ .Hi)(hookAddress))
|
|
801854
802470
|
return undefined;
|
|
801855
802471
|
try {
|
|
@@ -801904,7 +802520,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801904
802520
|
predicateWrapper.owner(),
|
|
801905
802521
|
]);
|
|
801906
802522
|
if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .eqAddress */ .fv)(warpRoute, this.args.addresses.deployedTokenRoute) &&
|
|
801907
|
-
hookType ===
|
|
802523
|
+
hookType === _hook_types_js__WEBPACK_IMPORTED_MODULE_22__/* .OnchainHookType */ .c0.PREDICATE_ROUTER_WRAPPER &&
|
|
801908
802524
|
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .eqAddress */ .fv)(onchainRegistry, expectedPredicateConfig.predicateRegistry) &&
|
|
801909
802525
|
onchainPolicyId === expectedPredicateConfig.policyId) {
|
|
801910
802526
|
return { address: hookAddr, onchainOwner };
|
|
@@ -801946,7 +802562,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801946
802562
|
!expectedConfig.predicateWrapper) {
|
|
801947
802563
|
return { transactions: [], deploysNewWrapper: false };
|
|
801948
802564
|
}
|
|
801949
|
-
const predicateWrapperConfig =
|
|
802565
|
+
const predicateWrapperConfig = _types_js__WEBPACK_IMPORTED_MODULE_12__/* .PredicateWrapperConfigSchema */ .Ky.parse(expectedConfig.predicateWrapper);
|
|
801950
802566
|
// Check if a wrapper matching by registry+policyId already exists on-chain.
|
|
801951
802567
|
// If so, only a transferOwnership tx is needed (not a full redeploy).
|
|
801952
802568
|
const existingWrapper = await this.findDeployedPredicateWrapper(actualConfig, predicateWrapperConfig);
|
|
@@ -801975,7 +802591,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
801975
802591
|
}
|
|
801976
802592
|
const signer = this.multiProvider.getSigner(this.chainName);
|
|
801977
802593
|
const factory = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_1__/* .StaticAggregationHookFactory__factory */ .KZH.connect(staticAggregationHookFactory, signer);
|
|
801978
|
-
const predicateDeployer = new
|
|
802594
|
+
const predicateDeployer = new _predicate_PredicateDeployer_js__WEBPACK_IMPORTED_MODULE_23__/* .PredicateWrapperDeployer */ .t(this.multiProvider, factory, this.logger);
|
|
801979
802595
|
// Deploy predicate wrapper and get addresses.
|
|
801980
802596
|
// Pass token type to deploy the appropriate wrapper.
|
|
801981
802597
|
// Pass pendingHookAddress (if any) so deployAndConfigure uses the post-update hook
|
|
@@ -802010,16 +802626,16 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
802010
802626
|
return [];
|
|
802011
802627
|
}
|
|
802012
802628
|
const routerAddress = this.args.addresses.deployedTokenRoute;
|
|
802013
|
-
const resolvedTokenFee = (0,
|
|
802629
|
+
const resolvedTokenFee = (0,_configUtils_js__WEBPACK_IMPORTED_MODULE_24__/* .resolveTokenFeeAddress */ .i0)(expectedConfig.tokenFee, routerAddress, expectedConfig);
|
|
802014
802630
|
const currentTokenFee = actualConfig.tokenFee;
|
|
802015
802631
|
if (!currentTokenFee) {
|
|
802016
802632
|
this.logger.info('No existing token fee found, creating new one');
|
|
802017
|
-
const expandedExpectedConfig = await
|
|
802633
|
+
const expandedExpectedConfig = await _fee_EvmTokenFeeModule_js__WEBPACK_IMPORTED_MODULE_25__/* .EvmTokenFeeModule */ .e.expandConfig({
|
|
802018
802634
|
config: resolvedTokenFee,
|
|
802019
802635
|
multiProvider: this.multiProvider,
|
|
802020
802636
|
chainName: this.chainName,
|
|
802021
802637
|
});
|
|
802022
|
-
const tokenFeeModule = await
|
|
802638
|
+
const tokenFeeModule = await _fee_EvmTokenFeeModule_js__WEBPACK_IMPORTED_MODULE_25__/* .EvmTokenFeeModule */ .e.create({
|
|
802023
802639
|
multiProvider: this.multiProvider,
|
|
802024
802640
|
chain: this.chainName,
|
|
802025
802641
|
config: expandedExpectedConfig,
|
|
@@ -802032,7 +802648,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
802032
802648
|
.feeRecipient()
|
|
802033
802649
|
.catch((error) => {
|
|
802034
802650
|
this.logger.warn(`Failed to read feeRecipient, defaulting to generate setFeeRecipient tx`, error);
|
|
802035
|
-
return
|
|
802651
|
+
return ethers__WEBPACK_IMPORTED_MODULE_21__.constants.AddressZero;
|
|
802036
802652
|
});
|
|
802037
802653
|
if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .eqAddress */ .fv)(currentFeeRecipient, deployedFee)) {
|
|
802038
802654
|
return [];
|
|
@@ -802047,7 +802663,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
802047
802663
|
];
|
|
802048
802664
|
}
|
|
802049
802665
|
this.logger.info('Updating existing token fee configuration');
|
|
802050
|
-
const tokenFeeModule = new
|
|
802666
|
+
const tokenFeeModule = new _fee_EvmTokenFeeModule_js__WEBPACK_IMPORTED_MODULE_25__/* .EvmTokenFeeModule */ .e(this.multiProvider, {
|
|
802051
802667
|
chain: this.chainName,
|
|
802052
802668
|
config: currentTokenFee,
|
|
802053
802669
|
addresses: {
|
|
@@ -802075,7 +802691,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
802075
802691
|
* @returns Ethereum transaction that need to be executed to update the owner.
|
|
802076
802692
|
*/
|
|
802077
802693
|
createOwnershipUpdateTxs(actualConfig, expectedConfig) {
|
|
802078
|
-
return (0,
|
|
802694
|
+
return (0,_contracts_contracts_js__WEBPACK_IMPORTED_MODULE_26__/* .transferOwnershipTransactions */ .Yg)(this.multiProvider.getEvmChainId(this.args.chain), this.args.addresses.deployedTokenRoute, actualConfig, expectedConfig, `${expectedConfig.type} Warp Route`);
|
|
802079
802695
|
}
|
|
802080
802696
|
/**
|
|
802081
802697
|
* Updates or deploys the ISM using the provided configuration.
|
|
@@ -802083,7 +802699,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
802083
802699
|
* @returns Object with deployedIsm address, and update Transactions
|
|
802084
802700
|
*/
|
|
802085
802701
|
async deployOrUpdateIsm(actualConfig, expectedConfig) {
|
|
802086
|
-
(0,
|
|
802702
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)(expectedConfig.interchainSecurityModule, 'Ism derived incorrectly');
|
|
802087
802703
|
if (typeof expectedConfig.interchainSecurityModule === 'string' &&
|
|
802088
802704
|
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .isZeroishAddress */ .Hi)(expectedConfig.interchainSecurityModule)) {
|
|
802089
802705
|
return {
|
|
@@ -802091,17 +802707,37 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
802091
802707
|
updateTransactions: [],
|
|
802092
802708
|
};
|
|
802093
802709
|
}
|
|
802094
|
-
|
|
802710
|
+
// Always override recipient for any RateLimitedIsm node — it must be the
|
|
802711
|
+
// token address. Any user-supplied value is silently wrong (it would wire
|
|
802712
|
+
// the ISM to the wrong chain), so we always set it from the deployed token
|
|
802713
|
+
// route. Handles both top-level and nested (e.g. inside aggregation) nodes.
|
|
802714
|
+
// Thread the owner through so that an omitted ism.owner in expectedConfig
|
|
802715
|
+
// doesn't look like an owner diff to EvmIsmModule.update (which would redeploy
|
|
802716
|
+
// the ISM and reset the rate-limit bucket).
|
|
802717
|
+
// Primary default: the warp-route owner (matches deploy path in token/deploy.ts).
|
|
802718
|
+
// Fallback: the current on-chain ISM owner (same-type, same-owner in-place update).
|
|
802719
|
+
let expectedIsm = expectedConfig.interchainSecurityModule;
|
|
802720
|
+
if (typeof expectedIsm === 'object' &&
|
|
802721
|
+
(0,_utils_ism_js__WEBPACK_IMPORTED_MODULE_11__/* .ismTreeContainsRateLimited */ .Bh)(expectedIsm)) {
|
|
802722
|
+
const actualIsm = actualConfig.interchainSecurityModule;
|
|
802723
|
+
const onChainOwner = typeof actualIsm === 'object' && 'owner' in actualIsm
|
|
802724
|
+
? actualIsm.owner
|
|
802725
|
+
: undefined;
|
|
802726
|
+
const defaultOwner = expectedConfig.owner ??
|
|
802727
|
+
(typeof onChainOwner === 'string' ? onChainOwner : undefined);
|
|
802728
|
+
expectedIsm = (0,_utils_ism_js__WEBPACK_IMPORTED_MODULE_11__/* .setRateLimitedIsmRecipient */ .re)(expectedIsm, this.args.addresses.deployedTokenRoute, defaultOwner);
|
|
802729
|
+
}
|
|
802730
|
+
const ismModule = new _ism_EvmIsmModule_js__WEBPACK_IMPORTED_MODULE_27__/* .EvmIsmModule */ .a(this.multiProvider, {
|
|
802095
802731
|
chain: this.args.chain,
|
|
802096
802732
|
config: actualConfig.interchainSecurityModule,
|
|
802097
802733
|
addresses: {
|
|
802098
802734
|
...this.args.addresses,
|
|
802099
802735
|
mailbox: actualConfig.mailbox,
|
|
802100
|
-
deployedIsm: (0,
|
|
802736
|
+
deployedIsm: (0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .derivedIsmAddress */ .Zr)(actualConfig),
|
|
802101
802737
|
},
|
|
802102
802738
|
}, this.ccipContractCache, this.contractVerifier);
|
|
802103
802739
|
this.logger.info(`Comparing target ISM config with ${this.args.chain} chain`);
|
|
802104
|
-
const updateTransactions = await ismModule.update(
|
|
802740
|
+
const updateTransactions = await ismModule.update(expectedIsm);
|
|
802105
802741
|
const { deployedIsm } = ismModule.serialize();
|
|
802106
802742
|
return { deployedIsm, updateTransactions };
|
|
802107
802743
|
}
|
|
@@ -802114,15 +802750,15 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
802114
802750
|
*/
|
|
802115
802751
|
async upgradeWarpRouteImplementationTx(actualConfig, expectedConfig) {
|
|
802116
802752
|
const updateTransactions = [];
|
|
802117
|
-
(0,
|
|
802753
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)(expectedConfig.type !== _config_js__WEBPACK_IMPORTED_MODULE_28__/* .TokenType */ .ks.unknown, 'Cannot upgrade warp route with unknown token type');
|
|
802118
802754
|
// This should be impossible since we try catch the call to `PACKAGE_VERSION`
|
|
802119
802755
|
// in `EvmWarpRouteReader.fetchPackageVersion`
|
|
802120
|
-
(0,
|
|
802756
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)(actualConfig.contractVersion, 'Actual contract version is undefined');
|
|
802121
802757
|
// Only upgrade if the user specifies a version
|
|
802122
802758
|
if (!expectedConfig.contractVersion) {
|
|
802123
802759
|
return [];
|
|
802124
802760
|
}
|
|
802125
|
-
const comparisonValue = (0,
|
|
802761
|
+
const comparisonValue = (0,compare_versions__WEBPACK_IMPORTED_MODULE_29__.compareVersions)(expectedConfig.contractVersion, actualConfig.contractVersion);
|
|
802126
802762
|
// Expected version is lower than actual version, no upgrade is possible
|
|
802127
802763
|
if (comparisonValue === -1) {
|
|
802128
802764
|
throw new Error(`Expected contract version ${expectedConfig.contractVersion} is lower than actual contract version ${actualConfig.contractVersion}`);
|
|
@@ -802133,21 +802769,21 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
802133
802769
|
}
|
|
802134
802770
|
// You can only upgrade to the contract version (see `PackageVersioned`)
|
|
802135
802771
|
// defined by the @hyperlane-xyz/core package
|
|
802136
|
-
(0,
|
|
802772
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .contractVersionMatchesDependency */ .Vx)(expectedConfig.contractVersion), _types_js__WEBPACK_IMPORTED_MODULE_12__/* .VERSION_ERROR_MESSAGE */ .eh);
|
|
802137
802773
|
// Scale values are immutables baked into the implementation bytecode.
|
|
802138
802774
|
// Changing the effective scale during an upgrade would cause in-flight
|
|
802139
802775
|
// messages to be decoded with incorrect scaling.
|
|
802140
|
-
(0,
|
|
802776
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)((0,_utils_decimals_js__WEBPACK_IMPORTED_MODULE_30__/* .scalesEqual */ .gm)(actualConfig.scale, expectedConfig.scale), `Scale change detected during upgrade. ` +
|
|
802141
802777
|
`Changing scale on an existing deployment may cause in-flight messages to be decoded incorrectly.`);
|
|
802142
802778
|
this.logger.info(`Upgrading Warp Route implementation on ${this.args.chain} from ${actualConfig.contractVersion} to ${expectedConfig.contractVersion}`);
|
|
802143
|
-
const deployer = new
|
|
802779
|
+
const deployer = new _deploy_js__WEBPACK_IMPORTED_MODULE_31__/* .HypERC20Deployer */ .A7(this.multiProvider);
|
|
802144
802780
|
const constructorArgs = await deployer.constructorArgs(this.chainName, expectedConfig);
|
|
802145
802781
|
const tokenType = expectedConfig.type;
|
|
802146
|
-
const implementation = await deployer.deployContractWithName(this.chainName, tokenType,
|
|
802782
|
+
const implementation = await deployer.deployContractWithName(this.chainName, tokenType, _contracts_js__WEBPACK_IMPORTED_MODULE_32__/* .hypERC20contracts */ .LW[tokenType], constructorArgs, undefined, false);
|
|
802147
802783
|
const provider = this.multiProvider.getProvider(this.domainId);
|
|
802148
802784
|
const proxyAddress = this.args.addresses.deployedTokenRoute;
|
|
802149
|
-
const proxyAdminAddress = await (0,
|
|
802150
|
-
(0,
|
|
802785
|
+
const proxyAdminAddress = await (0,_deploy_proxy_js__WEBPACK_IMPORTED_MODULE_14__/* .proxyAdmin */ .Ey)(provider, proxyAddress);
|
|
802786
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)(await (0,_deploy_proxy_js__WEBPACK_IMPORTED_MODULE_14__/* .isInitialized */ .Dp)(provider, proxyAddress), 'Proxy is not initialized');
|
|
802151
802787
|
updateTransactions.push({
|
|
802152
802788
|
chainId: this.chainId,
|
|
802153
802789
|
annotation: `Upgrading Warp Route implementation on ${this.args.chain}`,
|
|
@@ -802157,12 +802793,12 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
802157
802793
|
return updateTransactions;
|
|
802158
802794
|
}
|
|
802159
802795
|
createSetMaxFeePpmTxs(actualConfig, expectedConfig) {
|
|
802160
|
-
if (!(0,
|
|
802796
|
+
if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCctpTokenConfig */ .aX)(expectedConfig) ||
|
|
802161
802797
|
expectedConfig.cctpVersion !== 'V2' ||
|
|
802162
802798
|
expectedConfig.maxFeeBps === undefined) {
|
|
802163
802799
|
return [];
|
|
802164
802800
|
}
|
|
802165
|
-
const actualMaxFeeBps = (0,
|
|
802801
|
+
const actualMaxFeeBps = (0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCctpTokenConfig */ .aX)(actualConfig)
|
|
802166
802802
|
? actualConfig.maxFeeBps
|
|
802167
802803
|
: undefined;
|
|
802168
802804
|
// When upgrading across the CCTP_PPM_STORAGE_VERSION boundary, the
|
|
@@ -802172,9 +802808,9 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
802172
802808
|
// proxy upgrade. Always emit setMaxFeePpm in this case.
|
|
802173
802809
|
const crossingPpmBoundary = actualConfig.contractVersion &&
|
|
802174
802810
|
expectedConfig.contractVersion &&
|
|
802175
|
-
(0,
|
|
802811
|
+
(0,compare_versions__WEBPACK_IMPORTED_MODULE_29__.compareVersions)(actualConfig.contractVersion, _EvmWarpRouteReader_js__WEBPACK_IMPORTED_MODULE_7__/* .CCTP_PPM_STORAGE_VERSION */ .EY) <
|
|
802176
802812
|
0 &&
|
|
802177
|
-
(0,
|
|
802813
|
+
(0,compare_versions__WEBPACK_IMPORTED_MODULE_29__.compareVersions)(expectedConfig.contractVersion, _EvmWarpRouteReader_js__WEBPACK_IMPORTED_MODULE_7__/* .CCTP_PPM_STORAGE_VERSION */ .EY) >= 0;
|
|
802178
802814
|
if (!crossingPpmBoundary && actualMaxFeeBps === expectedConfig.maxFeeBps) {
|
|
802179
802815
|
return [];
|
|
802180
802816
|
}
|
|
@@ -802199,7 +802835,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
802199
802835
|
static async create(params) {
|
|
802200
802836
|
const { chain, config, multiProvider, ccipContractCache, contractVerifier, proxyFactoryFactories, } = params;
|
|
802201
802837
|
const chainName = multiProvider.getChainName(chain);
|
|
802202
|
-
const deployer = new
|
|
802838
|
+
const deployer = new _deploy_js__WEBPACK_IMPORTED_MODULE_31__/* .HypERC20Deployer */ .A7(multiProvider);
|
|
802203
802839
|
const deployedContracts = await deployer.deployContracts(chainName, config);
|
|
802204
802840
|
const warpModule = new EvmWarpModule(multiProvider, {
|
|
802205
802841
|
addresses: {
|
|
@@ -802215,7 +802851,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
802215
802851
|
const onlyTxIndex = 0;
|
|
802216
802852
|
await multiProvider.sendTransaction(chain, enrollRemoteTxs[onlyTxIndex]);
|
|
802217
802853
|
}
|
|
802218
|
-
if ((0,
|
|
802854
|
+
if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(config) &&
|
|
802219
802855
|
config.allowedRebalancers &&
|
|
802220
802856
|
config.allowedRebalancers.length !== 0) {
|
|
802221
802857
|
const addRebalancerTxs = await warpModule.createAddRebalancersUpdateTxs(actualConfig, config); // @TODO Remove when EvmWarpModule.create can be used
|
|
@@ -802223,7 +802859,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
802223
802859
|
await multiProvider.sendTransaction(chain, tx);
|
|
802224
802860
|
}
|
|
802225
802861
|
}
|
|
802226
|
-
if ((0,
|
|
802862
|
+
if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(config) &&
|
|
802227
802863
|
config.allowedRebalancingBridges &&
|
|
802228
802864
|
!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .isObjEmpty */ .XY)(config.allowedRebalancingBridges)) {
|
|
802229
802865
|
const addBridgesTxs = await warpModule.createAddAllowedBridgesUpdateTxs(actualConfig, config); // @TODO Remove when EvmWarpModule.create can be used
|
|
@@ -802231,7 +802867,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
802231
802867
|
await multiProvider.sendTransaction(chain, tx);
|
|
802232
802868
|
}
|
|
802233
802869
|
}
|
|
802234
|
-
if ((0,
|
|
802870
|
+
if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(config)) {
|
|
802235
802871
|
const addRemoteOutputTokens = warpModule.createAddRemoteOutputAssetsTxs(actualConfig, config);
|
|
802236
802872
|
const updateEverclearFeeParamsTxs = warpModule.createUpdateEverclearFeeParamsTxs(actualConfig, config);
|
|
802237
802873
|
const everclearTxs = [
|
|
@@ -802242,7 +802878,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
|
|
|
802242
802878
|
await multiProvider.sendTransaction(chain, tx);
|
|
802243
802879
|
}
|
|
802244
802880
|
}
|
|
802245
|
-
if ((0,
|
|
802881
|
+
if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCrossCollateralTokenConfig */ .v3)(config) &&
|
|
802246
802882
|
config.crossCollateralRouters &&
|
|
802247
802883
|
Object.keys(config.crossCollateralRouters).length > 0) {
|
|
802248
802884
|
const enrollTxs = warpModule.createEnrollCrossCollateralRoutersTxs(actualConfig, config);
|
|
@@ -802689,8 +803325,30 @@ class EvmWarpRouteReader extends EvmRouterReader/* EvmRouterReader */.V {
|
|
|
802689
803325
|
// Provider errors are expected because deriving will call methods that may not exist in the Bytecode
|
|
802690
803326
|
this.setSmartProviderLogLevel('silent');
|
|
802691
803327
|
try {
|
|
803328
|
+
// Fetch implementation bytecode once; scanning selectors locally avoids
|
|
803329
|
+
// reverted eth_calls for methods that don't exist on the contract.
|
|
803330
|
+
// Read the EIP-1967 impl slot directly so UUPS proxies (which have
|
|
803331
|
+
// an empty admin slot) are resolved correctly alongside TransparentProxy.
|
|
803332
|
+
// Wrapped in try/catch so EOAs / bad addresses don't throw here — bytecode
|
|
803333
|
+
// will be '0x' and the selector guard falls through to probes as pre-PR.
|
|
803334
|
+
let implAddress = warpRouteAddress;
|
|
803335
|
+
try {
|
|
803336
|
+
const impl = await (0,proxy/* proxyImplementation */.Pl)(this.provider, warpRouteAddress);
|
|
803337
|
+
if (!(0,addresses/* isZeroishAddress */.Hi)(impl))
|
|
803338
|
+
implAddress = impl;
|
|
803339
|
+
}
|
|
803340
|
+
catch {
|
|
803341
|
+
// not a proxy or address has no code — use warpRouteAddress directly
|
|
803342
|
+
}
|
|
803343
|
+
const bytecode = await this.provider.getCode(implAddress);
|
|
802692
803344
|
// First, try checking token specific methods
|
|
802693
803345
|
for (const [tokenType, { factory, method }] of Object.entries(contractTypes)) {
|
|
803346
|
+
// Skip if selector absent from bytecode — avoids reverted eth_calls.
|
|
803347
|
+
// When bytecode is unavailable ('0x'), fall through to the probe anyway
|
|
803348
|
+
// to preserve pre-optimization behavior on zero-impl / flaky-RPC paths.
|
|
803349
|
+
const selector = factory.createInterface().getSighash(method);
|
|
803350
|
+
if (!(0,proxy/* isStorageEmpty */.h$)(bytecode) && !bytecode.includes((0,addresses/* strip0x */.LL)(selector)))
|
|
803351
|
+
continue;
|
|
802694
803352
|
try {
|
|
802695
803353
|
const warpRoute = factory.connect(warpRouteAddress, this.provider);
|
|
802696
803354
|
const result = await warpRoute[method]();
|
|
@@ -813595,6 +814253,15 @@ async function expandWarpDeployConfig(params) {
|
|
|
813595
814253
|
function normalizeWarpDeployConfigForCheck(params) {
|
|
813596
814254
|
const { multiProvider, warpDeployConfig } = params;
|
|
813597
814255
|
return (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .objMap */ .Yp)(warpDeployConfig, (_chain, config) => {
|
|
814256
|
+
if ((0,_types_js__WEBPACK_IMPORTED_MODULE_9__/* .isDepositAddressTokenConfig */ .oA)(config)) {
|
|
814257
|
+
return {
|
|
814258
|
+
...config,
|
|
814259
|
+
mailbox: ethers__WEBPACK_IMPORTED_MODULE_13__.constants.AddressZero,
|
|
814260
|
+
interchainSecurityModule: ethers__WEBPACK_IMPORTED_MODULE_13__.constants.AddressZero,
|
|
814261
|
+
remoteRouters: {},
|
|
814262
|
+
destinationGas: undefined,
|
|
814263
|
+
};
|
|
814264
|
+
}
|
|
813598
814265
|
if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_9__/* .isOftTokenConfig */ .vo)(config)) {
|
|
813599
814266
|
return config;
|
|
813600
814267
|
}
|
|
@@ -814015,6 +814682,8 @@ class GasRouterDeployer extends ProxiedRouterDeployer {
|
|
|
814015
814682
|
//# sourceMappingURL=GasRouterDeployer.js.map
|
|
814016
814683
|
// EXTERNAL MODULE: ../sdk/dist/utils/decimals.js
|
|
814017
814684
|
var decimals = __nccwpck_require__(27043);
|
|
814685
|
+
// EXTERNAL MODULE: ../sdk/dist/utils/ism.js
|
|
814686
|
+
var ism = __nccwpck_require__(764);
|
|
814018
814687
|
// EXTERNAL MODULE: ../sdk/dist/token/EvmWarpRouteReader.js + 1 modules
|
|
814019
814688
|
var EvmWarpRouteReader = __nccwpck_require__(40945);
|
|
814020
814689
|
// EXTERNAL MODULE: ../sdk/dist/token/config.js
|
|
@@ -814043,6 +814712,7 @@ var token_types = __nccwpck_require__(38466);
|
|
|
814043
814712
|
|
|
814044
814713
|
|
|
814045
814714
|
|
|
814715
|
+
|
|
814046
814716
|
// initialize(address _hook, address _owner)
|
|
814047
814717
|
const OP_L2_INITIALIZE_SIGNATURE = 'initialize(address,address)';
|
|
814048
814718
|
// initialize(address _owner, string[] memory _urls)
|
|
@@ -814479,7 +815149,32 @@ class TokenDeployer extends GasRouterDeployer {
|
|
|
814479
815149
|
}
|
|
814480
815150
|
}));
|
|
814481
815151
|
}
|
|
814482
|
-
|
|
815152
|
+
// Wire rate-limited ISMs BEFORE ownership transfer so that
|
|
815153
|
+
// setInterchainSecurityModule succeeds regardless of config.owner.
|
|
815154
|
+
// Handles both top-level RateLimitedIsm and ISMs nested inside composites
|
|
815155
|
+
// (aggregation, routing, etc.) by setting `recipient` on every RATE_LIMITED
|
|
815156
|
+
// node in the tree before deploying.
|
|
815157
|
+
async setRateLimitedIsms(rateLimitedIsms, configMap, deployedContractsMap) {
|
|
815158
|
+
const ismFactory = this.options.ismFactory;
|
|
815159
|
+
(0,validation/* assert */.v)(ismFactory, 'ismFactory is required to deploy RateLimitedIsm — pass it to the deployer constructor');
|
|
815160
|
+
await (0,objects/* promiseObjAll */.a1)((0,objects/* objMap */.Yp)(rateLimitedIsms, async (chain, ismConfig) => {
|
|
815161
|
+
const router = this.router(deployedContractsMap[chain]);
|
|
815162
|
+
const mailbox = configMap[chain].mailbox;
|
|
815163
|
+
const defaultOwner = configMap[chain].owner;
|
|
815164
|
+
const resolvedIsm = (0,ism/* setRateLimitedIsmRecipient */.re)(ismConfig, router.address, defaultOwner);
|
|
815165
|
+
const deployedIsm = await ismFactory.deploy({
|
|
815166
|
+
destination: chain,
|
|
815167
|
+
config: resolvedIsm,
|
|
815168
|
+
mailbox,
|
|
815169
|
+
});
|
|
815170
|
+
const tokenContract = dist/* MailboxClient__factory */.mG7.connect(router.address, this.multiProvider.getProvider(chain));
|
|
815171
|
+
await this.multiProvider.sendTransaction(chain, {
|
|
815172
|
+
to: router.address,
|
|
815173
|
+
data: tokenContract.interface.encodeFunctionData('setInterchainSecurityModule', [deployedIsm.address]),
|
|
815174
|
+
});
|
|
815175
|
+
}));
|
|
815176
|
+
}
|
|
815177
|
+
async deploy(configMap, rateLimitedIsms) {
|
|
814483
815178
|
// Fail fast if any chain requires a predicate wrapper but lacks the factory.
|
|
814484
815179
|
// Checked before any on-chain work to avoid partial deployments.
|
|
814485
815180
|
for (const [chain, config] of Object.entries(configMap)) {
|
|
@@ -814488,6 +815183,12 @@ class TokenDeployer extends GasRouterDeployer {
|
|
|
814488
815183
|
const factoryContracts = this.options.ismFactory?.getContracts(chain);
|
|
814489
815184
|
(0,validation/* assert */.v)(factoryContracts?.staticAggregationHookFactory, `staticAggregationHookFactory not found for ${chain}. Ensure proxy factories are deployed.`);
|
|
814490
815185
|
}
|
|
815186
|
+
// Fail fast if rateLimitedIsms are requested but ismFactory is missing.
|
|
815187
|
+
// setRateLimitedIsms runs after super.deploy(), so catching this early
|
|
815188
|
+
// prevents partial on-chain work before hitting the same assert there.
|
|
815189
|
+
if (rateLimitedIsms && Object.keys(rateLimitedIsms).length > 0) {
|
|
815190
|
+
(0,validation/* assert */.v)(this.options.ismFactory, 'ismFactory is required to deploy RateLimitedIsm — pass it to the deployer constructor');
|
|
815191
|
+
}
|
|
814491
815192
|
let tokenMetadataMap;
|
|
814492
815193
|
try {
|
|
814493
815194
|
tokenMetadataMap = await TokenDeployer.deriveTokenMetadata(this.multiProvider, configMap);
|
|
@@ -814560,6 +815261,13 @@ class TokenDeployer extends GasRouterDeployer {
|
|
|
814560
815261
|
await this.setEverclearOutputAssets(configMap, deployedContractsMap);
|
|
814561
815262
|
await this.deployPredicateWrappers(configMap, deployedContractsMap);
|
|
814562
815263
|
await this.enrollCrossCollateralRouters(configMap, deployedContractsMap);
|
|
815264
|
+
// RateLimitedIsms are wired after enrollment. A brief window exists where
|
|
815265
|
+
// the token's effective ISM is the mailbox defaultIsm, but it is inert on a
|
|
815266
|
+
// fresh deploy: no remote peers are enrolled yet, so no valid inbound message
|
|
815267
|
+
// can arrive and be handled by the token during that window.
|
|
815268
|
+
if (rateLimitedIsms && Object.keys(rateLimitedIsms).length > 0) {
|
|
815269
|
+
await this.setRateLimitedIsms(rateLimitedIsms, configMap, deployedContractsMap);
|
|
815270
|
+
}
|
|
814563
815271
|
await super.transferOwnership(deployedContractsMap, configMap);
|
|
814564
815272
|
return deployedContractsMap;
|
|
814565
815273
|
}
|
|
@@ -816647,11 +817355,15 @@ async function estimateCallGas(params) {
|
|
|
816647
817355
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
816648
817356
|
|
|
816649
817357
|
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
817358
|
+
/* harmony export */ Bh: () => (/* binding */ ismTreeContainsRateLimited),
|
|
816650
817359
|
/* harmony export */ I6: () => (/* binding */ normalizeConfig),
|
|
817360
|
+
/* harmony export */ re: () => (/* binding */ setRateLimitedIsmRecipient),
|
|
816651
817361
|
/* harmony export */ zs: () => (/* binding */ extractIsmAndHookFactoryAddresses)
|
|
816652
817362
|
/* harmony export */ });
|
|
816653
817363
|
/* unused harmony exports multisigIsmVerificationCost, sortArraysInConfig */
|
|
816654
|
-
/* harmony import */ var
|
|
817364
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(73938);
|
|
817365
|
+
/* harmony import */ var _ism_types_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(69352);
|
|
817366
|
+
|
|
816655
817367
|
|
|
816656
817368
|
|
|
816657
817369
|
/**
|
|
@@ -816659,8 +817371,70 @@ async function estimateCallGas(params) {
|
|
|
816659
817371
|
* @param registryAddresses The registry addresses for a specific chain
|
|
816660
817372
|
* @returns The extracted ISM and Hook factory addresses
|
|
816661
817373
|
*/
|
|
817374
|
+
function ismTreeContainsRateLimited(ism) {
|
|
817375
|
+
if (typeof ism !== 'object' || ism === null)
|
|
817376
|
+
return false;
|
|
817377
|
+
const node = ism;
|
|
817378
|
+
if (node.type === _ism_types_js__WEBPACK_IMPORTED_MODULE_0__/* .IsmType */ .GO.RATE_LIMITED)
|
|
817379
|
+
return true;
|
|
817380
|
+
if (Array.isArray(node.modules)) {
|
|
817381
|
+
if (node.modules.some(ismTreeContainsRateLimited))
|
|
817382
|
+
return true;
|
|
817383
|
+
}
|
|
817384
|
+
if (node.domains !== null && typeof node.domains === 'object') {
|
|
817385
|
+
if (Object.values(node.domains).some(ismTreeContainsRateLimited))
|
|
817386
|
+
return true;
|
|
817387
|
+
}
|
|
817388
|
+
if (ismTreeContainsRateLimited(node.lowerIsm))
|
|
817389
|
+
return true;
|
|
817390
|
+
if (ismTreeContainsRateLimited(node.upperIsm))
|
|
817391
|
+
return true;
|
|
817392
|
+
return false;
|
|
817393
|
+
}
|
|
817394
|
+
/**
|
|
817395
|
+
* Recursively sets `recipient` on all RATE_LIMITED ISM nodes in the config tree.
|
|
817396
|
+
* Pass `undefined` to strip the field.
|
|
817397
|
+
* `defaultOwner` is set on nodes that don't have an explicit owner.
|
|
817398
|
+
*/
|
|
817399
|
+
function setRateLimitedIsmRecipient(ismConfig, recipient, defaultOwner) {
|
|
817400
|
+
if (typeof ismConfig === 'string')
|
|
817401
|
+
return ismConfig;
|
|
817402
|
+
if (ismConfig.type === _ism_types_js__WEBPACK_IMPORTED_MODULE_0__/* .IsmType */ .GO.RATE_LIMITED) {
|
|
817403
|
+
return {
|
|
817404
|
+
...ismConfig,
|
|
817405
|
+
recipient,
|
|
817406
|
+
...(defaultOwner != null && ismConfig.owner == null
|
|
817407
|
+
? { owner: defaultOwner }
|
|
817408
|
+
: {}),
|
|
817409
|
+
};
|
|
817410
|
+
}
|
|
817411
|
+
if (ismConfig.type === _ism_types_js__WEBPACK_IMPORTED_MODULE_0__/* .IsmType */ .GO.AGGREGATION ||
|
|
817412
|
+
ismConfig.type === _ism_types_js__WEBPACK_IMPORTED_MODULE_0__/* .IsmType */ .GO.STORAGE_AGGREGATION) {
|
|
817413
|
+
return {
|
|
817414
|
+
...ismConfig,
|
|
817415
|
+
modules: ismConfig.modules.map((m) => setRateLimitedIsmRecipient(m, recipient, defaultOwner)),
|
|
817416
|
+
};
|
|
817417
|
+
}
|
|
817418
|
+
if (ismConfig.type === _ism_types_js__WEBPACK_IMPORTED_MODULE_0__/* .IsmType */ .GO.ROUTING ||
|
|
817419
|
+
ismConfig.type === _ism_types_js__WEBPACK_IMPORTED_MODULE_0__/* .IsmType */ .GO.FALLBACK_ROUTING ||
|
|
817420
|
+
ismConfig.type === _ism_types_js__WEBPACK_IMPORTED_MODULE_0__/* .IsmType */ .GO.INCREMENTAL_ROUTING) {
|
|
817421
|
+
const newDomains = {};
|
|
817422
|
+
for (const [domain, domainIsm] of Object.entries(ismConfig.domains)) {
|
|
817423
|
+
newDomains[domain] = setRateLimitedIsmRecipient(domainIsm, recipient, defaultOwner);
|
|
817424
|
+
}
|
|
817425
|
+
return { ...ismConfig, domains: newDomains };
|
|
817426
|
+
}
|
|
817427
|
+
if (ismConfig.type === _ism_types_js__WEBPACK_IMPORTED_MODULE_0__/* .IsmType */ .GO.AMOUNT_ROUTING) {
|
|
817428
|
+
return {
|
|
817429
|
+
...ismConfig,
|
|
817430
|
+
lowerIsm: setRateLimitedIsmRecipient(ismConfig.lowerIsm, recipient, defaultOwner),
|
|
817431
|
+
upperIsm: setRateLimitedIsmRecipient(ismConfig.upperIsm, recipient, defaultOwner),
|
|
817432
|
+
};
|
|
817433
|
+
}
|
|
817434
|
+
return ismConfig;
|
|
817435
|
+
}
|
|
816662
817436
|
function extractIsmAndHookFactoryAddresses(registryAddresses) {
|
|
816663
|
-
return (0,
|
|
817437
|
+
return (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_1__/* .pick */ .Up)(registryAddresses, [
|
|
816664
817438
|
'domainRoutingIsmFactory',
|
|
816665
817439
|
'incrementalDomainRoutingIsmFactory',
|
|
816666
817440
|
'staticMerkleRootMultisigIsmFactory',
|
|
@@ -817762,8 +818536,8 @@ class WarpCore {
|
|
|
817762
818536
|
sender,
|
|
817763
818537
|
});
|
|
817764
818538
|
}
|
|
817765
|
-
|
|
817766
|
-
|
|
818539
|
+
const igpDenom = transferQuote.igpQuote.addressOrDenom;
|
|
818540
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .assert */ .v)(!igpDenom || (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .isZeroishAddress */ .Hi)(igpDenom) || igpDenom === 'lamport', `CrossCollateralRouter transferRemoteTo requires native IGP fee; got ${igpDenom}`);
|
|
817767
818541
|
const tokenFeeAmount = transferQuote.tokenFeeQuote?.amount ?? 0n;
|
|
817768
818542
|
const totalDebit = amount + tokenFeeAmount;
|
|
817769
818543
|
const [isApproveRequired, isRevokeApprovalRequired] = await Promise.all([
|
|
@@ -905580,6 +906354,7 @@ function intersection(a, b) {
|
|
|
905580
906354
|
/* harmony export */ Nw: () => (/* binding */ errorToString),
|
|
905581
906355
|
/* harmony export */ Sn: () => (/* binding */ toTitleCase),
|
|
905582
906356
|
/* harmony export */ U5: () => (/* binding */ toHexString),
|
|
906357
|
+
/* harmony export */ Wk: () => (/* binding */ formatError),
|
|
905583
906358
|
/* harmony export */ jP: () => (/* binding */ streamToString),
|
|
905584
906359
|
/* harmony export */ xJ: () => (/* binding */ fromHexString)
|
|
905585
906360
|
/* harmony export */ });
|
|
@@ -905631,6 +906406,28 @@ function errorToString(error, maxLength = 300) {
|
|
|
905631
906406
|
return trimToLength(details, maxLength);
|
|
905632
906407
|
return trimToLength(JSON.stringify(details), maxLength);
|
|
905633
906408
|
}
|
|
906409
|
+
function isErrorWithContext(e) {
|
|
906410
|
+
return e instanceof Error && 'context' in e;
|
|
906411
|
+
}
|
|
906412
|
+
/**
|
|
906413
|
+
* Formats an error for display, including the cause chain and any Solana
|
|
906414
|
+
* program logs attached to preflight failure errors.
|
|
906415
|
+
*/
|
|
906416
|
+
function formatError(error, depth = 0) {
|
|
906417
|
+
if (!(error instanceof Error))
|
|
906418
|
+
return String(error);
|
|
906419
|
+
const parts = [error.message];
|
|
906420
|
+
// SolanaError preflight failures attach { logs, unitsConsumed, ... } to context
|
|
906421
|
+
if (isErrorWithContext(error) &&
|
|
906422
|
+
Array.isArray(error.context?.logs) &&
|
|
906423
|
+
error.context.logs.length > 0) {
|
|
906424
|
+
parts.push(`Logs:\n ${error.context.logs.join('\n ')}`);
|
|
906425
|
+
}
|
|
906426
|
+
if (error.cause != null && depth < 10) {
|
|
906427
|
+
parts.push(`Caused by: ${formatError(error.cause, depth + 1)}`);
|
|
906428
|
+
}
|
|
906429
|
+
return parts.join('\n');
|
|
906430
|
+
}
|
|
905634
906431
|
const fromHexString = (hexstr) => Buffer.from((0,_addresses_js__WEBPACK_IMPORTED_MODULE_0__/* .strip0x */ .LL)(hexstr), 'hex');
|
|
905635
906432
|
const toHexString = (buf) => (0,_addresses_js__WEBPACK_IMPORTED_MODULE_0__/* .ensure0x */ .Ho)(buf.toString('hex'));
|
|
905636
906433
|
//# sourceMappingURL=strings.js.map
|
|
@@ -906530,7 +907327,7 @@ module.exports = /*#__PURE__*/JSON.parse('[{"type":"function","name":"proveL2Lea
|
|
|
906530
907327
|
/***/ 99468:
|
|
906531
907328
|
/***/ ((module) => {
|
|
906532
907329
|
|
|
906533
|
-
module.exports = {"rE":"
|
|
907330
|
+
module.exports = {"rE":"34.0.0"};
|
|
906534
907331
|
|
|
906535
907332
|
/***/ })
|
|
906536
907333
|
|