@hyperlane-xyz/cli 33.1.1 → 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 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, RateLimitedHook__factory, RateLimitedIsm__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
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. */
@@ -694191,7 +694193,7 @@ __webpack_async_result__();
694191
694193
  /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
694192
694194
  /* harmony export */ x: () => (/* binding */ VERSION)
694193
694195
  /* harmony export */ });
694194
- const VERSION = '33.1.1';
694196
+ const VERSION = '34.0.0';
694195
694197
  //# sourceMappingURL=version.js.map
694196
694198
 
694197
694199
  /***/ }),
@@ -694296,12 +694298,14 @@ class CosmosNativeProtocolProvider {
694296
694298
  /* harmony import */ var _cosmjs_proto_signing__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(5505);
694297
694299
  /* harmony import */ var _cosmjs_stargate__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(69403);
694298
694300
  /* harmony import */ var _cosmjs_tendermint_rpc__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(83071);
694299
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(21387);
694300
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(93142);
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);
694301
694303
  /* harmony import */ var _hyperlane_core_query_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(30801);
694302
694304
  /* harmony import */ var _hyperlane_warp_query_js__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(15220);
694303
694305
  /* harmony import */ var _registry_js__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(21360);
694304
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
+
694305
694309
 
694306
694310
 
694307
694311
 
@@ -694317,8 +694321,9 @@ class CosmosNativeProvider {
694317
694321
  registry;
694318
694322
  cometClient;
694319
694323
  rpcUrls;
694324
+ stargateClients = new _stargate_js__WEBPACK_IMPORTED_MODULE_9__/* .StargateClientCache */ .dc(1);
694320
694325
  static async connect(rpcUrls, _chainId) {
694321
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .assert */ .v)(rpcUrls.length > 0, `got no rpcUrls`);
694326
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(rpcUrls.length > 0, `got no rpcUrls`);
694322
694327
  const client = await (0,_cosmjs_tendermint_rpc__WEBPACK_IMPORTED_MODULE_4__.connectComet)(rpcUrls[0]);
694323
694328
  return new CosmosNativeProvider(client, rpcUrls);
694324
694329
  }
@@ -694345,33 +694350,57 @@ class CosmosNativeProvider {
694345
694350
  return status.syncInfo.latestBlockHeight;
694346
694351
  }
694347
694352
  async getBalance(req) {
694348
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .assert */ .v)(req.denom, `denom required by ${CosmosNativeProvider.name}`);
694353
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(req.denom, `denom required by ${CosmosNativeProvider.name}`);
694349
694354
  const coin = await this.query.bank.balance(req.address, req.denom);
694350
694355
  return BigInt(coin.amount);
694351
694356
  }
694352
694357
  async getTotalSupply(req) {
694353
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .assert */ .v)(req.denom, `denom required by ${CosmosNativeProvider.name}`);
694358
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(req.denom, `denom required by ${CosmosNativeProvider.name}`);
694354
694359
  const coin = await this.query.bank.supplyOf(req.denom);
694355
694360
  return BigInt(coin.amount);
694356
694361
  }
694357
694362
  async estimateTransactionFee(req) {
694358
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .assert */ .v)(req.estimatedGasPrice, `Cosmos Native requires a estimatedGasPrice to estimate the transaction fee`);
694359
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .assert */ .v)(req.senderAddress, `Cosmos Native requires a senderAddress to estimate the transaction fee`);
694360
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .assert */ .v)(req.senderPubKey, `Cosmos Native requires a sender public key to estimate the transaction fee`);
694361
- const stargateClient = await _cosmjs_stargate__WEBPACK_IMPORTED_MODULE_3__.StargateClient.connect(this.rpcUrls[0]);
694362
- const message = this.registry.encodeAsAny(req.transaction);
694363
- const pubKey = (0,_cosmjs_amino__WEBPACK_IMPORTED_MODULE_0__.encodeSecp256k1Pubkey)(new Uint8Array(Buffer.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .strip0x */ .LL)(req.senderPubKey), 'hex')));
694364
- const queryClient = stargateClient['getQueryClient']();
694365
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .assert */ .v)(queryClient, `queryClient could not be found on stargate client`);
694366
- const { sequence } = await stargateClient.getSequence(req.senderAddress);
694367
- const { gasInfo } = await queryClient.tx.simulate([message], undefined, pubKey, sequence);
694368
- const gasUnits = _cosmjs_math__WEBPACK_IMPORTED_MODULE_1__.Uint53.fromString(gasInfo?.gasUsed.toString() ?? '0').toNumber();
694369
- const gasPrice = parseFloat(req.estimatedGasPrice.toString());
694370
- return {
694371
- gasUnits: BigInt(gasUnits),
694372
- gasPrice,
694373
- fee: BigInt(Math.floor(gasUnits * gasPrice)),
694374
- };
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();
694375
694404
  }
694376
694405
  async isMessageDelivered(req) {
694377
694406
  const { delivered } = await this.query.core.Delivered({
@@ -694385,7 +694414,7 @@ class CosmosNativeProvider {
694385
694414
  const { token } = await this.query.warp.Token({
694386
694415
  id: req.tokenAddress,
694387
694416
  });
694388
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .assert */ .v)(token, `found no token for id ${req.tokenAddress}`);
694417
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(token, `found no token for id ${req.tokenAddress}`);
694389
694418
  const token_type = await (0,_warp_warp_query_js__WEBPACK_IMPORTED_MODULE_8__/* .getWarpTokenType */ .W$)(this.query, req.tokenAddress);
694390
694419
  return {
694391
694420
  address: token.id,
@@ -694417,7 +694446,7 @@ class CosmosNativeProvider {
694417
694446
  const { bridged_supply } = await this.query.warp.BridgedSupply({
694418
694447
  id: req.tokenAddress,
694419
694448
  });
694420
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .assert */ .v)(bridged_supply, `found no bridged supply for token id ${req.tokenAddress}`);
694449
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(bridged_supply, `found no bridged supply for token id ${req.tokenAddress}`);
694421
694450
  return BigInt(bridged_supply.amount);
694422
694451
  }
694423
694452
  async quoteRemoteTransfer(req) {
@@ -694427,14 +694456,14 @@ class CosmosNativeProvider {
694427
694456
  custom_hook_id: req.customHookAddress || '',
694428
694457
  custom_hook_metadata: req.customHookMetadata || '',
694429
694458
  });
694430
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .assert */ .v)(gas_payment && gas_payment[0], `found no quote for token id ${req.tokenAddress} and destination domain ${req.destinationDomainId}`);
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}`);
694431
694460
  return {
694432
694461
  denom: gas_payment[0].denom,
694433
694462
  amount: BigInt(gas_payment[0].amount),
694434
694463
  };
694435
694464
  }
694436
694465
  async getTransferTransaction(req) {
694437
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .assert */ .v)(req.denom, `denom required by ${CosmosNativeProvider.name}`);
694466
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(req.denom, `denom required by ${CosmosNativeProvider.name}`);
694438
694467
  return {
694439
694468
  typeUrl: '/cosmos.bank.v1beta1.MsgSend',
694440
694469
  value: {
@@ -694598,6 +694627,10 @@ class CosmosNativeSigner extends provider/* CosmosNativeProvider */.z {
694598
694627
  getSignerAddress() {
694599
694628
  return this.account.address;
694600
694629
  }
694630
+ disconnect() {
694631
+ super.disconnect();
694632
+ this.signer.disconnect();
694633
+ }
694601
694634
  supportsTransactionBatching() {
694602
694635
  return true;
694603
694636
  }
@@ -694619,6 +694652,100 @@ class CosmosNativeSigner extends provider/* CosmosNativeProvider */.z {
694619
694652
 
694620
694653
  /***/ }),
694621
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
+
694622
694749
  /***/ 46918:
694623
694750
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
694624
694751
 
@@ -695365,6 +695492,80 @@ function setupWarpExtension(base) {
695365
695492
 
695366
695493
  /***/ }),
695367
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
+
695368
695569
  /***/ 12966:
695369
695570
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
695370
695571
 
@@ -713391,7 +713592,7 @@ async function loadProtocolProviders(neededProtocols) {
713391
713592
  }
713392
713593
  switch (protocol) {
713393
713594
  case dist/* ProtocolType */.Hb.CosmosNative: {
713394
- const { CosmosNativeProtocolProvider } = await __nccwpck_require__.e(/* import() */ 466).then(__nccwpck_require__.bind(__nccwpck_require__, 46466));
713595
+ const { CosmosNativeProtocolProvider } = await Promise.resolve(/* import() */).then(__nccwpck_require__.bind(__nccwpck_require__, 46466));
713395
713596
  (0,dist/* registerProtocol */.oD)(protocol, () => new CosmosNativeProtocolProvider());
713396
713597
  break;
713397
713598
  }
@@ -743006,6 +743207,7 @@ class BaseMetadataBuilder {
743006
743207
  case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_9__/* .IsmType */ .GO.OP_STACK:
743007
743208
  case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_9__/* .IsmType */ .GO.PAUSABLE:
743008
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:
743009
743211
  return this.nullMetadataBuilder.build({ ...context, ism });
743010
743212
  case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_9__/* .IsmType */ .GO.MERKLE_ROOT_MULTISIG:
743011
743213
  case _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_9__/* .IsmType */ .GO.MESSAGE_ID_MULTISIG:
@@ -750576,6 +750778,8 @@ __nccwpck_require__.d(__webpack_exports__, {
750576
750778
 
750577
750779
  // EXTERNAL MODULE: ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js + 4 modules
750578
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);
750579
750783
  ;// CONCATENATED MODULE: ../sdk/dist/deploy/types.js
750580
750784
 
750581
750785
  const ProxyFactoryFactoriesSchema = types/* object */.Ik({
@@ -750607,6 +750811,8 @@ var ica_types = __nccwpck_require__(89972);
750607
750811
  var ism_types = __nccwpck_require__(69352);
750608
750812
  // EXTERNAL MODULE: ../sdk/dist/types.js
750609
750813
  var dist_types = __nccwpck_require__(88832);
750814
+ // EXTERNAL MODULE: ../sdk/dist/utils/ism.js
750815
+ var ism = __nccwpck_require__(764);
750610
750816
  ;// CONCATENATED MODULE: ../sdk/dist/core/types.js
750611
750817
 
750612
750818
 
@@ -750614,7 +750820,8 @@ var dist_types = __nccwpck_require__(88832);
750614
750820
 
750615
750821
 
750616
750822
 
750617
- const CoreConfigSchema = dist_types/* OwnableSchema */.wv.extend({
750823
+
750824
+ const CoreConfigBaseSchema = dist_types/* OwnableSchema */.wv.extend({
750618
750825
  defaultIsm: ism_types/* IsmConfigSchema */.nb,
750619
750826
  defaultHook: hook_types/* HookConfigSchema */.vC,
750620
750827
  requiredHook: hook_types/* HookConfigSchema */.vC,
@@ -750625,9 +750832,19 @@ const CoreConfigSchema = dist_types/* OwnableSchema */.wv.extend({
750625
750832
  // Override canonical Permit2 address for QuotedCalls deployment
750626
750833
  permit2: types/* string */.Yj().optional(),
750627
750834
  });
750628
- const DerivedCoreConfigSchema = CoreConfigSchema.merge(types/* object */.Ik({
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({
750629
750846
  interchainAccountRouter: ica_types/* DerivedIcaRouterConfigSchema */.XN.optional(),
750630
- }));
750847
+ })).superRefine(rejectRateLimitedDefaultIsm);
750631
750848
  const DeployedCoreAddressesSchema = ProxyFactoryFactoriesSchema.extend({
750632
750849
  mailbox: types/* string */.Yj(),
750633
750850
  validatorAnnounce: types/* string */.Yj(),
@@ -752069,26 +752286,28 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
752069
752286
  /* harmony import */ var _hyperlane_xyz_provider_sdk_warp__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(17791);
752070
752287
  /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(73689);
752071
752288
  /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(21387);
752072
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(73938);
752073
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__ = __nccwpck_require__(94523);
752074
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_23__ = __nccwpck_require__(14918);
752075
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_25__ = __nccwpck_require__(93142);
752076
- /* harmony import */ var _block_explorer_etherscan_js__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(26492);
752077
- /* harmony import */ var _ccip_utils_js__WEBPACK_IMPORTED_MODULE_18__ = __nccwpck_require__(93035);
752078
- /* harmony import */ var _hook_EvmHookModule_js__WEBPACK_IMPORTED_MODULE_22__ = __nccwpck_require__(10256);
752079
- /* harmony import */ var _ism_EvmIsmModule_js__WEBPACK_IMPORTED_MODULE_20__ = __nccwpck_require__(3612);
752080
- /* harmony import */ var _ism_HyperlaneIsmFactory_js__WEBPACK_IMPORTED_MODULE_16__ = __nccwpck_require__(44886);
752081
- /* harmony import */ var _metadata_ChainMetadataManager_js__WEBPACK_IMPORTED_MODULE_17__ = __nccwpck_require__(22887);
752082
- /* harmony import */ var _router_types_js__WEBPACK_IMPORTED_MODULE_24__ = __nccwpck_require__(38230);
752083
- /* harmony import */ var _token_EvmWarpModule_js__WEBPACK_IMPORTED_MODULE_26__ = __nccwpck_require__(48807);
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);
752084
752302
  /* harmony import */ var _token_config_js__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(4169);
752085
- /* harmony import */ var _token_contracts_js__WEBPACK_IMPORTED_MODULE_27__ = __nccwpck_require__(81504);
752086
- /* harmony import */ var _token_deploy_js__WEBPACK_IMPORTED_MODULE_15__ = __nccwpck_require__(19186);
752087
- /* harmony import */ var _utils_ism_js__WEBPACK_IMPORTED_MODULE_21__ = __nccwpck_require__(764);
752088
- /* harmony import */ var _HyperlaneProxyFactoryDeployer_js__WEBPACK_IMPORTED_MODULE_13__ = __nccwpck_require__(84387);
752089
- /* harmony import */ var _verify_ContractVerifier_js__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(76939);
752090
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_token_EvmWarpModule_js__WEBPACK_IMPORTED_MODULE_26__]);
752091
- _token_EvmWarpModule_js__WEBPACK_IMPORTED_MODULE_26__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
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
+
752092
752311
 
752093
752312
 
752094
752313
 
@@ -752190,45 +752409,95 @@ function validateWarpConfigForAltVM(config, chain) {
752190
752409
  throw new Error(`Unhandled token type '${config.type}' for Alt-VM chain '${chain}'.`);
752191
752410
  }
752192
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
+ }
752193
752424
  async function executeWarpDeploy(warpDeployConfig, multiProvider, altVmSigners, registryAddresses, apiKeys) {
752194
- const contractVerifier = new _verify_ContractVerifier_js__WEBPACK_IMPORTED_MODULE_11__/* .ContractVerifier */ .j(multiProvider, apiKeys, _hyperlane_xyz_core_buildArtifact_js__WEBPACK_IMPORTED_MODULE_1__/* .buildArtifact */ .L, _block_explorer_etherscan_js__WEBPACK_IMPORTED_MODULE_12__/* .ExplorerLicenseType */ .p8.MIT);
752195
- const ismFactoryDeployer = new _HyperlaneProxyFactoryDeployer_js__WEBPACK_IMPORTED_MODULE_13__/* .HyperlaneProxyFactoryDeployer */ .h(multiProvider, contractVerifier);
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 = {};
752196
752450
  // For each chain in WarpRouteConfig, deploy each Ism Factory, if it's not in the registry
752197
752451
  // Then return a modified config with the ism and/or hook address as a string
752198
- const modifiedConfig = await resolveWarpIsmAndHook(warpDeployConfig, multiProvider, altVmSigners, registryAddresses, ismFactoryDeployer, contractVerifier);
752452
+ const modifiedConfig = await resolveWarpIsmAndHook(warpDeployConfig, multiProvider, altVmSigners, registryAddresses, ismFactoryDeployer, contractVerifier, rateLimitedHookSnapshots);
752199
752453
  // Initialize with unsupported chains so that they are enrolled
752200
- let deployedContracts = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .objMap */ .Yp)((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .objFilter */ .s3)(warpDeployConfig, (_chain, config) => !!config.foreignDeployment), (chain, config) => {
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) => {
752201
752455
  (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(config.foreignDeployment, `Expected foreignDeployment field to be defined on ${chain} after filtering`);
752202
752456
  return config.foreignDeployment;
752203
752457
  });
752204
752458
  // get unique list of protocols
752205
752459
  const protocols = Array.from(new Set(Object.keys(modifiedConfig).map((chainName) => multiProvider.getProtocol(chainName))));
752206
752460
  for (const protocol of protocols) {
752207
- const protocolSpecificConfig = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .objFilter */ .s3)(modifiedConfig, (chainName, config) => multiProvider.getProtocol(chainName) === protocol &&
752461
+ const protocolSpecificConfig = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objFilter */ .s3)(modifiedConfig, (chainName, config) => multiProvider.getProtocol(chainName) === protocol &&
752208
752462
  !config.foreignDeployment);
752209
- if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .isObjEmpty */ .XY)(protocolSpecificConfig)) {
752463
+ if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .isObjEmpty */ .XY)(protocolSpecificConfig)) {
752210
752464
  continue;
752211
752465
  }
752212
752466
  switch (protocol) {
752213
752467
  case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Tron:
752214
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)');
752215
752471
  const deployer = warpDeployConfig.isNft
752216
- ? new _token_deploy_js__WEBPACK_IMPORTED_MODULE_15__/* .HypERC721Deployer */ .il(multiProvider)
752217
- : new _token_deploy_js__WEBPACK_IMPORTED_MODULE_15__/* .HypERC20Deployer */ .A7(// TODO: replace with EvmERC20WarpModule
752218
- multiProvider, _ism_HyperlaneIsmFactory_js__WEBPACK_IMPORTED_MODULE_16__/* .HyperlaneIsmFactory */ .K.fromAddressesMap(registryAddresses, multiProvider, undefined, contractVerifier), contractVerifier);
752219
- const evmContracts = await deployer.deploy(protocolSpecificConfig);
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);
752220
752489
  deployedContracts = {
752221
752490
  ...deployedContracts,
752222
- ...(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .objMap */ .Yp)(evmContracts, (_, contracts) => getRouter(contracts).address),
752491
+ ...(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objMap */ .Yp)(evmContracts, (_, contracts) => getRouter(contracts).address),
752223
752492
  };
752224
752493
  break;
752225
752494
  }
752226
752495
  default: {
752227
- const chainLookup = (0,_metadata_ChainMetadataManager_js__WEBPACK_IMPORTED_MODULE_17__/* .altVmChainLookup */ .O)(multiProvider);
752496
+ const chainLookup = (0,_metadata_ChainMetadataManager_js__WEBPACK_IMPORTED_MODULE_18__/* .altVmChainLookup */ .O)(multiProvider);
752228
752497
  const deployResults = {};
752229
- for (const chain of (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .objKeys */ .cG)(protocolSpecificConfig)) {
752230
- const config = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .mustGet */ .Qd)(protocolSpecificConfig, chain);
752231
- const signer = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .mustGet */ .Qd)(altVmSigners, chain);
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);
752232
752501
  const chainMetadata = chainLookup.getChainMetadata(chain);
752233
752502
  const writer = (0,_hyperlane_xyz_deploy_sdk__WEBPACK_IMPORTED_MODULE_2__/* .createWarpTokenWriter */ .l5)(chainMetadata, chainLookup, signer);
752234
752503
  const artifact = (0,_hyperlane_xyz_provider_sdk_warp__WEBPACK_IMPORTED_MODULE_7__/* .warpConfigToArtifact */ .ku)(validateWarpConfigForAltVM(config, chain), chainLookup);
@@ -752245,14 +752514,43 @@ async function executeWarpDeploy(warpDeployConfig, multiProvider, altVmSigners,
752245
752514
  }
752246
752515
  return deployedContracts;
752247
752516
  }
752248
- async function resolveWarpIsmAndHook(warpConfig, multiProvider, altVmSigners, registryAddresses, ismFactoryDeployer, contractVerifier) {
752249
- return (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .promiseObjAll */ .a1)((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .objMap */ .Yp)(warpConfig, async (chain, config) => {
752250
- const ccipContractCache = new _ccip_utils_js__WEBPACK_IMPORTED_MODULE_18__/* .CCIPContractCache */ .G5(registryAddresses);
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);
752251
752549
  const chainAddresses = registryAddresses[chain];
752252
752550
  if (!chainAddresses) {
752253
752551
  throw new Error(`Registry factory addresses not found for ${chain}.`);
752254
752552
  }
752255
- config.interchainSecurityModule = await createWarpIsm({
752553
+ const ism = await createWarpIsm({
752256
752554
  ccipContractCache,
752257
752555
  chain,
752258
752556
  chainAddresses,
@@ -752262,7 +752560,7 @@ async function resolveWarpIsmAndHook(warpConfig, multiProvider, altVmSigners, re
752262
752560
  ismFactoryDeployer,
752263
752561
  warpConfig: config,
752264
752562
  }); // TODO write test
752265
- config.hook = await createWarpHook({
752563
+ const hook = await createWarpHook({
752266
752564
  ccipContractCache,
752267
752565
  chain,
752268
752566
  chainAddresses,
@@ -752271,8 +752569,16 @@ async function resolveWarpIsmAndHook(warpConfig, multiProvider, altVmSigners, re
752271
752569
  contractVerifier,
752272
752570
  ismFactoryDeployer,
752273
752571
  warpConfig: config,
752572
+ rateLimitedHookSnapshots,
752274
752573
  });
752275
- return config;
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
+ };
752276
752582
  }));
752277
752583
  }
752278
752584
  /**
@@ -752284,21 +752590,30 @@ async function createWarpIsm({ ccipContractCache, chain, chainAddresses, multiPr
752284
752590
  const { interchainSecurityModule } = warpConfig;
752285
752591
  if (!interchainSecurityModule ||
752286
752592
  typeof interchainSecurityModule === 'string') {
752287
- _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .rootLogger */ .Jk.info(`Config Ism is ${!interchainSecurityModule ? 'empty' : interchainSecurityModule}, skipping deployment.`);
752593
+ _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`Config Ism is ${!interchainSecurityModule ? 'empty' : interchainSecurityModule}, skipping deployment.`);
752288
752594
  return interchainSecurityModule;
752289
752595
  }
752290
- _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .rootLogger */ .Jk.info(`Loading registry factory addresses for ${chain}...`);
752291
- _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .rootLogger */ .Jk.info(`Creating ${interchainSecurityModule.type} ISM for token on ${chain} chain...`);
752292
- _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .rootLogger */ .Jk.info(`Finished creating ${interchainSecurityModule.type} ISM for token on ${chain} chain.`);
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.`);
752293
752608
  const protocolType = multiProvider.getProtocol(chain);
