@hyperlane-xyz/cli 34.0.0 → 35.0.1

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
@@ -128363,7 +128363,7 @@ __webpack_unused_export__ = ({ value: true });
128363
128363
  let converter;
128364
128364
  {
128365
128365
  try {
128366
- converter = __nccwpck_require__(8441)('bigint_buffer');
128366
+ converter = __WEBPACK_EXTERNAL_createRequire(import.meta.url)(__nccwpck_require__.ab + "build/Release/bigint_buffer.node");
128367
128367
  }
128368
128368
  catch (e) {
128369
128369
  // Silently fall back to pure JS implementation
@@ -128436,234 +128436,6 @@ function toBufferBE(num, width) {
128436
128436
  exports.zy = toBufferBE;
128437
128437
 
128438
128438
 
128439
- /***/ }),
128440
-
128441
- /***/ 8441:
128442
- /***/ ((module, exports, __nccwpck_require__) => {
128443
-
128444
- /**
128445
- * Module dependencies.
128446
- */
128447
-
128448
- var fs = __nccwpck_require__(79896),
128449
- path = __nccwpck_require__(16928),
128450
- fileURLToPath = __nccwpck_require__(53904),
128451
- join = path.join,
128452
- dirname = path.dirname,
128453
- exists =
128454
- (fs.accessSync &&
128455
- function(path) {
128456
- try {
128457
- fs.accessSync(path);
128458
- } catch (e) {
128459
- return false;
128460
- }
128461
- return true;
128462
- }) ||
128463
- fs.existsSync ||
128464
- path.existsSync,
128465
- defaults = {
128466
- arrow: process.env.NODE_BINDINGS_ARROW || ' → ',
128467
- compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled',
128468
- platform: process.platform,
128469
- arch: process.arch,
128470
- nodePreGyp:
128471
- 'node-v' +
128472
- process.versions.modules +
128473
- '-' +
128474
- process.platform +
128475
- '-' +
128476
- process.arch,
128477
- version: process.versions.node,
128478
- bindings: 'bindings.node',
128479
- try: [
128480
- // node-gyp's linked version in the "build" dir
128481
- ['module_root', 'build', 'bindings'],
128482
- // node-waf and gyp_addon (a.k.a node-gyp)
128483
- ['module_root', 'build', 'Debug', 'bindings'],
128484
- ['module_root', 'build', 'Release', 'bindings'],
128485
- // Debug files, for development (legacy behavior, remove for node v0.9)
128486
- ['module_root', 'out', 'Debug', 'bindings'],
128487
- ['module_root', 'Debug', 'bindings'],
128488
- // Release files, but manually compiled (legacy behavior, remove for node v0.9)
128489
- ['module_root', 'out', 'Release', 'bindings'],
128490
- ['module_root', 'Release', 'bindings'],
128491
- // Legacy from node-waf, node <= 0.4.x
128492
- ['module_root', 'build', 'default', 'bindings'],
128493
- // Production "Release" buildtype binary (meh...)
128494
- ['module_root', 'compiled', 'version', 'platform', 'arch', 'bindings'],
128495
- // node-qbs builds
128496
- ['module_root', 'addon-build', 'release', 'install-root', 'bindings'],
128497
- ['module_root', 'addon-build', 'debug', 'install-root', 'bindings'],
128498
- ['module_root', 'addon-build', 'default', 'install-root', 'bindings'],
128499
- // node-pre-gyp path ./lib/binding/{node_abi}-{platform}-{arch}
128500
- ['module_root', 'lib', 'binding', 'nodePreGyp', 'bindings']
128501
- ]
128502
- };
128503
-
128504
- /**
128505
- * The main `bindings()` function loads the compiled bindings for a given module.
128506
- * It uses V8's Error API to determine the parent filename that this function is
128507
- * being invoked from, which is then used to find the root directory.
128508
- */
128509
-
128510
- function bindings(opts) {
128511
- // Argument surgery
128512
- if (typeof opts == 'string') {
128513
- opts = { bindings: opts };
128514
- } else if (!opts) {
128515
- opts = {};
128516
- }
128517
-
128518
- // maps `defaults` onto `opts` object
128519
- Object.keys(defaults).map(function(i) {
128520
- if (!(i in opts)) opts[i] = defaults[i];
128521
- });
128522
-
128523
- // Get the module root
128524
- if (!opts.module_root) {
128525
- opts.module_root = exports.getRoot(exports.getFileName());
128526
- }
128527
-
128528
- // Ensure the given bindings name ends with .node
128529
- if (path.extname(opts.bindings) != '.node') {
128530
- opts.bindings += '.node';
128531
- }
128532
-
128533
- // https://github.com/webpack/webpack/issues/4175#issuecomment-342931035
128534
- var requireFunc =
128535
- true
128536
- ? eval("require")
128537
- : 0;
128538
-
128539
- var tries = [],
128540
- i = 0,
128541
- l = opts.try.length,
128542
- n,
128543
- b,
128544
- err;
128545
-
128546
- for (; i < l; i++) {
128547
- n = join.apply(
128548
- null,
128549
- opts.try[i].map(function(p) {
128550
- return opts[p] || p;
128551
- })
128552
- );
128553
- tries.push(n);
128554
- try {
128555
- b = opts.path ? requireFunc.resolve(n) : requireFunc(n);
128556
- if (!opts.path) {
128557
- b.path = n;
128558
- }
128559
- return b;
128560
- } catch (e) {
128561
- if (e.code !== 'MODULE_NOT_FOUND' &&
128562
- e.code !== 'QUALIFIED_PATH_RESOLUTION_FAILED' &&
128563
- !/not find/i.test(e.message)) {
128564
- throw e;
128565
- }
128566
- }
128567
- }
128568
-
128569
- err = new Error(
128570
- 'Could not locate the bindings file. Tried:\n' +
128571
- tries
128572
- .map(function(a) {
128573
- return opts.arrow + a;
128574
- })
128575
- .join('\n')
128576
- );
128577
- err.tries = tries;
128578
- throw err;
128579
- }
128580
- module.exports = exports = bindings;
128581
-
128582
- /**
128583
- * Gets the filename of the JavaScript file that invokes this function.
128584
- * Used to help find the root directory of a module.
128585
- * Optionally accepts an filename argument to skip when searching for the invoking filename
128586
- */
128587
-
128588
- exports.getFileName = function getFileName(calling_file) {
128589
- var origPST = Error.prepareStackTrace,
128590
- origSTL = Error.stackTraceLimit,
128591
- dummy = {},
128592
- fileName;
128593
-
128594
- Error.stackTraceLimit = 10;
128595
-
128596
- Error.prepareStackTrace = function(e, st) {
128597
- for (var i = 0, l = st.length; i < l; i++) {
128598
- fileName = st[i].getFileName();
128599
- if (fileName !== __filename) {
128600
- if (calling_file) {
128601
- if (fileName !== calling_file) {
128602
- return;
128603
- }
128604
- } else {
128605
- return;
128606
- }
128607
- }
128608
- }
128609
- };
128610
-
128611
- // run the 'prepareStackTrace' function above
128612
- Error.captureStackTrace(dummy);
128613
- dummy.stack;
128614
-
128615
- // cleanup
128616
- Error.prepareStackTrace = origPST;
128617
- Error.stackTraceLimit = origSTL;
128618
-
128619
- // handle filename that starts with "file://"
128620
- var fileSchema = 'file://';
128621
- if (fileName.indexOf(fileSchema) === 0) {
128622
- fileName = fileURLToPath(fileName);
128623
- }
128624
-
128625
- return fileName;
128626
- };
128627
-
128628
- /**
128629
- * Gets the root directory of a module, given an arbitrary filename
128630
- * somewhere in the module tree. The "root directory" is the directory
128631
- * containing the `package.json` file.
128632
- *
128633
- * In: /home/nate/node-native-module/lib/index.js
128634
- * Out: /home/nate/node-native-module
128635
- */
128636
-
128637
- exports.getRoot = function getRoot(file) {
128638
- var dir = dirname(file),
128639
- prev;
128640
- while (true) {
128641
- if (dir === '.') {
128642
- // Avoids an infinite loop in rare cases, like the REPL
128643
- dir = process.cwd();
128644
- }
128645
- if (
128646
- exists(join(dir, 'package.json')) ||
128647
- exists(join(dir, 'node_modules'))
128648
- ) {
128649
- // Found the 'package.json' file or 'node_modules' dir; we're done
128650
- return dir;
128651
- }
128652
- if (prev === dir) {
128653
- // Got to the top
128654
- throw new Error(
128655
- 'Could not find module root given file: "' +
128656
- file +
128657
- '". Do you have a `package.json` file? '
128658
- );
128659
- }
128660
- // Try the parent dir next
128661
- prev = dir;
128662
- dir = join(dir, '..');
128663
- }
128664
- };
128665
-
128666
-
128667
128439
  /***/ }),
128668
128440
 
128669
128441
  /***/ 73258:
@@ -205000,79 +204772,6 @@ module.exports.main = main;
205000
204772
  module.exports.windows = windows;
205001
204773
 
205002
204774
 
205003
- /***/ }),
205004
-
205005
- /***/ 53904:
205006
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
205007
-
205008
-
205009
- /**
205010
- * Module dependencies.
205011
- */
205012
-
205013
- var sep = (__nccwpck_require__(16928).sep) || '/';
205014
-
205015
- /**
205016
- * Module exports.
205017
- */
205018
-
205019
- module.exports = fileUriToPath;
205020
-
205021
- /**
205022
- * File URI to Path function.
205023
- *
205024
- * @param {String} uri
205025
- * @return {String} path
205026
- * @api public
205027
- */
205028
-
205029
- function fileUriToPath (uri) {
205030
- if ('string' != typeof uri ||
205031
- uri.length <= 7 ||
205032
- 'file://' != uri.substring(0, 7)) {
205033
- throw new TypeError('must pass in a file:// URI to convert to a file path');
205034
- }
205035
-
205036
- var rest = decodeURI(uri.substring(7));
205037
- var firstSlash = rest.indexOf('/');
205038
- var host = rest.substring(0, firstSlash);
205039
- var path = rest.substring(firstSlash + 1);
205040
-
205041
- // 2. Scheme Definition
205042
- // As a special case, <host> can be the string "localhost" or the empty
205043
- // string; this is interpreted as "the machine from which the URL is
205044
- // being interpreted".
205045
- if ('localhost' == host) host = '';
205046
-
205047
- if (host) {
205048
- host = sep + sep + host;
205049
- }
205050
-
205051
- // 3.2 Drives, drive letters, mount points, file system root
205052
- // Drive letters are mapped into the top of a file URI in various ways,
205053
- // depending on the implementation; some applications substitute
205054
- // vertical bar ("|") for the colon after the drive letter, yielding
205055
- // "file:///c|/tmp/test.txt". In some cases, the colon is left
205056
- // unchanged, as in "file:///c:/tmp/test.txt". In other cases, the
205057
- // colon is simply omitted, as in "file:///c/tmp/test.txt".
205058
- path = path.replace(/^(.+)\|/, '$1:');
205059
-
205060
- // for Windows, we need to invert the path separators from what a URI uses
205061
- if (sep == '\\') {
205062
- path = path.replace(/\//g, '\\');
205063
- }
205064
-
205065
- if (/^.+\:/.test(path)) {
205066
- // has Windows drive at beginning of path
205067
- } else {
205068
- // unix path…
205069
- path = sep + path;
205070
- }
205071
-
205072
- return host + path;
205073
- }
205074
-
205075
-
205076
204775
  /***/ }),
205077
204776
 
205078
204777
  /***/ 18970:
@@ -403761,7 +403460,7 @@ async function __wbg_init(module_or_path, memory) {
403761
403460
  return __wbg_finalize_init(instance, module, thread_stack_size);
403762
403461
  }
403763
403462
 
403764
- const module$1 = __nccwpck_require__.ab + "aleo_wasm1.wasm";
403463
+ const module$1 = __nccwpck_require__.ab + "aleo_wasm.wasm";
403765
403464
 
403766
403465
  await __wbg_init({ module_or_path: pathToFileURL(module$1).href });
403767
403466
 
@@ -403772,7 +403471,7 @@ async function initThreadPool(threads) {
403772
403471
 
403773
403472
  console.info(`Spawning ${threads} threads`);
403774
403473
 
403775
- await initThreadPool$1(__nccwpck_require__.ab + "worker3.js", threads);
403474
+ await initThreadPool$1(__nccwpck_require__.ab + "worker2.js", threads);
403776
403475
  }
403777
403476
 
403778
403477
 
@@ -417892,7 +417591,7 @@ async function __wbg_init(module_or_path, memory) {
417892
417591
  return __wbg_finalize_init(instance, module, thread_stack_size);
417893
417592
  }
417894
417593
 
417895
- const module$1 = __nccwpck_require__.ab + "aleo_wasm.wasm";
417594
+ const module$1 = __nccwpck_require__.ab + "aleo_wasm1.wasm";
417896
417595
 
417897
417596
  await __wbg_init({ module_or_path: pathToFileURL(module$1).href });
417898
417597
 
@@ -417903,7 +417602,7 @@ async function initThreadPool(threads) {
417903
417602
 
417904
417603
  console.info(`Spawning ${threads} threads`);
417905
417604
 
417906
- await initThreadPool$1(__nccwpck_require__.ab + "worker2.js", threads);
417605
+ await initThreadPool$1(__nccwpck_require__.ab + "worker3.js", threads);
417907
417606
  }
417908
417607
 
417909
417608
 
@@ -672786,6 +672485,18 @@ class AleoBase {
672786
672485
  programManager.setAccount(account);
672787
672486
  return programManager;
672788
672487
  }
672488
+ get networkPath() {
672489
+ return this.chainId === _utils_types_js__WEBPACK_IMPORTED_MODULE_3__/* .AleoNetworkId */ .lH.TESTNET ? 'testnet' : 'mainnet';
672490
+ }
672491
+ async findBlockHashByTxId(txId) {
672492
+ const url = `${this.rpcUrls[0]}/${this.networkPath}/find/blockHash/${txId}`;
672493
+ return (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .retryAsync */ .tH)(async () => {
672494
+ const res = await fetch(url);
672495
+ if (!res.ok)
672496
+ throw new Error(`HTTP ${res.status}`);
672497
+ return JSON.parse(await res.text());
672498
+ }, _utils_helper_js__WEBPACK_IMPORTED_MODULE_2__/* .RETRY_ATTEMPTS */ .Km, _utils_helper_js__WEBPACK_IMPORTED_MODULE_2__/* .RETRY_DELAY_MS */ .k);
672499
+ }
672789
672500
  async queryMappingValue(programId, mappingName, key) {
672790
672501
  try {
672791
672502
  const result = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .retryAsync */ .tH)(() => this.aleoClient.getProgramMappingValue(programId, mappingName, key), _utils_helper_js__WEBPACK_IMPORTED_MODULE_2__/* .RETRY_ATTEMPTS */ .Km, _utils_helper_js__WEBPACK_IMPORTED_MODULE_2__/* .RETRY_DELAY_MS */ .k);
@@ -672979,6 +672690,16 @@ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_pro
672979
672690
 
672980
672691
  class AleoProvider extends _base_js__WEBPACK_IMPORTED_MODULE_6__/* .AleoBase */ .N {
672981
672692
  transactionFeeCache = {};
672693
+ signerTransferCache = new Map();
672694
+ async hasSignerTransferFunctions(programId) {
672695
+ if (this.signerTransferCache.has(programId)) {
672696
+ return this.signerTransferCache.get(programId);
672697
+ }
672698
+ const program = await this.aleoClient.getProgram(programId);
672699
+ const hasSigner = program.toString().includes('transfer_remote_as_signer');
672700
+ this.signerTransferCache.set(programId, hasSigner);
672701
+ return hasSigner;
672702
+ }
672982
672703
  static async connect(rpcUrls, chainId) {
672983
672704
  return new AleoProvider(rpcUrls, chainId);
672984
672705
  }
@@ -673178,6 +672899,28 @@ class AleoProvider extends _base_js__WEBPACK_IMPORTED_MODULE_6__/* .AleoBase */
673178
672899
  }
673179
672900
  }
673180
672901
  }
