@hyperlane-xyz/cli 29.0.1 → 29.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/index.js +149 -14
- package/package.json +15 -15
package/bundle/index.js
CHANGED
|
@@ -612080,12 +612080,12 @@ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_hyp
|
|
|
612080
612080
|
|
|
612081
612081
|
async function sendTestMessage({ context, origin, destination, messageBody, timeoutSec, skipWaitForDelivery, selfRelay, }) {
|
|
612082
612082
|
const { chainMetadata, multiProvider } = context;
|
|
612083
|
-
//
|
|
612084
|
-
//
|
|
612085
|
-
const
|
|
612086
|
-
const activeEvmChainMetadata = (0,_utils_chains_js__WEBPACK_IMPORTED_MODULE_6__/* .filterOutDisabledChains */ .zC)(
|
|
612083
|
+
// sendMessage works with EVM-like chains (Ethereum + Tron) as they share
|
|
612084
|
+
// the same Solidity contracts and ethers.js-compatible providers.
|
|
612085
|
+
const evmLikeChainMetadata = Object.fromEntries(Object.entries(chainMetadata).filter(([chain]) => (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_9__/* .isEVMLike */ .Us)(multiProvider.getProtocol(chain))));
|
|
612086
|
+
const activeEvmChainMetadata = (0,_utils_chains_js__WEBPACK_IMPORTED_MODULE_6__/* .filterOutDisabledChains */ .zC)(evmLikeChainMetadata);
|
|
612087
612087
|
if (Object.keys(activeEvmChainMetadata).length === 0) {
|
|
612088
|
-
throw new Error(`No EVM chains found in registry. 'hyperlane send message' only supports EVM chains.`);
|
|
612088
|
+
throw new Error(`No EVM-compatible chains found in registry. 'hyperlane send message' only supports EVM-like chains.`);
|
|
612089
612089
|
}
|
|
612090
612090
|
if (!origin) {
|
|
612091
612091
|
origin = await (0,_utils_chains_js__WEBPACK_IMPORTED_MODULE_6__/* .runSingleChainSelectionStep */ .jZ)(activeEvmChainMetadata, 'Select the origin chain:');
|
|
@@ -612946,12 +612946,11 @@ async function nativeBalancesAreSufficient(multiProvider, altVmSigners, chains,
|
|
|
612946
612946
|
|
|
612947
612947
|
__nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
612948
612948
|
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
612949
|
-
/* harmony export */ SS: () => (/* binding */ filterChainMetadataByProtocol),
|
|
612950
612949
|
/* harmony export */ aE: () => (/* binding */ runMultiChainSelectionStep),
|
|
612951
612950
|
/* harmony export */ jZ: () => (/* binding */ runSingleChainSelectionStep),
|
|
612952
612951
|
/* harmony export */ zC: () => (/* binding */ filterOutDisabledChains)
|
|
612953
612952
|
/* harmony export */ });
|
|
612954
|
-
/* unused harmony exports isDisabledChainMetadata, getActiveChainNames, extractChainsFromObj */
|
|
612953
|
+
/* unused harmony exports filterChainMetadataByProtocol, isDisabledChainMetadata, getActiveChainNames, extractChainsFromObj */
|
|
612955
612954
|
/* harmony import */ var _inquirer_prompts__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(98720);
|
|
612956
612955
|
/* harmony import */ var _inquirer_search__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(89458);
|
|
612957
612956
|
/* harmony import */ var _inquirer_select__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(1235);
|
|
@@ -620629,7 +620628,7 @@ __webpack_async_result__();
|
|
|
620629
620628
|
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
620630
620629
|
/* harmony export */ x: () => (/* binding */ VERSION)
|
|
620631
620630
|
/* harmony export */ });
|
|
620632
|
-
const VERSION = '29.0
|
|
620631
|
+
const VERSION = '29.1.0';
|
|
620633
620632
|
//# sourceMappingURL=version.js.map
|
|
620634
620633
|
|
|
620635
620634
|
/***/ }),
|
|
@@ -714066,11 +714065,14 @@ function isEvmBlockExplorerAndNotEtherscan(blockExplorer) {
|
|
|
714066
714065
|
[chainMetadataTypes/* ExplorerFamily */.id.Voyager]: false,
|
|
714067
714066
|
[chainMetadataTypes/* ExplorerFamily */.id.ZkSync]: true,
|
|
714068
714067
|
[chainMetadataTypes/* ExplorerFamily */.id.RadixDashboard]: false,
|
|
714068
|
+
[chainMetadataTypes/* ExplorerFamily */.id.TronScan]: false,
|
|
714069
714069
|
[chainMetadataTypes/* ExplorerFamily */.id.Unknown]: false,
|
|
714070
714070
|
};
|
|
714071
714071
|
return byFamily[blockExplorer.family] ?? false;
|
|
714072
714072
|
}
|
|
714073
714073
|
//# sourceMappingURL=utils.js.map
|
|
714074
|
+
// EXTERNAL MODULE: ../utils/dist/addresses.js
|
|
714075
|
+
var addresses = __nccwpck_require__(93142);
|
|
714074
714076
|
;// CONCATENATED MODULE: ../sdk/dist/metadata/blockExplorer.js
|
|
714075
714077
|
|
|
714076
714078
|
|
|
@@ -714146,6 +714148,12 @@ function getExplorerTxUrl(metadata, hash) {
|
|
|
714146
714148
|
].includes(chainName)
|
|
714147
714149
|
? 'transaction'
|
|
714148
714150
|
: 'tx';
|
|
714151
|
+
// TronScan uses 'transaction' instead of 'tx' for transaction URLs and doesn't support the 0x prefix for transaction hashes
|
|
714152
|
+
if (metadata.blockExplorers &&
|
|
714153
|
+
metadata.blockExplorers.length &&
|
|
714154
|
+
metadata.blockExplorers[0].family === chainMetadataTypes/* ExplorerFamily */.id.TronScan) {
|
|
714155
|
+
return appendToPath(baseUrl, `transaction/${(0,addresses/* strip0x */.LL)(hash)}`).toString();
|
|
714156
|
+
}
|
|
714149
714157
|
return appendToPath(baseUrl, `${urlPathStub}/${hash}`).toString();
|
|
714150
714158
|
}
|
|
714151
714159
|
function getExplorerAddressUrl(metadata, address) {
|
|
@@ -714158,6 +714166,14 @@ function getExplorerAddressUrl(metadata, address) {
|
|
|
714158
714166
|
return appendToPath(baseUrl, `${urlPathStub}/${address}`).toString();
|
|
714159
714167
|
}
|
|
714160
714168
|
function appendToPath(baseUrl, pathExtension) {
|
|
714169
|
+
// Handle URLs with hash fragments (e.g., TronScan uses explorer.com/#/path)
|
|
714170
|
+
const hashIndex = baseUrl.indexOf('#');
|
|
714171
|
+
if (hashIndex !== -1) {
|
|
714172
|
+
const urlPart = baseUrl.slice(0, hashIndex);
|
|
714173
|
+
const hashPart = baseUrl.slice(hashIndex + 1);
|
|
714174
|
+
const hashPath = hashPart.endsWith('/') ? hashPart.slice(0, -1) : hashPart;
|
|
714175
|
+
return new URL(`${urlPart}#${hashPath}/${pathExtension}`);
|
|
714176
|
+
}
|
|
714161
714177
|
const base = new URL(baseUrl);
|
|
714162
714178
|
let currentPath = base.pathname;
|
|
714163
714179
|
if (currentPath.endsWith('/'))
|
|
@@ -715114,6 +715130,7 @@ var ExplorerFamily;
|
|
|
715114
715130
|
ExplorerFamily["Voyager"] = "voyager";
|
|
715115
715131
|
ExplorerFamily["ZkSync"] = "zksync";
|
|
715116
715132
|
ExplorerFamily["RadixDashboard"] = "radixdashboard";
|
|
715133
|
+
ExplorerFamily["TronScan"] = "tronscan";
|
|
715117
715134
|
ExplorerFamily["Other"] = "other";
|
|
715118
715135
|
ExplorerFamily["Unknown"] = "unknown";
|
|
715119
715136
|
})(ExplorerFamily || (ExplorerFamily = {}));
|
|
@@ -757312,9 +757329,9 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
|
|
|
757312
757329
|
/* unused harmony export getCollateralTokenAdapter */
|
|
757313
757330
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(21387);
|
|
757314
757331
|
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(16639);
|
|
757315
|
-
/* harmony import */ var
|
|
757332
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__ = __nccwpck_require__(93142);
|
|
757316
757333
|
/* harmony import */ var _utils_starknet_js__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(84779);
|
|
757317
|
-
/* harmony import */ var
|
|
757334
|
+
/* harmony import */ var _TokenAmount_js__WEBPACK_IMPORTED_MODULE_17__ = __nccwpck_require__(32242);
|
|
757318
757335
|
/* harmony import */ var _TokenConnection_js__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(29842);
|
|
757319
757336
|
/* harmony import */ var _TokenStandard_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(4879);
|
|
757320
757337
|
/* harmony import */ var _adapters_AleoTokenAdapter_js__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(90735);
|
|
@@ -757324,6 +757341,7 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
|
|
|
757324
757341
|
/* harmony import */ var _adapters_EvmCrossCollateralAdapter_js__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(33974);
|
|
757325
757342
|
/* harmony import */ var _adapters_EvmTokenAdapter_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(21582);
|
|
757326
757343
|
/* harmony import */ var _adapters_M0PortalLiteTokenAdapter_js__WEBPACK_IMPORTED_MODULE_15__ = __nccwpck_require__(62213);
|
|
757344
|
+
/* harmony import */ var _adapters_M0PortalTokenAdapter_js__WEBPACK_IMPORTED_MODULE_16__ = __nccwpck_require__(62041);
|
|
757327
757345
|
/* harmony import */ var _adapters_RadixTokenAdapter_js__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(6410);
|
|
757328
757346
|
/* harmony import */ var _adapters_SealevelTokenAdapter_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(68957);
|
|
757329
757347
|
/* harmony import */ var _adapters_StarknetTokenAdapter_js__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(36122);
|
|
@@ -757346,6 +757364,7 @@ _adapters_AleoTokenAdapter_js__WEBPACK_IMPORTED_MODULE_10__ = (__webpack_async_d
|
|
|
757346
757364
|
|
|
757347
757365
|
|
|
757348
757366
|
|
|
757367
|
+
|
|
757349
757368
|
class Token {
|
|
757350
757369
|
protocol;
|
|
757351
757370
|
constructor(args) {
|
|
@@ -757639,6 +757658,11 @@ class Token {
|
|
|
757639
757658
|
return new _adapters_M0PortalLiteTokenAdapter_js__WEBPACK_IMPORTED_MODULE_15__/* .M0PortalLiteTokenAdapter */ .k(multiProvider, chainName, addressOrDenom, // portal address
|
|
757640
757659
|
collateralAddressOrDenom);
|
|
757641
757660
|
}
|
|
757661
|
+
else if (standard === _TokenStandard_js__WEBPACK_IMPORTED_MODULE_0__/* .TokenStandard */ .ph.EvmM0Portal) {
|
|
757662
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_1__/* .assert */ .v)(collateralAddressOrDenom, 'collateralAddressOrDenom (mToken address) required for M0Portal');
|
|
757663
|
+
return new _adapters_M0PortalTokenAdapter_js__WEBPACK_IMPORTED_MODULE_16__/* .M0PortalTokenAdapter */ .q(multiProvider, chainName, addressOrDenom, // portal address
|
|
757664
|
+
collateralAddressOrDenom);
|
|
757665
|
+
}
|
|
757642
757666
|
else {
|
|
757643
757667
|
throw new Error(`No hyp adapter found for token standard: ${standard}`);
|
|
757644
757668
|
}
|
|
@@ -757672,10 +757696,10 @@ class Token {
|
|
|
757672
757696
|
async getBalance(multiProvider, address) {
|
|
757673
757697
|
const adapter = this.getAdapter(multiProvider);
|
|
757674
757698
|
const balance = await adapter.getBalance(address);
|
|
757675
|
-
return new
|
|
757699
|
+
return new _TokenAmount_js__WEBPACK_IMPORTED_MODULE_17__/* .TokenAmount */ .s(balance, this);
|
|
757676
757700
|
}
|
|
757677
757701
|
amount(amount) {
|
|
757678
|
-
return new
|
|
757702
|
+
return new _TokenAmount_js__WEBPACK_IMPORTED_MODULE_17__/* .TokenAmount */ .s(amount, this);
|
|
757679
757703
|
}
|
|
757680
757704
|
isNft() {
|
|
757681
757705
|
return _TokenStandard_js__WEBPACK_IMPORTED_MODULE_0__/* .TOKEN_NFT_STANDARDS */ .CE.includes(this.standard);
|
|
@@ -757754,7 +757778,7 @@ class Token {
|
|
|
757754
757778
|
return true;
|
|
757755
757779
|
if (this.isCollateralized()) {
|
|
757756
757780
|
if (this.collateralAddressOrDenom &&
|
|
757757
|
-
(0,
|
|
757781
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_18__/* .eqAddress */ .fv)(this.collateralAddressOrDenom, token.addressOrDenom)) {
|
|
757758
757782
|
return true;
|
|
757759
757783
|
}
|
|
757760
757784
|
if (!this.collateralAddressOrDenom &&
|
|
@@ -757940,6 +757964,7 @@ var TokenStandard;
|
|
|
757940
757964
|
TokenStandard["EvmHypVSXERC20"] = "EvmHypVSXERC20";
|
|
757941
757965
|
TokenStandard["EvmHypVSXERC20Lockbox"] = "EvmHypVSXERC20Lockbox";
|
|
757942
757966
|
TokenStandard["EvmM0PortalLite"] = "EvmM0PortalLite";
|
|
757967
|
+
TokenStandard["EvmM0Portal"] = "EvmM0Portal";
|
|
757943
757968
|
TokenStandard["EvmHypEverclearCollateral"] = "EvmHypEverclearCollateral";
|
|
757944
757969
|
TokenStandard["EvmHypEverclearEth"] = "EvmHypEverclearEth";
|
|
757945
757970
|
TokenStandard["EvmHypCrossCollateralRouter"] = "EvmHypCrossCollateralRouter";
|
|
@@ -758017,6 +758042,7 @@ const TOKEN_STANDARD_TO_PROTOCOL = {
|
|
|
758017
758042
|
EvmHypVSXERC20: _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_0__/* .ProtocolType */ .Hb.Ethereum,
|
|
758018
758043
|
EvmHypVSXERC20Lockbox: _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_0__/* .ProtocolType */ .Hb.Ethereum,
|
|
758019
758044
|
EvmM0PortalLite: _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_0__/* .ProtocolType */ .Hb.Ethereum,
|
|
758045
|
+
EvmM0Portal: _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_0__/* .ProtocolType */ .Hb.Ethereum,
|
|
758020
758046
|
[TokenStandard.EvmHypEverclearCollateral]: _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_0__/* .ProtocolType */ .Hb.Ethereum,
|
|
758021
758047
|
[TokenStandard.EvmHypEverclearEth]: _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_0__/* .ProtocolType */ .Hb.Ethereum,
|
|
758022
758048
|
[TokenStandard.EvmHypCrossCollateralRouter]: _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_0__/* .ProtocolType */ .Hb.Ethereum,
|
|
@@ -758156,6 +758182,7 @@ const TOKEN_HYP_STANDARDS = [
|
|
|
758156
758182
|
TokenStandard.EvmHypVSXERC20,
|
|
758157
758183
|
TokenStandard.EvmHypVSXERC20Lockbox,
|
|
758158
758184
|
TokenStandard.EvmM0PortalLite,
|
|
758185
|
+
TokenStandard.EvmM0Portal,
|
|
758159
758186
|
TokenStandard.EvmHypCrossCollateralRouter,
|
|
758160
758187
|
TokenStandard.SealevelHypNative,
|
|
758161
758188
|
TokenStandard.SealevelHypCollateral,
|
|
@@ -760228,6 +760255,114 @@ class M0PortalLiteTokenAdapter extends _EvmTokenAdapter_js__WEBPACK_IMPORTED_MOD
|
|
|
760228
760255
|
|
|
760229
760256
|
/***/ }),
|
|
760230
760257
|
|
|
760258
|
+
/***/ 62041:
|
|
760259
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
760260
|
+
|
|
760261
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
760262
|
+
/* harmony export */ q: () => (/* binding */ M0PortalTokenAdapter)
|
|
760263
|
+
/* harmony export */ });
|
|
760264
|
+
/* harmony import */ var ethers__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(61934);
|
|
760265
|
+
/* harmony import */ var _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(22783);
|
|
760266
|
+
/* harmony import */ var _hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(93142);
|
|
760267
|
+
/* harmony import */ var _EvmTokenAdapter_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(21582);
|
|
760268
|
+
|
|
760269
|
+
|
|
760270
|
+
|
|
760271
|
+
|
|
760272
|
+
/**
|
|
760273
|
+
* M0PortalTokenAdapter - Adapter for M0 Portal token transfers
|
|
760274
|
+
*
|
|
760275
|
+
* This adapter extends EvmTokenAdapter for basic ERC20 operations and adds
|
|
760276
|
+
* support for cross-chain transfers via the M0 Portal. The Portal handles
|
|
760277
|
+
* bridging of M0 Extension tokens (like mUSD) between chains.
|
|
760278
|
+
*
|
|
760279
|
+
* Key differences from standard ERC20:
|
|
760280
|
+
* - Approvals are made to the Portal contract (not the recipient)
|
|
760281
|
+
* - Cross-chain transfers use Portal's sendToken function
|
|
760282
|
+
* - M tokens use index-based accounting which can cause rounding
|
|
760283
|
+
*/
|
|
760284
|
+
// From https://github.com/m0-foundation/m-portal-v2/blob/main/evm/src/Portal.sol
|
|
760285
|
+
const PORTAL_ABI = [
|
|
760286
|
+
'function sendToken(uint256 amount, address sourceToken, uint32 destinationChainId, bytes32 destinationToken, bytes32 recipient, bytes32 refundAddress, address bridgeAdapter, bytes calldata bridgeAdapterArgs) external payable returns (bytes32)',
|
|
760287
|
+
'function quote(uint32 destinationChainId, uint8 payloadType, address bridgeAdapter) external view returns (uint256)',
|
|
760288
|
+
'function currentIndex() external view returns (uint128)',
|
|
760289
|
+
'function mToken() external view returns (address)',
|
|
760290
|
+
];
|
|
760291
|
+
// The address of Hyperlane's bridge adapter used by M0 Portal to interact with Hyperlane Protocol.
|
|
760292
|
+
// The address is the same across all EVM chains
|
|
760293
|
+
const HYPERLANE_BRIDGE_ADAPTER = '0xfCc1d596Ad6cAb0b5394eAa447d8626813180f32';
|
|
760294
|
+
// M0 Portal allows for different payload types
|
|
760295
|
+
const TOKEN_TRANSFER_PAYLOAD_TYPE = 0;
|
|
760296
|
+
// Hyperlane bridge adapter doesn't require any special arguments for token transfers
|
|
760297
|
+
const EMPTY_BRIDGE_ADAPTER_ARGS = '0x';
|
|
760298
|
+
class M0PortalTokenAdapter extends _EvmTokenAdapter_js__WEBPACK_IMPORTED_MODULE_1__/* .EvmTokenAdapter */ .d8 {
|
|
760299
|
+
portalAddress;
|
|
760300
|
+
portalContract;
|
|
760301
|
+
constructor(multiProvider, chainName, portalAddress, mTokenAddress) {
|
|
760302
|
+
// Initialize parent EvmTokenAdapter with the M token
|
|
760303
|
+
super(chainName, multiProvider, { token: mTokenAddress }, _hyperlane_xyz_core__WEBPACK_IMPORTED_MODULE_0__/* .ERC20__factory */ .XcE);
|
|
760304
|
+
this.portalAddress = portalAddress;
|
|
760305
|
+
// Initialize the Portal contract for cross-chain transfers
|
|
760306
|
+
this.portalContract = new ethers__WEBPACK_IMPORTED_MODULE_2__.Contract(this.portalAddress, PORTAL_ABI, this.getProvider());
|
|
760307
|
+
}
|
|
760308
|
+
// ========== ITokenAdapter overrides ==========
|
|
760309
|
+
async getMinimumTransferAmount(_recipient) {
|
|
760310
|
+
// M tokens use index-based accounting which can cause rounding
|
|
760311
|
+
// Return a small minimum to avoid rounding to 0
|
|
760312
|
+
return 1n;
|
|
760313
|
+
}
|
|
760314
|
+
// ========== IHypTokenAdapter implementation ==========
|
|
760315
|
+
async getDomains() {
|
|
760316
|
+
// This should be configured based on deployment
|
|
760317
|
+
// For now return empty - configuration will come from WarpCore config
|
|
760318
|
+
return [];
|
|
760319
|
+
}
|
|
760320
|
+
async getRouterAddress(_domain) {
|
|
760321
|
+
// Portal doesn't use traditional routers
|
|
760322
|
+
// Return the portal address as the "router"
|
|
760323
|
+
return Buffer.from((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .strip0x */ .LL)((0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .addressToBytes32 */ .In)(this.portalAddress)), 'hex');
|
|
760324
|
+
}
|
|
760325
|
+
async getAllRouters() {
|
|
760326
|
+
return [];
|
|
760327
|
+
}
|
|
760328
|
+
async getBridgedSupply() {
|
|
760329
|
+
// For simple transfer support, we don't need bridged supply tracking
|
|
760330
|
+
// WarpCore can work without this for basic transfers
|
|
760331
|
+
return undefined;
|
|
760332
|
+
}
|
|
760333
|
+
async quoteTransferRemoteGas({ destination, }) {
|
|
760334
|
+
const destinationChainId = this.multiProvider.getChainId(this.multiProvider.getChainName(destination));
|
|
760335
|
+
// Use Portal's built-in gas estimation
|
|
760336
|
+
const gasQuote = await this.portalContract.quote(destinationChainId, TOKEN_TRANSFER_PAYLOAD_TYPE, HYPERLANE_BRIDGE_ADAPTER);
|
|
760337
|
+
return {
|
|
760338
|
+
igpQuote: {
|
|
760339
|
+
addressOrDenom: undefined,
|
|
760340
|
+
amount: BigInt(gasQuote.toString()),
|
|
760341
|
+
},
|
|
760342
|
+
};
|
|
760343
|
+
}
|
|
760344
|
+
async populateTransferRemoteTx(params) {
|
|
760345
|
+
const destinationChainId = this.multiProvider.getChainId(this.multiProvider.getChainName(params.destination));
|
|
760346
|
+
// Get gas quote if not provided
|
|
760347
|
+
const gasQuote = params.interchainGas?.igpQuote?.amount ??
|
|
760348
|
+
(await this.quoteTransferRemoteGas({
|
|
760349
|
+
destination: params.destination,
|
|
760350
|
+
sender: params.fromAccountOwner,
|
|
760351
|
+
})).igpQuote?.amount;
|
|
760352
|
+
// Use Portal's sendToken function to support M0 Extensions like mUSD
|
|
760353
|
+
// Both source and destination use the same token address (mUSD on both chains)
|
|
760354
|
+
return this.portalContract.populateTransaction.sendToken(BigInt(params.weiAmountOrId.toString()), this.addresses.token, // source token
|
|
760355
|
+
destinationChainId, (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .addressToBytes32 */ .In)(this.addresses.token), // destination token (same address on both chains for mUSD)
|
|
760356
|
+
(0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .addressToBytes32 */ .In)(params.recipient), (0,_hyperlane_xyz_utils__WEBPACK_IMPORTED_MODULE_3__/* .addressToBytes32 */ .In)(params.fromAccountOwner ?? ethers__WEBPACK_IMPORTED_MODULE_2__.constants.AddressZero), // refundAddress,
|
|
760357
|
+
HYPERLANE_BRIDGE_ADAPTER, EMPTY_BRIDGE_ADAPTER_ARGS, {
|
|
760358
|
+
value: gasQuote,
|
|
760359
|
+
});
|
|
760360
|
+
}
|
|
760361
|
+
}
|
|
760362
|
+
//# sourceMappingURL=M0PortalTokenAdapter.js.map
|
|
760363
|
+
|
|
760364
|
+
/***/ }),
|
|
760365
|
+
|
|
760231
760366
|
/***/ 6410:
|
|
760232
760367
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
760233
760368
|
|
|
@@ -911306,7 +911441,7 @@ module.exports = /*#__PURE__*/JSON.parse('[{"type":"function","name":"proveL2Lea
|
|
|
911306
911441
|
/***/ 99468:
|
|
911307
911442
|
/***/ ((module) => {
|
|
911308
911443
|
|
|
911309
|
-
module.exports = {"rE":"29.0
|
|
911444
|
+
module.exports = {"rE":"29.1.0"};
|
|
911310
911445
|
|
|
911311
911446
|
/***/ })
|
|
911312
911447
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperlane-xyz/cli",
|
|
3
|
-
"version": "29.0
|
|
3
|
+
"version": "29.1.0",
|
|
4
4
|
"description": "A command-line utility for common Hyperlane operations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -79,21 +79,21 @@
|
|
|
79
79
|
"zod": "^3.21.2",
|
|
80
80
|
"zod-validation-error": "^3.3.0",
|
|
81
81
|
"zx": "^8.1.4",
|
|
82
|
-
"@hyperlane-xyz/aleo-sdk": "29.0
|
|
83
|
-
"@hyperlane-xyz/eslint-config": "29.0.1",
|
|
84
|
-
"@hyperlane-xyz/http-registry-server": "29.0.1",
|
|
85
|
-
"@hyperlane-xyz/deploy-sdk": "4.2.1",
|
|
82
|
+
"@hyperlane-xyz/aleo-sdk": "29.1.0",
|
|
86
83
|
"@hyperlane-xyz/core": "11.1.0",
|
|
87
|
-
"@hyperlane-xyz/cosmos-sdk": "29.0
|
|
88
|
-
"@hyperlane-xyz/
|
|
89
|
-
"@hyperlane-xyz/
|
|
90
|
-
"@hyperlane-xyz/
|
|
91
|
-
"@hyperlane-xyz/
|
|
92
|
-
"@hyperlane-xyz/
|
|
93
|
-
"@hyperlane-xyz/
|
|
94
|
-
"@hyperlane-xyz/
|
|
95
|
-
"@hyperlane-xyz/
|
|
96
|
-
"@hyperlane-xyz/sdk": "29.0
|
|
84
|
+
"@hyperlane-xyz/cosmos-sdk": "29.1.0",
|
|
85
|
+
"@hyperlane-xyz/eslint-config": "29.1.0",
|
|
86
|
+
"@hyperlane-xyz/deploy-sdk": "4.2.2",
|
|
87
|
+
"@hyperlane-xyz/http-registry-server": "29.1.0",
|
|
88
|
+
"@hyperlane-xyz/provider-sdk": "4.2.2",
|
|
89
|
+
"@hyperlane-xyz/radix-sdk": "29.1.0",
|
|
90
|
+
"@hyperlane-xyz/rebalancer": "27.2.1",
|
|
91
|
+
"@hyperlane-xyz/relayer": "1.1.14",
|
|
92
|
+
"@hyperlane-xyz/sdk": "29.1.0",
|
|
93
|
+
"@hyperlane-xyz/sealevel-sdk": "29.1.0",
|
|
94
|
+
"@hyperlane-xyz/tron-sdk": "22.1.6",
|
|
95
|
+
"@hyperlane-xyz/tsconfig": "^29.1.0",
|
|
96
|
+
"@hyperlane-xyz/utils": "29.1.0"
|
|
97
97
|
},
|
|
98
98
|
"engines": {
|
|
99
99
|
"node": ">=16"
|