752294
752609
  switch (protocolType) {
752295
752610
  case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Tron:
752296
752611
  case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Ethereum: {
752297
- const evmIsmModule = await _ism_EvmIsmModule_js__WEBPACK_IMPORTED_MODULE_20__/* .EvmIsmModule */ .a.create({
752612
+ const evmIsmModule = await _ism_EvmIsmModule_js__WEBPACK_IMPORTED_MODULE_22__/* .EvmIsmModule */ .a.create({
752298
752613
  chain,
752299
752614
  mailbox: chainAddresses.mailbox,
752300
752615
  multiProvider: multiProvider,
752301
- proxyFactoryFactories: (0,_utils_ism_js__WEBPACK_IMPORTED_MODULE_21__/* .extractIsmAndHookFactoryAddresses */ .zs)(chainAddresses),
752616
+ proxyFactoryFactories: (0,_utils_ism_js__WEBPACK_IMPORTED_MODULE_16__/* .extractIsmAndHookFactoryAddresses */ .zs)(chainAddresses),
752302
752617
  config: interchainSecurityModule,
752303
752618
  ccipContractCache,
752304
752619
  contractVerifier,
@@ -752307,8 +752622,8 @@ async function createWarpIsm({ ccipContractCache, chain, chainAddresses, multiPr
752307
752622
  return deployedIsm;
752308
752623
  }
752309
752624
  default: {
752310
- const signer = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .mustGet */ .Qd)(altVmSigners, chain);
752311
- const chainLookup = (0,_metadata_ChainMetadataManager_js__WEBPACK_IMPORTED_MODULE_17__/* .altVmChainLookup */ .O)(multiProvider);
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);
752312
752627
  const chainMetadata = chainLookup.getChainMetadata(chain);
752313
752628
  const writer = (0,_hyperlane_xyz_deploy_sdk__WEBPACK_IMPORTED_MODULE_2__/* .createIsmWriter */ .lN)(chainMetadata, chainLookup, signer);
752314
752629
  const artifact = (0,_hyperlane_xyz_provider_sdk_ism__WEBPACK_IMPORTED_MODULE_6__/* .ismConfigToArtifact */ .HL)(
@@ -752319,25 +752634,40 @@ async function createWarpIsm({ ccipContractCache, chain, chainAddresses, multiPr
752319
752634
  }
752320
752635
  }
752321
752636
  }
752322
- async function createWarpHook({ ccipContractCache, chain, chainAddresses, multiProvider, altVmSigners, contractVerifier, warpConfig, }) {
752637
+ async function createWarpHook({ ccipContractCache, chain, chainAddresses, multiProvider, altVmSigners, contractVerifier, warpConfig, rateLimitedHookSnapshots, }) {
752323
752638
  const { hook } = warpConfig;
752324
752639
  if (!hook || typeof hook === 'string') {
752325
- _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .rootLogger */ .Jk.info(`Config Hook is ${!hook ? 'empty' : hook}, skipping deployment.`);
752640
+ _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`Config Hook is ${!hook ? 'empty' : hook}, skipping deployment.`);
752326
752641
  return hook;
752327
752642
  }
752328
- _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .rootLogger */ .Jk.info(`Loading registry factory addresses for ${chain}...`);
752329
- _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .rootLogger */ .Jk.info(`Creating ${hook.type} Hook for token on ${chain} chain...`);
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...`);
752330
752660
  const protocolType = multiProvider.getProtocol(chain);
752331
752661
  switch (protocolType) {
752332
752662
  case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Tron:
752333
752663
  case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Ethereum: {
752334
- _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .rootLogger */ .Jk.info(`Loading registry factory addresses for ${chain}...`);
752335
- _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .rootLogger */ .Jk.info(`Creating ${hook.type} Hook for token on ${chain} chain...`);
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...`);
752336
752666
  // If config.proxyadmin.address exists, then use that. otherwise deploy a new proxyAdmin
752337
752667
  const proxyAdminAddress = warpConfig.proxyAdmin?.address ??
752338
752668
  (await multiProvider.handleDeploy(chain, new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .ProxyAdmin__factory */ .Aig(), []))
752339
752669
  .address;
752340
- const evmHookModule = await _hook_EvmHookModule_js__WEBPACK_IMPORTED_MODULE_22__/* .EvmHookModule */ .o.create({
752670
+ const evmHookModule = await _hook_EvmHookModule_js__WEBPACK_IMPORTED_MODULE_19__/* .EvmHookModule */ .o.create({
752341
752671
  chain,
752342
752672
  multiProvider: multiProvider,
752343
752673
  coreAddresses: {
@@ -752347,15 +752677,15 @@ async function createWarpHook({ ccipContractCache, chain, chainAddresses, multiP
752347
752677
  config: hook,
752348
752678
  ccipContractCache,
752349
752679
  contractVerifier,
752350
- proxyFactoryFactories: (0,_utils_ism_js__WEBPACK_IMPORTED_MODULE_21__/* .extractIsmAndHookFactoryAddresses */ .zs)(chainAddresses),
752680
+ proxyFactoryFactories: (0,_utils_ism_js__WEBPACK_IMPORTED_MODULE_16__/* .extractIsmAndHookFactoryAddresses */ .zs)(chainAddresses),
752351
752681
  });
752352
- _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .rootLogger */ .Jk.info(`Finished creating ${hook.type} Hook for token on ${chain} chain.`);
752682
+ _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.info(`Finished creating ${hook.type} Hook for token on ${chain} chain.`);
752353
752683
  const { deployedHook } = evmHookModule.serialize();
752354
752684
  return deployedHook;
752355
752685
  }
752356
752686
  default: {
752357
- const signer = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .mustGet */ .Qd)(altVmSigners, chain);
752358
- const chainLookup = (0,_metadata_ChainMetadataManager_js__WEBPACK_IMPORTED_MODULE_17__/* .altVmChainLookup */ .O)(multiProvider);
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);
752359
752689
  const metadata = multiProvider.getChainMetadata(chain);
752360
752690
  // Deploy new hook using artifact writer with mailbox context
752361
752691
  const writer = (0,_hyperlane_xyz_deploy_sdk__WEBPACK_IMPORTED_MODULE_2__/* .createHookWriter */ .JM)(metadata, chainLookup, signer, {
@@ -752368,17 +752698,18 @@ async function createWarpHook({ ccipContractCache, chain, chainAddresses, multiP
752368
752698
  }
752369
752699
  }
752370
752700
  async function enrollCrossChainRouters({ multiProvider, altVmSigners, registryAddresses, warpDeployConfig, }, deployedContracts) {
752371
- _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .rootLogger */ .Jk.info(`Start enrolling cross chain routers`);
752372
- const resolvedConfigMap = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .objMap */ .Yp)(warpDeployConfig, (_, config) => ({
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) => ({
752373
752703
  gas: (0,_token_config_js__WEBPACK_IMPORTED_MODULE_8__/* .gasOverhead */ .yv)(config.type),
752374
752704
  ...config,
752375
752705
  }));
752376
- const supportedChains = Object.keys((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .objFilter */ .s3)(resolvedConfigMap, (_, config) => !config.foreignDeployment));
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));
752377
752708
  // Process all chains in parallel since they are independent
752378
- const { fulfilled, rejected } = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_23__/* .mapAllSettled */ .bh)(supportedChains, async (currentChain) => {
752709
+ const { fulfilled, rejected } = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_24__/* .mapAllSettled */ .bh)(supportedChains, async (currentChain) => {
752379
752710
  const protocol = multiProvider.getProtocol(currentChain);
752380
752711
  // Start with user-specified remote routers (for chains not in the deployment)
752381
- const userRemoteRouters = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .objMap */ .Yp)((0,_router_types_js__WEBPACK_IMPORTED_MODULE_24__/* .resolveRouterMapConfig */ .c0)(multiProvider, resolvedConfigMap[currentChain].remoteRouters ?? {}), (_, value) => ({ address: (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_25__/* .addressToBytes32 */ .In)(value.address) }));
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) }));
752382
752713
  // Merge: deployed routers take precedence over user-specified
752383
752714
  const remoteRouters = {
752384
752715
  ...userRemoteRouters,
@@ -752387,14 +752718,14 @@ async function enrollCrossChainRouters({ multiProvider, altVmSigners, registryAd
752387
752718
  .map(([chain, address]) => [
752388
752719
  multiProvider.getDomainId(chain).toString(),
752389
752720
  {
752390
- address: (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_25__/* .addressToBytes32 */ .In)(address),
752721
+ address: (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_26__/* .addressToBytes32 */ .In)(address),
752391
752722
  },
752392
752723
  ])),
752393
752724
  };
752394
752725
  // Start with user-specified destination gas
752395
- const userDestinationGas = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_24__/* .resolveRouterMapConfig */ .c0)(multiProvider, resolvedConfigMap[currentChain].destinationGas ?? {});
752726
+ const userDestinationGas = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_25__/* .resolveRouterMapConfig */ .c0)(multiProvider, resolvedConfigMap[currentChain].destinationGas ?? {});
752396
752727
  // Default to MAX_GAS_OVERHEAD for user-specified remote routers without explicit destinationGas
752397
- const defaultGasForUserRouters = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .objMap */ .Yp)(userRemoteRouters, (domainId) => userDestinationGas[domainId] ?? _token_config_js__WEBPACK_IMPORTED_MODULE_8__/* .MAX_GAS_OVERHEAD */ .mA.toString());
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());
752398
752729
  // Merge: deployed chain gas takes precedence over defaults and user-specified
752399
752730
  const destinationGas = {
752400
752731
  ...defaultGasForUserRouters,
@@ -752406,14 +752737,14 @@ async function enrollCrossChainRouters({ multiProvider, altVmSigners, registryAd
752406
752737
  ])),
752407
752738
  };
752408
752739
  for (const domainId of Object.keys(remoteRouters)) {
752409
- _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .rootLogger */ .Jk.debug(`Creating enroll remote router transactions with remote domain id ${domainId} and address ${remoteRouters[domainId]} on chain ${currentChain}`);
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}`);
752410
752741
  }
752411
752742
  let transactions = [];
752412
752743
  switch (protocol) {
752413
752744
  case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Tron:
752414
752745
  case _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ProtocolType */ .Hb.Ethereum: {
752415
752746
  const { domainRoutingIsmFactory, incrementalDomainRoutingIsmFactory, staticMerkleRootMultisigIsmFactory, staticMessageIdMultisigIsmFactory, staticAggregationIsmFactory, staticAggregationHookFactory, staticMerkleRootWeightedMultisigIsmFactory, staticMessageIdWeightedMultisigIsmFactory, } = registryAddresses[currentChain];
752416
- const evmWarpModule = new _token_EvmWarpModule_js__WEBPACK_IMPORTED_MODULE_26__/* .EvmWarpModule */ .N(multiProvider, {
752747
+ const evmWarpModule = new _token_EvmWarpModule_js__WEBPACK_IMPORTED_MODULE_27__/* .EvmWarpModule */ .N(multiProvider, {
752417
752748
  chain: currentChain,
752418
752749
  config: resolvedConfigMap[currentChain],
752419
752750
  addresses: {
@@ -752452,8 +752783,8 @@ async function enrollCrossChainRouters({ multiProvider, altVmSigners, registryAd
752452
752783
  break;
752453
752784
  }
752454
752785
  default: {
752455
- const signer = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .mustGet */ .Qd)(altVmSigners, currentChain);
752456
- const chainLookup = (0,_metadata_ChainMetadataManager_js__WEBPACK_IMPORTED_MODULE_17__/* .altVmChainLookup */ .O)(multiProvider);
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);
752457
752788
  const chainMetadata = chainLookup.getChainMetadata(currentChain);
752458
752789
  const writer = (0,_hyperlane_xyz_deploy_sdk__WEBPACK_IMPORTED_MODULE_2__/* .createWarpTokenWriter */ .l5)(chainMetadata, chainLookup, signer);
752459
752790
  const expectedConfig = {
@@ -752470,7 +752801,7 @@ async function enrollCrossChainRouters({ multiProvider, altVmSigners, registryAd
752470
752801
  transactions = await writer.update(deployedArtifact);
752471
752802
  }
752472
752803
  }
752473
- _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .rootLogger */ .Jk.debug(`Created enroll router update transactions for chain ${currentChain}`);
752804
+ _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.debug(`Created enroll router update transactions for chain ${currentChain}`);
752474
752805
  return { chain: currentChain, transactions };
752475
752806
  }, (chain) => chain);
752476
752807
  // Process settled results and collect transactions
@@ -752482,7 +752813,7 @@ async function enrollCrossChainRouters({ multiProvider, altVmSigners, registryAd
752482
752813
  }
752483
752814
  }
752484
752815
  for (const [chain, error] of rejected) {
752485
- _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .rootLogger */ .Jk.error(`Failed to create enroll router transactions for chain ${chain}: ${error.message}`);
752816
+ _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .rootLogger */ .Jk.error(`Failed to create enroll router transactions for chain ${chain}: ${error.message}`);
752486
752817
  errors.push(`${chain}: ${error.message}`);
752487
752818
  }
752488
752819
  if (errors.length > 0) {
@@ -752491,7 +752822,7 @@ async function enrollCrossChainRouters({ multiProvider, altVmSigners, registryAd
752491
752822
  return updateTransactions;
752492
752823
  }
752493
752824
  function getRouter(contracts) {
752494
- for (const key of (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .objKeys */ .cG)(_token_contracts_js__WEBPACK_IMPORTED_MODULE_27__/* .hypERC20factories */ .AE)) {
752825
+ for (const key of (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objKeys */ .cG)(_token_contracts_js__WEBPACK_IMPORTED_MODULE_28__/* .hypERC20factories */ .AE)) {
752495
752826
  if (contracts[key])
752496
752827
  return contracts[key];
752497
752828
  }
@@ -755534,6 +755865,13 @@ class EvmHookModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
755534
755865
  targetConfig: target,
755535
755866
  });
755536
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
+ }
755537
755875
  else {
755538
755876
  throw new Error(`Unsupported hook type: ${target.type}`);
755539
755877
  }
@@ -755568,6 +755906,18 @@ class EvmHookModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
755568
755906
  }
755569
755907
  return updateTxs;
755570
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
+ }
755571
755921
  async updateIgpHook({ currentConfig, targetConfig, }) {
755572
755922
  const updateTxs = [];
755573
755923
  const igpAddress = this.args.addresses.deployedHook;
@@ -755837,6 +756187,8 @@ class EvmHookModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
755837
756187
  // we can remove the ts-ignore once we have a proper type for address Hooks
755838
756188
  // @ts-ignore
755839
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 });
755840
756192
  default:
755841
756193
  throw new Error(`Unsupported hook config: ${config}`);
755842
756194
  }
@@ -755859,6 +756211,17 @@ class EvmHookModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
755859
756211
  await this.multiProvider.handleTx(this.chain, hook.transferOwnership(config.owner, this.txOverrides));
755860
756212
  return hook;
755861
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
+ }
755862
756225
  async deployAggregationHook({ config, }) {
755863
756226
  this.logger.debug('Deploying AggregationHook...');
755864
756227
  // deploy subhooks
@@ -756175,6 +756538,9 @@ class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1
756175
756538
  derivedHookConfig = { type: _types_js__WEBPACK_IMPORTED_MODULE_4__/* .HookType */ .WD.CCTP, address };
756176
756539
  this._cache.set(address, derivedHookConfig);
756177
756540
  break;
756541
+ case _types_js__WEBPACK_IMPORTED_MODULE_4__/* .OnchainHookType */ .c0.RATE_LIMITED:
756542
+ derivedHookConfig = await this.deriveRateLimitedHookConfig(address);
756543
+ break;
756178
756544
  default:
756179
756545
  throw new Error(`Unsupported HookType: ${_types_js__WEBPACK_IMPORTED_MODULE_4__/* .OnchainHookType */ .c0[onchainHookType]}`);
756180
756546
  }
@@ -756276,6 +756642,23 @@ class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1
756276
756642
  this._cache.set(address, config);
756277
756643
  return config;
756278
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
+ }
756279
756662
  async deriveMerkleTreeConfig(address) {
756280
756663
  const hook = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .MerkleTreeHook__factory */ .IFf.connect(address, this.provider);
756281
756664
  this.assertHookType(await hook.hookType(), _types_js__WEBPACK_IMPORTED_MODULE_4__/* .OnchainHookType */ .c0.MERKLE_TREE);
@@ -756563,6 +756946,7 @@ const hookFactories = {
756563
756946
  [_types_js__WEBPACK_IMPORTED_MODULE_1__/* .HookType */ .WD.AMOUNT_ROUTING]: new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .AmountRoutingHook__factory */ ._ff(),
756564
756947
  [_types_js__WEBPACK_IMPORTED_MODULE_1__/* .HookType */ .WD.MAILBOX_DEFAULT]: new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .DefaultHook__factory */ .hR3(),
756565
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(),
756566
756950
  };
756567
756951
  //# sourceMappingURL=contracts.js.map
756568
756952
 
@@ -756578,9 +756962,10 @@ const hookFactories = {
756578
756962
  /* harmony export */ vC: () => (/* binding */ HookConfigSchema),
756579
756963
  /* harmony export */ yx: () => (/* binding */ MUTABLE_HOOK_TYPE)
756580
756964
  /* harmony export */ });
756581
- /* 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 */
756582
756966
  /* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(49355);
756583
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(73689);
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);
756584
756969
  /* harmony import */ var _gas_oracle_types_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(73847);
756585
756970
  /* harmony import */ var _metadata_customZodTypes_js__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(47690);
756586
756971
  /* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(88832);
@@ -756636,6 +757021,11 @@ const HookType = {
756636
757021
  * `EvmHookModule.deploy` path just connects to `config.address`.
756637
757022
  */
756638
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',
756639
757029
  UNKNOWN: 'unknownHook',
756640
757030
  PREDICATE: 'predicateHook',
756641
757031
  };
@@ -756652,6 +757042,7 @@ const HookTypeToContractNameMap = {
756652
757042
  [HookType.ARB_L2_TO_L1]: 'arbL2ToL1Hook',
756653
757043
  [HookType.MAILBOX_DEFAULT]: 'defaultHook',
756654
757044
  [HookType.CCIP]: 'ccipHook',
757045
+ [HookType.RATE_LIMITED]: 'rateLimitedHook',
756655
757046
  };
756656
757047
  // Hook types that can be updated in-place
756657
757048
  const MUTABLE_HOOK_TYPE = [
@@ -756660,6 +757051,7 @@ const MUTABLE_HOOK_TYPE = [
756660
757051
  HookType.ROUTING,
756661
757052
  HookType.FALLBACK_ROUTING,
756662
757053
  HookType.PAUSABLE,
757054
+ HookType.RATE_LIMITED,
756663
757055
  ];
756664
757056
  const ProtocolFeeSchema = _types_js__WEBPACK_IMPORTED_MODULE_0__/* .OwnableSchema */ .wv.extend({
756665
757057
  type: zod__WEBPACK_IMPORTED_MODULE_1__/* .literal */ .eu(HookType.PROTOCOL_FEE),
@@ -756735,6 +757127,24 @@ const UnknownHookSchema = zod__WEBPACK_IMPORTED_MODULE_1__/* .object */ .Ik({
756735
757127
  type: zod__WEBPACK_IMPORTED_MODULE_1__/* .literal */ .eu(HookType.UNKNOWN),
756736
757128
  })
756737
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
+ });
756738
757148
  const KnownHookTypes = Object.values(HookType).filter((t) => t !== HookType.UNKNOWN);
756739
757149
  /**
756740
757150
  * Recursively normalizes unknown hook type values to HookType.UNKNOWN.
@@ -756746,7 +757156,7 @@ const KnownHookTypes = Object.values(HookType).filter((t) => t !== HookType.UNKN
756746
757156
  */
756747
757157
  function normalizeUnknownHookTypes(config) {
756748
757158
  // Handle nullish values and primitives (including string addresses)
756749
- if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .isNullish */ .u)(config) || typeof config !== 'object') {
757159
+ if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .isNullish */ .u)(config) || typeof config !== 'object') {
756750
757160
  return config;
756751
757161
  }
756752
757162
  if (Array.isArray(config)) {
@@ -756761,7 +757171,7 @@ function normalizeUnknownHookTypes(config) {
756761
757171
  ? value
756762
757172
  : HookType.UNKNOWN;
756763
757173
  }
756764
- else if (typeof value === 'object' && !(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .isNullish */ .u)(value)) {
757174
+ else if (typeof value === 'object' && !(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .isNullish */ .u)(value)) {
756765
757175
  normalized[key] = normalizeUnknownHookTypes(value);
756766
757176
  }
756767
757177
  else {
@@ -756785,6 +757195,7 @@ const HookConfigSchema = zod__WEBPACK_IMPORTED_MODULE_1__/* .union */ .KC([
756785
757195
  MailboxDefaultHookSchema,
756786
757196
  CCIPHookSchema,
756787
757197
  CctpHookSchema,
757198
+ RateLimitedHookSchema,
756788
757199
  UnknownHookSchema,
756789
757200
  PredicateHookSchema,
756790
757201
  ]);
@@ -756816,7 +757227,7 @@ const HooksConfigMapSchema = zod__WEBPACK_IMPORTED_MODULE_1__/* .record */ .g1(H
756816
757227
 
756817
757228
 
756818
757229
  async function getEvmHookUpdateTransactions(clientContractAddress, updateHookParams) {
756819
- 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;
756820
757231
  const hookModule = new _EvmHookModule_js__WEBPACK_IMPORTED_MODULE_0__/* .EvmHookModule */ .o(multiProvider, {
756821
757232
  chain: evmChainName,
756822
757233
  config: actualHookConfig,
@@ -756827,6 +757238,7 @@ async function getEvmHookUpdateTransactions(clientContractAddress, updateHookPar
756827
757238
  deployedHook: typeof actualHookConfig === 'string'
756828
757239
  ? actualHookConfig
756829
757240
  : actualHookConfig.address,
757241
+ ...(rateLimitedSender ? { rateLimitedSender } : {}),
756830
757242
  },
756831
757243
  }, ccipContractCache, contractVerifier);
756832
757244
  // Get the current hook address before applying the txs to identify if
@@ -756854,19 +757266,13 @@ async function getEvmHookUpdateTransactions(clientContractAddress, updateHookPar
756854
757266
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
756855
757267
 
756856
757268
  /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
756857
- /* harmony export */ B: () => (/* binding */ stripPredicateSubHook)
757269
+ /* harmony export */ Bl: () => (/* binding */ stripPredicateSubHook),
757270
+ /* harmony export */ r$: () => (/* binding */ hookTreeContainsRateLimited)
756858
757271
  /* harmony export */ });
756859
757272
  /* unused harmony export isHookCompatible */
756860
757273
  /* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(52116);
756861
757274
 
756862
757275
 
756863
- /**
756864
- * Checks if the given hook type is compatible with the chain's technical stack.
756865
- *
756866
- * @param {HookType} params.hookType - The type of hook
756867
- * @param {ChainTechnicalStack | undefined} params.chainTechnicalStack - The technical stack of the chain
756868
- * @returns {boolean} True if the hook type is compatible with the chain, false otherwise
756869
- */
756870
757276
  /**
756871
757277
  * Strips the PREDICATE sub-hook from an aggregation hook config.
756872
757278
  * If the aggregation contains exactly one non-predicate hook, unwraps it.
@@ -756885,6 +757291,30 @@ function stripPredicateSubHook(hook) {
756885
757291
  // Multiple non-predicate hooks remain — can't construct without on-chain address
756886
757292
  return hook;
756887
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
+ }
756888
757318
  const isHookCompatible = ({ hookType, chainTechnicalStack, }) => !(hookType === HookType.AGGREGATION &&
756889
757319
  chainTechnicalStack === ChainTechnicalStack.ZkSync);
756890
757320
  //# sourceMappingURL=utils.js.map
@@ -757074,7 +757504,14 @@ class EvmIsmModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_MO
757074
757504
  // - If it is not a mutable ISM.
757075
757505
  // Else, we have to figure out what an update for this ISM entails
757076
757506
  // Check if we need to deploy a new ISM
757077
- if (typeof normalizedCurrentConfig === 'string' ||
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' ||
757078
757515
  normalizedCurrentConfig.type !== normalizedTargetConfig.type ||
757079
757516
  !_types_js__WEBPACK_IMPORTED_MODULE_4__/* .MUTABLE_ISM_TYPE */ .mJ.includes(normalizedTargetConfig.type)) {
757080
757517
  const contract = await this.deploy({
@@ -757137,6 +757574,12 @@ class EvmIsmModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_MO
757137
757574
  target,
757138
757575
  }));
757139
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
+ }
757140
757583
  else {
757141
757584
  throw new Error(`Unsupported update to mutable ISM of type ${target.type}`);
757142
757585
  }
@@ -757223,6 +757666,24 @@ class EvmIsmModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_MO
757223
757666
  },
757224
757667
  ];
757225
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
+ }
757226
757687
  async deploy({ config, }) {
757227
757688
  config = _types_js__WEBPACK_IMPORTED_MODULE_4__/* .IsmConfigSchema */ .nb.parse(config);
757228
757689
  return this.ismFactory.deploy({
@@ -757605,6 +758066,26 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
757605
758066
  catch {
757606
758067
  this.logger.debug('Error accessing "VERIFIED_MASK_INDEX" property, implying this is not an OP Stack ISM.', address);
757607
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
+ }
757608
758089
  // no specific properties, must be Test ISM
757609
758090
  return {
757610
758091
  address,
@@ -757639,8 +758120,8 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
757639
758120
  /* harmony import */ var _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(50653);
757640
758121
  /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(94523);
757641
758122
  /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(21387);
757642
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(73938);
757643
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(93142);
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);
757644
758125
  /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(39196);
757645
758126
  /* harmony import */ var _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(63942);
757646
758127
  /* harmony import */ var _ccip_utils_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(93035);
@@ -757648,7 +758129,7 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
757648
758129
  /* harmony import */ var _deploy_HyperlaneDeployer_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(6609);
757649
758130
  /* harmony import */ var _deploy_contracts_js__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(98370);
757650
758131
  /* harmony import */ var _metadata_chainMetadataTypes_js__WEBPACK_IMPORTED_MODULE_13__ = __nccwpck_require__(1430);
757651
- /* harmony import */ var _utils_zksync_js__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(68927);
758132
+ /* harmony import */ var _utils_zksync_js__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(68927);
757652
758133
  /* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(69352);
757653
758134
  /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(37748);
757654
758135
 
@@ -757669,6 +758150,7 @@ const ismFactories = {
757669
758150
  [_types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.OP_STACK]: new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .OPStackIsm__factory */ .NR9(),
757670
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(),
757671
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(),
757672
758154
  };
757673
758155
  const domainRoutingInitializationSize = (destination) => {
757674
758156
  if (destination === 'tempo') {
@@ -757791,6 +758273,23 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
757791
758273
  case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.ARB_L2_TO_L1:
757792
758274
  contract = await this.deployer.deployContract(destination, _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.ARB_L2_TO_L1, [config.bridge]);
757793
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
+ }
757794
758293
  case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.CCIP:
757795
758294
  contract = await this.deployCCIPIsm(destination, config);
757796
758295
  break;
@@ -757841,10 +758340,10 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
757841
758340
  break;
757842
758341
  // TODO: support using minimal proxy factories for storage multisig ISMs too
757843
758342
  case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.STORAGE_MERKLE_ROOT_MULTISIG:
757844
- address = await deployStorage(new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .StorageMerkleRootMultisigIsm__factory */ .PCg(), await (0,_utils_zksync_js__WEBPACK_IMPORTED_MODULE_10__/* .getZKSyncArtifactByContractName */ .z)(config.type));
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));
757845
758344
  break;
757846
758345
  case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.STORAGE_MESSAGE_ID_MULTISIG:
757847
- address = await deployStorage(new _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .StorageMessageIdMultisigIsm__factory */ .vYr(), await (0,_utils_zksync_js__WEBPACK_IMPORTED_MODULE_10__/* .getZKSyncArtifactByContractName */ .z)(config.type));
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));
757848
758347
  break;
757849
758348
  default:
757850
758349
  throw new Error(`Unsupported multisig ISM type ${config.type}`);
@@ -757904,7 +758403,7 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
757904
758403
  : contracts.domainRoutingIsmFactory;
757905
758404
  let routingIsm;
757906
758405
  // filtering out domains which are not part of the multiprovider
757907
- config.domains = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_11__/* .objFilter */ .s3)(config.domains, (domain, _) => {
758406
+ config.domains = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .objFilter */ .s3)(config.domains, (domain, _) => {
757908
758407
  const domainId = this.multiProvider.tryGetDomainId(domain);
757909
758408
  if (domainId === null) {
757910
758409
  logger.warn(`Domain ${domain} doesn't have chain metadata provided, skipping ...`);
@@ -757923,7 +758422,7 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
757923
758422
  let isOwner = false;
757924
758423
  if (existingIsmAddress) {
757925
758424
  const owner = await _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .DomainRoutingIsm__factory */ .ayM.connect(existingIsmAddress, provider).owner();
757926
- isOwner = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .eqAddress */ .fv)(await signer.getAddress(), owner);
758425
+ isOwner = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .eqAddress */ .fv)(await signer.getAddress(), owner);
757927
758426
  }
757928
758427
  // reconfiguring existing routing ISM
757929
758428
  if (existingIsmAddress && isOwner && !delta.mailbox) {
@@ -757975,7 +758474,7 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
757975
758474
  throw new Error('Mailbox address is required for deploying fallback routing ISM');
757976
758475
  }
757977
758476
  logger.debug('Deploying fallback routing ISM ...');
757978
- 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_10__/* .getZKSyncArtifactByContractName */ .z)(config.type));
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));
757979
758478
  // TODO: Should verify contract here