672902
+ // ### QUERY DISPATCH ###
672903
+ async getDispatchNonceForTx(mailboxAddress, txId) {
672904
+ const { programId } = (0,_utils_helper_js__WEBPACK_IMPORTED_MODULE_3__/* .fromAleoAddress */ .kz)(mailboxAddress);
672905
+ const blockHash = await this.findBlockHashByTxId(txId);
672906
+ const block = await this.aleoClient.getBlockByHash(blockHash);
672907
+ const blockHeight = Number(block.header.metadata.height);
672908
+ const nonce = await this.queryMappingValue(programId, 'dispatch_event_index', `${blockHeight}u32`);
672909
+ return nonce != null ? nonce : null;
672910
+ }
672911
+ async getDispatchedMessageId(mailboxAddress, nonce) {
672912
+ const { programId } = (0,_utils_helper_js__WEBPACK_IMPORTED_MODULE_3__/* .fromAleoAddress */ .kz)(mailboxAddress);
672913
+ const raw = await this.queryMappingString(programId, 'dispatch_id_events', `${nonce}u32`);
672914
+ return (0,_utils_helper_js__WEBPACK_IMPORTED_MODULE_3__/* .u128PairToBytes32 */ .Gb)(raw);
672915
+ }
672916
+ async getDispatchedDestinationDomain(mailboxAddress, nonce) {
672917
+ const { programId } = (0,_utils_helper_js__WEBPACK_IMPORTED_MODULE_3__/* .fromAleoAddress */ .kz)(mailboxAddress);
672918
+ const result = await this.queryMappingValue(programId, 'dispatch_events', `${nonce}u32`);
672919
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__/* .assert */ .v)(result != null, `No dispatch_events entry at nonce ${nonce} (mailbox=${mailboxAddress})`);
672920
+ const domain = result['destination_domain'];
672921
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__/* .assert */ .v)(typeof domain === 'number', `destination_domain is not a number: ${domain}`);
672922
+ return domain;
672923
+ }
673181
672924
  async getQuotes(gasLimit, destinationDomainId, hooks) {
673182
672925
  let total_quote = new bignumber_js__WEBPACK_IMPORTED_MODULE_1__/* .BigNumber */ .g(0);
673183
672926
  const quotes = [];
@@ -673294,13 +673037,16 @@ class AleoProvider extends _base_js__WEBPACK_IMPORTED_MODULE_6__/* .AleoBase */
673294
673037
  required_hook:${mailbox.requiredHook ? (0,_utils_helper_js__WEBPACK_IMPORTED_MODULE_3__/* .fromAleoAddress */ .kz)(mailbox.requiredHook).address : _utils_helper_js__WEBPACK_IMPORTED_MODULE_3__/* .ALEO_NULL_ADDRESS */ .B$}
673295
673038
  }`;
673296
673039
  const amount = `${req.amount}${tokenType === _hyperlane_xyz_provider_sdk__WEBPACK_IMPORTED_MODULE_2__/* .AltVM.TokenType */ .bx.ks.native ? 'u64' : 'u128'}`;
673040
+ const useSignerVariant = await this.hasSignerTransferFunctions(programId);
673297
673041
  if (req.customHookAddress) {
673298
673042
  const metadataBytes = (0,_utils_helper_js__WEBPACK_IMPORTED_MODULE_3__/* .fillArray */ .R2)([...Buffer.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .strip0x */ .LL)(req.customHookMetadata || ''), 'hex')], 64, 0);
673299
673043
  const gasLimit = _provablehq_sdk_mainnet_js__WEBPACK_IMPORTED_MODULE_0__/* .U128 */ .xQ.fromBytesLe(Uint8Array.from(metadataBytes.slice(0, 16))).toString();
673300
673044
  const hookMetadata = `{gas_limit:${gasLimit},extra_data:[${metadataBytes.map((b) => `${b}u8`).join(',')}]}`;
673301
673045
  return {
673302
673046
  programName: programId,
673303
- functionName: 'transfer_remote_with_hook',
673047
+ functionName: useSignerVariant
673048
+ ? 'transfer_remote_with_hook_as'
673049
+ : 'transfer_remote_with_hook',
673304
673050
  priorityFee: 0,
673305
673051
  privateFee: false,
673306
673052
  inputs: [
@@ -673318,7 +673064,9 @@ class AleoProvider extends _base_js__WEBPACK_IMPORTED_MODULE_6__/* .AleoBase */
673318
673064
  }
673319
673065
  return {
673320
673066
  programName: programId,
673321
- functionName: 'transfer_remote',
673067
+ functionName: useSignerVariant
673068
+ ? 'transfer_remote_as_signer'
673069
+ : 'transfer_remote',
673322
673070
  priorityFee: 0,
673323
673071
  privateFee: false,
673324
673072
  inputs: [
@@ -673346,24 +673094,26 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
673346
673094
  /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
673347
673095
  /* harmony export */ C: () => (/* binding */ AleoSigner)
673348
673096
  /* harmony export */ });
673349
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(21387);
673350
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(73689);
673351
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(14918);
673352
- /* harmony import */ var _utils_helper_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(86255);
673353
- /* harmony import */ var _provider_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(18269);
673354
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_utils_helper_js__WEBPACK_IMPORTED_MODULE_0__, _provider_js__WEBPACK_IMPORTED_MODULE_1__]);
673355
- ([_utils_helper_js__WEBPACK_IMPORTED_MODULE_0__, _provider_js__WEBPACK_IMPORTED_MODULE_1__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
673097
+ /* harmony import */ var _hyperlane_xyz_provider_sdk_warp__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(17791);
673098
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(21387);
673099
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(73689);
673100
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(14918);
673101
+ /* harmony import */ var _utils_helper_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(86255);
673102
+ /* harmony import */ var _provider_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(18269);
673103
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_utils_helper_js__WEBPACK_IMPORTED_MODULE_1__, _provider_js__WEBPACK_IMPORTED_MODULE_2__]);
673104
+ ([_utils_helper_js__WEBPACK_IMPORTED_MODULE_1__, _provider_js__WEBPACK_IMPORTED_MODULE_2__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
673356
673105
 
673357
673106
 
673358
673107
 
673359
- class AleoSigner extends _provider_js__WEBPACK_IMPORTED_MODULE_1__/* .AleoProvider */ .t {
673108
+
673109
+ class AleoSigner extends _provider_js__WEBPACK_IMPORTED_MODULE_2__/* .AleoProvider */ .t {
673360
673110
  static WARP_SUFFIX_ALREADY_DEPLOYED_ERROR = 'already deployed, please choose another suffix';
673361
673111
  programManager;
673362
673112
  static async connectWithSigner(rpcUrls, privateKey, extraParams) {
673363
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .v)(extraParams, `extra params not defined`);
673113
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .v)(extraParams, `extra params not defined`);
673364
673114
  const metadata = extraParams.metadata;
673365
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .v)(metadata, `metadata not defined in extra params`);
673366
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .v)(!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .isNullish */ .u)(metadata.chainId), `chainId not defined in metadata extra params`);
673115
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .v)(metadata, `metadata not defined in extra params`);
673116
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .v)(!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .isNullish */ .u)(metadata.chainId), `chainId not defined in metadata extra params`);
673367
673117
  const chainId = parseInt(metadata.chainId.toString());
673368
673118
  return new AleoSigner(rpcUrls, chainId, privateKey);
673369
673119
  }
@@ -673377,7 +673127,7 @@ class AleoSigner extends _provider_js__WEBPACK_IMPORTED_MODULE_1__/* .AleoProvid
673377
673127
  // Check if it's already deployed
673378
673128
  const isDeployed = await this.isProgramDeployed(ismManagerProgramId);
673379
673129
  if (!isDeployed) {
673380
- const suffix = (0,_utils_helper_js__WEBPACK_IMPORTED_MODULE_0__/* .getProgramSuffix */ .GC)(ismManagerProgramId);
673130
+ const suffix = (0,_utils_helper_js__WEBPACK_IMPORTED_MODULE_1__/* .getProgramSuffix */ .GC)(ismManagerProgramId);
673381
673131
  await this.deployProgram('ism_manager', suffix);
673382
673132
  }
673383
673133
  return ismManagerProgramId;
@@ -673397,16 +673147,19 @@ class AleoSigner extends _provider_js__WEBPACK_IMPORTED_MODULE_1__/* .AleoProvid
673397
673147
  err.message.includes(programId));
673398
673148
  }
673399
673149
  async getWarpTokenSuffix(tokenType, preferredSuffix, maxAttempts = 20) {
673150
+ if (tokenType === _hyperlane_xyz_provider_sdk_warp__WEBPACK_IMPORTED_MODULE_0__/* .TokenType */ .ks.native) {
673151
+ return 'credits';
673152
+ }
673400
673153
  const configuredSuffix = preferredSuffix || this.warpSuffix;
673401
673154
  if (configuredSuffix) {
673402
- const tokenProgramId = `${this.prefix}_${tokenType}_${configuredSuffix}.aleo`;
673155
+ const tokenProgramId = `${this.prefix}_warp_token_${configuredSuffix}.aleo`;
673403
673156
  const isAlreadyDeployed = await this.isProgramDeployed(tokenProgramId);
673404
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .v)(!isAlreadyDeployed, `Warp route with suffix ${configuredSuffix} ${AleoSigner.WARP_SUFFIX_ALREADY_DEPLOYED_ERROR}`);
673157
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .v)(!isAlreadyDeployed, `Warp route with suffix ${configuredSuffix} ${AleoSigner.WARP_SUFFIX_ALREADY_DEPLOYED_ERROR}`);
673405
673158
  return configuredSuffix;
673406
673159
  }
673407
673160
  for (let i = 0; i < maxAttempts; i++) {
673408
- const suffix = this.generateSuffix(_utils_helper_js__WEBPACK_IMPORTED_MODULE_0__/* .SUFFIX_LENGTH_LONG */ .SO);
673409
- const tokenProgramId = `${this.prefix}_${tokenType}_${suffix}.aleo`;
673161
+ const suffix = this.generateSuffix(_utils_helper_js__WEBPACK_IMPORTED_MODULE_1__/* .SUFFIX_LENGTH_LONG */ .SO);
673162
+ const tokenProgramId = `${this.prefix}_warp_token_${suffix}.aleo`;
673410
673163
  if (!(await this.isProgramDeployed(tokenProgramId))) {
673411
673164
  return suffix;
673412
673165
  }
@@ -673414,7 +673167,7 @@ class AleoSigner extends _provider_js__WEBPACK_IMPORTED_MODULE_1__/* .AleoProvid
673414
673167
  throw new Error(`Could not find an unused suffix for ${tokenType} after ${maxAttempts} attempts`);
673415
673168
  }
673416
673169
  async deployProgram(programName, coreSuffix, warpSuffix) {
673417
- const programs = (0,_utils_helper_js__WEBPACK_IMPORTED_MODULE_0__/* .loadProgramsInDeployOrder */ .wR)(this.prefix, programName, coreSuffix, warpSuffix);
673170
+ const programs = (0,_utils_helper_js__WEBPACK_IMPORTED_MODULE_1__/* .loadProgramsInDeployOrder */ .wR)(this.prefix, programName, coreSuffix, warpSuffix);
673418
673171
  for (const { id, program } of programs) {
673419
673172
  if (await this.isProgramDeployed(id)) {
673420
673173
  continue;
@@ -673455,7 +673208,7 @@ class AleoSigner extends _provider_js__WEBPACK_IMPORTED_MODULE_1__/* .AleoProvid
673455
673208
  async getHookManager(suffix) {
673456
673209
  const programs = await this.deployProgram('hook_manager', suffix);
673457
673210
  const hookManagerProgramId = programs['hook_manager'];
673458
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__/* .assert */ .v)(hookManagerProgramId, `hook_manager program not deployed`);
673211
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .v)(hookManagerProgramId, `hook_manager program not deployed`);
673459
673212
  return hookManagerProgramId;
673460
673213
  }
673461
673214
  supportsTransactionBatching() {
@@ -673468,7 +673221,7 @@ class AleoSigner extends _provider_js__WEBPACK_IMPORTED_MODULE_1__/* .AleoProvid
673468
673221
  const tx = this.skipProofs
673469
673222
  ? await this.programManager.buildDevnodeExecutionTransaction(transaction)
673470
673223
  : await this.programManager.buildExecutionTransaction(transaction);
673471
- const txId = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .retryAsync */ .tH)(() => this.programManager.networkClient.submitTransaction(tx), _utils_helper_js__WEBPACK_IMPORTED_MODULE_0__/* .RETRY_ATTEMPTS */ .Km, _utils_helper_js__WEBPACK_IMPORTED_MODULE_0__/* .RETRY_DELAY_MS */ .k);
673224
+ const txId = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .retryAsync */ .tH)(() => this.programManager.networkClient.submitTransaction(tx), _utils_helper_js__WEBPACK_IMPORTED_MODULE_1__/* .RETRY_ATTEMPTS */ .Km, _utils_helper_js__WEBPACK_IMPORTED_MODULE_1__/* .RETRY_DELAY_MS */ .k);
673472
673225
  const receipt = await this.aleoClient.waitForTransactionConfirmation(txId);
673473
673226
  return {
673474
673227
  ...receipt,
@@ -675297,6 +675050,7 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
675297
675050
  /* harmony export */ B$: () => (/* binding */ ALEO_NULL_ADDRESS),
675298
675051
  /* harmony export */ ED: () => (/* binding */ getUnusedSuffix),
675299
675052
  /* harmony export */ GC: () => (/* binding */ getProgramSuffix),
675053
+ /* harmony export */ Gb: () => (/* binding */ u128PairToBytes32),
675300
675054
  /* harmony export */ Km: () => (/* binding */ RETRY_ATTEMPTS),
675301
675055
  /* harmony export */ M0: () => (/* binding */ formatAddress),
675302
675056
  /* harmony export */ NL: () => (/* binding */ providerWarpTokenTypeFromAleoTokenType),
@@ -675321,10 +675075,12 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
675321
675075
  /* harmony export */ wR: () => (/* binding */ loadProgramsInDeployOrder),
675322
675076
  /* harmony export */ zg: () => (/* binding */ formatIsmAddress)
675323
675077
  /* harmony export */ });
675324
- /* unused harmony exports MAINNET_PREFIX, TESTNET_PREFIX, getProgramPrefix, isProgramDeployed */
675078
+ /* unused harmony exports MAINNET_PREFIX, TESTNET_PREFIX, getProgramPrefix, toKeyId, isProgramDeployed */
675325
675079
  /* harmony import */ var _provablehq_sdk_mainnet_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(73565);
675326
675080
  /* harmony import */ var _hyperlane_xyz_provider_sdk_warp__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(17791);
675327
675081
  /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(93142);
675082
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(21387);
675083
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(18508);
675328
675084
  /* harmony import */ var _artifacts_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(29026);
675329
675085
  /* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(96602);
675330
675086
  var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_provablehq_sdk_mainnet_js__WEBPACK_IMPORTED_MODULE_0__]);
@@ -675383,7 +675139,13 @@ function loadProgramsInDeployOrder(prefix, programName, coreSuffix, warpSuffix)
675383
675139
  programs = programs.map((p) => _provablehq_sdk_mainnet_js__WEBPACK_IMPORTED_MODULE_0__/* .Program */ .BP.fromString(p
675384
675140
  .toString()
675385
675141
  .replaceAll(/(mailbox|hook_manager|dispatch_proxy|validator_announce).aleo/g, (_, p1) => (coreSuffix ? `${p1}_${coreSuffix}.aleo` : `${p1}.aleo`))
675386
- .replaceAll(/(hyp_native|hyp_collateral|hyp_synthetic).aleo/g, (_, p1) => `${p1}_${getCustomWarpSuffixFromEnv() || warpSuffix || coreSuffix}.aleo`)));
675142
+ .replaceAll(/(hyp_native|hyp_collateral|hyp_synthetic).aleo/g, (_, p1) => {
675143
+ if (p1 === 'hyp_native') {
675144
+ return `hyp_warp_token_credits.aleo`;
675145
+ }
675146
+ const effectiveSuffix = getCustomWarpSuffixFromEnv() || warpSuffix || coreSuffix;
675147
+ return `hyp_warp_token_${effectiveSuffix}.aleo`;
675148
+ })));
675387
675149
  if (customIsmSuffix) {
675388
675150
  programs = programs.map((p) => _provablehq_sdk_mainnet_js__WEBPACK_IMPORTED_MODULE_0__/* .Program */ .BP.fromString(p
675389
675151
  .toString()
@@ -675436,7 +675198,18 @@ constructor:
675436
675198
  }
675437
675199
  return programs.map((p) => ({
675438
675200
  id: p.id(),
675439
- name: Object.keys(_artifacts_js__WEBPACK_IMPORTED_MODULE_2__/* .programRegistry */ .aE).find((r) => p.id().startsWith(`${prefix}_${r.replaceAll('hyp_', '')}`)) || '',
675201
+ name: Object.keys(_artifacts_js__WEBPACK_IMPORTED_MODULE_2__/* .programRegistry */ .aE).find((r) => {
675202
+ if (r === 'hyp_native') {
675203
+ return p.id() === `${prefix}_warp_token_credits.aleo`;
675204
+ }
675205
+ if ((r === 'hyp_collateral' || r === 'hyp_synthetic') &&
675206
+ r === programName &&
675207
+ p.id().startsWith(`${prefix}_warp_token_`) &&
675208
+ p.id() !== `${prefix}_warp_token_credits.aleo`) {
675209
+ return true;
675210
+ }
675211
+ return p.id().startsWith(`${prefix}_${r.replaceAll('hyp_', '')}`);
675212
+ }) || '',
675440
675213
  program: p.toString(),
675441
675214
  }));
675442
675215
  }
@@ -675550,11 +675323,74 @@ function bytes32ToU128String(input) {
675550
675323
  const highBytes = Uint8Array.from(bytes.subarray(16, 32));
675551
675324
  return `[${_provablehq_sdk_mainnet_js__WEBPACK_IMPORTED_MODULE_0__/* .U128 */ .xQ.fromBytesLe(lowBytes).toString()},${_provablehq_sdk_mainnet_js__WEBPACK_IMPORTED_MODULE_0__/* .U128 */ .xQ.fromBytesLe(highBytes).toString()}]`;
675552
675325
  }
675326
+ // Inverse of bytes32ToU128String: parses "[lowU128u128, highU128u128]" from dispatch_id_events
675327
+ // and converts back to a 0x-prefixed 32-byte hex string.
675328
+ function u128PairToBytes32(u128PairStr) {
675329
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .v)(u128PairStr.startsWith('[') && u128PairStr.endsWith(']'), `u128PairToBytes32: expected "[low,high]" format, got: ${u128PairStr}`);
675330
+ const inner = u128PairStr.slice(1, -1);
675331
+ const parts = inner.split(',').map((s) => s.trim().replace(/u128$/, ''));
675332
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .v)(parts.length === 2, `u128PairToBytes32: expected exactly 2 comma-separated parts, got ${parts.length}: ${inner}`);
675333
+ const low = BigInt(parts[0]);
675334
+ const high = BigInt(parts[1]);
675335
+ const u128Max = 2n ** 128n;
675336
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .v)(low >= 0n && low < u128Max, `u128PairToBytes32: low value out of u128 range: ${low}`);
675337
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .v)(high >= 0n && high < u128Max, `u128PairToBytes32: high value out of u128 range: ${high}`);
675338
+ const bytes = new Uint8Array(32);
675339
+ let tempLow = low;
675340
+ for (let i = 0; i < 16; i++) {
675341
+ bytes[i] = Number(tempLow & 0xffn);
675342
+ tempLow >>= 8n;
675343
+ }
675344
+ let tempHigh = high;
675345
+ for (let i = 0; i < 16; i++) {
675346
+ bytes[16 + i] = Number(tempHigh & 0xffn);
675347
+ tempHigh >>= 8n;
675348
+ }
675349
+ return (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_6__/* .toHexString */ .U5)(Buffer.from(bytes));
675350
+ }
675553
675351
  function getBalanceKey(address, denom) {
675554
675352
  return new _provablehq_sdk_mainnet_js__WEBPACK_IMPORTED_MODULE_0__/* .BHP256 */ .I_()
675555
675353
  .hash(_provablehq_sdk_mainnet_js__WEBPACK_IMPORTED_MODULE_0__/* .Plaintext */ .wN.fromString(`{account:${address},token_id:${denom}}`).toBitsLe())
675556
675354
  .toString();
675557
675355
  }
675356
+ // Aleo scalar field (BLS12-377 Fr) is 253 bits.
675357
+ const ALEO_FIELD_BITS = 253;
675358
+ // Encodes an Aleo Identifier to its snarkVM LE bit representation.
675359
+ // Identifier stores ASCII bytes packed into a field element: chars → LE bits → zero-padded to 253 bits.
675360
+ function identifierToBitsLe(name) {
675361
+ const bits = [];
675362
+ for (let i = 0; i < name.length; i++) {
675363
+ const byte = name.charCodeAt(i);
675364
+ for (let b = 0; b < 8; b++)
675365
+ bits.push(((byte >> b) & 1) === 1);
675366
+ }
675367
+ while (bits.length < ALEO_FIELD_BITS)
675368
+ bits.push(false);
675369
+ return bits;
675370
+ }
675371
+ // Encodes an Aleo ProgramID (e.g., "mailbox.aleo") as LE bits.
675372
+ // ProgramID serializes as: name identifier bits || network identifier bits.
675373
+ function programIdToBitsLe(programId) {
675374
+ const dot = programId.lastIndexOf('.');
675375
+ return [
675376
+ ...identifierToBitsLe(programId.slice(0, dot)),
675377
+ ...identifierToBitsLe(programId.slice(dot + 1)),
675378
+ ];
675379
+ }
675380
+ // Computes the Aleo mapping key_id used in FinalizeJSON.
675381
+ // Matches the Rust `to_key_id` in hyperlane-aleo/src/utils.rs:
675382
+ // BHP1024(programId_bits | false | mappingName_bits | false | plaintextKey_bits)
675383
+ // key must be a valid Aleo plaintext string, e.g. "0u32".
675384
+ function toKeyId(programId, mappingName, key) {
675385
+ const bits = [
675386
+ ...programIdToBitsLe(programId),
675387
+ false,
675388
+ ...identifierToBitsLe(mappingName),
675389
+ false,
675390
+ ...Plaintext.fromString(key).toBitsLe(),
675391
+ ];
675392
+ return new BHP1024().hash(bits).toString();
675393
+ }
675558
675394
  /**
675559
675395
  * Convert AleoTokenType to provider-sdk TokenType
675560
675396
  */
@@ -676141,9 +675977,11 @@ class AleoNativeTokenWriter extends AleoNativeTokenReader {
676141
675977
  // Get mailbox suffix for deployment
676142
675978
  const { programId: mailboxProgramId } = (0,_utils_helper_js__WEBPACK_IMPORTED_MODULE_2__/* .fromAleoAddress */ .kz)(config.mailbox);
676143
675979
  const mailboxSuffix = (0,_utils_helper_js__WEBPACK_IMPORTED_MODULE_2__/* .getProgramSuffix */ .GC)(mailboxProgramId);
676144
- // Resolve token suffix from preferred setting or generate a collision-free one
675980
+ // Resolve token suffix from preferred setting or generate a collision-free one.
675981
+ // Native tokens always use the fixed 'credits' suffix, so the program may
675982
+ // already be deployed and initialized from a previous warp deploy run.
676145
675983
  const tokenSuffix = await this.signer.getWarpTokenSuffix('native');
676146
- // Deploy native token program
675984
+ // Deploy native token program (idempotent if already on-chain)
676147
675985
  const programs = await this.signer
676148
675986
  .deployProgram('hyp_native', mailboxSuffix, tokenSuffix)
676149
675987
  .catch((error) => {
@@ -676151,6 +675989,15 @@ class AleoNativeTokenWriter extends AleoNativeTokenReader {
676151
675989
  });
676152
675990
  const tokenProgramId = programs['hyp_native'];
676153
675991
  (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_6__/* .assert */ .v)(tokenProgramId, 'Expected native token program to be deployed but none was found in deployment mapping');
675992
+ const tokenAddress = (0,_utils_helper_js__WEBPACK_IMPORTED_MODULE_2__/* .toAleoAddress */ .j2)(tokenProgramId);
675993
+ // Native tokens use a fixed program name (no random suffix), so only one
675994
+ // native warp token can exist per network. If it's already initialized,
675995
+ // fail early with a clear message instead of letting init fail on-chain.
675996
+ const existingArtifact = await this.read(tokenAddress).catch(() => null);
675997
+ if (existingArtifact) {
675998
+ throw new Error(`Native warp token ${tokenProgramId} is already deployed at ${tokenAddress}. ` +
675999
+ `Native tokens cannot be redeployed. Use \`hyperlane warp apply\` to update the existing deployment.`);
676000
+ }
676154
676001
  // Initialize token
676155
676002
  const initTx = (0,_warp_tx_js__WEBPACK_IMPORTED_MODULE_5__/* .getCreateNativeTokenTx */ .zf)(tokenProgramId);
676156
676003
  const initReceipt = await this.signer
@@ -676159,7 +676006,6 @@ class AleoNativeTokenWriter extends AleoNativeTokenReader {
676159
676006
  throw withErrorContext(`Failed to initialize native warp token program ${tokenProgramId} (signer=${signerAddress})`, error);
676160
676007
  });
676161
676008
  allReceipts.push(initReceipt);
676162
- const tokenAddress = (0,_utils_helper_js__WEBPACK_IMPORTED_MODULE_2__/* .toAleoAddress */ .j2)(tokenProgramId);
676163
676009
  // Perform post-deployment updates (ISM setup and router enrollment)
676164
676010
  const postDeploymentTxs = (0,_warp_tx_js__WEBPACK_IMPORTED_MODULE_5__/* .getPostDeploymentUpdateTxs */ .UL)(tokenAddress, config);
676165
676011
  for (const tx of postDeploymentTxs) {
@@ -677362,6 +677208,160 @@ async function getOperatorSignature(domain, serviceManager, avsDirectory, operat
677362
677208
 
677363
677209
  /***/ }),
677364
677210
 
677211
+ /***/ 46761:
677212
+ /***/ ((__webpack_module__, __webpack_exports__, __nccwpck_require__) => {
677213
+
677214
+ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
677215
+ /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
677216
+ /* harmony export */ u: () => (/* binding */ runWarpRouteBalances)
677217
+ /* harmony export */ });
677218
+ /* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(9035);
677219
+ /* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(4879);
677220
+ /* harmony import */ var _logger_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(54321);
677221
+ /* harmony import */ var _utils_files_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(17468);
677222
+ /* harmony import */ var _utils_warp_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(85361);
677223
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_utils_warp_js__WEBPACK_IMPORTED_MODULE_1__, _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_2__]);
677224
+ ([_utils_warp_js__WEBPACK_IMPORTED_MODULE_1__, _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_2__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
677225
+
677226
+
677227
+
677228
+
677229
+ function formatBigIntBalance(raw, decimals) {
677230
+ const str = raw.toString().padStart(decimals + 1, '0');
677231
+ const intPart = str.slice(0, str.length - decimals);
677232
+ const fracFull = str.slice(str.length - decimals);
677233
+ const fracTrimmed = fracFull.replace(/0+$/, '');
677234
+ const intFormatted = new Intl.NumberFormat().format(BigInt(intPart));
677235
+ return fracTrimmed ? `${intFormatted}.${fracTrimmed}` : intFormatted;
677236
+ }
677237
+ async function runWarpRouteBalances({ context, warpRouteId, chains, out, address, raw, }) {
677238
+ const warpCoreConfig = await (0,_utils_warp_js__WEBPACK_IMPORTED_MODULE_1__/* .getWarpCoreConfigOrExit */ .ff)({
677239
+ context,
677240
+ warpRouteId,
677241
+ chains,
677242
+ });
677243
+ const registryAddresses = await context.registry.getAddresses();
677244
+ const mailboxMetadata = {};
677245
+ for (const token of warpCoreConfig.tokens) {
677246
+ const chainAddresses = registryAddresses[token.chainName];
677247
+ if (chainAddresses?.mailbox) {
677248
+ mailboxMetadata[token.chainName] = { mailbox: chainAddresses.mailbox };
677249
+ }
677250
+ }
677251
+ const multiProvider = context.multiProtocolProvider.extendChainMetadata(mailboxMetadata);
677252
+ const warpCore = _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_2__/* .WarpCore */ .u.FromConfig(multiProvider, warpCoreConfig);
677253
+ const collateralizedSet = new Set([
677254
+ ..._hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_3__/* .TOKEN_COLLATERALIZED_STANDARDS */ .PP,
677255
+ ..._hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_3__/* .ERC4626_COLLATERAL_STANDARDS */ .eB,
677256
+ ]);
677257
+ const chainsSet = chains && chains.length > 0 ? new Set(chains) : undefined;
677258
+ const filteredTokens = chainsSet
677259
+ ? warpCore.tokens.filter((t) => chainsSet.has(t.chainName))
677260
+ : warpCore.tokens;
677261
+ const tokenEntries = await Promise.all(filteredTokens.map(async (token) => {
677262
+ const isCollateral = collateralizedSet.has(token.standard);
677263
+ try {
677264
+ let balanceRaw;
677265
+ if (address) {
677266
+ const adapter = token.getAdapter(multiProvider);
677267
+ balanceRaw = await adapter.getBalance(address);
677268
+ }
677269
+ else if (isCollateral) {
677270
+ balanceRaw = await warpCore.getTokenCollateral(token);
677271
+ }
677272
+ else {
677273
+ const adapter = token.getAdapter(multiProvider);
677274
+ balanceRaw = await adapter.getTotalSupply();
677275
+ }
677276
+ const balance = balanceRaw !== undefined
677277
+ ? raw
677278
+ ? balanceRaw.toString()
677279
+ : formatBigIntBalance(balanceRaw, token.decimals)
677280
+ : 'N/A';
677281
+ return {
677282
+ chain: token.chainName,
677283
+ row: {
677284
+ Symbol: token.symbol,
677285
+ Standard: token.standard,
677286
+ Address: token.addressOrDenom,
677287
+ Balance: balance,
677288
+ },
677289
+ rawBalance: balanceRaw,
677290
+ isCollateral,
677291
+ decimals: token.decimals,
677292
+ };
677293
+ }
677294
+ catch (e) {
677295
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_4__/* .warnYellow */ .dE)(`Could not fetch balance for ${token.symbol} on ${token.chainName}: ${e instanceof Error ? e.message : String(e)}`);
677296
+ return {
677297
+ chain: token.chainName,
677298
+ row: {
677299
+ Symbol: token.symbol,
677300
+ Standard: token.standard,
677301
+ Address: token.addressOrDenom,
677302
+ Balance: 'Error',
677303
+ },
677304
+ rawBalance: undefined,
677305
+ isCollateral,
677306
+ decimals: token.decimals,
677307
+ };
677308
+ }
677309
+ }));
677310
+ const tableData = {};
677311
+ for (const { chain, row } of tokenEntries) {
677312
+ let key = chain;
677313
+ let i = 2;
677314
+ while (key in tableData) {
677315
+ key = `${chain} (${i++})`;
677316
+ }
677317
+ tableData[key] = row;
677318
+ }
677319
+ if (address) {
677320
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_4__/* .logBlue */ .RK)(`\nWarp route balances for ${address}:`);
677321
+ }
677322
+ else {
677323
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_4__/* .logBlue */ .RK)('\nWarp route balances:');
677324
+ }
677325
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_4__/* .logTable */ .Jn)(tableData);
677326
+ if (!address) {
677327
+ const collateralEntries = tokenEntries.filter((e) => e.isCollateral);
677328
+ const syntheticEntries = tokenEntries.filter((e) => !e.isCollateral);
677329
+ if (collateralEntries.length > 0 && syntheticEntries.length > 0) {
677330
+ const hasErrors = tokenEntries.some((e) => e.rawBalance === undefined);
677331
+ if (hasErrors) {
677332
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_4__/* .warnYellow */ .dE)('\nStatus: INCONCLUSIVE — some balances unavailable, cannot compare collateral vs synthetic supply');
677333
+ }
677334
+ else {
677335
+ const commonDecimals = Math.max(...collateralEntries.map((e) => e.decimals), ...syntheticEntries.map((e) => e.decimals));
677336
+ const scale = (e) => 10n ** BigInt(commonDecimals - e.decimals);
677337
+ const totalCollateral = collateralEntries.reduce((sum, e) => sum + (e.rawBalance ?? 0n) * scale(e), 0n);
677338
+ const totalSynthetic = syntheticEntries.reduce((sum, e) => sum + (e.rawBalance ?? 0n) * scale(e), 0n);
677339
+ const fmt = (v) => raw ? v.toString() : formatBigIntBalance(v, commonDecimals);
677340
+ if (totalCollateral === totalSynthetic) {
677341
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_4__/* .logGreen */ .In)(`\nStatus: collateral matches synthetic supply (${fmt(totalCollateral)})`);
677342
+ }
677343
+ else {
677344
+ const diff = totalCollateral > totalSynthetic
677345
+ ? totalCollateral - totalSynthetic
677346
+ : totalSynthetic - totalCollateral;
677347
+ const sign = totalCollateral > totalSynthetic ? '+' : '-';
677348
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_4__/* .warnYellow */ .dE)(`\nStatus: MISMATCH — collateral ${fmt(totalCollateral)} vs synthetic ${fmt(totalSynthetic)} (diff: ${sign}${fmt(diff)})`);
677349
+ }
677350
+ }
677351
+ }
677352
+ }
677353
+ if (out) {
677354
+ const jsonData = tokenEntries.map(({ chain, row }) => ({ chain, ...row }));
677355
+ (0,_utils_files_js__WEBPACK_IMPORTED_MODULE_0__/* .writeYamlOrJson */ .o9)(out, jsonData);
677356
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_4__/* .logGreen */ .In)(`\nBalances written to ${out}`);
677357
+ }
677358
+ }
677359
+ //# sourceMappingURL=warp.js.map
677360
+ __webpack_async_result__();
677361
+ } catch(e) { __webpack_async_result__(e); } });
677362
+
677363
+ /***/ }),
677364
+
677365
677365
  /***/ 53994:
