@moonbeam-network/xcm-builder 4.4.2 → 4.4.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.d.ts CHANGED
@@ -417,7 +417,7 @@ declare function eqBalances(): {
417
417
  transferXcm: () => ExtrinsicConfigBuilder;
418
418
  };
419
419
 
420
- declare function polkadotXcm$1(): {
420
+ declare function polkadotXcm$2(): {
421
421
  limitedReserveTransferAssets: () => {
422
422
  here: () => ExtrinsicConfigBuilder;
423
423
  X1: () => ExtrinsicConfigBuilder;
@@ -478,7 +478,7 @@ declare function ExtrinsicBuilder(): {
478
478
  eqBalances: typeof eqBalances;
479
479
  xTokens: typeof xTokens;
480
480
  xTransfer: typeof xTransfer;
481
- polkadotXcm: typeof polkadotXcm$1;
481
+ polkadotXcm: typeof polkadotXcm$2;
482
482
  xcmPallet: typeof xcmPallet$1;
483
483
  };
484
484
 
@@ -494,7 +494,7 @@ declare class SubstrateCallConfig {
494
494
  }
495
495
 
496
496
  type FeeConfigBuilder = ConfigBuilder<SubstrateCallConfig | ContractConfig, FeeConfigBuilderParams>;
497
- type BridgeFeeConfigBuilder = ConfigBuilder<SubstrateQueryConfig | ContractConfig, BridgeFeeConfigBuilderParams>;
497
+ type ProtocolFeeConfigBuilder = ConfigBuilder<SubstrateQueryConfig | ContractConfig, ProtocolFeeConfigBuilderParams>;
498
498
  interface FeeConfigBuilderParams {
499
499
  address: string;
500
500
  api: ApiPromise;
@@ -504,13 +504,8 @@ interface FeeConfigBuilderParams {
504
504
  feeAsset: ChainAsset;
505
505
  source: AnyChain;
506
506
  }
507
- interface BridgeFeeConfigBuilderParams {
508
- asset: ChainAsset;
509
- feeAsset: ChainAsset;
510
- address: string;
511
- balance?: AssetAmount;
512
- destination: AnyChain;
513
- source: AnyChain;
507
+ interface ProtocolFeeConfigBuilderParams extends Omit<FeeConfigBuilderParams, 'api'> {
508
+ bridgeChainFee: AssetAmount;
514
509
  }
515
510
  interface XcmPaymentFeeProps {
516
511
  isAssetReserveChain: boolean;
@@ -526,11 +521,14 @@ interface MoonbeamRuntimeXcmConfigAssetType extends Enum {
526
521
  type GetVersionedAssetId = (params: FeeConfigBuilderParams) => Promise<object> | object;
527
522
 
528
523
  declare function gateway(): {
529
- quoteSendTokenFee(): BridgeFeeConfigBuilder;
524
+ quoteSendTokenFee(): ProtocolFeeConfigBuilder;
530
525
  };
531
526
 
532
527
  declare function outboundQueueApi(): {
533
- calculateFee: () => BridgeFeeConfigBuilder;
528
+ calculateFee: () => {
529
+ mintForeignToken: () => ProtocolFeeConfigBuilder;
530
+ agentExecute: () => ProtocolFeeConfigBuilder;
531
+ };
534
532
  };
535
533
 
536
534
  declare function xcmPaymentApi(): {
@@ -607,7 +605,9 @@ interface SnowbridgeFunctionArgs {
607
605
  destinationParaId: number;
608
606
  amount: bigint;
609
607
  bridgeFeeAmount: bigint;
608
+ bridgeChainFee: bigint;
610
609
  requiresApproval: boolean;
610
+ value: bigint;
611
611
  }
612
612
  interface SnowbridgeConfigConstructorParams {
613
613
  args: SnowbridgeFunctionArgs;
@@ -1739,6 +1739,7 @@ type MrlExecuteConfigBuilder = ConfigBuilder<ContractConfig, MrlExecuteBuilderPa
1739
1739
  interface MrlBuilderParams extends BuilderParams<AnyChain> {
1740
1740
  isAutomatic: boolean;
1741
1741
  protocolFee?: AssetAmount;
1742
+ bridgeChainFee?: AssetAmount;
1742
1743
  moonApi: ApiPromise;
1743
1744
  moonAsset: ChainAsset;
1744
1745
  bridgeChain: AnyParachain;
@@ -1770,6 +1771,12 @@ declare function ethereumTokenTransfers(): {
1770
1771
  transferNativeToken: () => MrlConfigBuilder;
1771
1772
  };
1772
1773
 
1774
+ declare function polkadotXcm$1(): {
1775
+ transferAssetsUsingTypeAndThen: () => {
1776
+ canonicalEth: () => MrlConfigBuilder;
1777
+ };
1778
+ };
1779
+
1773
1780
  declare function xcmPallet(): {
1774
1781
  transferAssets: () => {
1775
1782
  globalConsensus: () => MrlConfigBuilder;
@@ -1780,6 +1787,7 @@ declare function xcmPallet(): {
1780
1787
  declare function extrinsic$1(): {
1781
1788
  ethereumTokenTransfers: typeof ethereumTokenTransfers;
1782
1789
  xcmPallet: typeof xcmPallet;
1790
+ polkadotXcm: typeof polkadotXcm$1;
1783
1791
  };
1784
1792
 
1785
1793
  declare function snowbridge(): {
@@ -1924,4 +1932,4 @@ declare function MrlBuilder(): {
1924
1932
 
1925
1933
  declare const BATCH_CONTRACT_ADDRESS = "0x0000000000000000000000000000000000000808";
1926
1934
 
1927
- export { type AssetAddressFormat, AssetMinBuilder, type AssetMinConfigBuilder, type AssetMinConfigBuilderParams, type AssetMultilocation, BATCH_CONTRACT_ABI, BATCH_CONTRACT_ADDRESS, BalanceBuilder, type BalanceBuilderParams, type BalanceConfigBuilder, type BridgeFeeConfigBuilder, type BridgeFeeConfigBuilderParams, type BuilderParams, type ConfigBuilder, ContractBuilder, ContractConfig, type ContractConfigBuilder, type ContractConfigConstructorParams, type DestinationMultilocation, ERC20_ABI, type EquilibriumSystemBalanceData, type EventMonitoringConfig, type EvmFunctionArgs, EvmQueryConfig, type EvmQueryConfigParams, type EvmQueryFunctions, ExtrinsicBuilder, ExtrinsicConfig, type ExtrinsicConfigBuilder, type ExtrinsicConfigConstructorParams, FeeBuilder, type FeeConfigBuilder, type FeeConfigBuilderParams, GATEWAY_ABI, type GetVersionedAssetId, MonitoringBuilder, type MonitoringBuilderConfig, type MoonbeamRuntimeXcmConfigAssetType, MrlBuilder, type MrlBuilderParams, type MrlConfigBuilder, type MrlExecuteBuilderParams, type MrlExecuteConfigBuilder, type MrlTransferConfig, type PalletBalancesAccountDataOld, type Parents, Protocols, Provider, type QueryConfigConstructorParams, SnowbridgeConfig, type SnowbridgeConfigConstructorParams, type SnowbridgeFunctionArgs, type SnowbridgeFunctions, SubstrateCallConfig, type SubstrateCallConfigConstructorParams, SubstrateQueryConfig, type TokensPalletAccountData, type Transact, TransferType, WormholeConfig, type WormholeConfigConstructorParams, type WormholeFunctionArgs, type WormholeTransferFunctions, type XcmPaymentFeeProps, XcmVersion, calculateSystemAccountBalance, evm, snowbridge, substrate, wormhole, wormholeFactory };
1935
+ export { type AssetAddressFormat, AssetMinBuilder, type AssetMinConfigBuilder, type AssetMinConfigBuilderParams, type AssetMultilocation, BATCH_CONTRACT_ABI, BATCH_CONTRACT_ADDRESS, BalanceBuilder, type BalanceBuilderParams, type BalanceConfigBuilder, type BuilderParams, type ConfigBuilder, ContractBuilder, ContractConfig, type ContractConfigBuilder, type ContractConfigConstructorParams, type DestinationMultilocation, ERC20_ABI, type EquilibriumSystemBalanceData, type EventMonitoringConfig, type EvmFunctionArgs, EvmQueryConfig, type EvmQueryConfigParams, type EvmQueryFunctions, ExtrinsicBuilder, ExtrinsicConfig, type ExtrinsicConfigBuilder, type ExtrinsicConfigConstructorParams, FeeBuilder, type FeeConfigBuilder, type FeeConfigBuilderParams, GATEWAY_ABI, type GetVersionedAssetId, MonitoringBuilder, type MonitoringBuilderConfig, type MoonbeamRuntimeXcmConfigAssetType, MrlBuilder, type MrlBuilderParams, type MrlConfigBuilder, type MrlExecuteBuilderParams, type MrlExecuteConfigBuilder, type MrlTransferConfig, type PalletBalancesAccountDataOld, type Parents, type ProtocolFeeConfigBuilder, type ProtocolFeeConfigBuilderParams, Protocols, Provider, type QueryConfigConstructorParams, SnowbridgeConfig, type SnowbridgeConfigConstructorParams, type SnowbridgeFunctionArgs, type SnowbridgeFunctions, SubstrateCallConfig, type SubstrateCallConfigConstructorParams, SubstrateQueryConfig, type TokensPalletAccountData, type Transact, TransferType, WormholeConfig, type WormholeConfigConstructorParams, type WormholeFunctionArgs, type WormholeTransferFunctions, type XcmPaymentFeeProps, XcmVersion, calculateSystemAccountBalance, evm, snowbridge, substrate, wormhole, wormholeFactory };
package/build/index.mjs CHANGED
@@ -119,11 +119,11 @@ function AssetMinBuilder() {
119
119
  };
120
120
  }
121
121
  function assetRegistry() {
122
- const pallet8 = "assetRegistry";
122
+ const pallet9 = "assetRegistry";
123
123
  return {
124
124
  assetMetadatas: () => ({
125
125
  build: ({ asset }) => new SubstrateQueryConfig({
126
- module: pallet8,
126
+ module: pallet9,
127
127
  func: "assetMetadatas",
128
128
  args: [asset],
129
129
  // biome-ignore lint/suspicious/noExplicitAny: not sure how to fix this
@@ -132,7 +132,7 @@ function assetRegistry() {
132
132
  }),
133
133
  currencyMetadatas: () => ({
134
134
  build: ({ asset }) => new SubstrateQueryConfig({
135
- module: pallet8,
135
+ module: pallet9,
136
136
  func: "currencyMetadatas",
137
137
  args: [asset],
138
138
  // biome-ignore lint/suspicious/noExplicitAny: not sure how to fix this
@@ -141,7 +141,7 @@ function assetRegistry() {
141
141
  }),
142
142
  metadata: () => ({
143
143
  build: ({ asset }) => new SubstrateQueryConfig({
144
- module: pallet8,
144
+ module: pallet9,
145
145
  func: "metadata",
146
146
  args: [asset],
147
147
  // biome-ignore lint/suspicious/noExplicitAny: not sure how to fix this
@@ -3912,7 +3912,7 @@ function gateway() {
3912
3912
  return {
3913
3913
  quoteSendTokenFee() {
3914
3914
  return {
3915
- build: ({ asset, destination, source }) => {
3915
+ build: ({ asset, destination, source, bridgeChainFee }) => {
3916
3916
  if (!asset.address) {
3917
3917
  throw new Error(`Asset ${asset.key} has no address`);
3918
3918
  }
@@ -3929,7 +3929,11 @@ function gateway() {
3929
3929
  return new ContractConfig({
3930
3930
  address: source.contracts.Gateway,
3931
3931
  abi: GATEWAY_ABI,
3932
- args: [asset.address, destination.parachainId, 0n],
3932
+ args: [
3933
+ asset.address,
3934
+ destination.parachainId,
3935
+ bridgeChainFee.amount
3936
+ ],
3933
3937
  func: "quoteSendTokenFee",
3934
3938
  module: "Gateway"
3935
3939
  });
@@ -3942,8 +3946,8 @@ function gateway() {
3942
3946
  // src/fee/outboundQueueApi/outboundQueueApi.ts
3943
3947
  function outboundQueueApi() {
3944
3948
  return {
3945
- calculateFee: () => {
3946
- return {
3949
+ calculateFee: () => ({
3950
+ mintForeignToken: () => ({
3947
3951
  build: ({ address, balance, feeAsset }) => {
3948
3952
  const args = [
3949
3953
  {
@@ -3963,8 +3967,34 @@ function outboundQueueApi() {
3963
3967
  transform: async (data) => data.local.toBigInt() + data.remote.toBigInt()
3964
3968
  });
3965
3969
  }
3966
- };
3967
- }
3970
+ }),
3971
+ agentExecute: () => ({
3972
+ build: ({ address, balance, destination }) => {
3973
+ const assetInDestination = balance ? destination.getChainAsset(balance) : void 0;
3974
+ const args = [
3975
+ {
3976
+ AgentExecute: {
3977
+ agentId: "0x0000000000000000000000000000000000000000000000000000000000000000",
3978
+ // actual value is not important
3979
+ TokenTransfer: {
3980
+ tokenId: assetInDestination?.address,
3981
+ recipient: address,
3982
+ amount: balance?.amount
3983
+ }
3984
+ }
3985
+ },
3986
+ null
3987
+ ];
3988
+ return new SubstrateQueryConfig({
3989
+ module: "outboundQueueApi",
3990
+ func: "calculateFee",
3991
+ args,
3992
+ queryType: "call",
3993
+ transform: async (data) => data.local.toBigInt() + data.remote.toBigInt()
3994
+ });
3995
+ }
3996
+ })
3997
+ })
3968
3998
  };
3969
3999
  }
3970
4000
 
@@ -4715,32 +4745,56 @@ function Gateway() {
4715
4745
  return {
4716
4746
  sendToken: () => ({
4717
4747
  provider,
4718
- build: ({ asset, destinationAddress, protocolFee, destination }) => callSendToken(asset, protocolFee, destination, destinationAddress)
4748
+ build: ({
4749
+ asset,
4750
+ destinationAddress,
4751
+ protocolFee,
4752
+ destination,
4753
+ bridgeChainFee
4754
+ }) => callSendToken(
4755
+ asset,
4756
+ protocolFee,
4757
+ destination,
4758
+ destinationAddress,
4759
+ bridgeChainFee
4760
+ )
4719
4761
  }),
4720
4762
  approveAndSendToken: () => ({
4721
4763
  provider,
4722
- build: ({ asset, destinationAddress, protocolFee, destination }) => {
4764
+ build: ({
4765
+ asset,
4766
+ destinationAddress,
4767
+ protocolFee,
4768
+ destination,
4769
+ bridgeChainFee
4770
+ }) => {
4723
4771
  const requiresApproval = protocolFee && !protocolFee.isSame(asset);
4724
4772
  return callSendToken(
4725
4773
  asset,
4726
4774
  protocolFee,
4727
4775
  destination,
4728
4776
  destinationAddress,
4777
+ bridgeChainFee,
4729
4778
  requiresApproval
4730
4779
  );
4731
4780
  }
4732
4781
  })
4733
4782
  };
4734
4783
  }
4735
- function callSendToken(asset, protocolFee, destination, destinationAddress, requiresApproval = false) {
4784
+ function callSendToken(asset, protocolFee, destination, destinationAddress, bridgeChainFee, requiresApproval = false) {
4736
4785
  if (!protocolFee) {
4737
4786
  throw new Error("Protocol fee is required for Gateway module");
4738
4787
  }
4788
+ if (!bridgeChainFee) {
4789
+ throw new Error("Bridge chain fee is required for Gateway module");
4790
+ }
4739
4791
  if (!EvmParachain4.isAnyParachain(destination)) {
4740
4792
  throw new Error(
4741
4793
  "Destination must be a Parachain or EvmParachain for sending token with Gateway module"
4742
4794
  );
4743
4795
  }
4796
+ const isDifferentAsset = !asset.isSame(protocolFee);
4797
+ const value = requiresApproval || isDifferentAsset ? protocolFee.amount : asset.amount + protocolFee.amount;
4744
4798
  return new SnowbridgeConfig({
4745
4799
  args: {
4746
4800
  tokenAddress: asset.address,
@@ -4748,7 +4802,9 @@ function callSendToken(asset, protocolFee, destination, destinationAddress, requ
4748
4802
  destinationParaId: destination.parachainId,
4749
4803
  amount: asset.amount,
4750
4804
  bridgeFeeAmount: protocolFee.amount,
4751
- requiresApproval
4805
+ bridgeChainFee: bridgeChainFee.amount,
4806
+ requiresApproval,
4807
+ value
4752
4808
  },
4753
4809
  func: "sendToken"
4754
4810
  });
@@ -4780,8 +4836,165 @@ function ethereumTokenTransfers() {
4780
4836
  };
4781
4837
  }
4782
4838
 
4783
- // src/mrl/providers/snowbridge/extrinsic/xcmPallet/xcmPallet.ts
4839
+ // src/mrl/providers/snowbridge/extrinsic/polkadotXcm/polkadotXcm.ts
4784
4840
  import { EvmChain as EvmChain2 } from "@moonbeam-network/xcm-types";
4841
+ var pallet7 = "polkadotXcm";
4842
+ function polkadotXcm2() {
4843
+ return {
4844
+ transferAssetsUsingTypeAndThen: () => {
4845
+ const func = "transferAssetsUsingTypeAndThen";
4846
+ const provider = "snowbridge" /* Snowbridge */;
4847
+ return {
4848
+ canonicalEth: () => ({
4849
+ provider,
4850
+ build: ({ asset, destination, destinationAddress, protocolFee }) => {
4851
+ if (!EvmChain2.is(destination)) {
4852
+ throw new Error(
4853
+ "Destination must be an EVM chain for globalConsensus function"
4854
+ );
4855
+ }
4856
+ if (!protocolFee) {
4857
+ throw new Error(
4858
+ "Bridge chain fee is required for the polkadotXcm.canonicalEth function"
4859
+ );
4860
+ }
4861
+ const protocolFeeAmount = protocolFee.amount * 110n / 100n;
4862
+ return new ExtrinsicConfig({
4863
+ module: pallet7,
4864
+ func,
4865
+ getArgs: (extrinsicFunction) => {
4866
+ const version = getExtrinsicArgumentVersion(extrinsicFunction);
4867
+ const dest = {
4868
+ [version]: {
4869
+ parents: 1,
4870
+ interior: "Here"
4871
+ }
4872
+ };
4873
+ const assets3 = {
4874
+ [version]: [
4875
+ {
4876
+ id: {
4877
+ parents: 1,
4878
+ interior: "Here"
4879
+ },
4880
+ fun: { Fungible: protocolFeeAmount }
4881
+ },
4882
+ {
4883
+ id: {
4884
+ parents: 2,
4885
+ interior: {
4886
+ X1: [
4887
+ {
4888
+ GlobalConsensus: {
4889
+ Ethereum: { chainId: destination.id }
4890
+ }
4891
+ }
4892
+ ]
4893
+ }
4894
+ },
4895
+ fun: { Fungible: asset.amount }
4896
+ }
4897
+ ]
4898
+ };
4899
+ const assetsTransferType = 2 /* DestinationReserve */;
4900
+ const remoteFeesId = {
4901
+ [version]: {
4902
+ parents: 1,
4903
+ interior: "Here"
4904
+ }
4905
+ };
4906
+ const feesTransferType = 2 /* DestinationReserve */;
4907
+ const customXcmOnDest = {
4908
+ [version]: [
4909
+ {
4910
+ InitiateReserveWithdraw: {
4911
+ assets: {
4912
+ Definite: [
4913
+ {
4914
+ id: {
4915
+ parents: 1,
4916
+ interior: {
4917
+ X1: [
4918
+ {
4919
+ GlobalConsensus: {
4920
+ Ethereum: { chainId: destination.id }
4921
+ }
4922
+ }
4923
+ ]
4924
+ }
4925
+ },
4926
+ fun: { Fungible: asset.amount }
4927
+ }
4928
+ ]
4929
+ },
4930
+ reserve: {
4931
+ parents: 1,
4932
+ interior: {
4933
+ X1: [
4934
+ {
4935
+ GlobalConsensus: {
4936
+ Ethereum: { chainId: destination.id }
4937
+ }
4938
+ }
4939
+ ]
4940
+ }
4941
+ },
4942
+ xcm: [
4943
+ {
4944
+ DepositAsset: {
4945
+ assets: {
4946
+ Definite: [
4947
+ {
4948
+ id: {
4949
+ parents: 0,
4950
+ interior: "Here"
4951
+ },
4952
+ fun: { Fungible: asset.amount }
4953
+ }
4954
+ ]
4955
+ },
4956
+ beneficiary: {
4957
+ parents: 0,
4958
+ interior: {
4959
+ X1: [
4960
+ {
4961
+ AccountKey20: {
4962
+ network: {
4963
+ Ethereum: { chainId: destination.id }
4964
+ },
4965
+ key: destinationAddress
4966
+ }
4967
+ }
4968
+ ]
4969
+ }
4970
+ }
4971
+ }
4972
+ }
4973
+ ]
4974
+ }
4975
+ }
4976
+ ]
4977
+ };
4978
+ return [
4979
+ dest,
4980
+ assets3,
4981
+ assetsTransferType,
4982
+ remoteFeesId,
4983
+ feesTransferType,
4984
+ customXcmOnDest,
4985
+ "Unlimited"
4986
+ ];
4987
+ }
4988
+ });
4989
+ }
4990
+ })
4991
+ };
4992
+ }
4993
+ };
4994
+ }
4995
+
4996
+ // src/mrl/providers/snowbridge/extrinsic/xcmPallet/xcmPallet.ts
4997
+ import { EvmChain as EvmChain3 } from "@moonbeam-network/xcm-types";
4785
4998
 
4786
4999
  // src/mrl/providers/snowbridge/extrinsic/xcmPallet/xcmPallet.utils.ts
4787
5000
  function getGlobalConsensusArgs({
@@ -4834,7 +5047,7 @@ function getGlobalConsensusArgs({
4834
5047
  }
4835
5048
 
4836
5049
  // src/mrl/providers/snowbridge/extrinsic/xcmPallet/xcmPallet.ts
4837
- var pallet7 = "xcmPallet";
5050
+ var pallet8 = "xcmPallet";
4838
5051
  function xcmPallet2() {
4839
5052
  return {
4840
5053
  transferAssets: () => {
@@ -4844,13 +5057,13 @@ function xcmPallet2() {
4844
5057
  globalConsensus: () => ({
4845
5058
  provider,
4846
5059
  build: ({ asset, destination, destinationAddress }) => {
4847
- if (!EvmChain2.is(destination)) {
5060
+ if (!EvmChain3.is(destination)) {
4848
5061
  throw new Error(
4849
5062
  "Destination must be an EVM chain for globalConsensus function"
4850
5063
  );
4851
5064
  }
4852
5065
  return new ExtrinsicConfig({
4853
- module: pallet7,
5066
+ module: pallet8,
4854
5067
  func,
4855
5068
  getArgs: (extrinsicFunction) => {
4856
5069
  const assets3 = [
@@ -4883,14 +5096,14 @@ function xcmPallet2() {
4883
5096
  globalConsensusErc20: () => ({
4884
5097
  provider,
4885
5098
  build: ({ asset, destination, destinationAddress }) => {
4886
- if (!EvmChain2.is(destination)) {
5099
+ if (!EvmChain3.is(destination)) {
4887
5100
  throw new Error(
4888
5101
  "Destination must be an EVM chain for globalConsensusErc20 function"
4889
5102
  );
4890
5103
  }
4891
5104
  const assetInDestination = destination.getChainAsset(asset);
4892
5105
  return new ExtrinsicConfig({
4893
- module: pallet7,
5106
+ module: pallet8,
4894
5107
  func,
4895
5108
  getArgs: (extrinsicFunction) => {
4896
5109
  const assets3 = [
@@ -4935,7 +5148,7 @@ function xcmPallet2() {
4935
5148
 
4936
5149
  // src/mrl/providers/snowbridge/extrinsic/index.ts
4937
5150
  function extrinsic() {
4938
- return { ethereumTokenTransfers, xcmPallet: xcmPallet2 };
5151
+ return { ethereumTokenTransfers, xcmPallet: xcmPallet2, polkadotXcm: polkadotXcm2 };
4939
5152
  }
4940
5153
 
4941
5154
  // src/mrl/providers/snowbridge/index.ts
@@ -4962,7 +5175,7 @@ import {
4962
5175
  import { getMultilocationDerivedAddresses } from "@moonbeam-network/xcm-utils";
4963
5176
  var BUY_EXECUTION_FEE = 100000000000000000n;
4964
5177
  var CROSS_CHAIN_FEE = 100000000000000000n;
4965
- function polkadotXcm2() {
5178
+ function polkadotXcm3() {
4966
5179
  const provider = "wormhole" /* Wormhole */;
4967
5180
  return {
4968
5181
  send: () => ({
@@ -5915,7 +6128,7 @@ var WormholeConfig = class _WormholeConfig {
5915
6128
  };
5916
6129
 
5917
6130
  // src/mrl/providers/wormhole/wormhole/wormhole.ts
5918
- import { EvmChain as EvmChain3, EvmParachain as EvmParachain7, Parachain as Parachain3 } from "@moonbeam-network/xcm-types";
6131
+ import { EvmChain as EvmChain4, EvmParachain as EvmParachain7, Parachain as Parachain3 } from "@moonbeam-network/xcm-types";
5919
6132
  import { getMultilocationDerivedAddresses as getMultilocationDerivedAddresses3 } from "@moonbeam-network/xcm-utils";
5920
6133
  import { evmToAddress as evmToAddress4 } from "@polkadot/util-crypto/address";
5921
6134
  import { Wormhole as Wormhole2 } from "@wormhole-foundation/sdk-connect";
@@ -5956,7 +6169,7 @@ function wormhole() {
5956
6169
  }) => {
5957
6170
  const isSourceParachain = Parachain3.is(source);
5958
6171
  const isDestinationMoonChain = destination.isEqual(moonChain);
5959
- const isDestinationEvmChain = EvmChain3.is(destination);
6172
+ const isDestinationEvmChain = EvmChain4.is(destination);
5960
6173
  const isNativeAsset = asset.isSame(
5961
6174
  isDestinationEvmChain ? moonChain.nativeAsset : source.nativeAsset
5962
6175
  );
@@ -7610,7 +7823,7 @@ function ethereumXcm() {
7610
7823
 
7611
7824
  // src/mrl/providers/wormhole/extrinsic/index.ts
7612
7825
  function extrinsic2() {
7613
- return { ethereumXcm, polkadotXcm: polkadotXcm2 };
7826
+ return { ethereumXcm, polkadotXcm: polkadotXcm3 };
7614
7827
  }
7615
7828
 
7616
7829
  // src/mrl/providers/wormhole/index.ts