757980
758479
  logger.debug('Initialising fallback routing ISM ...');
757981
758480
  receipt = await this.multiProvider.handleTx(destination, routingIsm['initialize(address,uint32[],address[])'](config.owner, safeConfigDomains, submoduleAddresses, overrides));
@@ -758044,7 +758543,7 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
758044
758543
  }
758045
758544
  // Transfer ownership after all enrollments are complete, unless the
758046
758545
  // signer is already the target owner (common for self-owned deploys).
758047
- if (!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .eqAddress */ .fv)(signerAddress, config.owner)) {
758546
+ if (!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .eqAddress */ .fv)(signerAddress, config.owner)) {
758048
758547
  const transferTxEstimatedGas = await routingIsm.estimateGas.transferOwnership(config.owner, overrides);
758049
758548
  const transferTx = await routingIsm.transferOwnership(config.owner, {
758050
758549
  gasLimit: (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .addBufferToGasLimit */ .Zp)(transferTxEstimatedGas, 15),
@@ -758089,7 +758588,7 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
758089
758588
  const sorted = [...values].sort();
758090
758589
  const getAddressResult = await factory['getAddress(address[],uint8)'](sorted, threshold);
758091
758590
  const address = (await this.previewFactoryDeployAddress(chain, factory, 'deploy(address[],uint8)', [sorted, threshold])) ?? getAddressResult;
758092
- if (!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .eqAddress */ .fv)(address, getAddressResult)) {
758591
+ if (!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .eqAddress */ .fv)(address, getAddressResult)) {
758093
758592
  logger.debug(`Factory getAddress mismatch on ${chain}, using deploy simulation address ${address}`);
758094
758593
  }
758095
758594
  const code = await this.multiProvider.getProvider(chain).getCode(address);
@@ -758115,7 +758614,7 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
758115
758614
  const sorted = [...values].sort();
758116
758615
  const getAddressResult = await factory['getAddress((address,uint96)[],uint96)'](sorted, thresholdWeight);
758117
758616
  const address = (await this.previewFactoryDeployAddress(chain, factory, 'deploy((address,uint96)[],uint96)', [sorted, thresholdWeight])) ?? getAddressResult;
758118
- if (!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_12__/* .eqAddress */ .fv)(address, getAddressResult)) {
758617
+ if (!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .eqAddress */ .fv)(address, getAddressResult)) {
758119
758618
  logger.debug(`Weighted factory getAddress mismatch on ${chain}, using deploy simulation address ${address}`);
758120
758619
  }
758121
758620
  const code = await this.multiProvider.getProvider(chain).getCode(address);
@@ -758177,12 +758676,13 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
758177
758676
  /* harmony export */ nR: () => (/* binding */ ModuleType),
758178
758677
  /* harmony export */ nb: () => (/* binding */ IsmConfigSchema)
758179
758678
  /* harmony export */ });
