@moonbeam-network/xcm-builder 3.2.3 → 3.2.4
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/build/index.mjs +7 -9
- package/build/index.mjs.map +1 -1
- package/package.json +4 -4
package/build/index.mjs
CHANGED
|
@@ -3639,7 +3639,7 @@ function Gmp() {
|
|
|
3639
3639
|
import { convertAddressTo32Bytes } from "@moonbeam-network/xcm-utils";
|
|
3640
3640
|
|
|
3641
3641
|
// src/mrl/providers/wormhole/wormhole/wormhole.ts
|
|
3642
|
-
import { EvmChain, EvmParachain as
|
|
3642
|
+
import { EvmChain, EvmParachain as EvmParachain4, Parachain as Parachain3 } from "@moonbeam-network/xcm-types";
|
|
3643
3643
|
import { getMultilocationDerivedAddresses as getMultilocationDerivedAddresses3 } from "@moonbeam-network/xcm-utils";
|
|
3644
3644
|
import { evmToAddress as evmToAddress4 } from "@polkadot/util-crypto/address";
|
|
3645
3645
|
import { Wormhole as Wormhole2 } from "@wormhole-foundation/sdk-connect";
|
|
@@ -3658,22 +3658,20 @@ var WormholeConfig = class _WormholeConfig {
|
|
|
3658
3658
|
};
|
|
3659
3659
|
|
|
3660
3660
|
// src/mrl/providers/wormhole/wormhole/wormholeFactory.ts
|
|
3661
|
+
import { EvmParachain as EvmParachain3 } from "@moonbeam-network/xcm-types";
|
|
3661
3662
|
import { Wormhole } from "@wormhole-foundation/sdk-connect";
|
|
3662
3663
|
import { EvmPlatform } from "@wormhole-foundation/sdk-evm";
|
|
3663
3664
|
function wormholeFactory(chain) {
|
|
3664
3665
|
return new Wormhole(
|
|
3665
3666
|
chain.isTestChain ? "Testnet" : "Mainnet",
|
|
3666
3667
|
[EvmPlatform],
|
|
3667
|
-
{
|
|
3668
|
+
EvmParachain3.isAnyEvmChain(chain) && chain.wh ? {
|
|
3668
3669
|
chains: {
|
|
3669
|
-
|
|
3670
|
-
rpc:
|
|
3671
|
-
},
|
|
3672
|
-
Moonbeam: {
|
|
3673
|
-
rpc: "https://rpc.api.moonbeam.network"
|
|
3670
|
+
[chain.wh.name]: {
|
|
3671
|
+
rpc: chain.rpc
|
|
3674
3672
|
}
|
|
3675
3673
|
}
|
|
3676
|
-
}
|
|
3674
|
+
} : void 0
|
|
3677
3675
|
);
|
|
3678
3676
|
}
|
|
3679
3677
|
|
|
@@ -3738,7 +3736,7 @@ function getPayload({
|
|
|
3738
3736
|
destination,
|
|
3739
3737
|
destinationAddress
|
|
3740
3738
|
}) {
|
|
3741
|
-
if (!
|
|
3739
|
+
if (!EvmParachain4.isAnyParachain(destination)) {
|
|
3742
3740
|
throw new Error(
|
|
3743
3741
|
`Destination ${destination.name} is not a Parachain or EvmParachain`
|
|
3744
3742
|
);
|