677366
677366
  /***/ ((__webpack_module__, __webpack_exports__, __nccwpck_require__) => {
677367
677367
 
@@ -679474,29 +679474,31 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
679474
679474
  /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(39023);
679475
679475
  /* harmony import */ var yaml__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(10684);
679476
679476
  /* harmony import */ var _hyperlane_xyz_rebalancer__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(97772);
679477
- /* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_21__ = __nccwpck_require__(47265);
679478
- /* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_23__ = __nccwpck_require__(17023);
679479
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_17__ = __nccwpck_require__(21387);
679480
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__ = __nccwpck_require__(52193);
679481
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__ = __nccwpck_require__(16639);
679482
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_22__ = __nccwpck_require__(94523);
679477
+ /* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_22__ = __nccwpck_require__(47265);
679478
+ /* harmony import */ var _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_24__ = __nccwpck_require__(17023);
679479
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__ = __nccwpck_require__(21387);
679480
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__ = __nccwpck_require__(52193);
679481
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_21__ = __nccwpck_require__(16639);
679482
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_23__ = __nccwpck_require__(94523);
679483
679483
  /* harmony import */ var _check_warp_js__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(53994);
679484
679484
  /* harmony import */ var _config_warp_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(10392);
679485
679485
  /* harmony import */ var _deploy_warp_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(41687);
679486
- /* harmony import */ var _fees_warp_js__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(89717);
679487
- /* harmony import */ var _fork_fork_js__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(51908);
679488
- /* harmony import */ var _logger_js__WEBPACK_IMPORTED_MODULE_16__ = __nccwpck_require__(54321);
679489
- /* harmony import */ var _read_warp_js__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(59794);
679490
- /* harmony import */ var _send_transfer_js__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(67793);
679491
- /* harmony import */ var _submitters_types_js__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(17555);
679492
- /* harmony import */ var _utils_files_js__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(17468);
679493
- /* harmony import */ var _utils_warp_send_js__WEBPACK_IMPORTED_MODULE_19__ = __nccwpck_require__(96192);
679494
- /* harmony import */ var _utils_warp_js__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(85361);
679495
- /* harmony import */ var _verify_warp_js__WEBPACK_IMPORTED_MODULE_13__ = __nccwpck_require__(56661);
679496
- /* harmony import */ var _options_js__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(89438);
679497
- /* harmony import */ var _send_js__WEBPACK_IMPORTED_MODULE_15__ = __nccwpck_require__(56148);
679498
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_hyperlane_xyz_rebalancer__WEBPACK_IMPORTED_MODULE_2__, _check_warp_js__WEBPACK_IMPORTED_MODULE_3__, _config_warp_js__WEBPACK_IMPORTED_MODULE_4__, _deploy_warp_js__WEBPACK_IMPORTED_MODULE_5__, _fees_warp_js__WEBPACK_IMPORTED_MODULE_6__, _fork_fork_js__WEBPACK_IMPORTED_MODULE_7__, _read_warp_js__WEBPACK_IMPORTED_MODULE_8__, _send_transfer_js__WEBPACK_IMPORTED_MODULE_9__, _submitters_types_js__WEBPACK_IMPORTED_MODULE_10__, _utils_warp_js__WEBPACK_IMPORTED_MODULE_12__, _verify_warp_js__WEBPACK_IMPORTED_MODULE_13__, _options_js__WEBPACK_IMPORTED_MODULE_14__, _send_js__WEBPACK_IMPORTED_MODULE_15__]);
679499
- ([_hyperlane_xyz_rebalancer__WEBPACK_IMPORTED_MODULE_2__, _check_warp_js__WEBPACK_IMPORTED_MODULE_3__, _config_warp_js__WEBPACK_IMPORTED_MODULE_4__, _deploy_warp_js__WEBPACK_IMPORTED_MODULE_5__, _fees_warp_js__WEBPACK_IMPORTED_MODULE_6__, _fork_fork_js__WEBPACK_IMPORTED_MODULE_7__, _read_warp_js__WEBPACK_IMPORTED_MODULE_8__, _send_transfer_js__WEBPACK_IMPORTED_MODULE_9__, _submitters_types_js__WEBPACK_IMPORTED_MODULE_10__, _utils_warp_js__WEBPACK_IMPORTED_MODULE_12__, _verify_warp_js__WEBPACK_IMPORTED_MODULE_13__, _options_js__WEBPACK_IMPORTED_MODULE_14__, _send_js__WEBPACK_IMPORTED_MODULE_15__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
679486
+ /* harmony import */ var _balances_warp_js__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(46761);
679487
+ /* harmony import */ var _fees_warp_js__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(89717);
679488
+ /* harmony import */ var _fork_fork_js__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(51908);
679489
+ /* harmony import */ var _logger_js__WEBPACK_IMPORTED_MODULE_17__ = __nccwpck_require__(54321);
679490
+ /* harmony import */ var _read_warp_js__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(59794);
679491
+ /* harmony import */ var _send_transfer_js__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(67793);
679492
+ /* harmony import */ var _submitters_types_js__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(17555);
679493
+ /* harmony import */ var _utils_files_js__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(17468);
679494
+ /* harmony import */ var _utils_warp_send_js__WEBPACK_IMPORTED_MODULE_20__ = __nccwpck_require__(96192);
679495
+ /* harmony import */ var _utils_warp_js__WEBPACK_IMPORTED_MODULE_13__ = __nccwpck_require__(85361);
679496
+ /* harmony import */ var _verify_warp_js__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(56661);
679497
+ /* harmony import */ var _options_js__WEBPACK_IMPORTED_MODULE_15__ = __nccwpck_require__(89438);
679498
+ /* harmony import */ var _send_js__WEBPACK_IMPORTED_MODULE_16__ = __nccwpck_require__(56148);
679499
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_hyperlane_xyz_rebalancer__WEBPACK_IMPORTED_MODULE_2__, _check_warp_js__WEBPACK_IMPORTED_MODULE_3__, _config_warp_js__WEBPACK_IMPORTED_MODULE_4__, _deploy_warp_js__WEBPACK_IMPORTED_MODULE_5__, _balances_warp_js__WEBPACK_IMPORTED_MODULE_6__, _fees_warp_js__WEBPACK_IMPORTED_MODULE_7__, _fork_fork_js__WEBPACK_IMPORTED_MODULE_8__, _read_warp_js__WEBPACK_IMPORTED_MODULE_9__, _send_transfer_js__WEBPACK_IMPORTED_MODULE_10__, _submitters_types_js__WEBPACK_IMPORTED_MODULE_11__, _utils_warp_js__WEBPACK_IMPORTED_MODULE_13__, _verify_warp_js__WEBPACK_IMPORTED_MODULE_14__, _options_js__WEBPACK_IMPORTED_MODULE_15__, _send_js__WEBPACK_IMPORTED_MODULE_16__]);
679500
+ ([_hyperlane_xyz_rebalancer__WEBPACK_IMPORTED_MODULE_2__, _check_warp_js__WEBPACK_IMPORTED_MODULE_3__, _config_warp_js__WEBPACK_IMPORTED_MODULE_4__, _deploy_warp_js__WEBPACK_IMPORTED_MODULE_5__, _balances_warp_js__WEBPACK_IMPORTED_MODULE_6__, _fees_warp_js__WEBPACK_IMPORTED_MODULE_7__, _fork_fork_js__WEBPACK_IMPORTED_MODULE_8__, _read_warp_js__WEBPACK_IMPORTED_MODULE_9__, _send_transfer_js__WEBPACK_IMPORTED_MODULE_10__, _submitters_types_js__WEBPACK_IMPORTED_MODULE_11__, _utils_warp_js__WEBPACK_IMPORTED_MODULE_13__, _verify_warp_js__WEBPACK_IMPORTED_MODULE_14__, _options_js__WEBPACK_IMPORTED_MODULE_15__, _send_js__WEBPACK_IMPORTED_MODULE_16__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
679501
+
679500
679502
 
679501
679503
 
679502
679504
 
@@ -679525,6 +679527,7 @@ const warpCommand = {
679525
679527
  describe: 'Manage Hyperlane warp routes',
679526
679528
  builder: (yargs) => yargs
679527
679529
  .command(apply)
679530
+ .command(balances)
679528
679531
  .command(check)
679529
679532
  .command(combine)
679530
679533
  .command(deploy)
@@ -679537,10 +679540,10 @@ const warpCommand = {
679537
679540
  .command(verify)
679538
679541
  .version(false)
679539
679542
  .demandCommand(),
679540
- handler: () => (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .log */ .Rm)('Command required'),
679543
+ handler: () => (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .log */ .Rm)('Command required'),
679541
679544
  };
679542
679545
  const WARP_ROUTE_OPTIONS = {
679543
- 'warp-route-id': _options_js__WEBPACK_IMPORTED_MODULE_14__/* .warpRouteIdCommandOption */ .N$,
679546
+ 'warp-route-id': _options_js__WEBPACK_IMPORTED_MODULE_15__/* .warpRouteIdCommandOption */ .N$,
679544
679547
  };
679545
679548
  async function getWarpConfigsFromContextOrRegistry({ context, warpRouteId, }) {
679546
679549
  if (context.warpCoreConfig && context.warpDeployConfig) {
@@ -679552,7 +679555,7 @@ async function getWarpConfigsFromContextOrRegistry({ context, warpRouteId, }) {
679552
679555
  }
679553
679556
  // If cache is partial, refresh both configs together to avoid mixing stale+fresh routes.
679554
679557
  const requestedWarpRouteId = context.resolvedWarpRouteId ?? warpRouteId;
679555
- const fetchedConfigs = await (0,_utils_warp_js__WEBPACK_IMPORTED_MODULE_12__/* .getWarpConfigs */ .Yb)({
679558
+ const fetchedConfigs = await (0,_utils_warp_js__WEBPACK_IMPORTED_MODULE_13__/* .getWarpConfigs */ .Yb)({
679556
679559
  context,
679557
679560
  warpRouteId: requestedWarpRouteId,
679558
679561
  });
@@ -679567,17 +679570,47 @@ async function getWarpConfigsFromContextOrRegistry({ context, warpRouteId, }) {
679567
679570
  resolvedWarpRouteId,
679568
679571
  };
679569
679572
  }
679573
+ const balances = {
679574
+ command: 'balances',
679575
+ describe: 'Display token balances for each leg of a warp route',
679576
+ builder: {
679577
+ ...WARP_ROUTE_OPTIONS,
679578
+ chains: (0,_options_js__WEBPACK_IMPORTED_MODULE_15__/* .stringArrayOptionConfig */ .om)({
679579
+ description: 'Filter to specific chains',
679580
+ demandOption: false,
679581
+ }),
679582
+ out: (0,_options_js__WEBPACK_IMPORTED_MODULE_15__/* .outputFileCommandOption */ .Ym)(undefined, false, 'Output file path (JSON or YAML)'),
679583
+ address: (0,_options_js__WEBPACK_IMPORTED_MODULE_15__/* .addressCommandOption */ .Fs)("User address to check balances for. When provided, shows the user's token balance on each chain instead of collateral/supply."),
679584
+ raw: {
679585
+ type: 'boolean',
679586
+ description: 'Show balances in base units (without decimal formatting)',
679587
+ default: false,
679588
+ },
679589
+ },
679590
+ handler: async ({ context, warpRouteId, chains, out, address, raw }) => {
679591
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .logCommandHeader */ .dp)('Hyperlane Warp Balances');
679592
+ await (0,_balances_warp_js__WEBPACK_IMPORTED_MODULE_6__/* .runWarpRouteBalances */ .u)({
679593
+ context,
679594
+ warpRouteId,
679595
+ chains,
679596
+ out,
679597
+ address,
679598
+ raw,
679599
+ });
679600
+ process.exit(0);
679601
+ },
679602
+ };
679570
679603
  const apply = {
679571
679604
  command: 'apply',
679572
679605
  describe: 'Update Warp Route contracts',
679573
679606
  builder: {
679574
679607
  ...WARP_ROUTE_OPTIONS,
679575
- strategy: { ..._options_js__WEBPACK_IMPORTED_MODULE_14__/* .strategyCommandOption */ .sB, demandOption: false },
679608
+ strategy: { ..._options_js__WEBPACK_IMPORTED_MODULE_15__/* .strategyCommandOption */ .sB, demandOption: false },
679576
679609
  'receipts-dir': {
679577
679610
  type: 'string',
679578
679611
  description: 'The directory to output transaction receipts.',
679579
679612
  default: './generated/transactions',
679580
- coerce: (dir) => (0,_utils_files_js__WEBPACK_IMPORTED_MODULE_11__/* .removeTrailingSlash */ .UC)(dir),
679613
+ coerce: (dir) => (0,_utils_files_js__WEBPACK_IMPORTED_MODULE_12__/* .removeTrailingSlash */ .UC)(dir),
679581
679614
  },
679582
679615
  relay: {
679583
679616
  type: 'boolean',
@@ -679586,9 +679619,9 @@ const apply = {
679586
679619
  },
679587
679620
  },
679588
679621
  handler: async ({ context, strategy: strategyUrl, receiptsDir, relay, warpRouteId, }) => {
679589
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logCommandHeader */ .dp)('Hyperlane Warp Apply');
679622
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .logCommandHeader */ .dp)('Hyperlane Warp Apply');
679590
679623
  if (strategyUrl)
679591
- _submitters_types_js__WEBPACK_IMPORTED_MODULE_10__/* .ExtendedChainSubmissionStrategySchema */ .VH.parse((0,_utils_files_js__WEBPACK_IMPORTED_MODULE_11__/* .readYamlOrJson */ .xQ)(strategyUrl));
679624
+ _submitters_types_js__WEBPACK_IMPORTED_MODULE_11__/* .ExtendedChainSubmissionStrategySchema */ .VH.parse((0,_utils_files_js__WEBPACK_IMPORTED_MODULE_12__/* .readYamlOrJson */ .xQ)(strategyUrl));
679592
679625
  await (0,_deploy_warp_js__WEBPACK_IMPORTED_MODULE_5__/* .runWarpRouteApply */ .RT)({
679593
679626
  context,
679594
679627
  warpDeployConfig: context.warpDeployConfig,
@@ -679606,7 +679639,7 @@ const deploy = {
679606
679639
  describe: 'Deploy Warp Route contracts',
679607
679640
  builder: WARP_ROUTE_OPTIONS,
679608
679641
  handler: async ({ context, warpRouteId }) => {
679609
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logCommandHeader */ .dp)(`Hyperlane Warp Route Deployment`);
679642
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .logCommandHeader */ .dp)(`Hyperlane Warp Route Deployment`);
679610
679643
  await (0,_deploy_warp_js__WEBPACK_IMPORTED_MODULE_5__/* .runWarpRouteDeploy */ .e9)({
679611
679644
  context,
679612
679645
  warpDeployConfig: context.warpDeployConfig,
@@ -679631,13 +679664,13 @@ const combine = {
679631
679664
  },
679632
679665
  },
679633
679666
  handler: async ({ context, routes, 'output-warp-route-id': outputId }) => {
679634
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logCommandHeader */ .dp)('Hyperlane Warp Combine');
679667
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .logCommandHeader */ .dp)('Hyperlane Warp Combine');
679635
679668
  const routeIds = routes
679636
679669
  .split(',')
679637
679670
  .map((r) => r.trim())
679638
679671
  .filter((r) => r.length > 0);
679639
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_17__/* .assert */ .v)(routeIds.length >= 2, 'At least 2 route IDs are required to combine');
679640
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_17__/* .assert */ .v)(outputId.trim().length > 0, 'Output warp route ID must be non-empty');
679672
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__/* .assert */ .v)(routeIds.length >= 2, 'At least 2 route IDs are required to combine');
679673
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__/* .assert */ .v)(outputId.trim().length > 0, 'Output warp route ID must be non-empty');
679641
679674
  await (0,_deploy_warp_js__WEBPACK_IMPORTED_MODULE_5__/* .runWarpRouteCombine */ .Iw)({
679642
679675
  context,
679643
679676
  routeIds,
@@ -679655,10 +679688,10 @@ const init = {
679655
679688
  describe: 'Create an advanced ISM',
679656
679689
  default: false,
679657
679690
  },
679658
- out: (0,_options_js__WEBPACK_IMPORTED_MODULE_14__/* .outputFileCommandOption */ .Ym)(),
679691
+ out: (0,_options_js__WEBPACK_IMPORTED_MODULE_15__/* .outputFileCommandOption */ .Ym)(),
679659
679692
  },
679660
679693
  handler: async ({ context, advanced, out }) => {
679661
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logCommandHeader */ .dp)('Hyperlane Warp Configure');
679694
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .logCommandHeader */ .dp)('Hyperlane Warp Configure');
679662
679695
  await (0,_config_warp_js__WEBPACK_IMPORTED_MODULE_4__/* .createWarpRouteDeployConfig */ .ft)({
679663
679696
  context,
679664
679697
  outPath: out,
@@ -679673,28 +679706,28 @@ const read = {
679673
679706
  builder: {
679674
679707
  ...WARP_ROUTE_OPTIONS,
679675
679708
  chain: {
679676
- ..._options_js__WEBPACK_IMPORTED_MODULE_14__/* .chainCommandOption */ .mF,
679709
+ ..._options_js__WEBPACK_IMPORTED_MODULE_15__/* .chainCommandOption */ .mF,
679677
679710
  demandOption: false,
679678
679711
  },
679679
- address: (0,_options_js__WEBPACK_IMPORTED_MODULE_14__/* .addressCommandOption */ .Fs)('Address of the router contract to read.', false),
679680
- out: (0,_options_js__WEBPACK_IMPORTED_MODULE_14__/* .outputFileCommandOption */ .Ym)(),
679712
+ address: (0,_options_js__WEBPACK_IMPORTED_MODULE_15__/* .addressCommandOption */ .Fs)('Address of the router contract to read.', false),
679713
+ out: (0,_options_js__WEBPACK_IMPORTED_MODULE_15__/* .outputFileCommandOption */ .Ym)(),
679681
679714
  },
679682
679715
  handler: async ({ context, chain, address, warpRouteId, out }) => {
679683
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logCommandHeader */ .dp)('Hyperlane Warp Reader');
679684
- const config = await (0,_read_warp_js__WEBPACK_IMPORTED_MODULE_8__/* .runWarpRouteRead */ .bb)({
679716
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .logCommandHeader */ .dp)('Hyperlane Warp Reader');
679717
+ const config = await (0,_read_warp_js__WEBPACK_IMPORTED_MODULE_9__/* .runWarpRouteRead */ .bb)({
679685
679718
  context,
679686
679719
  chain,
679687
679720
  address,
679688
679721
  warpRouteId,
679689
679722
  });
679690
679723
  if (out) {
679691
- (0,_utils_files_js__WEBPACK_IMPORTED_MODULE_11__/* .writeYamlOrJson */ .o9)(out, config, 'yaml');
679692
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logGreen */ .In)(`✅ Warp route config written successfully to ${out}:\n`);
679724
+ (0,_utils_files_js__WEBPACK_IMPORTED_MODULE_12__/* .writeYamlOrJson */ .o9)(out, config, 'yaml');
679725
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .logGreen */ .In)(`✅ Warp route config written successfully to ${out}:\n`);
679693
679726
  }
679694
679727
  else {
679695
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logGreen */ .In)(`✅ Warp route config read successfully:\n`);
679728
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .logGreen */ .In)(`✅ Warp route config read successfully:\n`);
679696
679729
  }
679697
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .log */ .Rm)((0,_utils_files_js__WEBPACK_IMPORTED_MODULE_11__/* .indentYamlOrJson */ .R7)((0,yaml__WEBPACK_IMPORTED_MODULE_1__/* .stringify */ .As)(config, null, 2), 4));
679730
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .log */ .Rm)((0,_utils_files_js__WEBPACK_IMPORTED_MODULE_12__/* .indentYamlOrJson */ .R7)((0,yaml__WEBPACK_IMPORTED_MODULE_1__/* .stringify */ .As)(config, null, 2), 4));
679698
679731
  process.exit(0);
679699
679732
  },
679700
679733
  };
@@ -679710,8 +679743,8 @@ const getFees = {
679710
679743
  },
679711
679744
  },