758180
- /* 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 */
758181
758680
  /* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(49355);
758182
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(73689);
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);
758183
758683
  /* harmony import */ var _metadata_customZodTypes_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(47690);
758184
758684
  /* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(88832);
758185
- /* harmony import */ var _utils_schemas_js__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(73535);
758685
+ /* harmony import */ var _utils_schemas_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(73535);
758186
758686
 
758187
758687
 
758188
758688
 
@@ -758228,6 +758728,7 @@ const IsmType = {
758228
758728
  WEIGHTED_MESSAGE_ID_MULTISIG: 'weightedMessageIdMultisigIsm',
758229
758729
  CCIP: 'ccipIsm',
758230
758730
  OFFCHAIN_LOOKUP: 'offchainLookupIsm',
758731
+ RATE_LIMITED: 'rateLimitedIsm',
758231
758732
  UNKNOWN: 'unknownIsm',
758232
758733
  };
758233
758734
  // ISM types that can be updated in-place
@@ -758237,6 +758738,7 @@ const MUTABLE_ISM_TYPE = [
758237
758738
  IsmType.PAUSABLE,
758238
758739
  IsmType.OFFCHAIN_LOOKUP,
758239
758740
  IsmType.INCREMENTAL_ROUTING,
758741
+ IsmType.RATE_LIMITED,
758240
758742
  ];
758241
758743
  /**
758242
758744
  * @notice Statically deployed ISM types
@@ -758281,6 +758783,7 @@ function ismTypeToModuleType(ismType) {
758281
758783
  case IsmType.CUSTOM:
758282
758784
  case IsmType.TRUSTED_RELAYER:
758283
758785
  case IsmType.CCIP:
758786
+ case IsmType.RATE_LIMITED:
758284
758787
  return ModuleType.NULL;
758285
758788
  case IsmType.ARB_L2_TO_L1:
758286
758789
  return ModuleType.ARB_L2_TO_L1;
@@ -758317,6 +758820,26 @@ const TrustedRelayerIsmConfigSchema = zod__WEBPACK_IMPORTED_MODULE_1__/* .object
758317
758820
  type: zod__WEBPACK_IMPORTED_MODULE_1__/* .literal */ .eu(IsmType.TRUSTED_RELAYER),
758318
758821
  relayer: zod__WEBPACK_IMPORTED_MODULE_1__/* .string */ .Yj(),
758319
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
+ });
758320
758843
  const CCIPIsmConfigSchema = zod__WEBPACK_IMPORTED_MODULE_1__/* .object */ .Ik({
758321
758844
  type: zod__WEBPACK_IMPORTED_MODULE_1__/* .literal */ .eu(IsmType.CCIP),
758322
758845
  originChain: zod__WEBPACK_IMPORTED_MODULE_1__/* .string */ .Yj(),
@@ -758325,7 +758848,7 @@ const OffchainLookupIsmConfigSchema = _types_js__WEBPACK_IMPORTED_MODULE_0__/* .
758325
758848
  type: zod__WEBPACK_IMPORTED_MODULE_1__/* .literal */ .eu(IsmType.OFFCHAIN_LOOKUP),
758326
758849
  urls: zod__WEBPACK_IMPORTED_MODULE_1__/* .array */ .YO(zod__WEBPACK_IMPORTED_MODULE_1__/* .string */ .Yj().url()),
758327
758850
  });
