@hyperlane-xyz/cli 32.0.0 → 32.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 +56 -17
- package/package.json +15 -15
package/bundle/index.js
CHANGED
|
@@ -693772,7 +693772,7 @@ __webpack_async_result__();
|
|
|
693772
693772
|
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
693773
693773
|
/* harmony export */ x: () => (/* binding */ VERSION)
|
|
693774
693774
|
/* harmony export */ });
|
|
693775
|
-
const VERSION = '32.0.
|
|
693775
|
+
const VERSION = '32.0.1';
|
|
693776
693776
|
//# sourceMappingURL=version.js.map
|
|
693777
693777
|
|
|
693778
693778
|
/***/ }),
|
|
@@ -811266,6 +811266,7 @@ const NON_ZERO_SENDER_ADDRESS = '0xa7ECcdb9Be08178f896c26b7BbD8C3D4E844d9Ba';
|
|
|
811266
811266
|
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
811267
811267
|
/* harmony export */ El: () => (/* binding */ transformConfigToCheck),
|
|
811268
811268
|
/* harmony export */ Ji: () => (/* binding */ getRouterAddressesFromWarpCoreConfig),
|
|
811269
|
+
/* harmony export */ SX: () => (/* binding */ normalizeWarpDeployConfigForCheck),
|
|
811269
811270
|
/* harmony export */ WZ: () => (/* binding */ expandWarpDeployConfig),
|
|
811270
811271
|
/* harmony export */ Z3: () => (/* binding */ expandVirtualWarpDeployConfig),
|
|
811271
811272
|
/* harmony export */ bp: () => (/* binding */ filterWarpCoreConfigMapByChains),
|
|
@@ -811282,10 +811283,12 @@ const NON_ZERO_SENDER_ADDRESS = '0xa7ECcdb9Be08178f896c26b7BbD8C3D4E844d9Ba';
|
|
|
811282
811283
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(16639);
|
|
811283
811284
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(52193);
|
|
811284
811285
|
/* harmony import */ var _deploy_proxy_js__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(83697);
|
|
811285
|
-
/* harmony import */ var
|
|
811286
|
+
/* harmony import */ var _fee_types_js__WEBPACK_IMPORTED_MODULE_15__ = __nccwpck_require__(52555);
|
|
811286
811287
|
/* harmony import */ var _hook_EvmHookReader_js__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(69319);
|
|
811287
811288
|
/* harmony import */ var _ism_EvmIsmReader_js__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(60715);
|
|
811288
|
-
/* harmony import */ var
|
|
811289
|
+
/* harmony import */ var _router_types_js__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(38230);
|
|
811290
|
+
/* harmony import */ var _utils_decimals_js__WEBPACK_IMPORTED_MODULE_17__ = __nccwpck_require__(27043);
|
|
811291
|
+
/* harmony import */ var _EvmWarpRouteReader_js__WEBPACK_IMPORTED_MODULE_16__ = __nccwpck_require__(40945);
|
|
811289
811292
|
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(4169);
|
|
811290
811293
|
/* harmony import */ var _tokenMetadataUtils_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(61740);
|
|
811291
811294
|
/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(38466);
|
|
@@ -811301,6 +811304,8 @@ const NON_ZERO_SENDER_ADDRESS = '0xa7ECcdb9Be08178f896c26b7BbD8C3D4E844d9Ba';
|
|
|
811301
811304
|
|
|
811302
811305
|
|
|
811303
811306
|
|
|
811307
|
+
|
|
811308
|
+
|
|
811304
811309
|
/**
|
|
811305
811310
|
* Gets gas configuration for a chain
|
|
811306
811311
|
*/
|
|
@@ -811535,6 +811540,24 @@ async function expandWarpDeployConfig(params) {
|
|
|
811535
811540
|
return chainConfig;
|
|
811536
811541
|
}));
|
|
811537
811542
|
}
|
|
811543
|
+
function normalizeWarpDeployConfigForCheck(params) {
|
|
811544
|
+
const { multiProvider, warpDeployConfig } = params;
|
|
811545
|
+
return (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .objMap */ .Yp)(warpDeployConfig, (_chain, config) => {
|
|
811546
|
+
if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_9__/* .isOftTokenConfig */ .vo)(config)) {
|
|
811547
|
+
return config;
|
|
811548
|
+
}
|
|
811549
|
+
return {
|
|
811550
|
+
...config,
|
|
811551
|
+
mailbox: ethers__WEBPACK_IMPORTED_MODULE_13__.constants.AddressZero,
|
|
811552
|
+
hook: ethers__WEBPACK_IMPORTED_MODULE_13__.constants.AddressZero,
|
|
811553
|
+
interchainSecurityModule: ethers__WEBPACK_IMPORTED_MODULE_13__.constants.AddressZero,
|
|
811554
|
+
remoteRouters: {},
|
|
811555
|
+
destinationGas: undefined,
|
|
811556
|
+
domainMappings: (0,_router_types_js__WEBPACK_IMPORTED_MODULE_14__/* .resolveRouterMapConfig */ .c0)(multiProvider, config.domainMappings),
|
|
811557
|
+
extraOptions: config.extraOptions === '0x' ? undefined : config.extraOptions,
|
|
811558
|
+
};
|
|
811559
|
+
});
|
|
811560
|
+
}
|
|
811538
811561
|
/**
|
|
811539
811562
|
* Resolves the fee token address based on the warp route token type.
|
|
811540
811563
|
* - Native tokens: fee token is AddressZero
|
|
@@ -811563,7 +811586,7 @@ function resolveCrossCollateralFeeContracts(destinationConfig, routerAddress, to
|
|
|
811563
811586
|
}
|
|
811564
811587
|
function resolveTokenFeeAddress(feeConfig, routerAddress, tokenConfig) {
|
|
811565
811588
|
const feeToken = getFeeTokenAddress(routerAddress, tokenConfig);
|
|
811566
|
-
if (feeConfig.type ===
|
|
811589
|
+
if (feeConfig.type === _fee_types_js__WEBPACK_IMPORTED_MODULE_15__/* .TokenFeeType */ .cA.RoutingFee) {
|
|
811567
811590
|
return {
|
|
811568
811591
|
...feeConfig,
|
|
811569
811592
|
token: feeToken,
|
|
@@ -811573,7 +811596,7 @@ function resolveTokenFeeAddress(feeConfig, routerAddress, tokenConfig) {
|
|
|
811573
811596
|
])),
|
|
811574
811597
|
};
|
|
811575
811598
|
}
|
|
811576
|
-
if (feeConfig.type ===
|
|
811599
|
+
if (feeConfig.type === _fee_types_js__WEBPACK_IMPORTED_MODULE_15__/* .TokenFeeType */ .cA.CrossCollateralRoutingFee) {
|
|
811577
811600
|
return {
|
|
811578
811601
|
...feeConfig,
|
|
811579
811602
|
feeContracts: Object.fromEntries(Object.keys(feeConfig.feeContracts).map((chain) => [
|
|
@@ -811590,7 +811613,7 @@ function resolveTokenFeeAddress(feeConfig, routerAddress, tokenConfig) {
|
|
|
811590
811613
|
async function expandVirtualWarpDeployConfig(params) {
|
|
811591
811614
|
const { multiProvider, onChainWarpConfig, deployedRoutersAddresses } = params;
|
|
811592
811615
|
return (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .promiseObjAll */ .a1)((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .objMap */ .Yp)(onChainWarpConfig, async (chain, config) => {
|
|
811593
|
-
const warpReader = new
|
|
811616
|
+
const warpReader = new _EvmWarpRouteReader_js__WEBPACK_IMPORTED_MODULE_16__/* .EvmWarpRouteReader */ .pr(multiProvider, chain);
|
|
811594
811617
|
const warpVirtualConfig = await warpReader.deriveWarpRouteVirtualConfig(chain, deployedRoutersAddresses[chain]);
|
|
811595
811618
|
return {
|
|
811596
811619
|
...warpVirtualConfig,
|
|
@@ -811660,30 +811683,30 @@ function normalizeTokenFeeForCheck(feeConfig) {
|
|
|
811660
811683
|
if (!feeConfig)
|
|
811661
811684
|
return feeConfig;
|
|
811662
811685
|
const tokenConfig = 'token' in feeConfig && feeConfig.token ? { token: feeConfig.token } : {};
|
|
811663
|
-
if (feeConfig.type ===
|
|
811686
|
+
if (feeConfig.type === _fee_types_js__WEBPACK_IMPORTED_MODULE_15__/* .TokenFeeType */ .cA.RoutingFee) {
|
|
811664
811687
|
const normalizedFeeContracts = Object.fromEntries(Object.entries(feeConfig.feeContracts).map(([chain, nestedFee]) => [
|
|
811665
811688
|
chain,
|
|
811666
811689
|
normalizeTokenFeeForCheck(nestedFee),
|
|
811667
811690
|
]));
|
|
811668
811691
|
return {
|
|
811669
|
-
type:
|
|
811692
|
+
type: _fee_types_js__WEBPACK_IMPORTED_MODULE_15__/* .TokenFeeType */ .cA.RoutingFee,
|
|
811670
811693
|
owner: feeConfig.owner,
|
|
811671
811694
|
...tokenConfig,
|
|
811672
811695
|
feeContracts: normalizedFeeContracts,
|
|
811673
811696
|
};
|
|
811674
811697
|
}
|
|
811675
|
-
if (feeConfig.type ===
|
|
811698
|
+
if (feeConfig.type === _fee_types_js__WEBPACK_IMPORTED_MODULE_15__/* .TokenFeeType */ .cA.CrossCollateralRoutingFee) {
|
|
811676
811699
|
const normalizedFeeContracts = Object.fromEntries(Object.keys(feeConfig.feeContracts).map((chain) => [
|
|
811677
811700
|
chain,
|
|
811678
811701
|
normalizeCrossCollateralFeeContractsForCheck(feeConfig.feeContracts[chain]),
|
|
811679
811702
|
]));
|
|
811680
811703
|
return {
|
|
811681
|
-
type:
|
|
811704
|
+
type: _fee_types_js__WEBPACK_IMPORTED_MODULE_15__/* .TokenFeeType */ .cA.CrossCollateralRoutingFee,
|
|
811682
811705
|
owner: feeConfig.owner,
|
|
811683
811706
|
feeContracts: normalizedFeeContracts,
|
|
811684
811707
|
};
|
|
811685
811708
|
}
|
|
811686
|
-
if (feeConfig.type ===
|
|
811709
|
+
if (feeConfig.type === _fee_types_js__WEBPACK_IMPORTED_MODULE_15__/* .TokenFeeType */ .cA.OffchainQuotedLinearFee) {
|
|
811687
811710
|
return {
|
|
811688
811711
|
type: feeConfig.type,
|
|
811689
811712
|
owner: feeConfig.owner,
|
|
@@ -811692,7 +811715,7 @@ function normalizeTokenFeeForCheck(feeConfig) {
|
|
|
811692
811715
|
quoteSigners: feeConfig.quoteSigners,
|
|
811693
811716
|
};
|
|
811694
811717
|
}
|
|
811695
|
-
if (feeConfig.type ===
|
|
811718
|
+
if (feeConfig.type === _fee_types_js__WEBPACK_IMPORTED_MODULE_15__/* .TokenFeeType */ .cA.LinearFee) {
|
|
811696
811719
|
return {
|
|
811697
811720
|
type: feeConfig.type,
|
|
811698
811721
|
owner: feeConfig.owner,
|
|
@@ -811721,6 +811744,9 @@ function transformConfigToCheck(obj) {
|
|
|
811721
811744
|
if (clonedTokenConfig.tokenFee) {
|
|
811722
811745
|
clonedTokenConfig.tokenFee = normalizeTokenFeeForCheck(clonedTokenConfig.tokenFee);
|
|
811723
811746
|
}
|
|
811747
|
+
// normalizeScale(undefined) -> {1n,1n}, matching EvmWarpRouteReader.fetchScale's
|
|
811748
|
+
// identity-collapse so both sides of the diff agree symmetrically.
|
|
811749
|
+
clonedTokenConfig.scale = (0,_utils_decimals_js__WEBPACK_IMPORTED_MODULE_17__/* .normalizeScale */ .EM)(clonedTokenConfig.scale);
|
|
811724
811750
|
return (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .sortArraysInObject */ .rk)((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_4__/* .transformObj */ .a)(clonedTokenConfig, transformWarpDeployConfigToCheck), sortArraysInConfigToCheck);
|
|
811725
811751
|
}
|
|
811726
811752
|
/**
|
|
@@ -813413,7 +813439,11 @@ async function checkWarpRouteDeployConfig({ multiProvider, warpCoreConfig, warpD
|
|
|
813413
813439
|
expandedOnChainWarpConfig,
|
|
813414
813440
|
validateScale: false,
|
|
813415
813441
|
});
|
|
813416
|
-
const
|
|
813442
|
+
const normalizedWarpDeployConfig = (0,_configUtils_js__WEBPACK_IMPORTED_MODULE_5__/* .normalizeWarpDeployConfigForCheck */ .SX)({
|
|
813443
|
+
multiProvider,
|
|
813444
|
+
warpDeployConfig: expandedWarpDeployConfig,
|
|
813445
|
+
});
|
|
813446
|
+
const evmExpandedWarpDeployConfig = (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__/* .objFilter */ .s3)(normalizedWarpDeployConfig, (chain, _config) => (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .isEVMLike */ .Us)(multiProvider.getProtocol(chain)));
|
|
813417
813447
|
const rawDiff = buildWarpRouteDiff({
|
|
813418
813448
|
onChainWarpConfig: expandedOnChainWarpConfig,
|
|
813419
813449
|
warpRouteConfig: evmExpandedWarpDeployConfig,
|
|
@@ -813427,7 +813457,7 @@ async function checkWarpRouteDeployConfig({ multiProvider, warpCoreConfig, warpD
|
|
|
813427
813457
|
const diffViolations = flattenWarpRouteCheckDiff(diff);
|
|
813428
813458
|
const scaleViolations = await getScaleViolations({
|
|
813429
813459
|
multiProvider,
|
|
813430
|
-
warpRouteConfig:
|
|
813460
|
+
warpRouteConfig: normalizedWarpDeployConfig,
|
|
813431
813461
|
});
|
|
813432
813462
|
return {
|
|
813433
813463
|
diff,
|
|
@@ -813676,8 +813706,17 @@ function stringifyViolationValue(value) {
|
|
|
813676
813706
|
if (value === undefined) {
|
|
813677
813707
|
return '';
|
|
813678
813708
|
}
|
|
813679
|
-
if (
|
|
813680
|
-
return
|
|
813709
|
+
if (typeof value === 'string') {
|
|
813710
|
+
return value;
|
|
813711
|
+
}
|
|
813712
|
+
if (value === null) {
|
|
813713
|
+
return 'null';
|
|
813714
|
+
}
|
|
813715
|
+
if (typeof value === 'number' ||
|
|
813716
|
+
typeof value === 'boolean' ||
|
|
813717
|
+
typeof value === 'symbol' ||
|
|
813718
|
+
typeof value === 'function') {
|
|
813719
|
+
return value.toString();
|
|
813681
813720
|
}
|
|
813682
813721
|
if (Array.isArray(value)) {
|
|
813683
813722
|
return `[${value.map(stringifyViolationValue).join(',')}]`;
|
|
@@ -904304,7 +904343,7 @@ module.exports = /*#__PURE__*/JSON.parse('[{"type":"function","name":"proveL2Lea
|
|
|
904304
904343
|
/***/ 99468:
|
|
904305
904344
|
/***/ ((module) => {
|
|
904306
904345
|
|
|
904307
|
-
module.exports = {"rE":"32.0.
|
|
904346
|
+
module.exports = {"rE":"32.0.1"};
|
|
904308
904347
|
|
|
904309
904348
|
/***/ })
|
|
904310
904349
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperlane-xyz/cli",
|
|
3
|
-
"version": "32.0.
|
|
3
|
+
"version": "32.0.1",
|
|
4
4
|
"description": "A command-line utility for common Hyperlane operations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -74,21 +74,21 @@
|
|
|
74
74
|
"zod": "^3.21.2",
|
|
75
75
|
"zod-validation-error": "^3.3.0",
|
|
76
76
|
"zx": "^8.1.4",
|
|
77
|
-
"@hyperlane-xyz/aleo-sdk": "32.0.
|
|
77
|
+
"@hyperlane-xyz/aleo-sdk": "32.0.1",
|
|
78
78
|
"@hyperlane-xyz/core": "11.3.1",
|
|
79
|
-
"@hyperlane-xyz/cosmos-sdk": "32.0.
|
|
80
|
-
"@hyperlane-xyz/deploy-sdk": "5.0.
|
|
81
|
-
"@hyperlane-xyz/http-registry-server": "32.0.
|
|
82
|
-
"@hyperlane-xyz/provider-sdk": "5.0.
|
|
83
|
-
"@hyperlane-xyz/radix-sdk": "32.0.
|
|
84
|
-
"@hyperlane-xyz/
|
|
85
|
-
"@hyperlane-xyz/
|
|
86
|
-
"@hyperlane-xyz/
|
|
87
|
-
"@hyperlane-xyz/sdk": "32.0.
|
|
88
|
-
"@hyperlane-xyz/
|
|
89
|
-
"@hyperlane-xyz/
|
|
90
|
-
"@hyperlane-xyz/
|
|
91
|
-
"@hyperlane-xyz/utils": "32.0.
|
|
79
|
+
"@hyperlane-xyz/cosmos-sdk": "32.0.1",
|
|
80
|
+
"@hyperlane-xyz/deploy-sdk": "5.0.1",
|
|
81
|
+
"@hyperlane-xyz/http-registry-server": "32.0.1",
|
|
82
|
+
"@hyperlane-xyz/provider-sdk": "5.0.1",
|
|
83
|
+
"@hyperlane-xyz/radix-sdk": "32.0.1",
|
|
84
|
+
"@hyperlane-xyz/rebalancer": "27.2.11",
|
|
85
|
+
"@hyperlane-xyz/relayer": "1.1.24",
|
|
86
|
+
"@hyperlane-xyz/tron-sdk": "23.0.1",
|
|
87
|
+
"@hyperlane-xyz/sdk": "32.0.1",
|
|
88
|
+
"@hyperlane-xyz/starknet-sdk": "28.0.1",
|
|
89
|
+
"@hyperlane-xyz/tsconfig": "^32.0.1",
|
|
90
|
+
"@hyperlane-xyz/sealevel-sdk": "32.0.1",
|
|
91
|
+
"@hyperlane-xyz/utils": "32.0.1"
|
|
92
92
|
},
|
|
93
93
|
"engines": {
|
|
94
94
|
"node": ">=16"
|