679712
679745
  handler: async ({ context, warpRouteId, amount }) => {
679713
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logCommandHeader */ .dp)('Hyperlane Warp Route Fees');
679714
- await (0,_fees_warp_js__WEBPACK_IMPORTED_MODULE_6__/* .runWarpRouteFees */ .A)({
679746
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .logCommandHeader */ .dp)('Hyperlane Warp Route Fees');
679747
+ await (0,_fees_warp_js__WEBPACK_IMPORTED_MODULE_7__/* .runWarpRouteFees */ .A)({
679715
679748
  context,
679716
679749
  warpRouteId,
679717
679750
  amount: amount,
@@ -679723,7 +679756,7 @@ const send = {
679723
679756
  command: 'send',
679724
679757
  describe: 'Send a test token transfer on a warp route',
679725
679758
  builder: {
679726
- ..._send_js__WEBPACK_IMPORTED_MODULE_15__/* .messageSendOptions */ .eC,
679759
+ ..._send_js__WEBPACK_IMPORTED_MODULE_16__/* .messageSendOptions */ .eC,
679727
679760
  ...WARP_ROUTE_OPTIONS,
679728
679761
  amount: {
679729
679762
  type: 'string',
@@ -679734,7 +679767,7 @@ const send = {
679734
679767
  type: 'string',
679735
679768
  description: 'Token recipient address. Required for non-EVM destinations. Defaults to destination signer for EVM destinations.',
679736
679769
  },
679737
- chains: (0,_options_js__WEBPACK_IMPORTED_MODULE_14__/* .stringArrayOptionConfig */ .om)({
679770
+ chains: (0,_options_js__WEBPACK_IMPORTED_MODULE_15__/* .stringArrayOptionConfig */ .om)({
679738
679771
  description: 'List of chains to send messages to',
679739
679772
  demandOption: false,
679740
679773
  conflicts: ['origin', 'destination'],
@@ -679784,7 +679817,7 @@ const send = {
679784
679817
  .filter((v) => Boolean(v))
679785
679818
  .filter((v, i, a) => a.indexOf(v) === i);
679786
679819
  const warpCoreConfig = context.warpCoreConfig ??
679787
- (await (0,_utils_warp_js__WEBPACK_IMPORTED_MODULE_12__/* .getWarpCoreConfigOrExit */ .ff)({
679820
+ (await (0,_utils_warp_js__WEBPACK_IMPORTED_MODULE_13__/* .getWarpCoreConfigOrExit */ .ff)({
679788
679821
  warpRouteId,
679789
679822
  context,
679790
679823
  chains: filterChains.length > 0 ? filterChains : undefined,
@@ -679796,8 +679829,8 @@ const send = {
679796
679829
  }
679797
679830
  const supportedChains = new Set(warpCoreConfig.tokens.map((t) => t.chainName));
679798
679831
  // Check if any of the chain selection through --chains or --origin & --destination are not in the warp core
679799
- const unsupportedChains = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__/* .difference */ .iv)(new Set([...(chainsArg || []), origin, destination].filter(Boolean)), supportedChains);
679800
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_17__/* .assert */ .v)(unsupportedChains.size === 0, `Chain(s) ${[...unsupportedChains].join(', ')} are not part of the warp route.`);
679832
+ const unsupportedChains = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .difference */ .iv)(new Set([...(chainsArg || []), origin, destination].filter(Boolean)), supportedChains);
679833
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__/* .assert */ .v)(unsupportedChains.size === 0, `Chain(s) ${[...unsupportedChains].join(', ')} are not part of the warp route.`);
679801
679834
  // When origin & destination are explicitly provided, preserve duplicates
679802
679835
  // for same-chain transfers (e.g., origin=anvil2, destination=anvil2).
679803
679836
  // Only deduplicate when using --chains or auto-selecting from config.
@@ -679805,24 +679838,24 @@ const send = {
679805
679838
  chains = [origin, destination];
679806
679839
  }
679807
679840
  else {
679808
- const orderedDefaultChains = (0,_utils_warp_send_js__WEBPACK_IMPORTED_MODULE_19__/* .getOrderedWarpSendChains */ .M)(supportedChains, context.multiProvider);
679841
+ const orderedDefaultChains = (0,_utils_warp_send_js__WEBPACK_IMPORTED_MODULE_20__/* .getOrderedWarpSendChains */ .M)(supportedChains, context.multiProvider);
679809
679842
  chains =
679810
679843
  chains.length === 0
679811
679844
  ? orderedDefaultChains
679812
- : [...(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__/* .intersection */ .E$)(new Set(chains), supportedChains)];
679845
+ : [...(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_19__/* .intersection */ .E$)(new Set(chains), supportedChains)];
679813
679846
  }
679814
679847
  if (roundTrip) {
679815
679848
  // Round-trip requires all chains to be EVM-like since non-EVM chains
679816
679849
  // become intermediate origins in the reversed path.
679817
- const nonEvmChains = chains.filter((chain) => !(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_20__/* .isEVMLike */ .Us)(context.multiProvider.getProtocol(chain)));
679818
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_17__/* .assert */ .v)(nonEvmChains.length === 0, `--round-trip is not supported with non-EVM chains (${nonEvmChains.join(', ')}). ` +
679850
+ const nonEvmChains = chains.filter((chain) => !(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_21__/* .isEVMLike */ .Us)(context.multiProvider.getProtocol(chain)));
679851
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__/* .assert */ .v)(nonEvmChains.length === 0, `--round-trip is not supported with non-EVM chains (${nonEvmChains.join(', ')}). ` +
679819
679852
  `Non-EVM chains cannot be intermediate hop origins.`);
679820
679853
  // Appends the reverse of the array, excluding the 1st (e.g. [1,2,3] becomes [1,2,3,2,1])
679821
679854
  const reversed = [...chains].reverse().slice(1, chains.length + 1);
679822
679855
  chains = [...chains, ...reversed];
679823
679856
  }
679824
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logBlue */ .RK)(`🚀 Sending a message for chains: ${chains.join(' ➡️ ')}`);
679825
- await (0,_send_transfer_js__WEBPACK_IMPORTED_MODULE_9__/* .sendTestTransfer */ .P)({
679857
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .logBlue */ .RK)(`🚀 Sending a message for chains: ${chains.join(' ➡️ ')}`);
679858
+ await (0,_send_transfer_js__WEBPACK_IMPORTED_MODULE_10__/* .sendTestTransfer */ .P)({
679826
679859
  context,
679827
679860
  warpCoreConfig,
679828
679861
  chains,
@@ -679840,7 +679873,7 @@ const send = {
679840
679873
  feeQuotingUrl,
679841
679874
  feeQuotingApiKey,
679842
679875
  });
679843
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logGreen */ .In)(`✅ Successfully sent messages for chains: ${chains.join(' ➡️ ')}`);
679876
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .logGreen */ .In)(`✅ Successfully sent messages for chains: ${chains.join(' ➡️ ')}`);
679844
679877
  process.exit(0);
679845
679878
  },
679846
679879
  };
@@ -679864,18 +679897,18 @@ const check = {
679864
679897
  description: 'Override the origin owner address instead of reading from warp deploy config.',
679865
679898
  implies: 'origin',
679866
679899
  },
679867
- chains: (0,_options_js__WEBPACK_IMPORTED_MODULE_14__/* .stringArrayOptionConfig */ .om)({
679900
+ chains: (0,_options_js__WEBPACK_IMPORTED_MODULE_15__/* .stringArrayOptionConfig */ .om)({
679868
679901
  description: 'List of chains to check. Defaults to all chains except origin when using --ica.',
679869
679902
  implies: 'ica',
679870
679903
  }),
679871
679904
  },
679872
679905
  handler: async ({ context, warpRouteId, ica, origin, originOwner, chains, }) => {
679873
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logCommandHeader */ .dp)('Hyperlane Warp Check');
679906
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .logCommandHeader */ .dp)('Hyperlane Warp Check');
679874
679907
  // CROSS route case: resolver set warpCoreConfig but not warpDeployConfig
679875
679908
  // (combined CROSS routes have no deploy config of their own)
679876
679909
  if (context.warpCoreConfig && !context.warpDeployConfig) {
679877
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_17__/* .assert */ .v)(!ica, 'Cannot perform ICA owner check for combined CROSS routes (no deploy config)');
679878
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_17__/* .assert */ .v)(context.resolvedWarpRouteId, 'resolvedWarpRouteId must be set for CROSS routes');
679910
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__/* .assert */ .v)(!ica, 'Cannot perform ICA owner check for combined CROSS routes (no deploy config)');
679911
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__/* .assert */ .v)(context.resolvedWarpRouteId, 'resolvedWarpRouteId must be set for CROSS routes');
679879
679912
  const result = await (0,_check_warp_js__WEBPACK_IMPORTED_MODULE_3__/* .checkCrossCollateralWarpRoute */ .l$)({
679880
679913
  context,
679881
679914
  warpCoreConfig: context.warpCoreConfig,
@@ -679891,7 +679924,7 @@ const check = {
679891
679924
  // If --ica flag is set, run ICA owner check instead of the regular config check
679892
679925
  // Note: ICA check uses full warpDeployConfig (not filtered) to support pre-deployed chains
679893
679926
  if (ica) {
679894
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_17__/* .assert */ .v)(origin, '--origin is required when using --ica');
679927
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__/* .assert */ .v)(origin, '--origin is required when using --ica');
679895
679928
  await (0,_check_warp_js__WEBPACK_IMPORTED_MODULE_3__/* .runWarpIcaOwnerCheck */ .WN)({
679896
679929
  context,
679897
679930
  warpDeployConfig,
@@ -679901,8 +679934,8 @@ const check = {
679901
679934
  });
679902
679935
  process.exit(0);
679903
679936
  }
679904
- ({ warpCoreConfig, warpDeployConfig } = (0,_utils_warp_js__WEBPACK_IMPORTED_MODULE_12__/* .filterWarpConfigsToMatchingChains */ .mg)(warpDeployConfig, warpCoreConfig));
679905
- const result = await (0,_hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_21__/* .checkWarpRouteDeployConfig */ .TU)({
679937
+ ({ warpCoreConfig, warpDeployConfig } = (0,_utils_warp_js__WEBPACK_IMPORTED_MODULE_13__/* .filterWarpConfigsToMatchingChains */ .mg)(warpDeployConfig, warpCoreConfig));
679938
+ const result = await (0,_hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_22__/* .checkWarpRouteDeployConfig */ .TU)({
679906
679939
  multiProvider: context.multiProvider,
679907
679940
  warpCoreConfig,
679908
679941
  warpDeployConfig,
@@ -679968,7 +680001,7 @@ const rebalancer = {
679968
680001
  },
679969
680002
  handler: async (args) => {
679970
680003
  const { context, config: configPath, checkFrequency, withMetrics, monitorOnly, manual, origin, destination, amount, } = args;
679971
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logCommandHeader */ .dp)('Hyperlane Warp Route Rebalancer');
680004
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .logCommandHeader */ .dp)('Hyperlane Warp Route Rebalancer');
679972
680005
  try {
679973
680006
  // Load rebalancer configuration
679974
680007
  const rebalancerConfig = _hyperlane_xyz_rebalancer__WEBPACK_IMPORTED_MODULE_2__/* .RebalancerConfig */ .Wo.load(configPath);
@@ -679981,12 +680014,12 @@ const rebalancer = {
679981
680014
  withMetrics,
679982
680015
  monitorOnly,
679983
680016
  coingeckoApiKey: process.env.COINGECKO_API_KEY,
679984
- logger: _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_22__/* .rootLogger */ .Jk.child({ module: 'rebalancer' }),
680017
+ logger: _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_23__/* .rootLogger */ .Jk.child({ module: 'rebalancer' }),
679985
680018
  });
679986
680019
  // Execute based on mode
679987
680020
  if (manual) {
679988
680021
  if (!origin || !destination || !amount) {
679989
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .errorRed */ .aq)('Origin, destination, and amount are required for manual rebalance');
680022
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .errorRed */ .aq)('Origin, destination, and amount are required for manual rebalance');
679990
680023
  process.exit(1);
679991
680024
  }
679992
680025
  await service.executeManual({
@@ -679994,7 +680027,7 @@ const rebalancer = {
679994
680027
  destination,
679995
680028
  amount,
679996
680029
  });
679997
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logGreen */ .In)('✅ Manual rebalance completed successfully');
680030
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .logGreen */ .In)('✅ Manual rebalance completed successfully');
679998
680031
  }
679999
680032
  else {
680000
680033
  // Start daemon mode
@@ -680002,7 +680035,7 @@ const rebalancer = {
680002
680035
  }
680003
680036
  }
680004
680037
  catch (e) {
680005
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .errorRed */ .aq)(`Rebalancer error: ${util__WEBPACK_IMPORTED_MODULE_0__.format(e)}`);
680038
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .errorRed */ .aq)(`Rebalancer error: ${util__WEBPACK_IMPORTED_MODULE_0__.format(e)}`);
680006
680039
  process.exit(1);
680007
680040
  }
680008
680041
  },
@@ -680012,25 +680045,25 @@ const verify = {
680012
680045
  describe: 'Verify deployed contracts on explorers',
680013
680046
  builder: WARP_ROUTE_OPTIONS,
680014
680047
  handler: async ({ context, warpRouteId }) => {
680015
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logCommandHeader */ .dp)('Hyperlane Warp Verify');
680048
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .logCommandHeader */ .dp)('Hyperlane Warp Verify');
680016
680049
  const { warpCoreConfig } = await getWarpConfigsFromContextOrRegistry({
680017
680050
  context,
680018
680051
  warpRouteId,
680019
680052
  });
680020
- return (0,_verify_warp_js__WEBPACK_IMPORTED_MODULE_13__/* .runVerifyWarpRoute */ .c)({ context, warpCoreConfig });
680053
+ return (0,_verify_warp_js__WEBPACK_IMPORTED_MODULE_14__/* .runVerifyWarpRoute */ .c)({ context, warpCoreConfig });
680021
680054
  },
680022
680055
  };
680023
680056
  const fork = {
680024
680057
  command: 'fork',
680025
680058
  describe: 'Fork a Hyperlane chain on a compatible Anvil/Hardhat node',
680026
680059
  builder: {
680027
- ..._options_js__WEBPACK_IMPORTED_MODULE_14__/* .forkCommandOptions */ .im,
680060
+ ..._options_js__WEBPACK_IMPORTED_MODULE_15__/* .forkCommandOptions */ .im,
680028
680061
  ...WARP_ROUTE_OPTIONS,
680029
680062
  },
680030
680063
  handler: async ({ context, warpRouteId, port, kill, forkConfig: forkConfigPath, }) => {
680031
680064
  let forkConfig;
680032
680065
  if (forkConfigPath) {
680033
- forkConfig = _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_23__/* .RawForkedChainConfigByChainSchema */ .uE.parse((0,_utils_files_js__WEBPACK_IMPORTED_MODULE_11__/* .readYamlOrJson */ .xQ)(forkConfigPath));
680066
+ forkConfig = _hyperlane_xyz_sdk__WEBPACK_IMPORTED_MODULE_24__/* .RawForkedChainConfigByChainSchema */ .uE.parse((0,_utils_files_js__WEBPACK_IMPORTED_MODULE_12__/* .readYamlOrJson */ .xQ)(forkConfigPath));
680034
680067
  }
680035
680068
  else {
680036
680069
  forkConfig = {};
@@ -680040,8 +680073,8 @@ const fork = {
680040
680073
  warpRouteId,
680041
680074
  });
680042
680075
  const chainsToFork = new Set(Object.keys(warpDeployConfig));
680043
- (0,_logger_js__WEBPACK_IMPORTED_MODULE_16__/* .logBlue */ .RK)(`Forking chains from warp deploy config: ${Array.from(chainsToFork).join(', ')}`);
680044
- await (0,_fork_fork_js__WEBPACK_IMPORTED_MODULE_7__/* .runForkCommand */ .x)({
680076
+ (0,_logger_js__WEBPACK_IMPORTED_MODULE_17__/* .logBlue */ .RK)(`Forking chains from warp deploy config: ${Array.from(chainsToFork).join(', ')}`);
680077
+ await (0,_fork_fork_js__WEBPACK_IMPORTED_MODULE_8__/* .runForkCommand */ .x)({
680045
680078
  context,
680046
680079
  chainsToFork,
680047
680080
  forkConfig,
@@ -685581,6 +685614,7 @@ const SUPPORTED_PROTOCOLS = new Set([
685581
685614
  _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .ProtocolType */ .Hb.CosmosNative,
685582
685615
  _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .ProtocolType */ .Hb.Starknet,
685583
685616
  _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .ProtocolType */ .Hb.Radix,
685617
+ _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .ProtocolType */ .Hb.Aleo,
685584
685618
  ]);
685585
685619
  const EXPLORER_GRAPHQL_URL = process.env.HYPERLANE_EXPLORER_GRAPHQL_URL ??
685586
685620
  process.env.EXPLORER_GRAPHQL_URL ??
@@ -685973,7 +686007,7 @@ async function executeDelivery({ context, origin, destination, warpCoreConfig, a
685973
686007
  if (!transferReceipt) {
685974
686008
  throw new Error('No transfer transaction receipt found');
685975
686009
  }
685976
- const extracted = core.extractMessageIds(origin, transferReceipt);
686010
+ const extracted = await core.extractMessageIds(origin, transferReceipt);
685977
686011
  const messageId = extracted[0]?.messageId;
685978
686012
  if (!messageId) {
685979
686013
  // Same-chain transfers don't dispatch an interchain message.
@@ -694193,7 +694227,7 @@ __webpack_async_result__();
694193
694227
  /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
694194
694228
  /* harmony export */ x: () => (/* binding */ VERSION)
694195
694229
  /* harmony export */ });
694196
- const VERSION = '34.0.0';
694230
+ const VERSION = '35.0.1';
694197
694231
  //# sourceMappingURL=version.js.map
694198
694232
 
694199
694233
  /***/ }),
@@ -745467,6 +745501,10 @@ const DEFAULT_BLOCKPI_VALIDATOR = {
745467
745501
  address: '0x6d113ae51bfea7b63a8828f97e9dce393b25c189',
745468
745502
  alias: 'BlockPI',
745469
745503
  };
745504
+ const DEFAULT_POPS_VALIDATOR = {
745505
+ address: '0xa6c998f0db2b56d7a63faf30a9b677c8b9b6faab',
745506
+ alias: 'P-OPS Team',
745507
+ };
745470
745508
  // TODO: consider migrating these to the registry too
745471
745509
  const defaultMultisigConfigs = {
745472
745510
  abstract: {
@@ -745850,21 +745888,14 @@ const defaultMultisigConfigs = {
745850
745888
  ],
745851
745889
  },
745852
745890
  celestia: {
745853
- threshold: 4,
745891
+ threshold: 3,
745854
745892
  validators: [
745855
745893
  {
745856
745894
  address: '0x6dbc192c06907784fb0af0c0c2d8809ea50ba675',
745857
745895
  alias: AW_VALIDATOR_ALIAS,
745858
745896
  },
745859
745897
  DEFAULT_ZKV_VALIDATOR,
745860
- {
745861
- address: '0x885a8c1ef7f7eea8955c8f116fc1fbe1113c4a78',
745862
- alias: 'P2P.ORG',
745863
- },
745864
- {
745865
- address: '0xa6c998f0db2b56d7a63faf30a9b677c8b9b6faab',
745866
- alias: 'P-OPS Team',
745867
- },
745898
+ DEFAULT_POPS_VALIDATOR,
745868
745899
  {
745869
745900
  address: '0x21e93a81920b73c0e98aed8e6b058dae409e4909',
745870
745901
  alias: 'Binary Builders',
@@ -745952,6 +745983,10 @@ const defaultMultisigConfigs = {
745952
745983
  alias: AW_VALIDATOR_ALIAS,
745953
745984
  },
745954
745985
  DEFAULT_MITOSIS_VALIDATOR,
745986
+ {
745987
+ address: '0xd2e26f9089e9ff6a1ea9f7e90575e985cfea7f03',
745988
+ alias: 'Citrea',
745989
+ },
745955
745990
  ],
745956
745991
  },
745957
745992
  coredao: {
@@ -746046,12 +746081,25 @@ const defaultMultisigConfigs = {
746046
746081
  ],
746047
746082
  },
746048
746083
  eden: {
746049
- threshold: 1,
746084
+ threshold: 3,
746050
746085
  validators: [
746051
746086
  {
746052
746087
  address: '0x1c61e6379443e2842d3e9db28e962b6c717fdab1',
746053
746088
  alias: AW_VALIDATOR_ALIAS,
746054
746089
  },
746090
+ DEFAULT_POPS_VALIDATOR,
746091
+ {
746092
+ address: '0xE95a08Ef009be3Fbc7FDfa4739AB2428910C285f',
746093
+ alias: 'Substance Labs',
746094
+ },
746095
+ {
746096
+ address: '0x359042Ade900d465e96C9c7A9BF975b061c1e8f7',
746097
+ alias: 'Cosmostation',
746098
+ },
746099
+ {
746100
+ address: '0xa3f19CDFa6B684b44da3cF1e2D19d5Cb916cA0EF',
746101
+ alias: 'Qubelabs',
746102
+ },
746055
746103
  ],
746056
746104
  },
746057
746105
  electroneum: {
@@ -746115,6 +746163,10 @@ const defaultMultisigConfigs = {
746115
746163
  address: '0x36a669703ad0e11a0382b098574903d2084be22c',
746116
746164
  alias: 'Enigma',
746117
746165
  },
746166
+ {
746167
+ address: '0xef2e5bb2bc45dd092ff7f9d4d4485f022185aeae',
746168
+ alias: 'Citrea',
746169
+ },
746118
746170
  ],
746119
746171
  },
746120
746172
  everclear: {
@@ -746582,7 +746634,7 @@ const defaultMultisigConfigs = {
746582
746634
  ],
746583
746635
  },
746584
746636
  mantapacific: {
746585
- threshold: 4,
746637
+ threshold: 3,
746586
746638
  validators: [
746587
746639
  {
746588
746640
  address: '0x8e668c97ad76d0e28375275c41ece4972ab8a5bc',
@@ -746592,7 +746644,6 @@ const defaultMultisigConfigs = {
746592
746644
  address: '0x521a3e6bf8d24809fde1c1fd3494a859a16f132c',
746593
746645
  alias: 'Cosmostation',
746594
746646
  },
746595
- { address: '0x14025fe092f5f8a401dd9819704d9072196d2125', alias: 'P2P' },
746596
746647
  {
746597
746648
  address: '0x25b9a0961c51e74fd83295293bc029131bf1e05a',
746598
746649
  alias: 'Neutron',
@@ -746851,8 +746902,18 @@ const defaultMultisigConfigs = {
746851
746902
  DEFAULT_MITOSIS_VALIDATOR,
746852
746903
  ],
746853
746904
  },
746905
+ nesa: {
746906
+ threshold: 2,
746907
+ validators: [
746908
+ {
746909
+ address: '0x990f548e766b830f69642d36cdd47fb20a2aa405',
746910
+ alias: AW_VALIDATOR_ALIAS,
746911
+ },
746912
+ DEFAULT_MITOSIS_VALIDATOR,
746913
+ ],
746914
+ },
746854
746915
  neutron: {
746855
- threshold: 4,
746916
+ threshold: 3,
746856
746917
  validators: [
746857
746918
  {
746858
746919
  address: '0xa9b8c1f4998f781f958c63cfcd1708d02f004ff0',
@@ -746862,7 +746923,6 @@ const defaultMultisigConfigs = {
746862
746923
  address: '0xb65438a014fb05fbadcfe35bc6e25d372b6ba460',
746863
746924
  alias: 'Cosmostation',
746864
746925
  },
746865
- { address: '0x42fa752defe92459370a052b6387a87f7de9b80c', alias: 'P2P' },
746866
746926
  {
746867
746927
  address: '0xc79503a3e3011535a9c60f6d21f76f59823a38bd',
746868
746928
  alias: 'Neutron',
@@ -747826,7 +747886,7 @@ const SEALEVEL_PRIORITY_FEES = {
747826
747886
  /* harmony export */ g: () => (/* binding */ multiProtocolTestChainMetadata),
747827
747887
  /* harmony export */ hR: () => (/* binding */ testChainMetadata)
747828
747888
  /* harmony export */ });
747829
- /* unused harmony exports TestChainName, test1, test2, test3, test4, testXERC20, testVSXERC20, testXERC20Lockbox, testScale1, testScale2, testCollateralFiat, testCosmosChain, testSealevelChain, testStarknetChain, KNOWN_ETHEREUM_TIMELOCK_CONTRACT, ethereumTestChain, multiProtocolTestChains */
747889
+ /* unused harmony exports TestChainName, test1, test2, test3, test4, testXERC20, testVSXERC20, testXERC20Lockbox, testOwnerCollateral, testRebaseCollateral, testScale1, testScale2, testCollateralFiat, testCosmosChain, testSealevelChain, testStarknetChain, KNOWN_ETHEREUM_TIMELOCK_CONTRACT, ethereumTestChain, multiProtocolTestChains */
747830
747890
  /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(16639);
747831
747891
  /* harmony import */ var _metadata_chainMetadataTypes_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(1430);
747832
747892
 
@@ -747915,6 +747975,20 @@ const testXERC20Lockbox = {
747915
747975
  displayName: 'Test XERC20Lockbox',
747916
747976
  name: 'testxerc20lockbox',
747917
747977
  };
747978
+ const testOwnerCollateral = {
747979
+ ...test1,
747980
+ chainId: 9913380,
747981
+ domainId: 9913380,
747982
+ displayName: 'Test OwnerCollateral',
747983
+ name: 'testownercollateral',
747984
+ };
747985
+ const testRebaseCollateral = {
747986
+ ...test1,
747987
+ chainId: 9913381,
747988
+ domainId: 9913381,
747989
+ displayName: 'Test RebaseCollateral',
747990
+ name: 'testrebasecollateral',
747991
+ };
747918
747992
  const testScale1 = {
747919
747993
  ...test1,
747920
747994
  chainId: 9913377,
@@ -748049,6 +748123,8 @@ const multiProtocolTestChainMetadata = {
748049
748123
  testscale1: testScale1,
748050
748124
  testscale2: testScale2,
748051
748125
  testcollateralfiat: testCollateralFiat,
748126
+ testownercollateral: testOwnerCollateral,
748127
+ testrebasecollateral: testRebaseCollateral,
748052
748128
  };
748053
748129
  const multiProtocolTestChains = Object.keys(multiProtocolTestChainMetadata);
748054
748130
  //# sourceMappingURL=testChains.js.map
@@ -749937,10 +750013,10 @@ var logging = __nccwpck_require__(94523);
749937
750013
  var types = __nccwpck_require__(16639);
749938
750014
  // EXTERNAL MODULE: ../sdk/dist/app/MultiProtocolApp.js
749939
750015
  var MultiProtocolApp = __nccwpck_require__(48381);
749940
- // EXTERNAL MODULE: ../utils/dist/validation.js
749941
- var validation = __nccwpck_require__(21387);
749942
750016
  // EXTERNAL MODULE: ../utils/dist/async.js
749943
750017
  var dist_async = __nccwpck_require__(14918);
750018
+ // EXTERNAL MODULE: ../utils/dist/validation.js
750019
+ var validation = __nccwpck_require__(21387);
749944
750020
  // EXTERNAL MODULE: ../sdk/dist/providers/ProviderType.js
749945
750021
  var ProviderType = __nccwpck_require__(25047);
749946
750022
  ;// CONCATENATED MODULE: ../sdk/dist/core/adapters/AleoCoreAdapter.js
@@ -749957,9 +750033,41 @@ class AleoCoreAdapter extends MultiProtocolApp/* BaseAleoAdapter */.Ki {
749957
750033
  this.multiProvider = multiProvider;
749958
750034
  this.addresses = addresses;
749959
750035
  }
749960
- extractMessageIds(sourceTx) {
749961
- (0,validation/* assert */.v)(sourceTx.type === ProviderType/* ProviderType */.c.Aleo, `Unsupported provider type for AleoCoreAdapter ${sourceTx.type}`);
749962
- return [];
750036
+ async extractMessageIds(sourceTx) {
750037
+ if (sourceTx.type !== ProviderType/* ProviderType */.c.Aleo) {
750038
+ return [];
750039
+ }
750040
+ if (!this.addresses.mailbox) {
750041
+ this.logger.debug('No Aleo mailbox address configured; skipping message ID extraction');
750042
+ return [];
750043
+ }
750044
+ if (sourceTx.receipt.type !== 'execute') {
750045
+ this.logger.warn(`Aleo dispatch transaction was rejected (type=${sourceTx.receipt.type}); no message dispatched`);
750046
+ return [];
750047
+ }
750048
+ const provider = this.multiProvider.getAleoProvider(this.chainName);
750049
+ const txId = sourceTx.receipt.transactionHash;
750050
+ // Use dispatch_event_index[block_height] to find the exact nonce for this
750051
+ // transaction's block — same approach as the Rust relayer's block-level anchor.
750052
+ const dispatchNonce = await provider.getDispatchNonceForTx(this.addresses.mailbox, txId);
750053
+ if (dispatchNonce == null) {
750054
+ this.logger.warn(`No dispatch_event_index entry for tx ${txId}; no message dispatched`);
750055
+ return [];
750056
+ }
750057
+ const [messageId, destinationDomain] = await Promise.all([
750058
+ provider.getDispatchedMessageId(this.addresses.mailbox, dispatchNonce),
750059
+ provider.getDispatchedDestinationDomain(this.addresses.mailbox, dispatchNonce),
750060
+ ]);
750061
+ if (!messageId || destinationDomain == null) {
750062
+ this.logger.warn(`Could not fetch message ID or destination for nonce ${dispatchNonce}`);
750063
+ return [];
750064
+ }
750065
+ const destination = this.multiProvider.tryGetChainName(destinationDomain);
750066
+ if (!destination) {
750067
+ this.logger.warn(`Unknown destination domain ${destinationDomain}`);
750068
+ return [];
750069
+ }
750070
+ return [{ messageId, destination }];
749963
750071
  }
749964
750072
  async waitForMessageProcessed(messageId, destination, delayMs, maxAttempts) {
749965
750073
  const provider = this.multiProvider.getAleoProvider(destination);
@@ -750014,7 +750122,7 @@ class CosmNativeCoreAdapter extends MultiProtocolApp/* BaseCosmosAdapter */.L_ {
750014
750122
  this.multiProvider = multiProvider;
750015
750123
  this.addresses = addresses;
750016
750124
  }
750017
- extractMessageIds(sourceTx) {
750125
+ async extractMessageIds(sourceTx) {
750018
750126
  (0,validation/* assert */.v)(sourceTx.type === ProviderType/* ProviderType */.c.CosmJsNative, `Unsupported provider type for CosmNativeCoreAdapter ${sourceTx.type}`);
750019
750127
  const dispatchEvents = sourceTx.receipt.events.filter((e) => MESSAGE_DISPATCH_EVENT_TYPES.includes(e.type));
750020
750128
  return dispatchEvents.map((event) => {
@@ -750172,7 +750280,7 @@ class CosmWasmCoreAdapter extends MultiProtocolApp/* BaseCosmWasmAdapter */.J {
750172
750280
  });
750173
750281
  return response.delivered;
750174
750282
  }
750175
- extractMessageIds(sourceTx) {
750283
+ async extractMessageIds(sourceTx) {
750176
750284
  if (sourceTx.type !== ProviderType/* ProviderType */.c.CosmJsWasm) {
750177
750285
  throw new Error(`Unsupported provider type for CosmosCoreAdapter ${sourceTx.type}`);
750178
750286
  }
@@ -750229,7 +750337,7 @@ class EvmCoreAdapter extends MultiProtocolApp/* BaseEvmAdapter */.zl {
750229
750337
  }; // Core only uses mailbox so cast to keep adapter interface simple
750230
750338
  this.core = new HyperlaneCore/* HyperlaneCore */.K(contractsMap, multiProvider.toMultiProvider());
750231
750339
  }
750232
- extractMessageIds(sourceTx) {
750340
+ async extractMessageIds(sourceTx) {
750233
750341
  if (sourceTx.type !== ProviderType/* ProviderType */.c.EthersV5 &&
750234
750342
  sourceTx.type !== ProviderType/* ProviderType */.c.Tron) {
750235
750343
  throw new Error(`Unsupported provider type for EvmCoreAdapter ${sourceTx.type}`);
@@ -750266,7 +750374,7 @@ class RadixCoreAdapter extends MultiProtocolApp/* BaseRadixAdapter */.v5 {
750266
750374
  this.multiProvider = multiProvider;
750267
750375
  this.addresses = addresses;
750268
750376
  }
750269
- extractMessageIds(sourceTx) {
750377
+ async extractMessageIds(sourceTx) {
750270
750378
  (0,validation/* assert */.v)(sourceTx.type === ProviderType/* ProviderType */.c.Radix, `Unsupported provider type for RadixCoreAdapter ${sourceTx.type}`);
750271
750379
  const events = sourceTx.receipt.transaction.receipt?.events ?? [];
750272
750380
  if (events.length === 0) {
@@ -750333,7 +750441,7 @@ class StarknetCoreAdapter extends MultiProtocolApp/* BaseStarknetAdapter */.Rn {
750333
750441
  this.multiProvider = multiProvider;
750334
750442
  this.addresses = addresses;
750335
750443
  }
750336
- extractMessageIds(sourceTx) {
750444
+ async extractMessageIds(sourceTx) {
750337
750445
  if (sourceTx.type !== ProviderType/* ProviderType */.c.Starknet) {
750338
750446
  throw new Error(`Unsupported provider type for StarknetCoreAdapter ${sourceTx.type}`);
750339
750447
  }
@@ -750427,11 +750535,11 @@ class MultiProtocolCore extends MultiProtocolApp/* MultiProtocolApp */.ff {
750427
750535
  return AleoCoreAdapter;
750428
750536
  throw new Error(`No adapter for protocol ${protocol}`);
750429
750537
  }
750430
- extractMessageIds(origin, sourceTx) {
750538
+ async extractMessageIds(origin, sourceTx) {
750431
750539
  return this.adapter(origin).extractMessageIds(sourceTx);
750432
750540
  }
750433
750541
  async waitForMessagesProcessed(origin, destination, sourceTx, delayMs, maxAttempts) {
750434
- const messages = this.adapter(origin).extractMessageIds(sourceTx);
750542
+ const messages = await this.adapter(origin).extractMessageIds(sourceTx);
750435
750543
  await Promise.all(messages.map((msg) => this.adapter(destination).waitForMessageProcessed(msg.messageId, msg.destination, delayMs, maxAttempts)));
750436
750544
  return true;
750437
750545
  }
@@ -750588,7 +750696,7 @@ class SealevelCoreAdapter extends MultiProtocolApp/* BaseSealevelAdapter */.OR {
750588
750696
  this.multiProvider = multiProvider;
750589
750697
  this.addresses = addresses;
750590
750698
  }
750591
- extractMessageIds(sourceTx) {
750699
+ async extractMessageIds(sourceTx) {
750592
750700
  if (sourceTx.type !== ProviderType/* ProviderType */.c.SolanaWeb3) {
750593
750701
  throw new Error(`Unsupported provider type for SealevelCoreAdapter ${sourceTx.type}`);
750594
750702
  }
@@ -752853,6 +752961,8 @@ var objects = __nccwpck_require__(73938);
752853
752961
  var types = __nccwpck_require__(16639);
752854
752962
  // EXTERNAL MODULE: ../utils/dist/logging.js
752855
752963
  var logging = __nccwpck_require__(94523);
752964
+ // EXTERNAL MODULE: ../utils/dist/validation.js
752965
+ var validation = __nccwpck_require__(21387);
752856
752966
  // EXTERNAL MODULE: ../utils/dist/addresses.js
752857
752967
  var addresses = __nccwpck_require__(93142);
752858
752968
  // EXTERNAL MODULE: ../utils/dist/sets.js
@@ -752863,8 +752973,6 @@ var contracts = __nccwpck_require__(15570);
752863
752973
  var AbstractHyperlaneModule = __nccwpck_require__(53387);
752864
752974
  // EXTERNAL MODULE: ../sdk/dist/utils/ism.js
752865
752975
  var ism = __nccwpck_require__(764);
752866
- // EXTERNAL MODULE: ../utils/dist/validation.js
752867
- var validation = __nccwpck_require__(21387);
752868
752976
  // EXTERNAL MODULE: ../sdk/dist/deploy/HyperlaneDeployer.js
752869
752977
  var HyperlaneDeployer = __nccwpck_require__(6609);
752870
752978
  // EXTERNAL MODULE: ../sdk/dist/fee/EvmTokenFeeReader.js
@@ -753280,7 +753388,8 @@ class EvmTokenFeeModule extends AbstractHyperlaneModule/* HyperlaneModule */.x {
753280
753388
  if (targetConfig.type === fee_types/* TokenFeeType */.cA.OffchainQuotedLinearFee) {
753281
753389
  mutableFields.quoteSigners = true;
753282
753390
  }
753283
- if (targetConfig.type === fee_types/* TokenFeeType */.cA.RoutingFee) {
753391
+ if (targetConfig.type === fee_types/* TokenFeeType */.cA.RoutingFee ||
753392
+ targetConfig.type === fee_types/* TokenFeeType */.cA.CrossCollateralRoutingFee) {
753284
753393
  mutableFields.feeContracts = true;
753285
753394
  }
753286
753395
  return !(0,objects/* deepEquals */.c2)((0,objects/* objOmit */.Xi)(actualConfig, mutableFields), (0,objects/* objOmit */.Xi)(targetConfig, mutableFields));
@@ -753336,6 +753445,58 @@ class EvmTokenFeeModule extends AbstractHyperlaneModule/* HyperlaneModule */.x {
753336
753445
  ...this.createOwnershipUpdateTxs(normalizedActualConfig, normalizedTargetConfig),
753337
753446
  ];
753338
753447
  }
753448
+ // CrossCollateralRoutingFee: update sub-fee contracts (nested structure)
753449
+ if (normalizedTargetConfig.type === fee_types/* TokenFeeType */.cA.CrossCollateralRoutingFee &&
753450
+ normalizedActualConfig.type === fee_types/* TokenFeeType */.cA.CrossCollateralRoutingFee &&
753451
+ actualConfig.type === fee_types/* TokenFeeType */.cA.CrossCollateralRoutingFee) {
753452
+ const targetFeeContracts = normalizedTargetConfig.feeContracts ?? {};
753453
+ // Carry actual addresses into target entries, but limit to target keys only so
753454
+ // orphan entries from actualConfig don't get re-injected into the update loop.
753455
+ const merged = (0,objects/* objMerge */._J)(actualConfig, normalizedTargetConfig, 10, true);
753456
+ if (merged.feeContracts) {
753457
+ for (const chainName of Object.keys(merged.feeContracts)) {
753458
+ if (!(chainName in targetFeeContracts)) {
753459
+ delete merged.feeContracts[chainName];
753460
+ }
753461
+ else {
753462
+ for (const routerBytes32 of Object.keys(merged.feeContracts[chainName])) {
753463
+ if (!(routerBytes32 in targetFeeContracts[chainName])) {
753464
+ delete merged.feeContracts[chainName][routerBytes32];
753465
+ }
753466
+ }
753467
+ }
753468
+ }
753469
+ }
753470
+ // Emit clearing transactions for entries removed from target.
753471
+ const removalDestinations = [];
753472
+ const removalRouterKeys = [];
753473
+ const zeroAddresses = [];
753474
+ for (const [chainName, routerConfigs] of Object.entries(actualConfig.feeContracts ?? {})) {
753475
+ const targetRouterConfigs = targetFeeContracts[chainName] ?? {};
753476
+ for (const routerBytes32 of Object.keys(routerConfigs)) {
753477
+ if (!(routerBytes32 in targetRouterConfigs)) {
753478
+ removalDestinations.push(this.multiProvider.getDomainId(chainName));
753479
+ removalRouterKeys.push(routerBytes32);
753480
+ zeroAddresses.push(lib.constants.AddressZero);
753481
+ }
753482
+ }
753483
+ }
753484
+ const removalTxs = removalDestinations.length > 0
753485
+ ? [
753486
+ {
753487
+ annotation: 'Clearing removed CrossCollateralRoutingFee sub-contract pointers',
753488
+ chainId: this.chainId,
753489
+ to: this.args.addresses.deployedFee,
753490
+ data: dist/* CrossCollateralRoutingFee__factory */.gv3.createInterface().encodeFunctionData('setCrossCollateralRouterFeeContracts', [removalDestinations, removalRouterKeys, zeroAddresses]),
753491
+ },
753492
+ ]
753493
+ : [];
753494
+ return [
753495
+ ...(await this.updateCrossCollateralRoutingFee(merged)),
753496
+ ...removalTxs,
753497
+ ...this.createOwnershipUpdateTxs(normalizedActualConfig, normalizedTargetConfig),
753498
+ ];
753499
+ }
753339
753500
  // Routing fee: update sub-fee contracts
753340
753501
  if (normalizedTargetConfig.type === fee_types/* TokenFeeType */.cA.RoutingFee &&
753341
753502
  normalizedActualConfig.type === fee_types/* TokenFeeType */.cA.RoutingFee) {
@@ -753346,6 +753507,114 @@ class EvmTokenFeeModule extends AbstractHyperlaneModule/* HyperlaneModule */.x {
753346
753507
  }
753347
753508
  return this.createOwnershipUpdateTxs(normalizedActualConfig, normalizedTargetConfig);
753348
753509
  }
753510
+ async updateCrossCollateralRoutingFee(targetConfig) {
753511
+ const updateTransactions = [];
753512
+ if (!targetConfig.feeContracts)
753513
+ return [];
753514
+ const currentRoutingAddress = this.args.addresses.deployedFee;
753515
+ // Validate all destination chains and collect domain IDs upfront so that an unknown
753516
+ // chain name fails before any sub-fee deployments are attempted.
753517
+ const domainIdByChain = new Map();
753518
+ for (const chainName of Object.keys(targetConfig.feeContracts)) {
753519
+ domainIdByChain.set(chainName, this.multiProvider.getDomainId(chainName));
753520
+ }
753521
+ // Deduplicate update work for shared addresses (old address → deployed address after update).
753522
+ // Multiple (chainName, routerBytes32) pairs may point to the same physical contract; we only
753523
+ // run the update once per (address, config) pair. If two entries share an address but have
753524
+ // divergent target configs (split case), each gets its own deployment.
753525
+ const updatedByAddress = new Map();
753526
+ // Per-entry deployed address, keyed by "chainName:routerBytes32".
753527
+ const entryDeployedAddr = new Map();
753528
+ for (const [chainName, routerConfigs] of Object.entries(targetConfig.feeContracts)) {
753529
+ for (const [routerBytes32, subFeeConfig] of Object.entries(routerConfigs)) {
753530
+ (0,validation/* assert */.v)(/^0x[0-9a-fA-F]{64}$/.test(routerBytes32), `routerBytes32 key "${routerBytes32}" for chain ${chainName} is not a valid 32-byte hex string`);
753531
+ const address = subFeeConfig.address;
753532
+ const entryKey = `${chainName}:${routerBytes32}`;
753533
+ if (!address) {
753534
+ // No existing sub-fee contract — deploy a new one
753535
+ this.logger.info(`No existing sub-fee contract for ${chainName}/${routerBytes32}, deploying new one`);
753536
+ const subFeeModule = await EvmTokenFeeModule.create({
753537
+ multiProvider: this.multiProvider,
753538
+ chain: this.chainName,
753539
+ config: subFeeConfig,
753540
+ contractVerifier: this.contractVerifier,
753541
+ });
753542
+ const deployedSubFee = subFeeModule.serialize().deployedFee;
753543
+ this.logger.debug(`New cross-collateral sub-fee contract deployed at ${deployedSubFee} for ${chainName}/${routerBytes32}`);
753544
+ entryDeployedAddr.set(entryKey, deployedSubFee);
753545
+ }
753546
+ else {
753547
+ const addrKey = address.toLowerCase();
753548
+ const cached = updatedByAddress.get(addrKey);
753549
+ const configMatches = cached && (0,objects/* deepEquals */.c2)(cached.config, subFeeConfig);
753550
+ if (!cached || !configMatches) {
753551
+ if (cached && !configMatches) {
753552
+ // Same physical address but divergent target config — this is a route split.
753553
+ // Deploy a fresh sub-fee contract rather than reusing the other entry's result.
753554
+ this.logger.info(`Cross-collateral sub-fee config diverged for ${chainName}/${routerBytes32} at ${address}, deploying new contract`);
753555
+ const subFeeModule = await EvmTokenFeeModule.create({
753556
+ multiProvider: this.multiProvider,
753557
+ chain: this.chainName,
753558
+ config: subFeeConfig,
753559
+ contractVerifier: this.contractVerifier,
753560
+ });
753561
+ const deployedSubFee = subFeeModule.serialize().deployedFee;
753562
+ this.logger.debug(`New cross-collateral sub-fee contract deployed at ${deployedSubFee} for ${chainName}/${routerBytes32}`);
753563
+ entryDeployedAddr.set(entryKey, deployedSubFee);
753564
+ continue;
753565
+ }
753566
+ // First time we see this address — run the update
753567
+ const subFeeModule = new EvmTokenFeeModule(this.multiProvider, {
753568
+ addresses: { deployedFee: address },
753569
+ chain: this.chainName,
753570
+ config: subFeeConfig,
753571
+ }, this.contractVerifier);
753572
+ const subFeeUpdateTransactions = await subFeeModule.update(subFeeConfig, { address });
753573
+ updateTransactions.push(...subFeeUpdateTransactions);
753574
+ const deployedSubFeeAddr = subFeeModule.serialize().deployedFee;
753575
+ if (!(0,addresses/* eqAddress */.fv)(deployedSubFeeAddr, address)) {
753576
+ this.logger.debug(`Cross-collateral sub-fee redeployed: ${address} → ${deployedSubFeeAddr} for ${chainName}/${routerBytes32}`);
753577
+ }
753578
+ updatedByAddress.set(addrKey, {
753579
+ config: subFeeConfig,
753580
+ deployedAddr: deployedSubFeeAddr,
753581
+ });
753582
+ }
753583
+ const entry = updatedByAddress.get(addrKey);
753584
+ (0,validation/* assert */.v)(entry !== undefined, `Missing deployed fee for ${addrKey}`);
753585
+ entryDeployedAddr.set(entryKey, entry.deployedAddr);
753586
+ }
753587
+ }
753588
+ }
753589
+ // Build setCrossCollateralRouterFeeContracts args for entries whose pointer changed
753590
+ const destinations = [];
753591
+ const routerKeys = [];
753592
+ const newAddresses = [];
753593
+ for (const [chainName, routerConfigs] of Object.entries(targetConfig.feeContracts)) {
753594
+ const domainId = domainIdByChain.get(chainName);
753595
+ (0,validation/* assert */.v)(domainId !== undefined, `Domain ID not found for ${chainName}`);
753596
+ for (const [routerBytes32, subFeeConfig] of Object.entries(routerConfigs)) {
753597
+ const entryKey = `${chainName}:${routerBytes32}`;
753598
+ const deployedSubFee = entryDeployedAddr.get(entryKey);
753599
+ (0,validation/* assert */.v)(deployedSubFee !== undefined, `Missing deployed fee for entry ${entryKey}`);
753600
+ const oldAddr = subFeeConfig.address;
753601
+ if (!oldAddr || !(0,addresses/* eqAddress */.fv)(deployedSubFee, oldAddr)) {
753602
+ destinations.push(domainId);
753603
+ routerKeys.push(routerBytes32);
753604
+ newAddresses.push(deployedSubFee);
753605
+ }
753606
+ }
753607
+ }
753608
+ if (destinations.length > 0) {
753609
+ updateTransactions.push({
753610
+ annotation: 'Updating CrossCollateralRoutingFee sub-contract pointers',
753611
+ chainId: this.chainId,
753612
+ to: currentRoutingAddress,
753613
+ data: dist/* CrossCollateralRoutingFee__factory */.gv3.createInterface().encodeFunctionData('setCrossCollateralRouterFeeContracts', [destinations, routerKeys, newAddresses]),
753614
+ });
753615
+ }
753616
+ return updateTransactions;
753617
+ }
753349
753618
  async updateRoutingFee(targetConfig) {
753350
753619
  const updateTransactions = [];
753351
753620
  if (!targetConfig.feeContracts)
@@ -756443,15 +756712,16 @@ class EvmHookModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
756443
756712
  /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
756444
756713
  /* harmony export */ F: () => (/* binding */ EvmHookReader)
756445
756714
  /* harmony export */ });
756446
- /* harmony import */ var ethers__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(61934);
756715
+ /* harmony import */ var ethers__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(61934);
756447
756716
  /* harmony import */ var _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(50653);
756448
756717
  /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(94523);
756449
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(73938);
756450
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(14918);
756451
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(93142);
756452
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(21387);
756718
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(73938);
756719
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(14918);
756720
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(93142);
756721
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(21387);
756453
756722
  /* harmony import */ var _consts_concurrency_js__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(92573);
756454
756723
  /* harmony import */ var _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(49680);
756724
+ /* harmony import */ var _utils_contract_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(76709);
756455
756725
  /* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(52116);
756456
756726
 
756457
756727
 
@@ -756459,6 +756729,13 @@ class EvmHookModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
756459
756729
 
756460
756730
 
756461
756731
 
756732
+
756733
+ function isUnsupportedIgpDomainError(error, domainId) {
756734
+ // Mirrors InterchainGasPaymaster.getExchangeRateAndGasPrice in
756735
+ // solidity/contracts/hooks/igp/InterchainGasPaymaster.sol.
756736
+ return (error instanceof Error &&
756737
+ error.message.includes(`Configured IGP doesn't support domain ${domainId}`));
756738
+ }
756462
756739
  class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1__/* .HyperlaneReader */ .S {
756463
756740
  multiProvider;
756464
756741
  chain;
@@ -756547,8 +756824,7 @@ class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1
756547
756824
  }
756548
756825
  catch (e) {
756549
756826
  let customMessage = `Failed to derive ${onchainHookType} hook (${address})`;
756550
- if (!onchainHookType &&
756551
- e.message.includes('Invalid response from provider')) {
756827
+ if (!onchainHookType && (0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_5__/* .isMissingSelectorCallException */ .pJ)(e)) {
756552
756828
  customMessage = customMessage.concat(` [The provided hook contract might be outdated and not support hookType()]`);
756553
756829
  this.logger.info(`${customMessage}:\n\t${e}`);
756554
756830
  }
@@ -756583,22 +756859,50 @@ class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1
756583
756859
  switch (config.type) {
756584
756860
  case _types_js__WEBPACK_IMPORTED_MODULE_4__/* .HookType */ .WD.FALLBACK_ROUTING:
756585
756861
  case _types_js__WEBPACK_IMPORTED_MODULE_4__/* .HookType */ .WD.ROUTING:
756586
- config.domains = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .promiseObjAll */ .a1)((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_5__/* .objMap */ .Yp)(config.domains, async (_, hook) => this.deriveHookConfig(hook)));
756587
- if (config.type === _types_js__WEBPACK_IMPORTED_MODULE_4__/* .HookType */ .WD.FALLBACK_ROUTING)
756588
- config.fallback = await this.deriveHookConfig(config.fallback);
756862
+ config.domains = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_6__/* .promiseObjAll */ .a1)((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_6__/* .objMap */ .Yp)(config.domains, async (_, hook) => {
756863
+ const derived = await this.deriveHookConfig(hook);
756864
+ return this.preserveUnredeployable(hook, derived);
756865
+ }));
756866
+ if (config.type === _types_js__WEBPACK_IMPORTED_MODULE_4__/* .HookType */ .WD.FALLBACK_ROUTING) {
756867
+ const derived = await this.deriveHookConfig(config.fallback);
756868
+ config.fallback = this.preserveUnredeployable(config.fallback, derived);
756869
+ }
756589
756870
  break;
756871
+ case _types_js__WEBPACK_IMPORTED_MODULE_4__/* .HookType */ .WD.CCTP:
756872
+ return config;
756590
756873
  case _types_js__WEBPACK_IMPORTED_MODULE_4__/* .HookType */ .WD.AGGREGATION:
756591
- config.hooks = await Promise.all(config.hooks.map(async (hook) => this.deriveHookConfig(hook)));
756874
+ config.hooks = await Promise.all(config.hooks.map(async (hook) => {
756875
+ const derived = await this.deriveHookConfig(hook);
756876
+ return this.preserveUnredeployable(hook, derived);
756877
+ }));
756592
756878
  break;
756593
- case _types_js__WEBPACK_IMPORTED_MODULE_4__/* .HookType */ .WD.AMOUNT_ROUTING:
756594
- [config.lowerHook, config.upperHook] = await Promise.all([
756595
- this.deriveHookConfig(config.lowerHook),
756596
- this.deriveHookConfig(config.upperHook),
756879
+ case _types_js__WEBPACK_IMPORTED_MODULE_4__/* .HookType */ .WD.AMOUNT_ROUTING: {
756880
+ const lowerOrig = config.lowerHook;
756881
+ const upperOrig = config.upperHook;
756882
+ const [lowerDerived, upperDerived] = await Promise.all([
756883
+ this.deriveHookConfig(lowerOrig),
756884
+ this.deriveHookConfig(upperOrig),
756597
756885
  ]);
756886
+ config.lowerHook = this.preserveUnredeployable(lowerOrig, lowerDerived);
756887
+ config.upperHook = this.preserveUnredeployable(upperOrig, upperDerived);
756598
756888
  break;
756889
+ }
756599
756890
  }
756600
756891
  return config;
756601
756892
  }
756893
+ // Returns original HookConfig for non-redeployable types (CCTP, PREDICATE) so that
756894
+ // normalizeConfig — which strips 'address' from all objects — does not discard
756895
+ // the address. Returns the address as a bare string so it survives normalizeConfig
756896
+ // and deploy() reaches the string branch intact, regardless of whether the original
756897
+ // was already a string or an object with an address field.
756898
+ preserveUnredeployable(original, derived) {
756899
+ if (derived.type !== _types_js__WEBPACK_IMPORTED_MODULE_4__/* .HookType */ .WD.CCTP && derived.type !== _types_js__WEBPACK_IMPORTED_MODULE_4__/* .HookType */ .WD.PREDICATE) {
756900
+ return derived;
756901
+ }
756902
+ if (typeof original === 'string')
756903
+ return original;
756904
+ return derived.address;
756905
+ }
756602
756906
  async deriveMailboxDefaultHookConfig(address) {
756603
756907
  const hook = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .DefaultHook__factory */ .hR3.connect(address, this.provider);
756604
756908
  this.assertHookType(await hook.hookType(), _types_js__WEBPACK_IMPORTED_MODULE_4__/* .OnchainHookType */ .c0.MAILBOX_DEFAULT_HOOK);
@@ -756611,24 +756915,26 @@ class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1
756611
756915
  }
756612
756916
  async deriveIdAuthIsmConfig(address) {
756613
756917
  // First check if it's a CCIP hook
756918
+ const ccipHook = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .CCIPHook__factory */ .TaE.connect(address, this.provider);
756614
756919
  try {
756615
- const ccipHook = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .CCIPHook__factory */ .TaE.connect(address, this.provider);
756616
756920
  // This method only exists on CCIPHook
756617
756921
  await ccipHook.ccipDestination();
756618
- return this.deriveCcipConfig(address);
756619
756922
  }
756620
- catch {
756923
+ catch (error) {
756924
+ (0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_5__/* .throwIfNotMissingSelector */ .KT)(error);
756621
756925
  // Not a CCIP hook, try OPStack
756926
+ const opStackHook = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .OPStackHook__factory */ .Luq.connect(address, this.provider);
756622
756927
  try {
756623
- const opStackHook = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .OPStackHook__factory */ .Luq.connect(address, this.provider);
756624
756928
  // This method only exists on OPStackHook
756625
756929
  await opStackHook.l1Messenger();
756626
- return this.deriveOpStackConfig(address);
756627
756930
  }
756628
- catch {
756931
+ catch (innerError) {
756932
+ (0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_5__/* .throwIfNotMissingSelector */ .KT)(innerError);
756629
756933
  throw new Error(`Could not determine hook type - neither CCIP nor OPStack methods found`);
756630
756934
  }
756935
+ return this.deriveOpStackConfig(address);
756631
756936
  }
756937
+ return this.deriveCcipConfig(address);
756632
756938
  }
756633
756939
  async deriveCcipConfig(address) {
756634
756940
  const ccipHook = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .CCIPHook__factory */ .TaE.connect(address, this.provider);
@@ -756674,10 +756980,13 @@ class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1
756674
756980
  // Parallelize hookType and hooks list fetching
756675
756981
  const [hookType, hooks] = await Promise.all([
756676
756982
  hook.hookType(),
756677
- hook.hooks(ethers__WEBPACK_IMPORTED_MODULE_6__.ethers.constants.AddressZero),
756983
+ hook.hooks(ethers__WEBPACK_IMPORTED_MODULE_7__.ethers.constants.AddressZero),
756678
756984
  ]);
756679
756985
  this.assertHookType(hookType, _types_js__WEBPACK_IMPORTED_MODULE_4__/* .OnchainHookType */ .c0.AGGREGATION);
756680
- const hookConfigs = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__/* .concurrentMap */ .q1)(this.concurrency, hooks, (hook) => this.deriveHookConfig(hook));
756986
+ const hookConfigs = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .concurrentMap */ .q1)(this.concurrency, hooks, async (hookAddress) => {
756987
+ const derived = await this.deriveHookConfigFromAddress(hookAddress);
756988
+ return this.preserveUnredeployable(hookAddress, derived);
756989
+ });
756681
756990
  const config = {
756682
756991
  address,
756683
756992
  type: _types_js__WEBPACK_IMPORTED_MODULE_4__/* .HookType */ .WD.AGGREGATION,
@@ -756706,7 +757015,8 @@ class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1
756706
757015
  hook.owner(),
756707
757016
  hook.beneficiary(),
756708
757017
  // quoteSigners() not available on IGP versions before offchain fee quoting
756709
- hook.quoteSigners().catch(() => {
757018
+ hook.quoteSigners().catch((error) => {
757019
+ (0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_5__/* .throwIfNotMissingSelector */ .KT)(error);
756710
757020
  this.logger.debug('quoteSigners() not available on this IGP version, skipping');
756711
757021
  return [];
756712
757022
  }),
@@ -756715,7 +757025,7 @@ class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1
756715
757025
  const overhead = {};
756716
757026
  const oracleConfig = {};
756717
757027
  let oracleKey;
756718
- const allKeys = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__/* .concurrentMap */ .q1)(this.concurrency, this.possibleDomainIds(), async (domainId) => {
757028
+ const allKeys = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .concurrentMap */ .q1)(this.concurrency, this.possibleDomainIds(), async (domainId) => {
756719
757029
  const { name: chainName, nativeToken } = this.multiProvider.getChainMetadata(domainId);
756720
757030
  try {
756721
757031
  const { tokenExchangeRate, gasPrice } = await hook.getExchangeRateAndGasPrice(domainId);
@@ -756730,15 +757040,17 @@ class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1
756730
757040
  const oracle = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .StorageGasOracle__factory */ .T8$.connect(gasOracle, this.provider);
756731
757041
  return oracle.owner();
756732
757042
  }
756733
- catch {
757043
+ catch (error) {
757044
+ if (!isUnsupportedIgpDomainError(error, domainId))
757045
+ throw error;
756734
757046
  this.logger.debug('Domain not configured on IGP Hook', domainId, chainName);
756735
757047
  return null;
756736
757048
  }
756737
757049
  });
756738
757050
  const resolvedOracleKeys = allKeys.filter((key) => key !== null);
756739
757051
  if (resolvedOracleKeys.length > 0) {
756740
- const allKeysMatch = resolvedOracleKeys.every((key) => (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .eqAddress */ .fv)(resolvedOracleKeys[0], key));
756741
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .assert */ .v)(allKeysMatch, 'Not all oracle keys match');
757052
+ const allKeysMatch = resolvedOracleKeys.every((key) => (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .eqAddress */ .fv)(resolvedOracleKeys[0], key));
757053
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(allKeysMatch, 'Not all oracle keys match');
756742
757054
  oracleKey = resolvedOracleKeys[0];
756743
757055
  }
756744
757056
  const config = {
@@ -756806,7 +757118,8 @@ class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1
756806
757118
  hook.childHook(),
756807
757119
  ]);
756808
757120
  const destinationChainName = this.multiProvider.getChainName(destinationDomain);
756809
- const childHookConfig = await this.deriveHookConfig(childHookAddress);
757121
+ const derivedChild = await this.deriveHookConfigFromAddress(childHookAddress);
757122
+ const childHookConfig = this.preserveUnredeployable(childHookAddress, derivedChild);
756810
757123
  const config = {
756811
757124
  address,
756812
757125
  type: _types_js__WEBPACK_IMPORTED_MODULE_4__/* .HookType */ .WD.ARB_L2_TO_L1,
@@ -756845,7 +757158,8 @@ class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1
756845
757158
  this.fetchDomainHooks(hook),
756846
757159
  ]);
756847
757160
  this.assertHookType(hookType, _types_js__WEBPACK_IMPORTED_MODULE_4__/* .OnchainHookType */ .c0.FALLBACK_ROUTING);
756848
- const fallbackHookConfig = await this.deriveHookConfig(fallbackHookAddress);
757161
+ const derivedFallback = await this.deriveHookConfigFromAddress(fallbackHookAddress);
757162
+ const fallbackHookConfig = this.preserveUnredeployable(fallbackHookAddress, derivedFallback);
756849
757163
  const config = {
756850
757164
  owner,
756851
757165
  address,
@@ -756858,16 +757172,12 @@ class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1
756858
757172
  }
756859
757173
  async fetchDomainHooks(hook) {
756860
757174
  const domainHooks = {};
756861
- await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_7__/* .concurrentMap */ .q1)(this.concurrency, this.possibleDomainIds(), async (domainId) => {
757175
+ await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .concurrentMap */ .q1)(this.concurrency, this.possibleDomainIds(), async (domainId) => {
756862
757176
  const chainName = this.multiProvider.getChainName(domainId);
756863
- try {
756864
- const domainHook = await hook.hooks(domainId);
756865
- if (domainHook !== ethers__WEBPACK_IMPORTED_MODULE_6__.ethers.constants.AddressZero) {
756866
- domainHooks[chainName] = await this.deriveHookConfig(domainHook);
756867
- }
756868
- }
756869
- catch {
756870
- this.logger.debug(`Domain not configured on ${hook.constructor.name}`, domainId, chainName);
757177
+ const domainHook = await hook.hooks(domainId);
757178
+ if (!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .isZeroishAddress */ .Hi)(domainHook)) {
757179
+ const derived = await this.deriveHookConfigFromAddress(domainHook);
757180
+ domainHooks[chainName] = this.preserveUnredeployable(domainHook, derived);
756871
757181
  }
756872
757182
  });
756873
757183
  return domainHooks;
@@ -756901,10 +757211,12 @@ class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1
756901
757211
  ]);
756902
757212
  this.assertHookType(hookType, _types_js__WEBPACK_IMPORTED_MODULE_4__/* .OnchainHookType */ .c0.AMOUNT_ROUTING);
756903
757213
  // Parallelize hook config derivation
756904
- const [lowerHookConfig, upperHookConfig] = await Promise.all([
756905
- this.deriveHookConfig(lowerHookAddress),
756906
- this.deriveHookConfig(upperHookAddress),
757214
+ const [lowerDerived, upperDerived] = await Promise.all([
757215
+ this.deriveHookConfigFromAddress(lowerHookAddress),
757216
+ this.deriveHookConfigFromAddress(upperHookAddress),
756907
757217
  ]);
757218
+ const lowerHookConfig = this.preserveUnredeployable(lowerHookAddress, lowerDerived);
757219
+ const upperHookConfig = this.preserveUnredeployable(upperHookAddress, upperDerived);
756908
757220
  const config = {
756909
757221
  address,
756910
757222
  type: _types_js__WEBPACK_IMPORTED_MODULE_4__/* .HookType */ .WD.AMOUNT_ROUTING,
@@ -756916,7 +757228,7 @@ class EvmHookReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1
756916
757228
  return config;
756917
757229
  }
756918
757230
  assertHookType(hookType, expectedType) {
756919
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .assert */ .v)(hookType === expectedType, `expected hook type to be ${expectedType}, got ${hookType}`);
757231
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(hookType === expectedType, `expected hook type to be ${expectedType}, got ${hookType}`);
756920
757232
  }
756921
757233
  }
756922
757234
  //# sourceMappingURL=EvmHookReader.js.map
@@ -757328,13 +757640,15 @@ const isHookCompatible = ({ hookType, chainTechnicalStack, }) => !(hookType ===
757328
757640
  /* harmony export */ e: () => (/* binding */ EvmIcaRouterReader)
757329
757641
  /* harmony export */ });
757330
757642
  /* harmony import */ var _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(50653);
757331
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(94523);
757643
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(94523);
757332
757644
  /* harmony import */ var _router_EvmRouterReader_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(26623);
757645
+ /* harmony import */ var _utils_contract_js__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(76709);
757333
757646
  /* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(89972);
757334
757647
 
757335
757648
 
757336
757649
 
757337
757650
 
757651
+
757338
757652
  class EvmIcaRouterReader extends _router_EvmRouterReader_js__WEBPACK_IMPORTED_MODULE_1__/* .EvmRouterReader */ .V {
757339
757653
  async deriveConfig(address) {
757340
757654
  const icaRouterInstance = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .InterchainAccountRouter__factory */ .ojJ.connect(address, this.provider);
@@ -757344,8 +757658,9 @@ class EvmIcaRouterReader extends _router_EvmRouterReader_js__WEBPACK_IMPORTED_MO
757344
757658
  commitmentIsmAddress = await icaRouterInstance.CCIP_READ_ISM();
757345
757659
  routerType = _types_js__WEBPACK_IMPORTED_MODULE_2__/* .IcaRouterType */ .vn.REGULAR;
757346
757660
  }
757347
- catch {
757348
- _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .rootLogger */ .Jk.debug(`No CCIP_READ_ISM on ${address} — MinimalInterchainAccountRouter`);
757661
+ catch (error) {
757662
+ (0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_3__/* .throwIfNotMissingSelector */ .KT)(error);
757663
+ _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .rootLogger */ .Jk.debug(`No CCIP_READ_ISM on ${address} — MinimalInterchainAccountRouter`);
757349
757664
  routerType = _types_js__WEBPACK_IMPORTED_MODULE_2__/* .IcaRouterType */ .vn.MINIMAL;
757350
757665
  }
757351
757666
  const routerConfig = await this.readRouterConfig(address);
@@ -757703,18 +758018,18 @@ class EvmIsmModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_MO
757703
758018
  /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
757704
758019
  /* harmony export */ N: () => (/* binding */ EvmIsmReader)
757705
758020
  /* harmony export */ });
757706
- /* harmony import */ var ethers__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(61934);
758021
+ /* harmony import */ var ethers__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(61934);
757707
758022
  /* harmony import */ var _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(50653);
757708
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(94523);
758023
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(94523);
757709
758024
  /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(73938);
757710
758025
  /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(14918);
757711
758026
  /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(21387);
757712
758027
  /* harmony import */ var _ccip_utils_js__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(93035);
757713
- /* harmony import */ var _consts_concurrency_js__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(92573);
757714
- /* harmony import */ var _metadata_chainMetadataTypes_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(1430);
757715
- /* harmony import */ var _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(49680);
757716
- /* harmony import */ var _utils_contract_js__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(76709);
757717
- /* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(69352);
758028
+ /* harmony import */ var _consts_concurrency_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(92573);
758029
+ /* harmony import */ var _metadata_chainMetadataTypes_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(1430);
758030
+ /* harmony import */ var _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(49680);
758031
+ /* harmony import */ var _utils_contract_js__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(76709);
758032
+ /* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(69352);
757718
758033
 
757719
758034
 
757720
758035
 
@@ -757725,14 +758040,19 @@ class EvmIsmModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_MO
757725
758040
 
757726
758041
 
757727
758042
  const INCREMENTAL_REVERT_STRING = 'IncrementalDomainRoutingIsm: removal not supported';
757728
- class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1__/* .HyperlaneReader */ .S {
758043
+ // ISM types that cannot be deployed by HyperlaneIsmFactory — preserve as address strings.
758044
+ const NON_REDEPLOYABLE_ISM_TYPES = new Set([
758045
+ _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.OFFCHAIN_LOOKUP,
758046
+ _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.INTERCHAIN_ACCOUNT_ROUTING,
758047
+ ]);
758048
+ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_2__/* .HyperlaneReader */ .S {
757729
758049
  multiProvider;
757730
758050
  chain;
757731
758051
  concurrency;
757732
758052
  messageContext;
757733
- logger = _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__/* .rootLogger */ .Jk.child({ module: 'EvmIsmReader' });
758053
+ logger = _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .rootLogger */ .Jk.child({ module: 'EvmIsmReader' });
757734
758054
  isZkSyncChain;
757735
- constructor(multiProvider, chain, concurrency = multiProvider.tryGetRpcConcurrency(chain) ?? _consts_concurrency_js__WEBPACK_IMPORTED_MODULE_3__/* .DEFAULT_CONTRACT_READ_CONCURRENCY */ .M, messageContext) {
758055
+ constructor(multiProvider, chain, concurrency = multiProvider.tryGetRpcConcurrency(chain) ?? _consts_concurrency_js__WEBPACK_IMPORTED_MODULE_4__/* .DEFAULT_CONTRACT_READ_CONCURRENCY */ .M, messageContext) {
757736
758056
  super(multiProvider, chain);
757737
758057
  this.multiProvider = multiProvider;
757738
758058
  this.chain = chain;
@@ -757740,7 +758060,7 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
757740
758060
  this.messageContext = messageContext;
757741
758061
  // So we can distinguish between Storage/Static ISMs
757742
758062
  const chainTechnicalStack = this.multiProvider.getChainMetadata(this.chain).technicalStack;
757743
- this.isZkSyncChain = chainTechnicalStack === _metadata_chainMetadataTypes_js__WEBPACK_IMPORTED_MODULE_4__/* .ChainTechnicalStack */ .DU.ZkSync;
758063
+ this.isZkSyncChain = chainTechnicalStack === _metadata_chainMetadataTypes_js__WEBPACK_IMPORTED_MODULE_5__/* .ChainTechnicalStack */ .DU.ZkSync;
757744
758064
  }
757745
758065
  async deriveIsmConfigFromAddress(address) {
757746
758066
  let moduleType = undefined;
@@ -757753,28 +758073,28 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
757753
758073
  this.setSmartProviderLogLevel('silent');
757754
758074
  moduleType = await ism.moduleType();
757755
758075
  switch (moduleType) {
757756
- case _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.UNUSED:
758076
+ case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.UNUSED:
757757
758077
  throw new Error('UNUSED does not have a corresponding IsmType');
757758
- case _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.ROUTING:
758078
+ case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.ROUTING:
757759
758079
  // IsmType is either ROUTING or FALLBACK_ROUTING, but that's determined inside deriveRoutingConfig
757760
758080
  derivedIsmConfig = await this.deriveRoutingConfig(address);
757761
758081
  break;
757762
- case _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.AGGREGATION:
758082
+ case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.AGGREGATION:
757763
758083
  derivedIsmConfig = await this.deriveAggregationConfig(address);
757764
758084
  break;
757765
- case _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.LEGACY_MULTISIG:
758085
+ case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.LEGACY_MULTISIG:
757766
758086
  throw new Error('LEGACY_MULTISIG is deprecated and not supported');
757767
- case _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.MERKLE_ROOT_MULTISIG:
757768
- case _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.MESSAGE_ID_MULTISIG:
758087
+ case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.MERKLE_ROOT_MULTISIG:
758088
+ case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.MESSAGE_ID_MULTISIG:
757769
758089
  derivedIsmConfig = await this.deriveMultisigConfig(address);
757770
758090
  break;
757771
- case _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.NULL:
758091
+ case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.NULL:
757772
758092
  derivedIsmConfig = await this.deriveNullConfig(address);
757773
758093
  break;
757774
- case _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.CCIP_READ:
758094
+ case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.CCIP_READ:
757775
758095
  derivedIsmConfig = await this.deriveOffchainLookupConfig(address);
757776
758096
  break;
757777
- case _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.ARB_L2_TO_L1:
758097
+ case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.ARB_L2_TO_L1:
757778
758098
  return this.deriveArbL2ToL1Config(address);
757779
758099
  default:
757780
758100
  throw new Error(`Unknown ISM ModuleType: ${moduleType}`);
@@ -757786,17 +758106,17 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
757786
758106
  throw new Error(errorMessage);
757787
758107
  }
757788
758108
  finally {
757789
- this.setSmartProviderLogLevel((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__/* .getLogLevel */ .XM)()); // returns to original level defined by rootLogger
758109
+ this.setSmartProviderLogLevel((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .getLogLevel */ .XM)()); // returns to original level defined by rootLogger
757790
758110
  }
757791
758111
  return derivedIsmConfig;
757792
758112
  }
757793
758113
  async deriveOffchainLookupConfig(address) {
757794
758114
  const ism = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .AbstractCcipReadIsm__factory */ .RWQ.connect(address, this.provider);
757795
- this.assertModuleType(await ism.moduleType(), _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.CCIP_READ);
758115
+ this.assertModuleType(await ism.moduleType(), _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.CCIP_READ);
757796
758116
  const [urls, owner] = await Promise.all([ism.urls(), ism.owner()]);
757797
758117
  return {
757798
758118
  address,
757799
- type: _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.OFFCHAIN_LOOKUP,
758119
+ type: _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.OFFCHAIN_LOOKUP,
757800
758120
  urls,
757801
758121
  owner,
757802
758122
  };
@@ -757808,26 +758128,48 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
757808
758128
  return this.deriveIsmConfigFromAddress(config);
757809
758129
  // Extend the inner isms
757810
758130
  switch (config.type) {
757811
- case _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.FALLBACK_ROUTING:
757812
- case _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.ROUTING:
757813
- config.domains = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_6__/* .promiseObjAll */ .a1)((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_6__/* .objMap */ .Yp)(config.domains, async (_, ism) => this.deriveIsmConfig(ism)));
758131
+ case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.FALLBACK_ROUTING:
758132
+ case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.ROUTING:
758133
+ config.domains = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_6__/* .promiseObjAll */ .a1)((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_6__/* .objMap */ .Yp)(config.domains, async (_, ism) => {
758134
+ const derived = await this.deriveIsmConfig(ism);
758135
+ return this.preserveUnredeployableIsm(ism, derived);
758136
+ }));
757814
758137
  break;
757815
- case _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.AGGREGATION:
757816
- case _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.STORAGE_AGGREGATION:
757817
- config.modules = await Promise.all(config.modules.map(async (ism) => this.deriveIsmConfig(ism)));
758138
+ case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.AGGREGATION:
758139
+ case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.STORAGE_AGGREGATION:
758140
+ config.modules = await Promise.all(config.modules.map(async (ism) => {
758141
+ const derived = await this.deriveIsmConfig(ism);
758142
+ return this.preserveUnredeployableIsm(ism, derived);
758143
+ }));
757818
758144
  break;
757819
- case _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.AMOUNT_ROUTING:
757820
- [config.lowerIsm, config.upperIsm] = await Promise.all([
757821
- this.deriveIsmConfig(config.lowerIsm),
757822
- this.deriveIsmConfig(config.upperIsm),
758145
+ case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.AMOUNT_ROUTING: {
758146
+ const lowerOrig = config.lowerIsm;
758147
+ const upperOrig = config.upperIsm;
758148
+ const [lowerDerived, upperDerived] = await Promise.all([
758149
+ this.deriveIsmConfig(lowerOrig),
758150
+ this.deriveIsmConfig(upperOrig),
757823
758151
  ]);
758152
+ config.lowerIsm = this.preserveUnredeployableIsm(lowerOrig, lowerDerived);
758153
+ config.upperIsm = this.preserveUnredeployableIsm(upperOrig, upperDerived);
757824
758154
  break;
758155
+ }
757825
758156
  }
757826
758157
  return config;
757827
758158
  }
758159
+ // Returns the original IsmConfig for non-redeployable ISM types (e.g. OFFCHAIN_LOOKUP,
758160
+ // INTERCHAIN_ACCOUNT_ROUTING) so normalizeConfig and deploy() handle them correctly.
758161
+ // The original is typically a string address that survives normalizeConfig intact and
758162
+ // reaches deploy()'s string branch; an object config is also preserved via derived.address.
758163
+ preserveUnredeployableIsm(original, derived) {
758164
+ if (!NON_REDEPLOYABLE_ISM_TYPES.has(derived.type))
758165
+ return derived;
758166
+ if (typeof original === 'string')
758167
+ return original;
758168
+ return derived.address;
758169
+ }
757828
758170
  async deriveRoutingConfig(address) {
757829
758171
  const abstractRoutingIsm = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .AbstractRoutingIsm__factory */ .cYN.connect(address, this.provider);
757830
- this.assertModuleType(await abstractRoutingIsm.moduleType(), _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.ROUTING);
758172
+ this.assertModuleType(await abstractRoutingIsm.moduleType(), _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.ROUTING);
757831
758173
  // OPTIMIZATION: When we have messageContext, we only need to derive
757832
758174
  // the specific ISM that will verify this message, not the full routing table.
757833
758175
  // Just call route(message) and derive that single ISM directly.
@@ -757841,17 +758183,18 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
757841
758183
  try {
757842
758184
  owner = await ownableIsm.owner();
757843
758185
  }
757844
- catch {
758186
+ catch (error) {
758187
+ (0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_7__/* .throwIfNotMissingSelector */ .KT)(error);
757845
758188
  this.logger.debug('Error accessing owner property, implying that this is not a DefaultFallbackRoutingIsm.', address);
757846
758189
  }
757847
758190
  // If the current ISM does not have an owner then it is an Amount Router
757848
758191
  if (!owner) {
757849
758192
  if (isIca) {
757850
758193
  return {
757851
- type: _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.INTERCHAIN_ACCOUNT_ROUTING,
758194
+ type: _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.INTERCHAIN_ACCOUNT_ROUTING,
757852
758195
  isms: {},
757853
758196
  address,
757854
- owner: ethers__WEBPACK_IMPORTED_MODULE_7__.ethers.constants.AddressZero,
758197
+ owner: ethers__WEBPACK_IMPORTED_MODULE_8__.ethers.constants.AddressZero,
757855
758198
  };
757856
758199
  }
757857
758200
  return this.deriveNonOwnableRoutingConfig(address);
@@ -757862,28 +758205,29 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
757862
758205
  if (isIca) {
757863
758206
  const icaRouter = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .InterchainAccountRouter__factory */ .ojJ.connect(address, this.provider);
757864
758207
  return {
757865
- type: _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.INTERCHAIN_ACCOUNT_ROUTING,
757866
- isms: await this.deriveRemoteIsmConfigs(domainIds, abstractRoutingIsm, icaRouter.isms,
758208
+ type: _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.INTERCHAIN_ACCOUNT_ROUTING,
758209
+ isms: await this.deriveRemoteIsmConfigs(domainIds, abstractRoutingIsm, (domain) => icaRouter.isms(domain),
757867
758210
  // The isms here are deployed on remote chains and can't be derived
757868
758211
  false),
757869
758212
  address,
757870
758213
  owner,
757871
758214
  };
757872
758215
  }
757873
- const domains = await this.deriveRemoteIsmConfigs(domainIds, abstractRoutingIsm, defaultFallbackIsmInstance.module, true);
758216
+ const domains = await this.deriveRemoteIsmConfigs(domainIds, abstractRoutingIsm, (domain) => defaultFallbackIsmInstance.module(domain), true);
757874
758217
  // Fallback routing ISM extends from MailboxClient, default routing
757875
- let ismType = _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.FALLBACK_ROUTING;
758218
+ let ismType = _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.FALLBACK_ROUTING;
757876
758219
  try {
757877
758220
  await defaultFallbackIsmInstance.mailbox();
757878
758221
  }
757879
- catch {
757880
- ismType = _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.ROUTING;
758222
+ catch (error) {
758223
+ (0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_7__/* .throwIfNotMissingSelector */ .KT)(error);
758224
+ ismType = _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.ROUTING;
757881
758225
  this.logger.debug('Error accessing mailbox property, implying this is not a fallback routing ISM.', address);
757882
758226
  }
757883
758227
  // Check if it's an incremental routing ISM by looking for the unique error message in bytecode
757884
- if (ismType === _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.ROUTING) {
757885
- if (await (0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_8__/* .contractHasString */ .u)(this.provider, address, INCREMENTAL_REVERT_STRING)) {
757886
- ismType = _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.INCREMENTAL_ROUTING;
758228
+ if (ismType === _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.ROUTING) {
758229
+ if (await (0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_7__/* .contractHasString */ .uu)(this.provider, address, INCREMENTAL_REVERT_STRING)) {
758230
+ ismType = _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.INCREMENTAL_ROUTING;
757887
758231
  this.logger.debug({ address }, 'Detected incremental routing ISM');
757888
758232
  }
757889
758233
  }
@@ -757904,12 +758248,14 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
757904
758248
  await icaInstance.CCIP_READ_ISM();
757905
758249
  return true;
757906
758250
  }
757907
- catch {
758251
+ catch (error) {
758252
+ (0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_7__/* .throwIfNotMissingSelector */ .KT)(error);
757908
758253
  try {
757909
758254
  await icaInstance.bytecodeHash();
757910
758255
  return true;
757911
758256
  }
757912
- catch {
758257
+ catch (innerError) {
758258
+ (0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_7__/* .throwIfNotMissingSelector */ .KT)(innerError);
757913
758259
  this.logger.debug('Not an ICA router (no CCIP_READ_ISM or bytecodeHash).', address);
757914
758260
  return false;
757915
758261
  }
@@ -757919,18 +758265,20 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
757919
758265
  const res = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .concurrentMap */ .q1)(this.concurrency, domainIds, async (domainId) => {
757920
758266
  const chainName = this.multiProvider.tryGetChainName(domainId.toNumber());
757921
758267
  if (!chainName) {
757922
- this.logger.warn(`Unknown domain ID ${domainId}, skipping domain configuration`);
758268
+ this.logger.warn(`Unknown domain ID ${domainId.toString()}, skipping domain configuration`);
757923
758269
  return;
757924
758270
  }
757925
758271
  const moduleAddress = this.messageContext
757926
758272
  ? await contractInstance.route(this.messageContext.message)
757927
758273
  : await addressDeriveFunc(domainId);
757928
- return [
757929
- chainName,
757930
- deriveConfig
757931
- ? await this.deriveIsmConfig(moduleAddress)
757932
- : moduleAddress,
757933
- ];
758274
+ if (deriveConfig) {
758275
+ const derived = await this.deriveIsmConfigFromAddress(moduleAddress);
758276
+ return [
758277
+ chainName,
758278
+ this.preserveUnredeployableIsm(moduleAddress, derived),
758279
+ ];
758280
+ }
758281
+ return [chainName, moduleAddress];
757934
758282
  });
757935
758283
  return Object.fromEntries(res.filter((curr) => curr));
757936
758284
  }
@@ -757946,34 +758294,42 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
757946
758294
  ism.threshold(),
757947
758295
  ]);
757948
758296
  }
757949
- catch {
758297
+ catch (error) {
758298
+ (0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_7__/* .throwIfNotMissingSelector */ .KT)(error);
757950
758299
  // If we fail to access AmountRoutingIsm properties, this is likely a legacy InterchainAccountIsm
757951
758300
  this.logger.debug('Error accessing AmountRoutingIsm properties, treating as legacy InterchainAccountIsm.', address);
757952
758301
  // return a basic ICA routing config for legacy contracts
757953
758302
  return {
757954
- type: _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.INTERCHAIN_ACCOUNT_ROUTING,
758303
+ type: _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.INTERCHAIN_ACCOUNT_ROUTING,
757955
758304
  isms: {},
757956
758305
  address,
757957
- owner: ethers__WEBPACK_IMPORTED_MODULE_7__.ethers.constants.AddressZero,
758306
+ owner: ethers__WEBPACK_IMPORTED_MODULE_8__.ethers.constants.AddressZero,
757958
758307
  };
757959
758308
  }
758309
+ const [lowerDerived, upperDerived] = await Promise.all([
758310
+ this.deriveIsmConfigFromAddress(lowerIsm),
758311
+ this.deriveIsmConfigFromAddress(upperIsm),
758312
+ ]);
757960
758313
  return {
757961
- type: _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.AMOUNT_ROUTING,
758314
+ type: _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.AMOUNT_ROUTING,
757962
758315
  address,
757963
- lowerIsm: await this.deriveIsmConfig(lowerIsm),
757964
- upperIsm: await this.deriveIsmConfig(upperIsm),
758316
+ lowerIsm: this.preserveUnredeployableIsm(lowerIsm, lowerDerived),
758317
+ upperIsm: this.preserveUnredeployableIsm(upperIsm, upperDerived),
757965
758318
  threshold: threshold.toNumber(),
757966
758319
  };
757967
758320
  }
757968
758321
  async deriveAggregationConfig(address) {
757969
758322
  const ism = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .StaticAggregationIsm__factory */ .UMv.connect(address, this.provider);
757970
- this.assertModuleType(await ism.moduleType(), _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.AGGREGATION);
757971
- const [modules, threshold] = await ism.modulesAndThreshold(ethers__WEBPACK_IMPORTED_MODULE_7__.ethers.constants.AddressZero);
757972
- const ismConfigs = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .concurrentMap */ .q1)(this.concurrency, modules, async (module) => this.deriveIsmConfig(module));
758323
+ this.assertModuleType(await ism.moduleType(), _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.AGGREGATION);
758324
+ const [modules, threshold] = await ism.modulesAndThreshold(ethers__WEBPACK_IMPORTED_MODULE_8__.ethers.constants.AddressZero);
758325
+ const ismConfigs = await (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .concurrentMap */ .q1)(this.concurrency, modules, async (module) => {
758326
+ const derived = await this.deriveIsmConfigFromAddress(module);
758327
+ return this.preserveUnredeployableIsm(module, derived);
758328
+ });
757973
758329
  // If it's a zkSync chain, it must be a StorageAggregationIsm
757974
758330
  const ismType = this.isZkSyncChain
757975
- ? _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.STORAGE_AGGREGATION
757976
- : _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.AGGREGATION;
758331
+ ? _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.STORAGE_AGGREGATION
758332
+ : _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.AGGREGATION;
757977
758333
  return {
757978
758334
  address,
757979
758335
  type: ismType,
@@ -757984,19 +758340,19 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
757984
758340
  async deriveMultisigConfig(address) {
757985
758341
  const ism = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .IMultisigIsm__factory */ .jku.connect(address, this.provider);
757986
758342
  const moduleType = await ism.moduleType();
757987
- (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(moduleType === _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.MERKLE_ROOT_MULTISIG ||
757988
- moduleType === _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.MESSAGE_ID_MULTISIG, `expected module type to be ${_types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.MERKLE_ROOT_MULTISIG} or ${_types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.MESSAGE_ID_MULTISIG}, got ${moduleType}`);
757989
- let ismType = moduleType === _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.MERKLE_ROOT_MULTISIG
757990
- ? _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.MERKLE_ROOT_MULTISIG
757991
- : _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.MESSAGE_ID_MULTISIG;
758343
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__/* .assert */ .v)(moduleType === _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.MERKLE_ROOT_MULTISIG ||
758344
+ moduleType === _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.MESSAGE_ID_MULTISIG, `expected module type to be ${_types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.MERKLE_ROOT_MULTISIG} or ${_types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.MESSAGE_ID_MULTISIG}, got ${moduleType}`);
758345
+ let ismType = moduleType === _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.MERKLE_ROOT_MULTISIG
758346
+ ? _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.MERKLE_ROOT_MULTISIG
758347
+ : _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.MESSAGE_ID_MULTISIG;
757992
758348
  // If it's a zkSync chain, it must be a StorageMultisigIsm
757993
758349
  if (this.isZkSyncChain) {
757994
758350
  ismType =
757995
- moduleType === _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.MERKLE_ROOT_MULTISIG
757996
- ? _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.STORAGE_MERKLE_ROOT_MULTISIG
757997
- : _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.STORAGE_MESSAGE_ID_MULTISIG;
758351
+ moduleType === _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.MERKLE_ROOT_MULTISIG
758352
+ ? _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.STORAGE_MERKLE_ROOT_MULTISIG
758353
+ : _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.STORAGE_MESSAGE_ID_MULTISIG;
757998
758354
  }
757999
- const [validators, threshold] = await ism.validatorsAndThreshold(ethers__WEBPACK_IMPORTED_MODULE_7__.ethers.constants.AddressZero);
758355
+ const [validators, threshold] = await ism.validatorsAndThreshold(ethers__WEBPACK_IMPORTED_MODULE_8__.ethers.constants.AddressZero);
758000
758356
  return {
758001
758357
  address,
758002
758358
  type: ismType,
@@ -758006,7 +758362,7 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
758006
758362
  }
758007
758363
  async deriveNullConfig(address) {
758008
758364
  const ism = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .IInterchainSecurityModule__factory */ .Die.connect(address, this.provider);
758009
- this.assertModuleType(await ism.moduleType(), _types_js__WEBPACK_IMPORTED_MODULE_5__/* .ModuleType */ .nR.NULL);
758365
+ this.assertModuleType(await ism.moduleType(), _types_js__WEBPACK_IMPORTED_MODULE_1__/* .ModuleType */ .nR.NULL);
758010
758366
  // if it has trustedRelayer() property --> TRUSTED_RELAYER
758011
758367
  const trustedRelayerIsm = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .TrustedRelayerIsm__factory */ .tdx.connect(address, this.provider);
758012
758368
  try {
@@ -758014,25 +758370,34 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
758014
758370
  return {
758015
758371
  address,
758016
758372
  relayer,
758017
- type: _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.TRUSTED_RELAYER,
758373
+ type: _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.TRUSTED_RELAYER,
758018
758374
  };
758019
758375
  }
758020
- catch {
758376
+ catch (error) {
758377
+ (0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_7__/* .throwIfNotMissingSelector */ .KT)(error);
758021
758378
  this.logger.debug('Error accessing "trustedRelayer" property, implying this is not a Trusted Relayer ISM.', address);
758022
758379
  }
758023
758380
  // if it has paused() property --> PAUSABLE
758024
758381
  const pausableIsm = _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .PausableIsm__factory */ .fiP.connect(address, this.provider);
758025
- try {
758026
- const paused = await pausableIsm.paused();
758027
- const owner = await pausableIsm.owner();
758382
+ const [pausedResult, ownerResult] = await Promise.allSettled([
758383
+ pausableIsm.paused(),
758384
+ pausableIsm.owner(),
758385
+ ]);
758386
+ const unexpectedError = [pausedResult, ownerResult].find((result) => result.status === 'rejected' &&
758387
+ !(0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_7__/* .isMissingSelectorCallException */ .pJ)(result.reason));
758388
+ if (unexpectedError?.status === 'rejected') {
758389
+ throw unexpectedError.reason;
758390
+ }
758391
+ if (pausedResult.status === 'fulfilled' &&
758392
+ ownerResult.status === 'fulfilled') {
758028
758393
  return {
758029
758394
  address,
758030
- owner,
758031
- type: _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.PAUSABLE,
758032
- paused,
758395
+ owner: ownerResult.value,
758396
+ type: _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.PAUSABLE,
758397
+ paused: pausedResult.value,
758033
758398
  };
758034
758399
  }
758035
- catch {
758400
+ else {
758036
758401
  this.logger.debug('Error accessing "paused" property, implying this is not a Pausable ISM.', address);
758037
758402
  }
758038
758403
  // if it has ccipOrigin property --> CCIP
@@ -758045,11 +758410,12 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
758045
758410
  }
758046
758411
  return {
758047
758412
  address,
758048
- type: _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.CCIP,
758413
+ type: _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.CCIP,
758049
758414
  originChain,
758050
758415
  };
758051
758416
  }
758052
- catch {
758417
+ catch (error) {
758418
+ (0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_7__/* .throwIfNotMissingSelector */ .KT)(error);
758053
758419
  this.logger.debug('Error accessing "ccipOrigin" property, implying this is not a CCIP ISM.', address);
758054
758420
  }
758055
758421
  // if it has VERIFIED_MASK_INDEX, it's AbstractMessageIdAuthorizedIsm which means OPStackIsm
@@ -758058,12 +758424,13 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
758058
758424
  await opStackIsm.VERIFIED_MASK_INDEX();
758059
758425
  return {
758060
758426
  address,
758061
- type: _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.OP_STACK,
758427
+ type: _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.OP_STACK,
758062
758428
  origin: address,
758063
758429
  nativeBridge: '', // no way to extract native bridge from the ism
758064
758430
  };
758065
758431
  }
758066
- catch {
758432
+ catch (error) {
758433
+ (0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_7__/* .throwIfNotMissingSelector */ .KT)(error);
758067
758434
  this.logger.debug('Error accessing "VERIFIED_MASK_INDEX" property, implying this is not an OP Stack ISM.', address);
758068
758435
  }
758069
758436
  // Detect RateLimitedIsm by probing for its unique recipient() selector.
@@ -758077,19 +758444,20 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
758077
758444
  const owner = await rateLimitedIsm.owner();
758078
758445
  return {
758079
758446
  address,
758080
- type: _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.RATE_LIMITED,
758447
+ type: _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.RATE_LIMITED,
758081
758448
  recipient,
758082
758449
  maxCapacity,
758083
758450
  owner,
758084
758451
  };
758085
758452
  }
758086
- catch {
758453
+ catch (error) {
758454
+ (0,_utils_contract_js__WEBPACK_IMPORTED_MODULE_7__/* .throwIfNotMissingSelector */ .KT)(error);
758087
758455
  this.logger.debug('Error accessing "recipient" property, implying this is not a Rate Limited ISM.', address);
758088
758456
  }
758089
758457
  // no specific properties, must be Test ISM
758090
758458
  return {
758091
758459
  address,
758092
- type: _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.TEST_ISM,
758460
+ type: _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.TEST_ISM,
758093
758461
  };
758094
758462
  }
758095
758463
  async deriveArbL2ToL1Config(address) {
@@ -758099,7 +758467,7 @@ class EvmIsmReader extends _utils_HyperlaneReader_js__WEBPACK_IMPORTED_MODULE_1_
758099
758467
  const bridge = await outboxContract.bridge();
758100
758468
  return {
758101
758469
  address,
758102
- type: _types_js__WEBPACK_IMPORTED_MODULE_5__/* .IsmType */ .GO.ARB_L2_TO_L1,
758470
+ type: _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.ARB_L2_TO_L1,
758103
758471
  bridge,
758104
758472
  };
758105
758473
  }
@@ -758293,6 +758661,9 @@ class HyperlaneIsmFactory extends _app_HyperlaneApp_js__WEBPACK_IMPORTED_MODULE_
758293
758661
  case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.CCIP:
758294
758662
  contract = await this.deployCCIPIsm(destination, config);
758295
758663
  break;
758664
+ case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.OFFCHAIN_LOOKUP:
758665
+ throw new Error(`OFFCHAIN_LOOKUP ISM cannot be deployed — it must already be deployed. ` +
758666
+ `Pass its contract address as a string instead of a config object.`);
758296
758667
  case _types_js__WEBPACK_IMPORTED_MODULE_1__/* .IsmType */ .GO.INTERCHAIN_ACCOUNT_ROUTING:
758297
758668
  throw new Error('Interchain Account ISM is not supported in this context');
758298
758669
  default:
@@ -760402,6 +760773,9 @@ const RelayerAgentConfigSchema = AgentConfigSchema.extend({
760402
760773
  const ScraperAgentConfigSchema = AgentConfigSchema.extend({
760403
760774
  db: zod__WEBPACK_IMPORTED_MODULE_0__/* .string */ .Yj().min(1).describe('Database connection string'),
760404
760775
  chainsToScrape: CommaSeparatedChainList.describe('Comma separated list of chain names to scrape'),
760776
+ ccrRouters: zod__WEBPACK_IMPORTED_MODULE_0__/* .record */ .g1(zod__WEBPACK_IMPORTED_MODULE_0__/* .record */ .g1(zod__WEBPACK_IMPORTED_MODULE_0__/* .string */ .Yj()))
760777
+ .optional()
760778
+ .describe('Per-domain CCR router → underlying ERC20 token mapping. Domain ID → { router_address → token_address }. Auto-populated from registry.'),
760405
760779
  });
760406
760780
  const ValidatorAgentConfigSchema = AgentConfigSchema.extend({
760407
760781
  db: zod__WEBPACK_IMPORTED_MODULE_0__/* .string */ .Yj()
@@ -763051,6 +763425,21 @@ const DEFAULT_MAX_RETRIES = 1;
763051
763425
  const DEFAULT_BASE_RETRY_DELAY_MS = 250; // 0.25 seconds
763052
763426
  const DEFAULT_STAGGER_DELAY_MS = 1000; // 1 seconds
763053
763427
  const DEFAULT_PHASE2_WAIT_MULTIPLIER = 20;
763428
+ function getErrorMessage(error) {
763429
+ return error instanceof Error ? error.message : undefined;
763430
+ }
763431
+ function errorChainHasMessage(error, message) {
763432
+ let current = error;
763433
+ while (current instanceof Error) {
763434
+ if (getErrorMessage(current) === message)
763435
+ return true;
763436
+ current = current.cause;
763437
+ }
763438
+ return false;
763439
+ }
763440
+ function getMostDiagnosticUnhandledError(errors) {
763441
+ return (errors.find((error) => errorChainHasMessage(error, 'Invalid response from provider')) ?? errors[0]);
763442
+ }
763054
763443
  class BlockchainError extends Error {
763055
763444
  isRecoverable = false;
763056
763445
  constructor(message, options) {
@@ -763447,7 +763836,9 @@ class HyperlaneSmartProvider extends lib.providers.BaseProvider {
763447
763836
  }, 'Unhandled error case in combined provider error handler');
763448
763837
  return class extends Error {
763449
763838
  constructor() {
763450
- super(fallbackMsg);
763839
+ super(fallbackMsg, {
763840
+ cause: getMostDiagnosticUnhandledError(errors),
763841
+ });
763451
763842
  }
763452
763843
  };
763453
763844
  }
@@ -763912,11 +764303,13 @@ async function estimateTransactionFeeSolanaWeb3({ provider, transaction, }) {
763912
764303
  (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_8__/* .assert */ .v)(!value.err, `Solana gas estimation failed: ${JSON.stringify(value)}`);
763913
764304
  const gasUnits = BigInt(value.unitsConsumed || 0);
763914
764305
  const recentFees = await connection.getRecentPrioritizationFees();
763915
- const gasPrice = BigInt(recentFees[0].prioritizationFee);
764306
+ // prioritizationFee is in micro-lamports per compute unit; divide by 1e6 to get lamports
764307
+ const microLamportsPerCu = BigInt(recentFees[0]?.prioritizationFee ?? 0);
764308
+ const fee = (gasUnits * microLamportsPerCu) / 1000000n;
763916
764309
  return {
763917
764310
  gasUnits,
763918
- gasPrice,
763919
- fee: gasUnits * gasPrice,
764311
+ gasPrice: microLamportsPerCu,
764312
+ fee,
763920
764313
  };
763921
764314
  }
763922
764315
  // This is based on a reverse-engineered version of the
@@ -765041,6 +765434,8 @@ class EvmIcaTxSubmitter {
765041
765434
  chain: config.chain,
765042
765435
  destinationChain: config.destinationChain,
765043
765436
  originInterchainAccountRouter: interchainAccountRouterAddress,
765437
+ destinationInterchainAccountRouter: config.destinationInterchainAccountRouter,
765438
+ interchainSecurityModule: config.interchainSecurityModule,
765044
765439
  }, internalSubmitter, multiProvider, interchainAccountApp);
765045
765440
  }
765046
765441
  async submit(...txs) {
@@ -765068,18 +765463,28 @@ class EvmIcaTxSubmitter {
765068
765463
  return { data, to, value: value?.toString() };
765069
765464
  });
765070
765465
  const refundAddress = (0,addresses/* bytes32ToAddress */.ov)(this.config.owner);
765071
- const hookMetadata = (0,messages/* formatStandardHookMetadata */.NE)({ refundAddress });
765466
+ const icaConfig = {
765467
+ origin: this.config.chain,
765468
+ owner: this.config.owner,
765469
+ ismOverride: this.config.interchainSecurityModule,
765470
+ routerOverride: this.config.destinationInterchainAccountRouter,
765471
+ localRouter: this.config.originInterchainAccountRouter,
765472
+ };
765473
+ const gasLimit = await this.interchainAccountApp.estimateIcaHandleGas({
765474
+ origin: this.config.chain,
765475
+ destination: this.config.destinationChain,
765476
+ innerCalls,
765477
+ config: icaConfig,
765478
+ });
765479
+ const hookMetadata = (0,messages/* formatStandardHookMetadata */.NE)({
765480
+ refundAddress,
765481
+ gasLimit: gasLimit.toBigInt(),
765482
+ });
765072
765483
  const icaTx = await this.interchainAccountApp.getCallRemote({
765073
765484
  chain: this.config.chain,
765074
765485
  destination: this.config.destinationChain,
765075
765486
  innerCalls,
765076
- config: {
765077
- origin: this.config.chain,
765078
- owner: this.config.owner,
765079
- ismOverride: this.config.interchainSecurityModule,
765080
- routerOverride: this.config.destinationInterchainAccountRouter,
765081
- localRouter: this.config.originInterchainAccountRouter,
765082
- },
765487
+ config: icaConfig,
765083
765488
  hookMetadata,
765084
765489
  });
765085
765490
  return this.submitter.submit({
@@ -799885,34 +800290,70 @@ var index_default = SafeApiKit_default;
799885
800290
 
799886
800291
  const SAFE_API_RETRIES = 10;
799887
800292
  const SAFE_API_BASE_RETRY_MS = 1000;
800293
+ function isSafeApiKitConstructor(value) {
800294
+ return typeof value === 'function';
800295
+ }
799888
800296
  function safeApiKeyRequired(txServiceUrl) {
799889
800297
  return /safe\.global|5afe\.dev/.test(txServiceUrl);
799890
800298
  }
800299
+ function normalizeSafeTxServiceUrl(txServiceUrl) {
800300
+ const trimmedUrl = txServiceUrl.replace(/\/+$/, '');
800301
+ if (trimmedUrl.endsWith('/api'))
800302
+ return trimmedUrl;
800303
+ return `${trimmedUrl}/api`;
800304
+ }
800305
+ function isSafeGlobalTxServiceUrl(txServiceUrl) {
800306
+ try {
800307
+ const url = new URL(normalizeSafeTxServiceUrl(txServiceUrl));
800308
+ return (['api.safe.global', 'api.5afe.dev'].includes(url.hostname) &&
800309
+ /^\/tx-service\/[^/]+\/api$/.test(url.pathname));
800310
+ }
800311
+ catch {
800312
+ return false;
800313
+ }
800314
+ }
800315
+ function getSafeApiKitConfig(chainId, txServiceUrl, gnosisSafeApiKey) {
800316
+ const normalizedTxServiceUrl = normalizeSafeTxServiceUrl(txServiceUrl);
800317
+ const apiKey = safeApiKeyRequired(normalizedTxServiceUrl)
800318
+ ? gnosisSafeApiKey
800319
+ : undefined;
800320
+ const baseConfig = {
800321
+ chainId: BigInt(chainId),
800322
+ apiKey,
800323
+ };
800324
+ // Safe's hosted gateway authenticates API-key traffic correctly when API Kit
800325
+ // derives the service URL from chainId. Supplying txServiceUrl can hit lower
800326
+ // unauthenticated rate limits on some endpoints.
800327
+ if (apiKey && isSafeGlobalTxServiceUrl(normalizedTxServiceUrl)) {
800328
+ return baseConfig;
800329
+ }
800330
+ return {
800331
+ ...baseConfig,
800332
+ txServiceUrl: normalizedTxServiceUrl,
800333
+ };
800334
+ }
799891
800335
  function getSafeService(chain, multiProvider) {
799892
800336
  const { gnosisSafeTransactionServiceUrl, gnosisSafeApiKey } = multiProvider.getChainMetadata(chain);
799893
- let txServiceUrl = gnosisSafeTransactionServiceUrl;
799894
- if (!txServiceUrl) {
799895
- throw new Error(`must provide tx service url for ${chain}`);
799896
- }
799897
- // Ensure txServiceUrl ends with /api
799898
- if (!txServiceUrl.endsWith('/api') &&
799899
- !txServiceUrl.endsWith('/api/') &&
799900
- !txServiceUrl.endsWith('api')) {
799901
- // Remove trailing slash if present to avoid double slashes
799902
- txServiceUrl = txServiceUrl.replace(/\/+$/, '');
799903
- txServiceUrl = `${txServiceUrl}/api`;
799904
- }
800337
+ (0,validation/* assert */.v)(gnosisSafeTransactionServiceUrl, `must provide tx service url for ${chain}`);
799905
800338
  const chainId = multiProvider.getEvmChainId(chain);
799906
- if (!chainId) {
799907
- throw new Error(`Chain is not an EVM chain: ${chain}`);
800339
+ (0,validation/* assert */.v)(chainId, `Chain is not an EVM chain: ${chain}`);
800340
+ const config = getSafeApiKitConfig(chainId, gnosisSafeTransactionServiceUrl, gnosisSafeApiKey);
800341
+ (0,validation/* assert */.v)(isSafeApiKitConstructor(index_default), '@safe-global/api-kit default export is not a constructor');
800342
+ try {
800343
+ return new index_default(config);
800344
+ }
800345
+ catch (error) {
800346
+ if (error instanceof TypeError &&
800347
+ error.message.includes('There is no transaction service available for chainId') &&
800348
+ !config.txServiceUrl &&
800349
+ isSafeGlobalTxServiceUrl(gnosisSafeTransactionServiceUrl)) {
800350
+ return new index_default({
800351
+ ...config,
800352
+ txServiceUrl: normalizeSafeTxServiceUrl(gnosisSafeTransactionServiceUrl),
800353
+ });
800354
+ }
800355
+ throw error;
799908
800356
  }
799909
- // @ts-ignore
799910
- return new index_default({
799911
- chainId: BigInt(chainId),
799912
- txServiceUrl,
799913
- // Only provide apiKey if the url contains safe.global or 5afe.dev
799914
- apiKey: safeApiKeyRequired(txServiceUrl) ? gnosisSafeApiKey : undefined,
799915
- });
799916
800357
  }
799917
800358
  // This is the version of the Safe contracts that the SDK is compatible with.
799918
800359
  // Copied the MVP fields from https://github.com/safe-global/safe-core-sdk/blob/4d1c0e14630f951c2498e1d4dd521403af91d6e1/packages/protocol-kit/src/contracts/config.ts#L19
@@ -800013,7 +800454,13 @@ async function canProposeSafeTransactions(proposer, chain, multiProvider, safeAd
800013
800454
  try {
800014
800455
  safeService = getSafeService(chain, multiProvider);
800015
800456
  }
800016
- catch {
800457
+ catch (e) {
800458
+ logging/* rootLogger */.Jk.error('Failed to get Safe service for chain', {
800459
+ chain,
800460
+ chainName: multiProvider.tryGetChainName(chain),
800461
+ knownChains: multiProvider.getKnownChainNames(),
800462
+ error: e,
800463
+ });
800017
800464
  return false;
800018
800465
  }
800019
800466
  const safe = await getSafe(chain, multiProvider, safeAddress);
@@ -801730,7 +802177,7 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
801730
802177
  /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
801731
802178
  /* harmony export */ N: () => (/* binding */ EvmWarpModule)
801732
802179
  /* harmony export */ });
801733
- /* harmony import */ var compare_versions__WEBPACK_IMPORTED_MODULE_29__ = __nccwpck_require__(95416);
802180
+ /* harmony import */ var compare_versions__WEBPACK_IMPORTED_MODULE_31__ = __nccwpck_require__(95416);
801734
802181
  /* harmony import */ var ethers__WEBPACK_IMPORTED_MODULE_21__ = __nccwpck_require__(61934);
801735
802182
  /* harmony import */ var starknet__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(98954);
801736
802183
  /* harmony import */ var _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(50653);
@@ -801742,26 +802189,28 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
801742
802189
  /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_16__ = __nccwpck_require__(52193);
801743
802190
  /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__ = __nccwpck_require__(73689);
801744
802191
  /* harmony import */ var _block_explorer_etherscan_js__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(26492);
801745
- /* harmony import */ var _contracts_contracts_js__WEBPACK_IMPORTED_MODULE_26__ = __nccwpck_require__(15570);
802192
+ /* harmony import */ var _contracts_contracts_js__WEBPACK_IMPORTED_MODULE_28__ = __nccwpck_require__(15570);
801746
802193
  /* harmony import */ var _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(53387);
801747
802194
  /* harmony import */ var _deploy_proxy_js__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(83697);
801748
802195
  /* harmony import */ var _deploy_verify_ContractVerifier_js__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(76939);
801749
802196
  /* harmony import */ var _fee_EvmTokenFeeModule_js__WEBPACK_IMPORTED_MODULE_25__ = __nccwpck_require__(43313);
802197
+ /* harmony import */ var _fee_crossCollateralUtils_js__WEBPACK_IMPORTED_MODULE_27__ = __nccwpck_require__(66630);
802198
+ /* harmony import */ var _fee_types_js__WEBPACK_IMPORTED_MODULE_26__ = __nccwpck_require__(52555);
801750
802199
  /* harmony import */ var _hook_updates_js__WEBPACK_IMPORTED_MODULE_20__ = __nccwpck_require__(69203);
801751
802200
  /* harmony import */ var _hook_utils_js__WEBPACK_IMPORTED_MODULE_19__ = __nccwpck_require__(13912);
801752
802201
  /* 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);
802202
+ /* harmony import */ var _ism_EvmIsmModule_js__WEBPACK_IMPORTED_MODULE_29__ = __nccwpck_require__(3612);
801754
802203
  /* harmony import */ var _predicate_PredicateDeployer_js__WEBPACK_IMPORTED_MODULE_23__ = __nccwpck_require__(550);
801755
802204
  /* 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);
802205
+ /* harmony import */ var _utils_decimals_js__WEBPACK_IMPORTED_MODULE_32__ = __nccwpck_require__(27043);
801757
802206
  /* harmony import */ var _ism_types_js__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(69352);
801758
802207
  /* harmony import */ var _utils_ism_js__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(764);
801759
802208
  /* harmony import */ var _EvmWarpRouteReader_js__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(40945);
801760
802209
  /* 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);
802210
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_30__ = __nccwpck_require__(4169);
801762
802211
  /* 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);
802212
+ /* harmony import */ var _contracts_js__WEBPACK_IMPORTED_MODULE_34__ = __nccwpck_require__(81504);
802213
+ /* harmony import */ var _deploy_js__WEBPACK_IMPORTED_MODULE_33__ = __nccwpck_require__(19186);
801765
802214
  /* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(38466);
801766
802215
  var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_EvmXERC20Module_js__WEBPACK_IMPORTED_MODULE_13__]);
801767
802216
  _EvmXERC20Module_js__WEBPACK_IMPORTED_MODULE_13__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
@@ -801791,6 +802240,8 @@ _EvmXERC20Module_js__WEBPACK_IMPORTED_MODULE_13__ = (__webpack_async_dependencie
801791
802240
 
801792
802241
 
801793
802242
 
802243
+
802244
+
801794
802245
 
801795
802246
 
801796
802247
 
@@ -802623,6 +803074,16 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802623
803074
  */
802624
803075
  async createTokenFeeUpdateTxs(actualConfig, expectedConfig, tokenReaderParams) {
802625
803076
  if (!expectedConfig.tokenFee) {
803077
+ if (actualConfig.tokenFee) {
803078
+ return [
803079
+ {
803080
+ annotation: 'Removing fee recipient...',
803081
+ chainId: this.chainId,
803082
+ to: this.args.addresses.deployedTokenRoute,
803083
+ data: _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_1__/* .TokenRouter__factory */ .NgW.createInterface().encodeFunctionData('setFeeRecipient(address)', [ethers__WEBPACK_IMPORTED_MODULE_21__.constants.AddressZero]),
803084
+ },
803085
+ ];
803086
+ }
802626
803087
  return [];
802627
803088
  }
802628
803089
  const routerAddress = this.args.addresses.deployedTokenRoute;
@@ -802670,7 +803131,21 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802670
803131
  deployedFee: currentTokenFee.address,
802671
803132
  },
802672
803133
  }, this.contractVerifier);
802673
- const updateTransactions = await tokenFeeModule.update(resolvedTokenFee, tokenReaderParams);
803134
+ // For CCR fee updates, forward the on-chain enrolled router keys as hints so the
803135
+ // reader can observe orphan feeContracts entries not present in the target config.
803136
+ // Without these hints, the removal loop in EvmTokenFeeModule.update() never sees
803137
+ // stale (dest, router) entries and the on-chain pointer stays wired.
803138
+ let effectiveTokenReaderParams = tokenReaderParams;
803139
+ if ((0,_types_js__WEBPACK_IMPORTED_MODULE_12__/* .isCrossCollateralTokenConfig */ .v3)(actualConfig) &&
803140
+ actualConfig.crossCollateralRouters &&
803141
+ resolvedTokenFee.type === _fee_types_js__WEBPACK_IMPORTED_MODULE_26__/* .TokenFeeType */ .cA.CrossCollateralRoutingFee) {
803142
+ const onchainRoutersByDomain = (0,_router_types_js__WEBPACK_IMPORTED_MODULE_17__/* .resolveRouterMapConfig */ .c0)(this.multiProvider, actualConfig.crossCollateralRouters);
803143
+ effectiveTokenReaderParams = {
803144
+ ...tokenReaderParams,
803145
+ crossCollateralRouters: (0,_fee_crossCollateralUtils_js__WEBPACK_IMPORTED_MODULE_27__/* .mergeCrossCollateralRouters */ .wC)(tokenReaderParams?.crossCollateralRouters, onchainRoutersByDomain),
803146
+ };
803147
+ }
803148
+ const updateTransactions = await tokenFeeModule.update(resolvedTokenFee, effectiveTokenReaderParams);
802674
803149
  const { deployedFee } = tokenFeeModule.serialize();
802675
803150
  // Only call setFeeRecipient if the fee recipient address has changed
802676
803151
  if (!(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .eqAddress */ .fv)(currentTokenFee.address, deployedFee)) {
@@ -802691,7 +803166,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802691
803166
  * @returns Ethereum transaction that need to be executed to update the owner.
802692
803167
  */
802693
803168
  createOwnershipUpdateTxs(actualConfig, expectedConfig) {
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`);
803169
+ return (0,_contracts_contracts_js__WEBPACK_IMPORTED_MODULE_28__/* .transferOwnershipTransactions */ .Yg)(this.multiProvider.getEvmChainId(this.args.chain), this.args.addresses.deployedTokenRoute, actualConfig, expectedConfig, `${expectedConfig.type} Warp Route`);
802695
803170
  }
802696
803171
  /**
802697
803172
  * Updates or deploys the ISM using the provided configuration.
@@ -802727,7 +803202,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802727
803202
  (typeof onChainOwner === 'string' ? onChainOwner : undefined);
802728
803203
  expectedIsm = (0,_utils_ism_js__WEBPACK_IMPORTED_MODULE_11__/* .setRateLimitedIsmRecipient */ .re)(expectedIsm, this.args.addresses.deployedTokenRoute, defaultOwner);
802729
803204
  }
802730
- const ismModule = new _ism_EvmIsmModule_js__WEBPACK_IMPORTED_MODULE_27__/* .EvmIsmModule */ .a(this.multiProvider, {
803205
+ const ismModule = new _ism_EvmIsmModule_js__WEBPACK_IMPORTED_MODULE_29__/* .EvmIsmModule */ .a(this.multiProvider, {
802731
803206
  chain: this.args.chain,
802732
803207
  config: actualConfig.interchainSecurityModule,
802733
803208
  addresses: {
@@ -802750,15 +803225,15 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802750
803225
  */
802751
803226
  async upgradeWarpRouteImplementationTx(actualConfig, expectedConfig) {
802752
803227
  const updateTransactions = [];
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');
802754
- // This should be impossible since we try catch the call to `PACKAGE_VERSION`
802755
- // in `EvmWarpRouteReader.fetchPackageVersion`
803228
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)(expectedConfig.type !== _config_js__WEBPACK_IMPORTED_MODULE_30__/* .TokenType */ .ks.unknown, 'Cannot upgrade warp route with unknown token type');
803229
+ // Older contracts without PACKAGE_VERSION fall back to a legacy version in
803230
+ // EvmWarpRouteReader.fetchPackageVersion.
802756
803231
  (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)(actualConfig.contractVersion, 'Actual contract version is undefined');
802757
803232
  // Only upgrade if the user specifies a version
802758
803233
  if (!expectedConfig.contractVersion) {
802759
803234
  return [];
802760
803235
  }
802761
- const comparisonValue = (0,compare_versions__WEBPACK_IMPORTED_MODULE_29__.compareVersions)(expectedConfig.contractVersion, actualConfig.contractVersion);
803236
+ const comparisonValue = (0,compare_versions__WEBPACK_IMPORTED_MODULE_31__.compareVersions)(expectedConfig.contractVersion, actualConfig.contractVersion);
802762
803237
  // Expected version is lower than actual version, no upgrade is possible
802763
803238
  if (comparisonValue === -1) {
802764
803239
  throw new Error(`Expected contract version ${expectedConfig.contractVersion} is lower than actual contract version ${actualConfig.contractVersion}`);
@@ -802773,13 +803248,13 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802773
803248
  // Scale values are immutables baked into the implementation bytecode.
802774
803249
  // Changing the effective scale during an upgrade would cause in-flight
802775
803250
  // messages to be decoded with incorrect scaling.
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. ` +
803251
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_15__/* .assert */ .v)((0,_utils_decimals_js__WEBPACK_IMPORTED_MODULE_32__/* .scalesEqual */ .gm)(actualConfig.scale, expectedConfig.scale), `Scale change detected during upgrade. ` +
802777
803252
  `Changing scale on an existing deployment may cause in-flight messages to be decoded incorrectly.`);
802778
803253
  this.logger.info(`Upgrading Warp Route implementation on ${this.args.chain} from ${actualConfig.contractVersion} to ${expectedConfig.contractVersion}`);
802779
- const deployer = new _deploy_js__WEBPACK_IMPORTED_MODULE_31__/* .HypERC20Deployer */ .A7(this.multiProvider);
803254
+ const deployer = new _deploy_js__WEBPACK_IMPORTED_MODULE_33__/* .HypERC20Deployer */ .A7(this.multiProvider);
802780
803255
  const constructorArgs = await deployer.constructorArgs(this.chainName, expectedConfig);
802781
803256
  const tokenType = expectedConfig.type;
802782
- const implementation = await deployer.deployContractWithName(this.chainName, tokenType, _contracts_js__WEBPACK_IMPORTED_MODULE_32__/* .hypERC20contracts */ .LW[tokenType], constructorArgs, undefined, false);
803257
+ const implementation = await deployer.deployContractWithName(this.chainName, tokenType, _contracts_js__WEBPACK_IMPORTED_MODULE_34__/* .hypERC20contracts */ .LW[tokenType], constructorArgs, undefined, false);
802783
803258
  const provider = this.multiProvider.getProvider(this.domainId);
802784
803259
  const proxyAddress = this.args.addresses.deployedTokenRoute;
802785
803260
  const proxyAdminAddress = await (0,_deploy_proxy_js__WEBPACK_IMPORTED_MODULE_14__/* .proxyAdmin */ .Ey)(provider, proxyAddress);
@@ -802808,9 +803283,9 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802808
803283
  // proxy upgrade. Always emit setMaxFeePpm in this case.
802809
803284
  const crossingPpmBoundary = actualConfig.contractVersion &&
802810
803285
  expectedConfig.contractVersion &&
802811
- (0,compare_versions__WEBPACK_IMPORTED_MODULE_29__.compareVersions)(actualConfig.contractVersion, _EvmWarpRouteReader_js__WEBPACK_IMPORTED_MODULE_7__/* .CCTP_PPM_STORAGE_VERSION */ .EY) <
803286
+ (0,compare_versions__WEBPACK_IMPORTED_MODULE_31__.compareVersions)(actualConfig.contractVersion, _EvmWarpRouteReader_js__WEBPACK_IMPORTED_MODULE_7__/* .CCTP_PPM_STORAGE_VERSION */ .EY) <
802812
803287
  0 &&
802813
- (0,compare_versions__WEBPACK_IMPORTED_MODULE_29__.compareVersions)(expectedConfig.contractVersion, _EvmWarpRouteReader_js__WEBPACK_IMPORTED_MODULE_7__/* .CCTP_PPM_STORAGE_VERSION */ .EY) >= 0;
803288
+ (0,compare_versions__WEBPACK_IMPORTED_MODULE_31__.compareVersions)(expectedConfig.contractVersion, _EvmWarpRouteReader_js__WEBPACK_IMPORTED_MODULE_7__/* .CCTP_PPM_STORAGE_VERSION */ .EY) >= 0;
802814
803289
  if (!crossingPpmBoundary && actualMaxFeeBps === expectedConfig.maxFeeBps) {
802815
803290
  return [];
802816
803291
  }
@@ -802835,7 +803310,7 @@ class EvmWarpModule extends _core_AbstractHyperlaneModule_js__WEBPACK_IMPORTED_M
802835
803310
  static async create(params) {
802836
803311
  const { chain, config, multiProvider, ccipContractCache, contractVerifier, proxyFactoryFactories, } = params;
802837
803312
  const chainName = multiProvider.getChainName(chain);
802838
- const deployer = new _deploy_js__WEBPACK_IMPORTED_MODULE_31__/* .HypERC20Deployer */ .A7(multiProvider);
803313
+ const deployer = new _deploy_js__WEBPACK_IMPORTED_MODULE_33__/* .HypERC20Deployer */ .A7(multiProvider);
802839
803314
  const deployedContracts = await deployer.deployContracts(chainName, config);
802840
803315
  const warpModule = new EvmWarpModule(multiProvider, {
802841
803316
  addresses: {
@@ -802952,6 +803427,8 @@ var types = __nccwpck_require__(52116);
802952
803427
  var EvmIsmReader = __nccwpck_require__(60715);
802953
803428
  // EXTERNAL MODULE: ../sdk/dist/router/EvmRouterReader.js
802954
803429
  var EvmRouterReader = __nccwpck_require__(26623);
803430
+ // EXTERNAL MODULE: ../sdk/dist/utils/contract.js
803431
+ var contract = __nccwpck_require__(76709);
802955
803432
  // EXTERNAL MODULE: ../sdk/dist/deploy/proxy.js
802956
803433
  var proxy = __nccwpck_require__(83697);
802957
803434
  // EXTERNAL MODULE: ../sdk/dist/token/config.js
@@ -802980,6 +803457,7 @@ var xerc20 = __nccwpck_require__(32892);
802980
803457
 
802981
803458
 
802982
803459
 
803460
+
802983
803461
  const REBALANCING_CONTRACT_VERSION = '8.0.0';
802984
803462
  const TOKEN_FEE_CONTRACT_VERSION = '10.0.0';
802985
803463
  // version that introduced the fractional scale interface
@@ -803130,7 +803608,7 @@ class EvmWarpRouteReader extends EvmRouterReader/* EvmRouterReader */.V {
803130
803608
  'interchainSecurityModule' in routerConfig) {
803131
803609
  routerConfig.interchainSecurityModule = lib.constants.AddressZero;
803132
803610
  }
803133
- const predicateWrapper = await this.derivePredicateWrapperConfig(routerConfig.hook);
803611
+ const predicateWrapper = await this.derivePredicateWrapperConfig(routerConfig.hook, warpRouteAddress);
803134
803612
  const derivedConfig = {
803135
803613
  ...routerConfig,
803136
803614
  ...tokenConfig,
@@ -803146,9 +803624,38 @@ class EvmWarpRouteReader extends EvmRouterReader/* EvmRouterReader */.V {
803146
803624
  /**
803147
803625
  * Searches the derived hook tree for a PredicateRouterWrapper and, if found,
803148
803626
  * reads its on-chain config (registry, policyId, owner).
803627
+ *
803628
+ * EvmHookReader.preserveUnredeployable() stores PREDICATE sub-hooks as bare address
803629
+ * strings (to survive normalizeConfig and deploy's string branch). The sync
803630
+ * findPredicateAddressInHook() returns undefined for bare strings, so we fall back to
803631
+ * an on-chain hookType() probe on bare string sub-hooks of aggregation hooks.
803149
803632
  */
803150
- async derivePredicateWrapperConfig(hook) {
803151
- const predicateAddress = this.findPredicateAddressInHook(hook);
803633
+ async derivePredicateWrapperConfig(hook, warpRouteAddress) {
803634
+ let predicateAddress = this.findPredicateAddressInHook(hook);
803635
+ if (!predicateAddress &&
803636
+ typeof hook !== 'string' &&
803637
+ hook?.type === types/* HookType */.WD.AGGREGATION) {
803638
+ for (const sub of hook.hooks) {
803639
+ if (typeof sub !== 'string')
803640
+ continue;
803641
+ try {
803642
+ const candidate = dist/* PredicateRouterWrapper__factory */.sYb.connect(sub, this.provider);
803643
+ const [hookType, warpRoute] = await Promise.all([
803644
+ candidate.hookType(),
803645
+ candidate.warpRoute(),
803646
+ ]);
803647
+ if (hookType === types/* OnchainHookType */.c0.PREDICATE_ROUTER_WRAPPER &&
803648
+ (0,addresses/* eqAddress */.fv)(warpRoute, warpRouteAddress)) {
803649
+ predicateAddress = sub;
803650
+ break;
803651
+ }
803652
+ }
803653
+ catch (error) {
803654
+ (0,contract/* throwIfNotMissingSelector */.KT)(error);
803655
+ // Not a PredicateRouterWrapper — continue
803656
+ }
803657
+ }
803658
+ }
803152
803659
  if (!predicateAddress)
803153
803660
  return undefined;
803154
803661
  const wrapper = dist/* PredicateRouterWrapper__factory */.sYb.connect(predicateAddress, this.provider);
@@ -803178,6 +803685,7 @@ class EvmWarpRouteReader extends EvmRouterReader/* EvmRouterReader */.V {
803178
803685
  const [packageVersion, tokenFee] = await Promise.all([
803179
803686
  this.fetchPackageVersion(routerAddress),
803180
803687
  TokenRouter.feeRecipient().catch((error) => {
803688
+ (0,contract/* throwIfNotMissingSelector */.KT)(error);
803181
803689
  this.logger.debug(`Failed to read feeRecipient for token at address "${routerAddress}" on chain "${this.chain}", defaulting to AddressZero`, error);
803182
803690
  return lib.constants.AddressZero;
803183
803691
  }),
@@ -803193,6 +803701,7 @@ class EvmWarpRouteReader extends EvmRouterReader/* EvmRouterReader */.V {
803193
803701
  }
803194
803702
  const routingDestinations = destinations ??
803195
803703
  (await TokenRouter.domains().catch((error) => {
803704
+ (0,contract/* throwIfNotMissingSelector */.KT)(error);
803196
803705
  this.logger.debug(`Failed to derive token router domains for routing fee config on "${this.chain}"`, error);
803197
803706
  return undefined;
803198
803707
  }));
@@ -803363,6 +803872,7 @@ class EvmWarpRouteReader extends EvmRouterReader/* EvmRouterReader */.V {
803363
803872
  return token_config/* TokenType */.ks.XERC20;
803364
803873
  }
803365
803874
  catch (error) {
803875
+ (0,contract/* throwIfNotMissingSelector */.KT)(error);
803366
803876
  this.logger.debug(`Warp route token at address "${warpRouteAddress}" on chain "${this.chain}" is not a ${token_config/* TokenType */.ks.XERC20}`, error);
803367
803877
  }
803368
803878
  try {
@@ -803396,6 +803906,7 @@ class EvmWarpRouteReader extends EvmRouterReader/* EvmRouterReader */.V {
803396
803906
  return everclearTokenType;
803397
803907
  }
803398
803908
  catch (error) {
803909
+ (0,contract/* throwIfNotMissingSelector */.KT)(error);
803399
803910
  this.logger.debug(`Warp route token at address "${warpRouteAddress}" on chain "${this.chain}" is not a ${token_config/* TokenType */.ks.collateralEverclear}`, error);
803400
803911
  }
803401
803912
  try {
@@ -803404,12 +803915,14 @@ class EvmWarpRouteReader extends EvmRouterReader/* EvmRouterReader */.V {
803404
803915
  return token_config/* TokenType */.ks.crossCollateral;
803405
803916
  }
803406
803917
  catch (error) {
803918
+ (0,contract/* throwIfNotMissingSelector */.KT)(error);
803407
803919
  this.logger.debug(`Warp route token at address "${warpRouteAddress}" on chain "${this.chain}" is not a ${token_config/* TokenType */.ks.crossCollateral}`, error);
803408
803920
  }
803409
803921
  }
803410
803922
  return tokenType;
803411
803923
  }
803412
- catch {
803924
+ catch (error) {
803925
+ (0,contract/* throwIfNotMissingSelector */.KT)(error);
803413
803926
  continue;
803414
803927
  }
803415
803928
  }
@@ -803477,13 +803990,21 @@ class EvmWarpRouteReader extends EvmRouterReader/* EvmRouterReader */.V {
803477
803990
  'function bufferCap(address) external view returns (uint112)',
803478
803991
  ];
803479
803992
  const xERC20 = new lib.Contract(xERC20Address, rateLimitsABI, this.provider);
803993
+ let extraBridgesLimits;
803480
803994
  try {
803481
- const extraBridgesLimits = await (0,xerc20/* getExtraLockBoxConfigs */.g5)({
803995
+ extraBridgesLimits = await (0,xerc20/* getExtraLockBoxConfigs */.g5)({
803482
803996
  chain: this.chain,
803483
803997
  multiProvider: this.multiProvider,
803484
803998
  xERC20Address,
803485
803999
  logger: this.logger,
803486
804000
  });
804001
+ }
804002
+ catch (error) {
804003
+ if (!(0,contract/* isMissingSelectorCallException */.pJ)(error))
804004
+ throw error;
804005
+ this.logger.warn(`Skipping extra xERC20 lockbox configs after missing-selector error for token at ${xERC20Address} on chain ${this.chain}`, error);
804006
+ }
804007
+ try {
803487
804008
  // TODO: fix this such that it fetches from WL's values too
803488
804009
  return {
803489
804010
  xERC20: {
@@ -803492,13 +804013,17 @@ class EvmWarpRouteReader extends EvmRouterReader/* EvmRouterReader */.V {
803492
804013
  rateLimitPerSecond: (await xERC20.rateLimitPerSecond(warpRouteAddress)).toString(),
803493
804014
  bufferCap: (await xERC20.bufferCap(warpRouteAddress)).toString(),
803494
804015
  },
803495
- extraBridges: extraBridgesLimits.length > 0 ? extraBridgesLimits : undefined,
804016
+ extraBridges: extraBridgesLimits && extraBridgesLimits.length > 0
804017
+ ? extraBridgesLimits
804018
+ : undefined,
803496
804019
  },
803497
804020
  };
803498
804021
  }
803499
804022
  catch (error) {
804023
+ if ((0,contract/* isMissingSelectorCallException */.pJ)(error))
804024
+ return {};
803500
804025
  this.logger.error(`Error fetching xERC20 limits for token at ${xERC20Address} on chain ${this.chain}`, error);
803501
- return {};
804026
+ throw error;
803502
804027
  }
803503
804028
  }
803504
804029
  /**
@@ -803921,7 +804446,7 @@ class EvmWarpRouteReader extends EvmRouterReader/* EvmRouterReader */.V {
803921
804446
  return await contractWithVersion.PACKAGE_VERSION();
803922
804447
  }
803923
804448
  catch (err) {
803924
- if (err.cause?.code && err.cause?.code === 'CALL_EXCEPTION') {
804449
+ if ((0,contract/* isMissingSelectorCallException */.pJ)(err)) {
803925
804450
  // PACKAGE_VERSION was introduced in @hyperlane-xyz/core@5.4.0
803926
804451
  // See https://github.com/hyperlane-xyz/hyperlane-monorepo/releases/tag/%40hyperlane-xyz%2Fcore%405.4.0
803927
804452
  // The real version of a contract without this function is below 5.4.0
@@ -803929,7 +804454,7 @@ class EvmWarpRouteReader extends EvmRouterReader/* EvmRouterReader */.V {
803929
804454
  }
803930
804455
  else {
803931
804456
  this.logger.error(`Error when fetching package version ${err}`);
803932
- return '0.0.0';
804457
+ throw err;
803933
804458
  }
803934
804459
  }
803935
804460
  }
@@ -804887,6 +805412,7 @@ class TokenMetadata {
804887
805412
  /* harmony export */ Zz: () => (/* binding */ PROTOCOL_TO_HYP_NATIVE_STANDARD),
804888
805413
  /* harmony export */ _T: () => (/* binding */ tokenTypeToStandard),
804889
805414
  /* harmony export */ c_: () => (/* binding */ LOCKBOX_STANDARDS),
805415
+ /* harmony export */ eB: () => (/* binding */ ERC4626_COLLATERAL_STANDARDS),
804890
805416
  /* harmony export */ kK: () => (/* binding */ TOKEN_CROSS_COLLATERAL_STANDARDS),
804891
805417
  /* harmony export */ ph: () => (/* binding */ TokenStandard),
804892
805418
  /* harmony export */ ro: () => (/* binding */ TOKEN_STANDARD_TO_PROVIDER_TYPE)
@@ -805077,6 +805603,7 @@ const TOKEN_NFT_STANDARDS = [
805077
805603
  const TOKEN_COLLATERALIZED_STANDARDS = [
805078
805604
  TokenStandard.EvmHypCollateral,
805079
805605
  TokenStandard.EvmHypOwnerCollateral,
805606
+ TokenStandard.EvmHypRebaseCollateral,
805080
805607
  TokenStandard.EvmHypNative,
805081
805608
  TokenStandard.SealevelHypCollateral,
805082
805609
  TokenStandard.SealevelHypNative,
@@ -805089,6 +805616,8 @@ const TOKEN_COLLATERALIZED_STANDARDS = [
805089
805616
  TokenStandard.AleoHypCollateral,
805090
805617
  TokenStandard.TronHypNative,
805091
805618
  TokenStandard.TronHypCollateral,
805619
+ TokenStandard.TronHypOwnerCollateral,
805620
+ TokenStandard.TronHypRebaseCollateral,
805092
805621
  TokenStandard.TronHypXERC20Lockbox,
805093
805622
  TokenStandard.TronHypVSXERC20Lockbox,
805094
805623
  TokenStandard.RadixHypCollateral,
@@ -805119,6 +805648,12 @@ const LOCKBOX_STANDARDS = [
805119
805648
  TokenStandard.TronHypXERC20Lockbox,
805120
805649
  TokenStandard.TronHypVSXERC20Lockbox,
805121
805650
  ];
805651
+ const ERC4626_COLLATERAL_STANDARDS = [
805652
+ TokenStandard.EvmHypOwnerCollateral,
805653
+ TokenStandard.EvmHypRebaseCollateral,
805654
+ TokenStandard.TronHypOwnerCollateral,
805655
+ TokenStandard.TronHypRebaseCollateral,
805656
+ ];
805122
805657
  const MINT_LIMITED_STANDARDS = [
805123
805658
  TokenStandard.EvmHypXERC20,
805124
805659
  TokenStandard.EvmHypXERC20Lockbox,
@@ -806131,6 +806666,7 @@ __nccwpck_require__.d(__webpack_exports__, {
806131
806666
  u$: () => (/* binding */ EvmHypCollateralAdapter),
806132
806667
  OR: () => (/* binding */ EvmHypCollateralFiatAdapter),
806133
806668
  uc: () => (/* binding */ EvmHypNativeAdapter),
806669
+ dv: () => (/* binding */ EvmHypOwnerCollateralAdapter),
806134
806670
  aT: () => (/* binding */ EvmHypRebaseCollateralAdapter),
806135
806671
  Qn: () => (/* binding */ EvmHypSyntheticAdapter),
806136
806672
  kL: () => (/* binding */ EvmHypSyntheticRebaseAdapter),
@@ -806412,14 +806948,17 @@ class EvmHypSyntheticAdapter extends EvmTokenAdapter {
806412
806948
  return await this.contract.PACKAGE_VERSION();
806413
806949
  }
806414
806950
  catch (err) {
806415
- // PACKAGE_VERSION was introduced in v5.4.0
806951
+ if ((0,contract/* isMissingSelectorCallException */.pJ)(err)) {
806952
+ // PACKAGE_VERSION was introduced in v5.4.0
806953
+ return '5.3.9';
806954
+ }
806416
806955
  this.logger.error(`Error when fetching package version ${err}`);
806417
- return '5.3.9';
806956
+ throw err;
806418
806957
  }
806419
806958
  }
806420
806959
  async quoteTransferRemoteGas({ destination, recipient, amount, }) {
806421
806960
  const contractVersion = await this.getContractPackageVersion();
806422
- const hasQuoteTransferRemote = (0,contract/* isValidContractVersion */.j)(contractVersion, TOKEN_FEE_CONTRACT_VERSION);
806961
+ const hasQuoteTransferRemote = (0,contract/* isValidContractVersion */.jh)(contractVersion, TOKEN_FEE_CONTRACT_VERSION);
806423
806962
  // Version does not support quoteTransferRemote defaulting to quoteGasPayment
806424
806963
  if (!hasQuoteTransferRemote) {
806425
806964
  const gasPayment = await this.contract.quoteGasPayment(destination);
@@ -806692,7 +807231,8 @@ class EvmHypCollateralFiatAdapter extends EvmHypCollateralAdapter {
806692
807231
  const limit = await fiatToken.minterAllowance(this.addresses.token);
806693
807232
  return limit.toBigInt();
806694
807233
  }
806695
- catch {
807234
+ catch (error) {
807235
+ (0,contract/* throwIfNotMissingSelector */.KT)(error);
806696
807236
  return UIN256_MAX_VALUE;
806697
807237
  }
806698
807238
  }
@@ -806715,8 +807255,20 @@ class EvmHypRebaseCollateralAdapter extends BaseEvmHypCollateralAdapter {
806715
807255
  async getBridgedSupply(options) {
806716
807256
  const vault = dist/* ERC4626__factory */.RTL.connect(await this.collateralContract.vault(), this.getProvider());
806717
807257
  const overrides = buildBlockTagOverrides(options?.blockTag);
806718
- const balance = await vault.balanceOf(this.addresses.token, overrides);
806719
- return balance.toBigInt();
807258
+ const assets = await vault.maxWithdraw(this.addresses.token, overrides);
807259
+ return assets.toBigInt();
807260
+ }
807261
+ }
807262
+ class EvmHypOwnerCollateralAdapter extends EvmHypRebaseCollateralAdapter {
807263
+ collateralContract;
807264
+ constructor(chainName, multiProvider, addresses) {
807265
+ super(chainName, multiProvider, addresses);
807266
+ this.collateralContract = dist/* HypERC4626OwnerCollateral__factory */.uhc.connect(addresses.token, this.getProvider());
807267
+ }
807268
+ async getBridgedSupply(options) {
807269
+ const overrides = buildBlockTagOverrides(options?.blockTag);
807270
+ const assetDeposited = await this.collateralContract.assetDeposited(overrides);
807271
+ return assetDeposited.toBigInt();
806720
807272
  }
806721
807273
  }
806722
807274
  class EvmHypSyntheticRebaseAdapter extends EvmHypSyntheticAdapter {
@@ -812579,10 +813131,8 @@ function createEvmHypAdapter(multiProvider, token) {
812579
813131
  return (0,_evmLikeHyp_js__WEBPACK_IMPORTED_MODULE_0__/* .createEvmLikeHypAdapter */ .a)(multiProvider, token, {
812580
813132
  native: _TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.EvmNative,
812581
813133
  hypNative: _TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.EvmHypNative,
812582
- hypCollateral: [
812583
- _TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.EvmHypCollateral,
812584
- _TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.EvmHypOwnerCollateral,
812585
- ],
813134
+ hypCollateral: [_TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.EvmHypCollateral],
813135
+ hypOwnerCollateral: _TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.EvmHypOwnerCollateral,
812586
813136
  hypCrossCollateralRouter: _TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.EvmHypCrossCollateralRouter,
812587
813137
  hypRebaseCollateral: _TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.EvmHypRebaseCollateral,
812588
813138
  hypCollateralFiat: _TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.EvmHypCollateralFiat,
@@ -812723,6 +813273,12 @@ function createEvmLikeHypAdapter(multiProvider, token, standards) {
812723
813273
  token: addressOrDenom,
812724
813274
  });
812725
813275
  }
813276
+ if (standards.hypOwnerCollateral &&
813277
+ standard === standards.hypOwnerCollateral) {
813278
+ return new EvmTokenAdapter/* EvmHypOwnerCollateralAdapter */.dv(chainName, multiProvider, {
813279
+ token: addressOrDenom,
813280
+ });
813281
+ }
812726
813282
  if (standards.hypCollateral.some((candidate) => candidate === standard)) {
812727
813283
  return new EvmTokenAdapter/* EvmMovableCollateralAdapter */.vo(chainName, multiProvider, {
812728
813284
  token: addressOrDenom,
@@ -813870,10 +814426,8 @@ function createTronHypAdapter(multiProvider, token) {
813870
814426
  return (0,_evmLikeHyp_js__WEBPACK_IMPORTED_MODULE_0__/* .createEvmLikeHypAdapter */ .a)(multiProvider, token, {
813871
814427
  native: _TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.TronNative,
813872
814428
  hypNative: _TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.TronHypNative,
813873
- hypCollateral: [
813874
- _TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.TronHypCollateral,
813875
- _TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.TronHypOwnerCollateral,
813876
- ],
814429
+ hypCollateral: [_TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.TronHypCollateral],
814430
+ hypOwnerCollateral: _TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.TronHypOwnerCollateral,
813877
814431
  hypCrossCollateralRouter: _TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.TronHypCrossCollateralRouter,
813878
814432
  hypRebaseCollateral: _TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.TronHypRebaseCollateral,
813879
814433
  hypCollateralFiat: _TokenStandard_js__WEBPACK_IMPORTED_MODULE_1__/* .TokenStandard */ .ph.TronHypCollateralFiat,
@@ -815403,7 +815957,7 @@ const PROTOCOL_TO_DEFAULT_NATIVE_TOKEN = {
815403
815957
  },
815404
815958
  [_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_0__/* .ProtocolType */ .Hb.Aleo]: {
815405
815959
  decimals: 6,
815406
- denom: '0field',
815960
+ denom: 'credits',
815407
815961
  name: 'Aleo',
815408
815962
  symbol: 'ALEO',
815409
815963
  },
@@ -816728,6 +817282,8 @@ function viemLogFromGetEventLogsResponse(log) {
816728
817282
  };
816729
817283
  }
816730
817284
  //# sourceMappingURL=utils.js.map
817285
+ // EXTERNAL MODULE: ../sdk/dist/utils/contract.js
817286
+ var contract = __nccwpck_require__(76709);
816731
817287
  // EXTERNAL MODULE: ../sdk/dist/token/types.js
816732
817288
  var types = __nccwpck_require__(38466);
816733
817289
  // EXTERNAL MODULE: ../sdk/dist/token/xerc20-abi.js
@@ -816743,6 +817299,7 @@ var xerc20_abi = __nccwpck_require__(48798);
816743
817299
 
816744
817300
 
816745
817301
 
817302
+
816746
817303
  async function getExtraLockBoxConfigs({ xERC20Address, chain, multiProvider, logger = logging/* rootLogger */.Jk, }) {
816747
817304
  const explorer = multiProvider.tryGetEvmExplorerMetadata(chain);
816748
817305
  if (!explorer) {
@@ -816801,7 +817358,8 @@ async function getLockboxesFromLogs(logs, provider, chain, logger) {
816801
817358
  await maybeXERC20Lockbox.callStatic.XERC20();
816802
817359
  return log;
816803
817360
  }
816804
- catch {
817361
+ catch (error) {
817362
+ (0,contract/* throwIfNotMissingSelector */.KT)(error);
816805
817363
  logger.debug(`Contract at address ${log.args.bridge} on chain ${chain} is not a XERC20Lockbox contract.`);
816806
817364
  return undefined;
816807
817365
  }
@@ -817129,22 +817687,82 @@ class MultiGeneric {
817129
817687
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
817130
817688
 
817131
817689
  /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
817132
- /* harmony export */ j: () => (/* binding */ isValidContractVersion),
817133
- /* harmony export */ u: () => (/* binding */ contractHasString)
817690
+ /* harmony export */ KT: () => (/* binding */ throwIfNotMissingSelector),
817691
+ /* harmony export */ jh: () => (/* binding */ isValidContractVersion),
817692
+ /* harmony export */ pJ: () => (/* binding */ isMissingSelectorCallException),
817693
+ /* harmony export */ uu: () => (/* binding */ contractHasString)
817134
817694
  /* harmony export */ });
817135
817695
  /* harmony import */ var compare_versions__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(95416);
817136
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(93142);
817137
- /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(76378);
817696
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(73689);
817697
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(93142);
817698
+ /* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(76378);
817138
817699
 
817139
817700
 
817140
817701
  function isValidContractVersion(currentVersion, targetVersion) {
817141
817702
  return (0,compare_versions__WEBPACK_IMPORTED_MODULE_0__.compareVersions)(currentVersion, targetVersion) >= 0;
817142
817703
  }
817704
+ function isRecord(value) {
817705
+ return typeof value === 'object' && !(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_1__/* .isNullish */ .u)(value);
817706
+ }
817707
+ function getErrorMessage(error) {
817708
+ return error instanceof Error
817709
+ ? error.message
817710
+ : isRecord(error) && typeof error.message === 'string'
817711
+ ? error.message
817712
+ : undefined;
817713
+ }
817714
+ function isEmptyProviderResponse(error) {
817715
+ let current = error;
817716
+ while (isRecord(current)) {
817717
+ // Assumes the originating provider call was an eth_call probe. The
817718
+ // HyperlaneJsonRpcProvider also emits this message for empty getBalance,
817719
+ // getBlock, and getBlockNumber responses.
817720
+ if (getErrorMessage(current) === 'Invalid response from provider') {
817721
+ return true;
817722
+ }
817723
+ current = current.cause;
817724
+ }
817725
+ return false;
817726
+ }
817727
+ function findCallException(error) {
817728
+ let current = error;
817729
+ while (isRecord(current)) {
817730
+ if (current.code === 'CALL_EXCEPTION')
817731
+ return current;
817732
+ current = current.cause;
817733
+ }
817734
+ return undefined;
817735
+ }
817736
+ function isMissingSelectorCallException(error) {
817737
+ if (!isRecord(error))
817738
+ return false;
817739
+ if (isEmptyProviderResponse(error))
817740
+ return true;
817741
+ const callException = findCallException(error);
817742
+ if (!callException)
817743
+ return false;
817744
+ const nestedError = isRecord(callException.error)
817745
+ ? callException.error
817746
+ : undefined;
817747
+ const data = typeof callException.data === 'string'
817748
+ ? callException.data
817749
+ : nestedError?.data;
817750
+ if (data === '0x')
817751
+ return true;
817752
+ // Some ethers/provider combinations only expose empty return data in the
817753
+ // formatted message.
817754
+ return (typeof callException.message === 'string' &&
817755
+ callException.message.includes('data="0x"'));
817756
+ }
817757
+ function throwIfNotMissingSelector(error) {
817758
+ if (!isMissingSelectorCallException(error))
817759
+ throw error;
817760
+ }
817143
817761
  async function contractHasString(provider, address, searchFor) {
817144
817762
  const code = await provider.getCode(address);
817145
- const hexString = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_1__/* .strip0x */ .LL)(Buffer.from(searchFor).toString('hex'));
817763
+ const hexString = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__/* .strip0x */ .LL)(Buffer.from(searchFor).toString('hex'));
817146
817764
  // largest stack operation is PUSH32 https://www.evm.codes/?fork=osaka#7f
817147
- const chunks = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__/* .chunk */ .iv)(hexString, 32 * 2);
817765
+ const chunks = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .chunk */ .iv)(hexString, 32 * 2);
817148
817766
  for (const chunk of chunks) {
817149
817767
  if (!code.includes(chunk)) {
817150
817768
  return false;
@@ -818801,7 +819419,11 @@ class WarpCore {
818801
819419
  interchainFee: igpQuote,
818802
819420
  tokenFeeQuote,
818803
819421
  attestation,
818804
- amount: originTokenAmount.amount,
819422
+ // Only pass amount for predicate flows — it feeds the attested msg_value into
819423
+ // eth_estimateGas. For non-predicate flows, let getLocalTransferFee use its
819424
+ // minimal-amount fallback so simulation doesn't fail on large balances or
819425
+ // placeholder senders (e.g. 0x...dead) that have no ETH.
819426
+ amount: attestation ? originTokenAmount.amount : undefined,
818805
819427
  });
818806
819428
  return {
818807
819429
  interchainQuote: igpQuote,
@@ -818834,7 +819456,7 @@ class WarpCore {
818834
819456
  interchainFee: interchainQuote,
818835
819457
  tokenFeeQuote,
818836
819458
  attestation,
818837
- amount: originTokenAmount.amount,
819459
+ amount: attestation ? originTokenAmount.amount : undefined,
818838
819460
  destinationToken: resolvedDestinationToken,
818839
819461
  });
818840
819462
  return {
@@ -818850,14 +819472,28 @@ class WarpCore {
818850
819472
  async getMaxTransferAmount({ balance, destination, recipient, sender, senderPubKey, feeEstimate, destinationToken, }) {
818851
819473
  const originToken = balance.token;
818852
819474
  if (!feeEstimate) {
818853
- feeEstimate = await this.estimateTransferRemoteFees({
819475
+ // Get IGP and token fee quotes using the full balance so amount-dependent fees
819476
+ // (e.g. percentage-based token fees) are correctly computed and subtracted.
819477
+ const { igpQuote: interchainQuote, tokenFeeQuote } = await this.getInterchainTransferFee({
818854
819478
  originTokenAmount: balance,
818855
819479
  destination,
818856
819480
  recipient,
818857
819481
  sender,
819482
+ destinationToken,
819483
+ });
819484
+ // Estimate local gas with no amount so getLocalTransferFee uses its minimal-amount
819485
+ // fallback — avoids eth_estimateGas failures on native token routes where simulating
819486
+ // the full balance leaves nothing to cover gas.
819487
+ const localQuote = await this.getLocalTransferFeeAmount({
819488
+ originToken,
819489
+ destination,
819490
+ sender,
818858
819491
  senderPubKey,
819492
+ interchainFee: interchainQuote,
819493
+ tokenFeeQuote,
818859
819494
  destinationToken,
818860
819495
  });
819496
+ feeEstimate = { interchainQuote, localQuote, tokenFeeQuote };
818861
819497
  }
818862
819498
  const { localQuote, interchainQuote, tokenFeeQuote } = feeEstimate;
818863
819499
  let maxAmount = balance;
@@ -818886,9 +819522,11 @@ class WarpCore {
818886
819522
  return originToken.amount(0);
818887
819523
  }
818888
819524
  async getTokenCollateral(token) {
818889
- if (_token_TokenStandard_js__WEBPACK_IMPORTED_MODULE_13__/* .LOCKBOX_STANDARDS */ .c_.includes(token.standard)) {
818890
- const adapter = token.getAdapter(this.multiProvider);
819525
+ if (_token_TokenStandard_js__WEBPACK_IMPORTED_MODULE_13__/* .LOCKBOX_STANDARDS */ .c_.includes(token.standard) ||
819526
+ _token_TokenStandard_js__WEBPACK_IMPORTED_MODULE_13__/* .ERC4626_COLLATERAL_STANDARDS */ .eB.includes(token.standard)) {
819527
+ const adapter = token.getHypAdapter(this.multiProvider);
818891
819528
  const tokenCollateral = await adapter.getBridgedSupply();
819529
+ (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .assert */ .v)(tokenCollateral !== undefined, `getBridgedSupply returned undefined for ${token.symbol} on ${token.chainName}`);
818892
819530
  return tokenCollateral;
818893
819531
  }
818894
819532
  else {
@@ -904800,13 +905438,14 @@ async function createServiceLogger(options) {
904800
905438
  /* harmony export */ hw: () => (/* binding */ formatMessage),
904801
905439
  /* harmony export */ vY: () => (/* binding */ parseMessage)
904802
905440
  /* harmony export */ });
904803
- /* unused harmony exports extractRefundAddressFromMetadata, hasValidRefundAddress */
905441
+ /* unused harmony exports extractRefundAddressFromMetadata, hasValidRefundAddress, syntheticCcrSwapMessageId */
904804
905442
  /* harmony import */ var ethers__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(61934);
904805
905443
  /* harmony import */ var _addresses_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(93142);
904806
905444
  /* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(18508);
904807
905445
 
904808
905446
 
904809
905447
 
905448
+
904810
905449
  /**
904811
905450
  * JS Implementation of solidity/contracts/libs/Message.sol#formatMessage
904812
905451
  * @returns Hex string of the packed message
@@ -904917,6 +905556,32 @@ function hasValidRefundAddress(metadata) {
904917
905556
  return (refundAddress !== null &&
904918
905557
  refundAddress.toLowerCase() !== ethers.constants.AddressZero);
904919
905558
  }
905559
+ /**
905560
+ * Compute the synthetic message ID the scraper stores for a same-chain CCR swap.
905561
+ *
905562
+ * Format: `0x00000000 || keccak256("SameChainCCR" || txHash32 || logIndex8)[0..28]`
905563
+ *
905564
+ * The 4-byte zero prefix makes synthetic IDs immediately distinguishable from
905565
+ * real Hyperlane message IDs (which are uniform keccak256 outputs).
905566
+ *
905567
+ * @param txHash 32-byte transaction hash (0x-prefixed hex string)
905568
+ * @param logIndex log index of the ReceivedTransferRemote event
905569
+ */
905570
+ function syntheticCcrSwapMessageId(txHash, logIndex) {
905571
+ assert(ethers.utils.isHexString(txHash, 32), `txHash must be a 32-byte hex string, got: ${txHash}`);
905572
+ assert((typeof logIndex === 'bigint' && logIndex >= 0n) ||
905573
+ (typeof logIndex === 'number' &&
905574
+ Number.isInteger(logIndex) &&
905575
+ logIndex >= 0), `logIndex must be a non-negative integer, got: ${logIndex}`);
905576
+ const logIndexHex = ethers.utils.hexZeroPad(ethers.BigNumber.from(logIndex).toHexString(), 8);
905577
+ const hash = ethers.utils.keccak256(ethers.utils.concat([
905578
+ ethers.utils.toUtf8Bytes('SameChainCCR'),
905579
+ txHash,
905580
+ logIndexHex,
905581
+ ]));
905582
+ // 4 zero bytes || first 28 bytes of hash
905583
+ return ensure0x('00'.repeat(4) + hash.slice(2, 58));
905584
+ }
904920
905585
  //# sourceMappingURL=messages.js.map
904921
905586
 
904922
905587
  /***/ }),
@@ -907327,7 +907992,7 @@ module.exports = /*#__PURE__*/JSON.parse('[{"type":"function","name":"proveL2Lea
907327
907992
  /***/ 99468:
907328
907993
  /***/ ((module) => {
907329
907994
 
907330
- module.exports = {"rE":"34.0.0"};
907995
+ module.exports = {"rE":"35.0.1"};
907331
907996
 
907332
907997
  /***/ })
907333
907998