758328
- const isOffchainLookupIsmConfig = (0,_utils_schemas_js__WEBPACK_IMPORTED_MODULE_3__/* .isCompliant */ .M)(OffchainLookupIsmConfigSchema);
758851
+ const isOffchainLookupIsmConfig = (0,_utils_schemas_js__WEBPACK_IMPORTED_MODULE_4__/* .isCompliant */ .M)(OffchainLookupIsmConfigSchema);
758329
758852
  const OpStackIsmConfigSchema = zod__WEBPACK_IMPORTED_MODULE_1__/* .object */ .Ik({
758330
758853
  type: zod__WEBPACK_IMPORTED_MODULE_1__/* .literal */ .eu(IsmType.OP_STACK),
758331
758854
  origin: zod__WEBPACK_IMPORTED_MODULE_1__/* .string */ .Yj(),
@@ -758395,7 +758918,7 @@ const KnownIsmTypes = Object.values(IsmType).filter((t) => t !== IsmType.UNKNOWN
758395
758918
  */
758396
758919
  function normalizeUnknownIsmTypes(config) {
758397
758920
  // Handle nullish values and primitives (including string addresses)
758398
- if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .isNullish */ .u)(config) || typeof config !== 'object') {
758921
+ if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .isNullish */ .u)(config) || typeof config !== 'object') {
758399
758922
  return config;
758400
758923
  }
758401
758924
  if (Array.isArray(config)) {
@@ -758408,7 +758931,7 @@ function normalizeUnknownIsmTypes(config) {
758408
758931
  if (key === 'type' && typeof value === 'string') {
758409
758932
  normalized[key] = KnownIsmTypes.includes(value) ? value : IsmType.UNKNOWN;
758410
758933
  }
758411
- else if (typeof value === 'object' && !(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .isNullish */ .u)(value)) {
758934
+ else if (typeof value === 'object' && !(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .isNullish */ .u)(value)) {
758412
758935
  normalized[key] = normalizeUnknownIsmTypes(value);
758413
758936
  }
758414
758937
  else {
@@ -758424,6 +758947,7 @@ const IsmConfigSchema = zod__WEBPACK_IMPORTED_MODULE_1__/* .union */ .KC([
758424
758947
  PausableIsmConfigSchema,
758425
758948
  TrustedRelayerIsmConfigSchema,
758426
758949
  CCIPIsmConfigSchema,
758950
+ RateLimitedIsmConfigSchema,
758427
758951
  MultisigIsmConfigSchema,
758428
758952
  WeightedMultisigIsmConfigSchema,
758429
758953
  RoutingIsmConfigSchema,
@@ -758752,6 +759276,22 @@ async function moduleMatchesConfig(chain, moduleAddress, config, multiProvider,
758752
759276
  matches = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .eqAddress */ .fv)(expectedAddress, module.address);
758753
759277
  break;
758754
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
+ }
758755
759295
  default: {
758756
759296
  throw new Error('Unsupported ModuleType');
758757
759297
  }
@@ -760446,14 +760986,10 @@ __nccwpck_require__.d(__webpack_exports__, {
760446
760986
  ij: () => (/* binding */ buildInterchainAccountApp)
760447
760987
  });
760448
760988
 
760449
- // UNUSED EXPORTS: PostCallsSchema, commitmentFromIcaCalls, commitmentFromRevealMessage, deployInterchainAccount, encodeIcaCalls, isPostCallsIca, normalizeCalls, shareCallsWithPrivateRelayer
760989
+ // UNUSED EXPORTS: deployInterchainAccount, shareCallsWithPrivateRelayer
760450
760990
 
760451
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
760452
760992
  var lib = __nccwpck_require__(61934);
760453
- // EXTERNAL MODULE: ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js + 4 modules
760454
- var types = __nccwpck_require__(49355);
760455
- // EXTERNAL MODULE: ../sdk/dist/metadata/customZodTypes.js
760456
- var customZodTypes = __nccwpck_require__(47690);
760457
760993
  // EXTERNAL MODULE: ../../solidity/dist/index.js + 845 modules
760458
760994
  var dist = __nccwpck_require__(50653);
760459
760995
  // EXTERNAL MODULE: ../utils/dist/addresses.js
@@ -760467,7 +761003,7 @@ var objects = __nccwpck_require__(73938);
760467
761003
  // EXTERNAL MODULE: ../sdk/dist/contracts/contracts.js
760468
761004
  var contracts = __nccwpck_require__(15570);
760469
761005
  // EXTERNAL MODULE: ../utils/dist/types.js
760470
- var dist_types = __nccwpck_require__(16639);
761006
+ var types = __nccwpck_require__(16639);
760471
761007
  // EXTERNAL MODULE: ../sdk/dist/app/HyperlaneApp.js
760472
761008
  var HyperlaneApp = __nccwpck_require__(63942);
760473
761009
  ;// CONCATENATED MODULE: ../sdk/dist/router/RouterApps.js
@@ -760480,7 +761016,7 @@ class RouterApp extends HyperlaneApp/* HyperlaneApp */.E {
760480
761016
  this.foreignDeployments = foreignDeployments;
760481
761017
  }
760482
761018
  routerAddress(chainName) {
760483
- if ((0,dist_types/* isEVMLike */.Us)(this.multiProvider.getChainMetadata(chainName).protocol)) {
761019
+ if ((0,types/* isEVMLike */.Us)(this.multiProvider.getChainMetadata(chainName).protocol)) {
760484
761020
  return this.router(this.contractsMap[chainName]).address;
760485
761021
  }
760486
761022
  return this.foreignDeployments[chainName];
@@ -760522,8 +761058,6 @@ var account_contracts = __nccwpck_require__(29817);
760522
761058
 
760523
761059
 
760524
761060
 
760525
-
760526
-
760527
761061
  const IGP_DEFAULT_GAS = lib.BigNumber.from(50_000);
760528
761062
  const ICA_OVERHEAD = lib.BigNumber.from(50_000);
760529
761063
  const PER_CALL_OVERHEAD = lib.BigNumber.from(5_000);
@@ -760765,73 +761299,6 @@ async function deployInterchainAccount(multiProvider, chain, config, coreAddress
760765
761299
  const interchainAccountApp = await buildInterchainAccountApp(multiProvider, chain, config, coreAddressesByChain);
760766
761300
  return interchainAccountApp.deployAccount(chain, config);
760767
761301
  }
760768
- function encodeIcaCalls(calls, salt) {
760769
- return (salt +
760770
- utils.defaultAbiCoder
760771
- .encode(['tuple(bytes32 to,uint256 value,bytes data)[]'], [
760772
- calls.map((c) => ({
760773
- to: addressToBytes32(c.to),
760774
- value: c.value || 0,
760775
- data: c.data,
760776
- })),
760777
- ])
760778
- .slice(2));
760779
- }
760780
- function normalizeCalls(calls) {
760781
- return calls.map((call) => ({
760782
- to: addressToBytes32(call.to),
760783
- value: BigNumber.from(call.value || 0),
760784
- data: call.data,
760785
- }));
760786
- }
760787
- function commitmentFromIcaCalls(calls, salt) {
760788
- return utils.keccak256(encodeIcaCalls(calls, salt));
760789
- }
760790
- /**
760791
- * Format of REVEAL message:
760792
- * [ 0: 1] MessageType.REVEAL (uint8)
760793
- * [ 1: 33] ICA ISM (bytes32)
760794
- * [ 33: 65] Commitment (bytes32)
760795
- */
760796
- function commitmentFromRevealMessage(message) {
760797
- const messageBuffer = fromHexString(message);
760798
- // Validate minimum length (65 bytes: 1 byte type + 32 bytes ISM + 32 bytes commitment)
760799
- if (messageBuffer.length < 65) {
760800
- throw new Error(`Invalid reveal message: expected at least 65 bytes, got ${messageBuffer.length} bytes`);
760801
- }
760802
- // Extract commitment from bytes 33-65 (32 bytes)
760803
- const commitment = messageBuffer.subarray(33, 65);
760804
- return toHexString(commitment);
760805
- }
760806
- const PostCallsBaseSchema = types/* object */.Ik({
760807
- calls: types/* array */.YO(types/* object */.Ik({
760808
- to: customZodTypes/* ZHash */.l,
760809
- data: types/* string */.Yj(),
760810
- value: types/* string */.Yj().optional(),
760811
- }))
760812
- .min(1),
760813
- relayers: types/* array */.YO(customZodTypes/* ZHash */.l),
760814
- salt: customZodTypes/* ZHash */.l,
760815
- ismOverride: customZodTypes/* ZHash */.l.optional(),
760816
- originDomain: types/* number */.ai(),
760817
- });
760818
- // Legacy shape: ICA derived from dispatch tx receipt events
760819
- const PostCallsLegacySchema = PostCallsBaseSchema.extend({
760820
- commitmentDispatchTx: customZodTypes/* ZHash */.l,
760821
- });
760822
- // New shape: ICA derived directly from destination + owner
760823
- const PostCallsIcaSchema = PostCallsBaseSchema.extend({
760824
- destinationDomain: types/* number */.ai(),
760825
- owner: customZodTypes/* ZHash */.l,
760826
- userSalt: customZodTypes/* ZHash */.l.optional(),
760827
- });
760828
- const PostCallsSchema = types/* union */.KC([
760829
- PostCallsIcaSchema,
760830
- PostCallsLegacySchema,
760831
- ]);
760832
- function isPostCallsIca(data) {
760833
- return 'destinationDomain' in data && 'owner' in data;
760834
- }
760835
761302
  async function shareCallsWithPrivateRelayer(serverUrl, payload) {
760836
761303
  const resp = await fetch(serverUrl, {
760837
761304
  method: 'POST',
@@ -763366,7 +763833,7 @@ __webpack_async_result__();
763366
763833
  /* harmony export */ RN: () => (/* binding */ estimateTransactionFee),
763367
763834
  /* harmony export */ sI: () => (/* binding */ estimateTransactionFeeEthersV5ForGasUnits)
763368
763835
  /* harmony export */ });
763369
- /* 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 */
763370
763837
  /* harmony import */ var _cosmjs_amino__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(46661);
763371
763838
  /* harmony import */ var _cosmjs_cosmwasm_stargate__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(81729);
763372
763839
  /* harmony import */ var _cosmjs_encoding__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(35813);
@@ -763374,10 +763841,11 @@ __webpack_async_result__();
763374
763841
  /* harmony import */ var _cosmjs_proto_signing__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(5505);
763375
763842
  /* harmony import */ var _cosmjs_stargate__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(69403);
763376
763843
  /* harmony import */ var cosmjs_types_cosmwasm_wasm_v1_tx_js__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(79234);
763377
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(21387);
763378
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(93142);
763379
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(16639);
763380
- /* harmony import */ var _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(25047);
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);
763381
763849
 
763382
763850
 
763383
763851
 
@@ -763387,6 +763855,14 @@ __webpack_async_result__();
763387
763855
 
763388
763856
 
763389
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
+ }
763390
763866
  async function estimateTransactionFeeEthersV5({ transaction, provider, sender, }) {
763391
763867
  const gasUnits = await provider.estimateGas({
763392
763868
  ...transaction,
@@ -763433,7 +763909,7 @@ function computeEvmTxFee(gasUnits, gasPrice, maxFeePerGas, maxPriorityFeePerGas)
763433
763909
  async function estimateTransactionFeeSolanaWeb3({ provider, transaction, }) {
763434
763910
  const connection = provider.provider;
763435
763911
  const { value } = await connection.simulateTransaction(transaction.transaction);
763436
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__/* .assert */ .v)(!value.err, `Solana gas estimation failed: ${JSON.stringify(value)}`);
763912
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .v)(!value.err, `Solana gas estimation failed: ${JSON.stringify(value)}`);
763437
763913
  const gasUnits = BigInt(value.unitsConsumed || 0);
763438
763914
  const recentFees = await connection.getRecentPrioritizationFees();
763439
763915
  const gasPrice = BigInt(recentFees[0].prioritizationFee);
@@ -763458,7 +763934,7 @@ async function estimateTransactionFeeCosmJs({ transaction, provider, estimatedGa
763458
763934
  // @ts-ignore force access to protected method
763459
763935
  .forceGetQueryClient()
763460
763936
  .tx.simulate([encodedMsg], memo, encodedPubkey, sequence);
763461
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__/* .assert */ .v)(gasInfo, 'Gas estimation failed');
763937
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .v)(gasInfo, 'Gas estimation failed');
763462
763938
  const gasUnits = _cosmjs_math__WEBPACK_IMPORTED_MODULE_3__.Uint53.fromString(gasInfo.gasUsed.toString()).toNumber();
763463
763939
  const gasPrice = parseFloat(estimatedGasPrice.toString());
763464
763940
  return {
@@ -763480,15 +763956,29 @@ async function estimateTransactionFeeCosmJsWasm({ transaction, provider, estimat
763480
763956
  const wasmClient = await provider.provider;
763481
763957
  // @ts-ignore access a private field here to extract client URL
763482
763958
  const url = wasmClient.cometClient.client.url;
763483
- const stargateClient = _cosmjs_stargate__WEBPACK_IMPORTED_MODULE_5__.StargateClient.connect(url);
763484
- return estimateTransactionFeeCosmJs({
763485
- transaction: { type: _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.CosmJs, transaction: message },
763486
- provider: { type: _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.CosmJs, provider: stargateClient },
763487
- estimatedGasPrice,
763488
- sender,
763489
- senderPubKey,
763490
- memo,
763491
- });
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
+ }
763492
763982
  }
763493
763983
  async function estimateTransactionFeeCosmJsNative({ transaction, provider, estimatedGasPrice, senderAddress, senderPubKey, }) {
763494
763984
  const client = await provider.provider;
@@ -763515,28 +764005,28 @@ async function estimateTransactionFeeAleo({ transaction, provider, }) {
763515
764005
  });
763516
764006
  }
763517
764007
  function estimateTransactionFee({ transaction, provider, chainMetadata, sender, senderPubKey, }) {
763518
- if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.EthersV5 &&
763519
- provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.EthersV5) {
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) {
763520
764010
  return estimateTransactionFeeEthersV5({
763521
764011
  transaction: transaction.transaction,
763522
764012
  provider: provider.provider,
763523
764013
  sender,
763524
764014
  });
763525
764015
  }
763526
- else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.Viem &&
763527
- provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.Viem) {
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) {
763528
764018
  return estimateTransactionFeeViem({ transaction, provider, sender });
763529
764019
  }
763530
- else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.SolanaWeb3 &&
763531
- provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.SolanaWeb3) {
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) {
763532
764022
  return estimateTransactionFeeSolanaWeb3({ transaction, provider });
763533
764023
  }
763534
- else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.CosmJs &&
763535
- provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.CosmJs) {
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) {
763536
764026
  const { transactionOverrides } = chainMetadata;
763537
764027
  const estimatedGasPrice = transactionOverrides?.gasPrice;
763538
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__/* .assert */ .v)(estimatedGasPrice, 'gasPrice required for CosmJS gas estimation');
763539
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__/* .assert */ .v)(senderPubKey, 'senderPubKey required for CosmJS gas estimation');
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');
763540
764030
  return estimateTransactionFeeCosmJs({
763541
764031
  transaction,
763542
764032
  provider,
@@ -763545,12 +764035,12 @@ function estimateTransactionFee({ transaction, provider, chainMetadata, sender,
763545
764035
  senderPubKey,
763546
764036
  });
763547
764037
  }
763548
- else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.CosmJsWasm &&
763549
- provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.CosmJsWasm) {
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) {
763550
764040
  const { transactionOverrides } = chainMetadata;
763551
764041
  const estimatedGasPrice = transactionOverrides?.gasPrice;
763552
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__/* .assert */ .v)(estimatedGasPrice, 'gasPrice required for CosmJS gas estimation');
763553
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__/* .assert */ .v)(senderPubKey, 'senderPubKey required for CosmJS gas estimation');
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');
763554
764044
  return estimateTransactionFeeCosmJsWasm({
763555
764045
  transaction,
763556
764046
  provider,
@@ -763559,12 +764049,12 @@ function estimateTransactionFee({ transaction, provider, chainMetadata, sender,
763559
764049
  senderPubKey,
763560
764050
  });
763561
764051
  }
763562
- else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.CosmJsNative &&
763563
- provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.CosmJsNative) {
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) {
763564
764054
  const { transactionOverrides } = chainMetadata;
763565
764055
  const estimatedGasPrice = transactionOverrides?.gasPrice;
763566
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__/* .assert */ .v)(estimatedGasPrice, 'gasPrice required for CosmJS gas estimation');
763567
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__/* .assert */ .v)(senderPubKey, 'senderPubKey required for CosmJS gas estimation');
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');
763568
764058
  return estimateTransactionFeeCosmJsNative({
763569
764059
  transaction,
763570
764060
  provider,
@@ -763573,28 +764063,28 @@ function estimateTransactionFee({ transaction, provider, chainMetadata, sender,
763573
764063
  senderPubKey,
763574
764064
  });
763575
764065
  }
763576
- else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.Starknet &&
763577
- provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.Starknet) {
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) {
763578
764068
  return estimateTransactionFeeStarknet({ transaction, provider, sender });
763579
764069
  }
763580
- else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.Radix &&
763581
- provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.Radix) {
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) {
763582
764072
  return estimateTransactionFeeRadix({
763583
764073
  transaction,
763584
764074
  provider,
763585
764075
  });
763586
764076
  }
763587
- else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.Aleo &&
763588
- provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.Aleo) {
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) {
763589
764079
  return estimateTransactionFeeAleo({
763590
764080
  transaction,
763591
764081
  provider,
763592
764082
  });
763593
764083
  }
763594
- else if (transaction.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.Tron &&
763595
- provider.type === _ProviderType_js__WEBPACK_IMPORTED_MODULE_8__/* .ProviderType */ .c.Tron) {
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) {
763596
764086
  // Tron is EVM-compatible; its typed transaction/provider use EthersV5 underlying types
763597
- sender = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .convertToProtocolAddress */ .Vj)(sender, _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .ProtocolType */ .Hb.Ethereum);
764087
+ sender = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .convertToProtocolAddress */ .Vj)(sender, _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_11__/* .ProtocolType */ .Hb.Ethereum);
763598
764088
  return estimateTransactionFeeEthersV5({
763599
764089
  transaction: transaction.transaction,
763600
764090
  provider: provider.provider,
@@ -800689,6 +801179,7 @@ class HyperlaneRouterDeployer extends _deploy_HyperlaneDeployer_js__WEBPACK_IMPO
800689
801179
  });
800690
801180
  }));
800691
801181
  }
801182
+ async beforeTransferOwnership(_contractsMap, _configMap) { }
800692
801183
  async transferOwnership(contractsMap, configMap) {
800693
801184
  this.logger.debug(`Transferring ownership of ownables...`);
800694
801185
  for (const chain of Object.keys(contractsMap)) {
@@ -800706,6 +801197,7 @@ class HyperlaneRouterDeployer extends _deploy_HyperlaneDeployer_js__WEBPACK_IMPO
800706
801197
  await this.enrollRemoteRouters(deployedContractsMap, configMap, foreignDeployments);
800707
801198
  await this.deployAndConfigureTokenFees(deployedContractsMap, configMap);
800708
801199
  await this.configureClients(deployedContractsMap, configMap);
801200
+ await this.beforeTransferOwnership(deployedContractsMap, configMap);
800709
801201
  await this.transferOwnership(deployedContractsMap, configMap);
800710
801202
  this.logger.debug(`Finished deploying router contracts for all chains.`);
800711
801203
  return deployedContractsMap;
@@ -801238,40 +801730,41 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
801238
801730
  /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
801239
801731
  /* harmony export */ N: () => (/* binding */ EvmWarpModule)
801240
801732
  /* harmony export */ });
801241
- /* harmony import */ var compare_versions__WEBPACK_IMPORTED_MODULE_28__ = __nccwpck_require__(95416);
801242
- /* harmony import */ var ethers__WEBPACK_IMPORTED_MODULE_20__ = __nccwpck_require__(61934);
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);
801243
801735
  /* harmony import */ var starknet__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(98954);
801244
801736
  /* harmony import */ var _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(50653);
801245
801737
  /* harmony import */ var _hyperlane_xyz_core_buildArtifact_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(74119);
801246
801738
  /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(73938);
801247
801739
  /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(93142);
801248
801740
  /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(94523);
801249
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_13__ = __nccwpck_require__(21387);
801250
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(52193);
801251
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_16__ = __nccwpck_require__(73689);
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);
801252
801744
  /* harmony import */ var _block_explorer_etherscan_js__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(26492);
801253
- /* harmony import */ var _contracts_contracts_js__WEBPACK_IMPORTED_MODULE_25__ = __nccwpck_require__(15570);
801745
+ /* harmony import */ var _contracts_contracts_js__WEBPACK_IMPORTED_MODULE_26__ = __nccwpck_require__(15570);
801254
801746
  /* harmony import */ var _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(53387);
801255
- /* harmony import */ var _deploy_proxy_js__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(83697);
801747
+ /* harmony import */ var _deploy_proxy_js__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(83697);
801256
801748
  /* harmony import */ var _deploy_verify_ContractVerifier_js__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(76939);
801257
- /* harmony import */ var _fee_EvmTokenFeeModule_js__WEBPACK_IMPORTED_MODULE_24__ = __nccwpck_require__(43313);
801258
- /* harmony import */ var _hook_updates_js__WEBPACK_IMPORTED_MODULE_18__ = __nccwpck_require__(69203);
801259
- /* harmony import */ var _hook_utils_js__WEBPACK_IMPORTED_MODULE_17__ = __nccwpck_require__(13912);
801260
- /* harmony import */ var _hook_types_js__WEBPACK_IMPORTED_MODULE_21__ = __nccwpck_require__(52116);
801261
- /* harmony import */ var _ism_EvmIsmModule_js__WEBPACK_IMPORTED_MODULE_26__ = __nccwpck_require__(3612);
801262
- /* harmony import */ var _predicate_PredicateDeployer_js__WEBPACK_IMPORTED_MODULE_22__ = __nccwpck_require__(550);
801263
- /* harmony import */ var _router_types_js__WEBPACK_IMPORTED_MODULE_15__ = __nccwpck_require__(38230);
801264
- /* harmony import */ var _utils_decimals_js__WEBPACK_IMPORTED_MODULE_29__ = __nccwpck_require__(27043);
801265
- /* harmony import */ var _utils_ism_js__WEBPACK_IMPORTED_MODULE_19__ = __nccwpck_require__(764);
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);
801266
801759
  /* harmony import */ var _EvmWarpRouteReader_js__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(40945);
801267
- /* harmony import */ var _EvmXERC20Module_js__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(5715);
801268
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_27__ = __nccwpck_require__(4169);
801269
- /* harmony import */ var _configUtils_js__WEBPACK_IMPORTED_MODULE_23__ = __nccwpck_require__(63776);
801270
- /* harmony import */ var _contracts_js__WEBPACK_IMPORTED_MODULE_31__ = __nccwpck_require__(81504);
801271
- /* harmony import */ var _deploy_js__WEBPACK_IMPORTED_MODULE_30__ = __nccwpck_require__(19186);
801272
- /* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(38466);
801273
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_EvmXERC20Module_js__WEBPACK_IMPORTED_MODULE_11__]);
801274
- _EvmXERC20Module_js__WEBPACK_IMPORTED_MODULE_11__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
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];
801275
801768
  // import { expect } from 'chai';
801276
801769
 
801277
801770
 
@@ -801298,6 +801791,7 @@ _EvmXERC20Module_js__WEBPACK_IMPORTED_MODULE_11__ = (__webpack_async_dependencie
801298
801791
 
801299
801792
 
801300
801793
 
801794
+
801301
801795
 
801302
801796
 
801303
801797
  const getAllowedRebalancingBridgesByDomain = (allowedRebalancingBridgesByDomain) => {
@@ -801335,7 +801829,31 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801335
801829
  * @returns A promise that resolves to the token router configuration.
801336
801830
  */
801337
801831
  async read() {
801338
- return this.reader.deriveWarpRouteConfig(this.args.addresses.deployedTokenRoute);
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;
801339
801857
  }
801340
801858
  /**
801341
801859
  * Updates the Warp Route contract with the provided configuration.
@@ -801349,12 +801867,12 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801349
801867
  * @returns An array of Ethereum transactions that were executed to update the contract, or an error if the update failed.
801350
801868
  */
801351
801869
  async update(expectedConfig, tokenReaderParams) {
801352
- _types_js__WEBPACK_IMPORTED_MODULE_10__/* .HypTokenRouterConfigSchema */ .db.parse(expectedConfig);
801870
+ _types_js__WEBPACK_IMPORTED_MODULE_12__/* .HypTokenRouterConfigSchema */ .db.parse(expectedConfig);
801353
801871
  const actualConfig = await this.read();
801354
801872
  const transactions = [];
801355
801873
  let xerc20Txs = [];
801356
- if ((0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isXERC20TokenConfig */ .Kh)(expectedConfig)) {
801357
- const { module, config } = await _EvmXERC20Module_js__WEBPACK_IMPORTED_MODULE_11__/* .EvmXERC20Module */ .J.fromWarpRouteConfig(this.multiProvider, this.chainName, expectedConfig, this.args.addresses.deployedTokenRoute);
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);
801358
801876
  xerc20Txs = await module.update(config);
801359
801877
  }
801360
801878
  /**
@@ -801369,7 +801887,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801369
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),
801370
801888
  // MC unenroll before enroll for consistency with remote routers.
801371
801889
  // MC enrollment must come before gas setting so that MC-only domains
801372
- ...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_12__/* .proxyAdminUpdateTxs */ .CK)(this.chainId, this.args.addresses.deployedTokenRoute, actualConfig, expectedConfig));
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));
801373
801891
  return transactions;
801374
801892
  }
801375
801893
  /**
@@ -801381,15 +801899,15 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801381
801899
  */
801382
801900
  createEnrollRemoteRoutersUpdateTxs(actualConfig, expectedConfig) {
801383
801901
  // OFT contracts don't have Router interface — no remote router enrollment
801384
- if ((0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isOftTokenConfig */ .vo)(expectedConfig)) {
801902
+ if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isOftTokenConfig */ .vo)(expectedConfig)) {
801385
801903
  return [];
801386
801904
  }
801387
801905
  const updateTransactions = [];
801388
801906
  if (!expectedConfig.remoteRouters) {
801389
801907
  return [];
801390
801908
  }
801391
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_13__/* .assert */ .v)(actualConfig.remoteRouters, 'actualRemoteRouters is undefined');
801392
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_13__/* .assert */ .v)(expectedConfig.remoteRouters, 'actualRemoteRouters is undefined');
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');
801393
801911
  const { remoteRouters: actualRemoteRouters } = actualConfig;
801394
801912
  const { remoteRouters: expectedRemoteRouters } = expectedConfig;
801395
801913
  const routesToEnroll = Object.entries(expectedRemoteRouters)
@@ -801420,18 +801938,18 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801420
801938
  }
801421
801939
  createUnenrollRemoteRoutersUpdateTxs(actualConfig, expectedConfig) {
801422
801940
  // OFT contracts don't have Router interface — no remote router unenrollment
801423
- if ((0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isOftTokenConfig */ .vo)(expectedConfig)) {
801941
+ if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isOftTokenConfig */ .vo)(expectedConfig)) {
801424
801942
  return [];
801425
801943
  }
801426
801944
  const updateTransactions = [];
801427
801945
  if (!expectedConfig.remoteRouters) {
801428
801946
  return [];
801429
801947
  }
801430
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_13__/* .assert */ .v)(actualConfig.remoteRouters, 'actualRemoteRouters is undefined');
801431
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_13__/* .assert */ .v)(expectedConfig.remoteRouters, 'actualRemoteRouters is undefined');
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');
801432
801950
  const { remoteRouters: actualRemoteRouters } = actualConfig;
801433
801951
  const { remoteRouters: expectedRemoteRouters } = expectedConfig;
801434
- const routesToUnenroll = Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .difference */ .iv)(new Set(Object.keys(actualRemoteRouters)), new Set(Object.keys(expectedRemoteRouters))));
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))));
801435
801953
  if (routesToUnenroll.length === 0) {
801436
801954
  return updateTransactions;
801437
801955
  }
@@ -801445,8 +801963,8 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801445
801963
  return updateTransactions;
801446
801964
  }
801447
801965
  createAddRebalancersUpdateTxs(actualConfig, expectedConfig) {
801448
- if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isMovableCollateralTokenConfig */ .zW)(expectedConfig) ||
801449
- !(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isMovableCollateralTokenConfig */ .zW)(actualConfig)) {
801966
+ if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(expectedConfig) ||
801967
+ !(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(actualConfig)) {
801450
801968
  return [];
801451
801969
  }
801452
801970
  if (!expectedConfig.allowedRebalancers) {
@@ -801454,7 +801972,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801454
801972
  }
801455
801973
  const formattedExpectedRebalancers = new Set(expectedConfig.allowedRebalancers.map(_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .normalizeAddressEvm */ .Ek));
801456
801974
  const formattedActualRebalancers = new Set((actualConfig.allowedRebalancers ?? []).map(_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .normalizeAddressEvm */ .Ek));
801457
- const rebalancersToAdd = Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .difference */ .iv)(formattedExpectedRebalancers, formattedActualRebalancers));
801975
+ const rebalancersToAdd = Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_16__/* .difference */ .iv)(formattedExpectedRebalancers, formattedActualRebalancers));
801458
801976
  if (rebalancersToAdd.length === 0) {
801459
801977
  return [];
801460
801978
  }
@@ -801466,8 +801984,8 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801466
801984
  }));
801467
801985
  }
801468
801986
  createRemoveRebalancersUpdateTxs(actualConfig, expectedConfig) {
801469
- if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isMovableCollateralTokenConfig */ .zW)(expectedConfig) ||
801470
- !(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isMovableCollateralTokenConfig */ .zW)(actualConfig)) {
801987
+ if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(expectedConfig) ||
801988
+ !(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(actualConfig)) {
801471
801989
  return [];
801472
801990
  }
801473
801991
  if (!expectedConfig.allowedRebalancers) {
@@ -801475,7 +801993,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801475
801993
  }
801476
801994
  const formattedExpectedRebalancers = new Set(expectedConfig.allowedRebalancers.map(_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .normalizeAddressEvm */ .Ek));
801477
801995
  const formattedActualRebalancers = new Set((actualConfig.allowedRebalancers ?? []).map(_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .normalizeAddressEvm */ .Ek));
801478
- const rebalancersToRemove = Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .difference */ .iv)(formattedActualRebalancers, formattedExpectedRebalancers));
801996
+ const rebalancersToRemove = Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_16__/* .difference */ .iv)(formattedActualRebalancers, formattedExpectedRebalancers));
801479
801997
  if (rebalancersToRemove.length === 0) {
801480
801998
  return [];
801481
801999
  }
@@ -801490,15 +802008,15 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801490
802008
  * Create transactions to enroll CrossCollateralRouter routers.
801491
802009
  */
801492
802010
  createEnrollCrossCollateralRoutersTxs(actualConfig, expectedConfig) {
801493
- if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isCrossCollateralTokenConfig */ .v3)(expectedConfig) ||
801494
- !(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isCrossCollateralTokenConfig */ .v3)(actualConfig)) {
802011
+ if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCrossCollateralTokenConfig */ .v3)(expectedConfig) ||
802012
+ !(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCrossCollateralTokenConfig */ .v3)(actualConfig)) {
801495
802013
  return [];
801496
802014
  }
801497
802015
  if (!expectedConfig.crossCollateralRouters) {
801498
802016
  return [];
801499
802017
  }
801500
- const actualEnrolled = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.crossCollateralRouters ?? {});
801501
- const expectedEnrolled = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.crossCollateralRouters);
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);
801502
802020
  const domainsToEnroll = [];
801503
802021
  const routersToEnroll = [];
801504
802022
  for (const [domain, expectedRouters] of Object.entries(expectedEnrolled)) {
@@ -801528,13 +802046,13 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801528
802046
  * Create transactions to unenroll CrossCollateralRouter routers.
801529
802047
  */
801530
802048
  createUnenrollCrossCollateralRoutersTxs(actualConfig, expectedConfig) {
801531
- if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isCrossCollateralTokenConfig */ .v3)(expectedConfig) ||
801532
- !(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isCrossCollateralTokenConfig */ .v3)(actualConfig)) {
802049
+ if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCrossCollateralTokenConfig */ .v3)(expectedConfig) ||
802050
+ !(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCrossCollateralTokenConfig */ .v3)(actualConfig)) {
801533
802051
  return [];
801534
802052
  }
801535
802053
  const expectedCrossCollateralRouters = expectedConfig.crossCollateralRouters ?? {};
801536
- const actualEnrolled = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.crossCollateralRouters ?? {});
801537
- const expectedEnrolled = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedCrossCollateralRouters);
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);
801538
802056
  const domainsToUnenroll = [];
801539
802057
  const routersToUnenroll = [];
801540
802058
  for (const [domain, actualRouters] of Object.entries(actualEnrolled)) {
@@ -801568,8 +802086,8 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801568
802086
  return lower;
801569
802087
  }
801570
802088
  async getAllowedBridgesApprovalTxs(actualConfig, expectedConfig) {
801571
- if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isMovableCollateralTokenConfig */ .zW)(expectedConfig) ||
801572
- !(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isMovableCollateralTokenConfig */ .zW)(actualConfig)) {
802089
+ if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(expectedConfig) ||
802090
+ !(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(actualConfig)) {
801573
802091
  return [];
801574
802092
  }
801575
802093
  if (!expectedConfig.allowedRebalancingBridges) {
@@ -801603,18 +802121,18 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801603
802121
  })));
801604
802122
  }
801605
802123
  async createAddAllowedBridgesUpdateTxs(actualConfig, expectedConfig) {
801606
- if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isMovableCollateralTokenConfig */ .zW)(expectedConfig) ||
801607
- !(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isMovableCollateralTokenConfig */ .zW)(actualConfig)) {
802124
+ if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(expectedConfig) ||
802125
+ !(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(actualConfig)) {
801608
802126
  return [];
801609
802127
  }
801610
802128
  if (!expectedConfig.allowedRebalancingBridges) {
801611
802129
  return [];
801612
802130
  }
801613
- const actualAllowedBridges = getAllowedRebalancingBridgesByDomain((0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.allowedRebalancingBridges ?? {}));
801614
- const expectedAllowedBridges = getAllowedRebalancingBridgesByDomain((0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.allowedRebalancingBridges));
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));
801615
802133
  const rebalancingBridgesToAddByDomain = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .objMap */ .Yp)(expectedAllowedBridges, (domain, bridges) => {
801616
802134
  const actualBridges = actualAllowedBridges[domain] ?? new Set();
801617
- return Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .difference */ .iv)(bridges, actualBridges));
802135
+ return Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_16__/* .difference */ .iv)(bridges, actualBridges));
801618
802136
  });
801619
802137
  const bridgesToAllow = Object.entries(rebalancingBridgesToAddByDomain).flatMap(([domain, allowedBridgesToAdd]) => {
801620
802138
  return allowedBridgesToAdd.map((bridgeToAdd) => {
@@ -801630,18 +802148,18 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801630
802148
  return [...bridgesToAllow, ...approvalTxs];
801631
802149
  }
801632
802150
  createRemoveBridgesTxs(actualConfig, expectedConfig) {
801633
- if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isMovableCollateralTokenConfig */ .zW)(expectedConfig) ||
801634
- !(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isMovableCollateralTokenConfig */ .zW)(actualConfig)) {
802151
+ if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(expectedConfig) ||
802152
+ !(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(actualConfig)) {
801635
802153
  return [];
801636
802154
  }
801637
802155
  if (!expectedConfig.allowedRebalancingBridges) {
801638
802156
  return [];
801639
802157
  }
801640
- const actualAllowedBridges = getAllowedRebalancingBridgesByDomain((0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.allowedRebalancingBridges ?? {}));
801641
- const expectedAllowedBridges = getAllowedRebalancingBridgesByDomain((0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.allowedRebalancingBridges));
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));
801642
802160
  const rebalancingBridgesToAddByDomain = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .objMap */ .Yp)(actualAllowedBridges, (domain, bridges) => {
801643
802161
  const expectedBridges = expectedAllowedBridges[domain] ?? new Set();
801644
- return Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .difference */ .iv)(bridges, expectedBridges));
802162
+ return Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_16__/* .difference */ .iv)(bridges, expectedBridges));
801645
802163
  });
801646
802164
  return Object.entries(rebalancingBridgesToAddByDomain).flatMap(([domain, allowedBridgesToAdd]) => {
801647
802165
  return allowedBridgesToAdd.map((bridgeToAdd) => {
@@ -801655,12 +802173,12 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801655
802173
  });
801656
802174
  }
801657
802175
  createAddRemoteOutputAssetsTxs(actualConfig, expectedConfig) {
801658
- if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isEverclearTokenBridgeConfig */ .e6)(expectedConfig) ||
801659
- !(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isEverclearTokenBridgeConfig */ .e6)(actualConfig)) {
802176
+ if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(expectedConfig) ||
802177
+ !(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(actualConfig)) {
801660
802178
  return [];
801661
802179
  }
801662
- const actualOutputAssets = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.outputAssets);
801663
- const expectedOutputAssets = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.outputAssets);
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);
801664
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));
801665
802183
  if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .isObjEmpty */ .XY)(outputAssetsToAdd)) {
801666
802184
  return [];
@@ -801679,13 +802197,13 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801679
802197
  ];
801680
802198
  }
801681
802199
  createRemoveRemoteOutputAssetsTxs(actualConfig, expectedConfig) {
801682
- if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isEverclearTokenBridgeConfig */ .e6)(expectedConfig) ||
801683
- !(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isEverclearTokenBridgeConfig */ .e6)(actualConfig)) {
802200
+ if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(expectedConfig) ||
802201
+ !(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(actualConfig)) {
801684
802202
  return [];
801685
802203
  }
801686
- const actualOutputAssets = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.outputAssets);
801687
- const expectedOutputAssets = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.outputAssets);
801688
- const outputAssetsToRemove = Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .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))));
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))));
801689
802207
  if (outputAssetsToRemove.length === 0) {
801690
802208
  return [];
801691
802209
  }
@@ -801703,17 +802221,17 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801703
802221
  ];
801704
802222
  }
801705
802223
  createUpdateEverclearFeeParamsTxs(actualConfig, expectedConfig) {
801706
- if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isEverclearTokenBridgeConfig */ .e6)(expectedConfig) ||
801707
- !(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isEverclearTokenBridgeConfig */ .e6)(actualConfig)) {
802224
+ if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(expectedConfig) ||
802225
+ !(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(actualConfig)) {
801708
802226
  return [];
801709
802227
  }
801710
802228
  if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .deepEquals */ .c2)(expectedConfig.everclearFeeParams, actualConfig.everclearFeeParams)) {
801711
802229
  return [];
801712
802230
  }
801713
- const resolvedEverclearExpectedFeeConfig = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.everclearFeeParams);
801714
- const resolvedActualEverclearFeeConfig = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.everclearFeeParams);
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);
801715
802233
  const feesToSet = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .objFilter */ .s3)(resolvedEverclearExpectedFeeConfig, (domainId, currentDomainConfig) => {
801716
- return ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_16__/* .isNullish */ .u)(resolvedActualEverclearFeeConfig[Number(domainId)]) ||
802234
+ return ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__/* .isNullish */ .u)(resolvedActualEverclearFeeConfig[Number(domainId)]) ||
801717
802235
  !(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .deepEquals */ .c2)(currentDomainConfig, resolvedActualEverclearFeeConfig[Number(domainId)]));
801718
802236
  });
801719
802237
  return Object.entries(feesToSet).map(([domainId, feeConfig]) => {
@@ -801729,13 +802247,13 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801729
802247
  });
801730
802248
  }
801731
802249
  createRemoveEverclearFeeParamsTxs(actualConfig, expectedConfig) {
801732
- if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isEverclearTokenBridgeConfig */ .e6)(expectedConfig) ||
801733
- !(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isEverclearTokenBridgeConfig */ .e6)(actualConfig)) {
802250
+ if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(expectedConfig) ||
802251
+ !(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(actualConfig)) {
801734
802252
  return [];
801735
802253
  }
801736
- const resolvedEverclearExpectedFeeConfig = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.everclearFeeParams);
801737
- const resolvedActualEverclearFeeConfig = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.everclearFeeParams);
801738
- const outputAssetsToRemove = Array.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_14__/* .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))));
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))));
801739
802257
  if (outputAssetsToRemove.length === 0) {
801740
802258
  return [];
801741
802259
  }
@@ -801759,24 +802277,24 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801759
802277
  */
801760
802278
  createSetDestinationGasUpdateTxs(actualConfig, expectedConfig) {
801761
802279
  // OFT contracts don't have GasRouter interface — no destination gas config
801762
- if ((0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isOftTokenConfig */ .vo)(expectedConfig)) {
802280
+ if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isOftTokenConfig */ .vo)(expectedConfig)) {
801763
802281
  return [];
801764
802282
  }
801765
802283
  const updateTransactions = [];
801766
802284
  if (!expectedConfig.destinationGas) {
801767
802285
  return [];
801768
802286
  }
801769
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_13__/* .assert */ .v)(actualConfig.destinationGas, 'actualDestinationGas is undefined');
801770
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_13__/* .assert */ .v)(expectedConfig.destinationGas, 'expectedDestinationGas is undefined');
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');
801771
802289
  // Only set gas for domains that will have routers enrolled after the update.
801772
802290
  // For CrossCollateralRouter configs, also include domains from crossCollateralRouters.
801773
- const resolvedExpectedRemoteRouters = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.remoteRouters ?? {});
802291
+ const resolvedExpectedRemoteRouters = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.remoteRouters ?? {});
801774
802292
  const expectedRouterDomains = new Set(Object.keys(resolvedExpectedRemoteRouters).map(Number));
801775
802293
  // Include MC-enrolled router domains
801776
- if ((0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isCrossCollateralTokenConfig */ .v3)(expectedConfig) &&
802294
+ if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCrossCollateralTokenConfig */ .v3)(expectedConfig) &&
801777
802295
  expectedConfig.crossCollateralRouters) {
801778
802296
  const localDomain = this.multiProvider.getDomainId(this.chainName);
801779
- const resolvedEnrolled = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.crossCollateralRouters);
802297
+ const resolvedEnrolled = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.crossCollateralRouters);
801780
802298
  for (const domain of Object.keys(resolvedEnrolled).map(Number)) {
801781
802299
  if (domain === localDomain)
801782
802300
  continue;
@@ -801788,8 +802306,8 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801788
802306
  throw new Error(`destinationGas is set but remoteRouters and crossCollateralRouters are empty. ` +
801789
802307
  `Cannot configure gas for domains without corresponding router enrollments.`);
801790
802308
  }
801791
- const actualDestinationGas = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.destinationGas);
801792
- const expectedDestinationGas = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_15__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, expectedConfig.destinationGas);
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);
801793
802311
  // Filter to only domains that will have routers enrolled
801794
802312
  const filteredExpectedGas = Object.fromEntries(Object.entries(expectedDestinationGas).filter(([domain]) => expectedRouterDomains.has(Number(domain))));
801795
802313
  // Filter actual gas to the same domains for comparison
@@ -801825,7 +802343,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801825
802343
  if (!expectedConfig.interchainSecurityModule) {
801826
802344
  return [];
801827
802345
  }
801828
- const actualDeployedIsm = (0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .derivedIsmAddress */ .Zr)(actualConfig);
802346
+ const actualDeployedIsm = (0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .derivedIsmAddress */ .Zr)(actualConfig);
801829
802347
  // Try to update (may also deploy) Ism with the expected config
801830
802348
  const { deployedIsm: expectedDeployedIsm, updateTransactions: ismUpdateTransactions, } = await this.deployOrUpdateIsm(actualConfig, expectedConfig);
801831
802349
  // If an ISM is updated in-place, push the update txs
@@ -801873,7 +802391,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801873
802391
  (typeof expectedConfig.hook !== 'string' ||
801874
802392
  !(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .isZeroishAddress */ .Hi)(expectedConfig.hook))) {
801875
802393
  const proxyAdminAddress = expectedConfig.proxyAdmin?.address ?? actualConfig.proxyAdmin?.address;
801876
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_13__/* .assert */ .v)(proxyAdminAddress, 'ProxyAdmin address is undefined');
802394
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)(proxyAdminAddress, 'ProxyAdmin address is undefined');
801877
802395
  // The reader leaves the PREDICATE sub-hook inside actualConfig.hook
801878
802396
  // (e.g. Agg([Predicate, IGP])). When expectedConfig is derived from
801879
802397
  // actualConfig (e.g. during the enrollment step after initial deploy, OR
@@ -801884,23 +802402,24 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801884
802402
  // The needsPredicateRemoval block below then fires to clear the hook to zero.
801885
802403
  const shouldStripHookForComparison = !!expectedConfig.predicateWrapper || needsPredicateRemoval;
801886
802404
  const actualHookForComparison = shouldStripHookForComparison
801887
- ? (0,_hook_utils_js__WEBPACK_IMPORTED_MODULE_17__/* .stripPredicateSubHook */ .B)(actualHook)
802405
+ ? (0,_hook_utils_js__WEBPACK_IMPORTED_MODULE_19__/* .stripPredicateSubHook */ .Bl)(actualHook)
801888
802406
  : actualHook;
801889
802407
  const expectedHookForComparison = shouldStripHookForComparison && expectedConfig.hook
801890
- ? (0,_hook_utils_js__WEBPACK_IMPORTED_MODULE_17__/* .stripPredicateSubHook */ .B)(expectedConfig.hook)
802408
+ ? (0,_hook_utils_js__WEBPACK_IMPORTED_MODULE_19__/* .stripPredicateSubHook */ .Bl)(expectedConfig.hook)
801891
802409
  : expectedConfig.hook;
801892
- const result = await (0,_hook_updates_js__WEBPACK_IMPORTED_MODULE_18__/* .getEvmHookUpdateTransactions */ .m)(this.args.addresses.deployedTokenRoute, {
802410
+ const result = await (0,_hook_updates_js__WEBPACK_IMPORTED_MODULE_20__/* .getEvmHookUpdateTransactions */ .m)(this.args.addresses.deployedTokenRoute, {
801893
802411
  actualConfig: actualHookForComparison,
801894
802412
  expectedConfig: expectedHookForComparison,
801895
802413
  ccipContractCache: this.ccipContractCache,
801896
802414
  contractVerifier: this.contractVerifier,
801897
802415
  evmChainName: this.chainName,
801898
- hookAndIsmFactories: (0,_utils_ism_js__WEBPACK_IMPORTED_MODULE_19__/* .extractIsmAndHookFactoryAddresses */ .zs)(this.args.addresses),
802416
+ hookAndIsmFactories: (0,_utils_ism_js__WEBPACK_IMPORTED_MODULE_11__/* .extractIsmAndHookFactoryAddresses */ .zs)(this.args.addresses),
801899
802417
  setHookFunctionCallEncoder: (addr) => _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_1__/* .MailboxClient__factory */ .mG7.createInterface().encodeFunctionData('setHook', [addr]),
801900
802418
  logger: this.logger,
801901
802419
  mailbox: actualConfig.mailbox,
801902
802420
  multiProvider: this.multiProvider,
801903
802421
  proxyAdminAddress,
802422
+ rateLimitedSender: this.args.addresses.deployedTokenRoute,
801904
802423
  });
801905
802424
  hookTransactions = result.transactions;
801906
802425
  newHookAddress = result.newHookAddress;
@@ -801917,7 +802436,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801917
802436
  annotation: 'Remove predicate wrapper: clear custom hook (router will use mailbox default)',
801918
802437
  chainId: this.chainId,
801919
802438
  to: this.args.addresses.deployedTokenRoute,
801920
- data: _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_1__/* .MailboxClient__factory */ .mG7.createInterface().encodeFunctionData('setHook', [ethers__WEBPACK_IMPORTED_MODULE_20__.constants.AddressZero]),
802439
+ data: _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_1__/* .MailboxClient__factory */ .mG7.createInterface().encodeFunctionData('setHook', [ethers__WEBPACK_IMPORTED_MODULE_21__.constants.AddressZero]),
801921
802440
  });
801922
802441
  }
801923
802442
  }
@@ -801946,7 +802465,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
801946
802465
  * EvmTokenAdapter.findPredicateWrapperInHook and EvmWarpRouteReader.findPredicateAddressInHook).
801947
802466
  */
801948
802467
  async findDeployedPredicateWrapper(actualConfig, expectedPredicateConfig) {
801949
- const hookAddress = (0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .derivedHookAddress */ .Lm)(actualConfig);
802468
+ const hookAddress = (0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .derivedHookAddress */ .Lm)(actualConfig);
801950
802469
  if (!hookAddress || (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .isZeroishAddress */ .Hi)(hookAddress))
801951
802470
  return undefined;
801952
802471
  try {
@@ -802001,7 +802520,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802001
802520
  predicateWrapper.owner(),
802002
802521
  ]);
802003
802522
  if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .eqAddress */ .fv)(warpRoute, this.args.addresses.deployedTokenRoute) &&
802004
- hookType === _hook_types_js__WEBPACK_IMPORTED_MODULE_21__/* .OnchainHookType */ .c0.PREDICATE_ROUTER_WRAPPER &&
802523
+ hookType === _hook_types_js__WEBPACK_IMPORTED_MODULE_22__/* .OnchainHookType */ .c0.PREDICATE_ROUTER_WRAPPER &&
802005
802524
  (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .eqAddress */ .fv)(onchainRegistry, expectedPredicateConfig.predicateRegistry) &&
802006
802525
  onchainPolicyId === expectedPredicateConfig.policyId) {
802007
802526
  return { address: hookAddr, onchainOwner };
@@ -802043,7 +802562,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802043
802562
  !expectedConfig.predicateWrapper) {
802044
802563
  return { transactions: [], deploysNewWrapper: false };
802045
802564
  }
802046
- const predicateWrapperConfig = _types_js__WEBPACK_IMPORTED_MODULE_10__/* .PredicateWrapperConfigSchema */ .Ky.parse(expectedConfig.predicateWrapper);
802565
+ const predicateWrapperConfig = _types_js__WEBPACK_IMPORTED_MODULE_12__/* .PredicateWrapperConfigSchema */ .Ky.parse(expectedConfig.predicateWrapper);
802047
802566
  // Check if a wrapper matching by registry+policyId already exists on-chain.
802048
802567
  // If so, only a transferOwnership tx is needed (not a full redeploy).
802049
802568
  const existingWrapper = await this.findDeployedPredicateWrapper(actualConfig, predicateWrapperConfig);
@@ -802072,7 +802591,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802072
802591
  }
802073
802592
  const signer = this.multiProvider.getSigner(this.chainName);
802074
802593
  const factory = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_1__/* .StaticAggregationHookFactory__factory */ .KZH.connect(staticAggregationHookFactory, signer);
802075
- const predicateDeployer = new _predicate_PredicateDeployer_js__WEBPACK_IMPORTED_MODULE_22__/* .PredicateWrapperDeployer */ .t(this.multiProvider, factory, this.logger);
802594
+ const predicateDeployer = new _predicate_PredicateDeployer_js__WEBPACK_IMPORTED_MODULE_23__/* .PredicateWrapperDeployer */ .t(this.multiProvider, factory, this.logger);
802076
802595
  // Deploy predicate wrapper and get addresses.
802077
802596
  // Pass token type to deploy the appropriate wrapper.
802078
802597
  // Pass pendingHookAddress (if any) so deployAndConfigure uses the post-update hook
@@ -802107,16 +802626,16 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802107
802626
  return [];
802108
802627
  }
802109
802628
  const routerAddress = this.args.addresses.deployedTokenRoute;
802110
- const resolvedTokenFee = (0,_configUtils_js__WEBPACK_IMPORTED_MODULE_23__/* .resolveTokenFeeAddress */ .i0)(expectedConfig.tokenFee, routerAddress, expectedConfig);
802629
+ const resolvedTokenFee = (0,_configUtils_js__WEBPACK_IMPORTED_MODULE_24__/* .resolveTokenFeeAddress */ .i0)(expectedConfig.tokenFee, routerAddress, expectedConfig);
802111
802630
  const currentTokenFee = actualConfig.tokenFee;
802112
802631
  if (!currentTokenFee) {
802113
802632
  this.logger.info('No existing token fee found, creating new one');
802114
- const expandedExpectedConfig = await _fee_EvmTokenFeeModule_js__WEBPACK_IMPORTED_MODULE_24__/* .EvmTokenFeeModule */ .e.expandConfig({
802633
+ const expandedExpectedConfig = await _fee_EvmTokenFeeModule_js__WEBPACK_IMPORTED_MODULE_25__/* .EvmTokenFeeModule */ .e.expandConfig({
802115
802634
  config: resolvedTokenFee,
802116
802635
  multiProvider: this.multiProvider,
802117
802636
  chainName: this.chainName,
802118
802637
  });
802119
- const tokenFeeModule = await _fee_EvmTokenFeeModule_js__WEBPACK_IMPORTED_MODULE_24__/* .EvmTokenFeeModule */ .e.create({
802638
+ const tokenFeeModule = await _fee_EvmTokenFeeModule_js__WEBPACK_IMPORTED_MODULE_25__/* .EvmTokenFeeModule */ .e.create({
802120
802639
  multiProvider: this.multiProvider,
802121
802640
  chain: this.chainName,
802122
802641
  config: expandedExpectedConfig,
@@ -802129,7 +802648,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802129
802648
  .feeRecipient()
802130
802649
  .catch((error) => {
802131
802650
  this.logger.warn(`Failed to read feeRecipient, defaulting to generate setFeeRecipient tx`, error);
802132
- return ethers__WEBPACK_IMPORTED_MODULE_20__.constants.AddressZero;
802651
+ return ethers__WEBPACK_IMPORTED_MODULE_21__.constants.AddressZero;
802133
802652
  });
802134
802653
  if ((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .eqAddress */ .fv)(currentFeeRecipient, deployedFee)) {
802135
802654
  return [];
@@ -802144,7 +802663,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802144
802663
  ];
802145
802664
  }
802146
802665
  this.logger.info('Updating existing token fee configuration');
802147
- const tokenFeeModule = new _fee_EvmTokenFeeModule_js__WEBPACK_IMPORTED_MODULE_24__/* .EvmTokenFeeModule */ .e(this.multiProvider, {
802666
+ const tokenFeeModule = new _fee_EvmTokenFeeModule_js__WEBPACK_IMPORTED_MODULE_25__/* .EvmTokenFeeModule */ .e(this.multiProvider, {
802148
802667
  chain: this.chainName,
802149
802668
  config: currentTokenFee,
802150
802669
  addresses: {
@@ -802172,7 +802691,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802172
802691
  * @returns Ethereum transaction that need to be executed to update the owner.
802173
802692
  */
802174
802693
  createOwnershipUpdateTxs(actualConfig, expectedConfig) {
802175
- return (0,_contracts_contracts_js__WEBPACK_IMPORTED_MODULE_25__/* .transferOwnershipTransactions */ .Yg)(this.multiProvider.getEvmChainId(this.args.chain), this.args.addresses.deployedTokenRoute, actualConfig, expectedConfig, `${expectedConfig.type} Warp Route`);
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`);
802176
802695
  }
802177
802696
  /**
802178
802697
  * Updates or deploys the ISM using the provided configuration.
@@ -802180,7 +802699,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802180
802699
  * @returns Object with deployedIsm address, and update Transactions
802181
802700
  */
802182
802701
  async deployOrUpdateIsm(actualConfig, expectedConfig) {
802183
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_13__/* .assert */ .v)(expectedConfig.interchainSecurityModule, 'Ism derived incorrectly');
802702
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)(expectedConfig.interchainSecurityModule, 'Ism derived incorrectly');
802184
802703
  if (typeof expectedConfig.interchainSecurityModule === 'string' &&
802185
802704
  (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .isZeroishAddress */ .Hi)(expectedConfig.interchainSecurityModule)) {
802186
802705
  return {
@@ -802188,17 +802707,37 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802188
802707
  updateTransactions: [],
802189
802708
  };
802190
802709
  }
802191
- const ismModule = new _ism_EvmIsmModule_js__WEBPACK_IMPORTED_MODULE_26__/* .EvmIsmModule */ .a(this.multiProvider, {
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, {
802192
802731
  chain: this.args.chain,
802193
802732
  config: actualConfig.interchainSecurityModule,
802194
802733
  addresses: {
802195
802734
  ...this.args.addresses,
802196
802735
  mailbox: actualConfig.mailbox,
802197
- deployedIsm: (0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .derivedIsmAddress */ .Zr)(actualConfig),
802736
+ deployedIsm: (0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .derivedIsmAddress */ .Zr)(actualConfig),
802198
802737
  },
802199
802738
  }, this.ccipContractCache, this.contractVerifier);
802200
802739
  this.logger.info(`Comparing target ISM config with ${this.args.chain} chain`);
802201
- const updateTransactions = await ismModule.update(expectedConfig.interchainSecurityModule);
802740
+ const updateTransactions = await ismModule.update(expectedIsm);
802202
802741
  const { deployedIsm } = ismModule.serialize();
802203
802742
  return { deployedIsm, updateTransactions };
802204
802743
  }
@@ -802211,15 +802750,15 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802211
802750
  */
802212
802751
  async upgradeWarpRouteImplementationTx(actualConfig, expectedConfig) {
802213
802752
  const updateTransactions = [];
802214
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_13__/* .assert */ .v)(expectedConfig.type !== _config_js__WEBPACK_IMPORTED_MODULE_27__/* .TokenType */ .ks.unknown, 'Cannot upgrade warp route with unknown token type');
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');
802215
802754
  // This should be impossible since we try catch the call to `PACKAGE_VERSION`
802216
802755
  // in `EvmWarpRouteReader.fetchPackageVersion`
802217
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_13__/* .assert */ .v)(actualConfig.contractVersion, 'Actual contract version is undefined');
802756
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)(actualConfig.contractVersion, 'Actual contract version is undefined');
802218
802757
  // Only upgrade if the user specifies a version
802219
802758
  if (!expectedConfig.contractVersion) {
802220
802759
  return [];
802221
802760
  }
802222
- const comparisonValue = (0,compare_versions__WEBPACK_IMPORTED_MODULE_28__.compareVersions)(expectedConfig.contractVersion, actualConfig.contractVersion);
802761
+ const comparisonValue = (0,compare_versions__WEBPACK_IMPORTED_MODULE_29__.compareVersions)(expectedConfig.contractVersion, actualConfig.contractVersion);
802223
802762
  // Expected version is lower than actual version, no upgrade is possible
802224
802763
  if (comparisonValue === -1) {
802225
802764
  throw new Error(`Expected contract version ${expectedConfig.contractVersion} is lower than actual contract version ${actualConfig.contractVersion}`);
@@ -802230,21 +802769,21 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802230
802769
  }
802231
802770
  // You can only upgrade to the contract version (see `PackageVersioned`)
802232
802771
  // defined by the @hyperlane-xyz/core package
802233
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_13__/* .assert */ .v)((0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .contractVersionMatchesDependency */ .Vx)(expectedConfig.contractVersion), _types_js__WEBPACK_IMPORTED_MODULE_10__/* .VERSION_ERROR_MESSAGE */ .eh);
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);
802234
802773
  // Scale values are immutables baked into the implementation bytecode.
802235
802774
  // Changing the effective scale during an upgrade would cause in-flight
802236
802775
  // messages to be decoded with incorrect scaling.
802237
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_13__/* .assert */ .v)((0,_utils_decimals_js__WEBPACK_IMPORTED_MODULE_29__/* .scalesEqual */ .gm)(actualConfig.scale, expectedConfig.scale), `Scale change detected during upgrade. ` +
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. ` +
802238
802777
  `Changing scale on an existing deployment may cause in-flight messages to be decoded incorrectly.`);
802239
802778
  this.logger.info(`Upgrading Warp Route implementation on ${this.args.chain} from ${actualConfig.contractVersion} to ${expectedConfig.contractVersion}`);
802240
- const deployer = new _deploy_js__WEBPACK_IMPORTED_MODULE_30__/* .HypERC20Deployer */ .A7(this.multiProvider);
802779
+ const deployer = new _deploy_js__WEBPACK_IMPORTED_MODULE_31__/* .HypERC20Deployer */ .A7(this.multiProvider);
802241
802780
  const constructorArgs = await deployer.constructorArgs(this.chainName, expectedConfig);
802242
802781
  const tokenType = expectedConfig.type;
802243
- const implementation = await deployer.deployContractWithName(this.chainName, tokenType, _contracts_js__WEBPACK_IMPORTED_MODULE_31__/* .hypERC20contracts */ .LW[tokenType], constructorArgs, undefined, false);
802782
+ const implementation = await deployer.deployContractWithName(this.chainName, tokenType, _contracts_js__WEBPACK_IMPORTED_MODULE_32__/* .hypERC20contracts */ .LW[tokenType], constructorArgs, undefined, false);
802244
802783
  const provider = this.multiProvider.getProvider(this.domainId);
802245
802784
  const proxyAddress = this.args.addresses.deployedTokenRoute;
802246
- const proxyAdminAddress = await (0,_deploy_proxy_js__WEBPACK_IMPORTED_MODULE_12__/* .proxyAdmin */ .Ey)(provider, proxyAddress);
802247
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_13__/* .assert */ .v)(await (0,_deploy_proxy_js__WEBPACK_IMPORTED_MODULE_12__/* .isInitialized */ .Dp)(provider, proxyAddress), 'Proxy is not initialized');
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');
802248
802787
  updateTransactions.push({
802249
802788
  chainId: this.chainId,
802250
802789
  annotation: `Upgrading Warp Route implementation on ${this.args.chain}`,
@@ -802254,12 +802793,12 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802254
802793
  return updateTransactions;
802255
802794
  }
802256
802795
  createSetMaxFeePpmTxs(actualConfig, expectedConfig) {
802257
- if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isCctpTokenConfig */ .aX)(expectedConfig) ||
802796
+ if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCctpTokenConfig */ .aX)(expectedConfig) ||
802258
802797
  expectedConfig.cctpVersion !== 'V2' ||
802259
802798
  expectedConfig.maxFeeBps === undefined) {
802260
802799
  return [];
802261
802800
  }
802262
- const actualMaxFeeBps = (0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isCctpTokenConfig */ .aX)(actualConfig)
802801
+ const actualMaxFeeBps = (0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCctpTokenConfig */ .aX)(actualConfig)
802263
802802
  ? actualConfig.maxFeeBps
802264
802803
  : undefined;
802265
802804
  // When upgrading across the CCTP_PPM_STORAGE_VERSION boundary, the
@@ -802269,9 +802808,9 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802269
802808
  // proxy upgrade. Always emit setMaxFeePpm in this case.
802270
802809
  const crossingPpmBoundary = actualConfig.contractVersion &&
802271
802810
  expectedConfig.contractVersion &&
802272
- (0,compare_versions__WEBPACK_IMPORTED_MODULE_28__.compareVersions)(actualConfig.contractVersion, _EvmWarpRouteReader_js__WEBPACK_IMPORTED_MODULE_7__/* .CCTP_PPM_STORAGE_VERSION */ .EY) <
802811
+ (0,compare_versions__WEBPACK_IMPORTED_MODULE_29__.compareVersions)(actualConfig.contractVersion, _EvmWarpRouteReader_js__WEBPACK_IMPORTED_MODULE_7__/* .CCTP_PPM_STORAGE_VERSION */ .EY) <
802273
802812
  0 &&
802274
- (0,compare_versions__WEBPACK_IMPORTED_MODULE_28__.compareVersions)(expectedConfig.contractVersion, _EvmWarpRouteReader_js__WEBPACK_IMPORTED_MODULE_7__/* .CCTP_PPM_STORAGE_VERSION */ .EY) >= 0;
802813
+ (0,compare_versions__WEBPACK_IMPORTED_MODULE_29__.compareVersions)(expectedConfig.contractVersion, _EvmWarpRouteReader_js__WEBPACK_IMPORTED_MODULE_7__/* .CCTP_PPM_STORAGE_VERSION */ .EY) >= 0;
802275
802814
  if (!crossingPpmBoundary && actualMaxFeeBps === expectedConfig.maxFeeBps) {
802276
802815
  return [];
802277
802816
  }
@@ -802296,7 +802835,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802296
802835
  static async create(params) {
802297
802836
  const { chain, config, multiProvider, ccipContractCache, contractVerifier, proxyFactoryFactories, } = params;
802298
802837
  const chainName = multiProvider.getChainName(chain);
802299
- const deployer = new _deploy_js__WEBPACK_IMPORTED_MODULE_30__/* .HypERC20Deployer */ .A7(multiProvider);
802838
+ const deployer = new _deploy_js__WEBPACK_IMPORTED_MODULE_31__/* .HypERC20Deployer */ .A7(multiProvider);
802300
802839
  const deployedContracts = await deployer.deployContracts(chainName, config);
802301
802840
  const warpModule = new EvmWarpModule(multiProvider, {
802302
802841
  addresses: {
@@ -802312,7 +802851,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802312
802851
  const onlyTxIndex = 0;
802313
802852
  await multiProvider.sendTransaction(chain, enrollRemoteTxs[onlyTxIndex]);
802314
802853
  }
802315
- if ((0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isMovableCollateralTokenConfig */ .zW)(config) &&
802854
+ if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(config) &&
802316
802855
  config.allowedRebalancers &&
802317
802856
  config.allowedRebalancers.length !== 0) {
802318
802857
  const addRebalancerTxs = await warpModule.createAddRebalancersUpdateTxs(actualConfig, config); // @TODO Remove when EvmWarpModule.create can be used
@@ -802320,7 +802859,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802320
802859
  await multiProvider.sendTransaction(chain, tx);
802321
802860
  }
802322
802861
  }
802323
- if ((0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isMovableCollateralTokenConfig */ .zW)(config) &&
802862
+ if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isMovableCollateralTokenConfig */ .zW)(config) &&
802324
802863
  config.allowedRebalancingBridges &&
802325
802864
  !(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .isObjEmpty */ .XY)(config.allowedRebalancingBridges)) {
802326
802865
  const addBridgesTxs = await warpModule.createAddAllowedBridgesUpdateTxs(actualConfig, config); // @TODO Remove when EvmWarpModule.create can be used
@@ -802328,7 +802867,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802328
802867
  await multiProvider.sendTransaction(chain, tx);
802329
802868
  }
802330
802869
  }
802331
- if ((0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isEverclearTokenBridgeConfig */ .e6)(config)) {
802870
+ if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isEverclearTokenBridgeConfig */ .e6)(config)) {
802332
802871
  const addRemoteOutputTokens = warpModule.createAddRemoteOutputAssetsTxs(actualConfig, config);
802333
802872
  const updateEverclearFeeParamsTxs = warpModule.createUpdateEverclearFeeParamsTxs(actualConfig, config);
802334
802873
  const everclearTxs = [
@@ -802339,7 +802878,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802339
802878
  await multiProvider.sendTransaction(chain, tx);
802340
802879
  }
802341
802880
  }
802342
- if ((0,_types_js__WEBPACK_IMPORTED_MODULE_10__/* .isCrossCollateralTokenConfig */ .v3)(config) &&
802881
+ if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCrossCollateralTokenConfig */ .v3)(config) &&
802343
802882
  config.crossCollateralRouters &&
802344
802883
  Object.keys(config.crossCollateralRouters).length > 0) {
802345
802884
  const enrollTxs = warpModule.createEnrollCrossCollateralRoutersTxs(actualConfig, config);
@@ -814143,6 +814682,8 @@ class GasRouterDeployer extends ProxiedRouterDeployer {
814143
814682
  //# sourceMappingURL=GasRouterDeployer.js.map
814144
814683
  // EXTERNAL MODULE: ../sdk/dist/utils/decimals.js
814145
814684
  var decimals = __nccwpck_require__(27043);
814685
+ // EXTERNAL MODULE: ../sdk/dist/utils/ism.js
814686
+ var ism = __nccwpck_require__(764);
814146
814687
  // EXTERNAL MODULE: ../sdk/dist/token/EvmWarpRouteReader.js + 1 modules
814147
814688
  var EvmWarpRouteReader = __nccwpck_require__(40945);
814148
814689
  // EXTERNAL MODULE: ../sdk/dist/token/config.js
@@ -814171,6 +814712,7 @@ var token_types = __nccwpck_require__(38466);
814171
814712
 
814172
814713
 
814173
814714
 
814715
+
814174
814716
  // initialize(address _hook, address _owner)
814175
814717
  const OP_L2_INITIALIZE_SIGNATURE = 'initialize(address,address)';
814176
814718
  // initialize(address _owner, string[] memory _urls)
@@ -814607,7 +815149,32 @@ class TokenDeployer extends GasRouterDeployer {
814607
815149
  }
814608
815150
  }));
814609
815151
  }
814610
- async deploy(configMap) {
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) {
814611
815178
  // Fail fast if any chain requires a predicate wrapper but lacks the factory.
814612
815179
  // Checked before any on-chain work to avoid partial deployments.
814613
815180
  for (const [chain, config] of Object.entries(configMap)) {
@@ -814616,6 +815183,12 @@ class TokenDeployer extends GasRouterDeployer {
814616
815183
  const factoryContracts = this.options.ismFactory?.getContracts(chain);
814617
815184
  (0,validation/* assert */.v)(factoryContracts?.staticAggregationHookFactory, `staticAggregationHookFactory not found for ${chain}. Ensure proxy factories are deployed.`);
814618
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
+ }
814619
815192
  let tokenMetadataMap;
814620
815193
  try {
814621
815194
  tokenMetadataMap = await TokenDeployer.deriveTokenMetadata(this.multiProvider, configMap);
@@ -814688,6 +815261,13 @@ class TokenDeployer extends GasRouterDeployer {
814688
815261
  await this.setEverclearOutputAssets(configMap, deployedContractsMap);
814689
815262
  await this.deployPredicateWrappers(configMap, deployedContractsMap);
814690
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
+ }
814691
815271
  await super.transferOwnership(deployedContractsMap, configMap);
814692
815272
  return deployedContractsMap;
814693
815273
  }
@@ -816775,11 +817355,15 @@ async function estimateCallGas(params) {
816775
817355
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
816776
817356
 
816777
817357
  /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
817358
+ /* harmony export */ Bh: () => (/* binding */ ismTreeContainsRateLimited),
816778
817359
  /* harmony export */ I6: () => (/* binding */ normalizeConfig),
817360
+ /* harmony export */ re: () => (/* binding */ setRateLimitedIsmRecipient),
816779
817361
  /* harmony export */ zs: () => (/* binding */ extractIsmAndHookFactoryAddresses)
816780
817362
  /* harmony export */ });
816781
817363
  /* unused harmony exports multisigIsmVerificationCost, sortArraysInConfig */
816782
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(73938);
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
+
816783
817367
 
816784
817368
 
816785
817369
  /**
@@ -816787,8 +817371,70 @@ async function estimateCallGas(params) {
816787
817371
  * @param registryAddresses The registry addresses for a specific chain
816788
817372
  * @returns The extracted ISM and Hook factory addresses
816789
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
+ }
816790
817436
  function extractIsmAndHookFactoryAddresses(registryAddresses) {
816791
- return (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_0__/* .pick */ .Up)(registryAddresses, [
817437
+ return (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_1__/* .pick */ .Up)(registryAddresses, [
816792
817438
  'domainRoutingIsmFactory',
816793
817439
  'incrementalDomainRoutingIsmFactory',
816794
817440
  'staticMerkleRootMultisigIsmFactory',
@@ -906681,7 +907327,7 @@ module.exports = /*#__PURE__*/JSON.parse('[{"type":"function","name":"proveL2Lea
906681
907327
  /***/ 99468:
906682
907328
  /***/ ((module) => {
906683
907329
 
906684
- module.exports = {"rE":"33.1.1"};
907330
+ module.exports = {"rE":"34.0.0"};
906685
907331
 
906686
907332
  /***/ })
906687
907333