rubic-sdk 4.46.0 → 4.47.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.
Files changed (63) hide show
  1. package/dist/rubic-sdk.min.js +2627 -207
  2. package/dist/rubic-sdk.min.js.map +1 -1
  3. package/lib/features/cross-chain/calculation-manager/constants/cross-chain-providers.d.ts +2 -1
  4. package/lib/features/cross-chain/calculation-manager/constants/cross-chain-providers.js +3 -1
  5. package/lib/features/cross-chain/calculation-manager/constants/cross-chain-providers.js.map +1 -1
  6. package/lib/features/cross-chain/calculation-manager/models/cross-chain-trade-type.d.ts +1 -0
  7. package/lib/features/cross-chain/calculation-manager/models/cross-chain-trade-type.js +2 -1
  8. package/lib/features/cross-chain/calculation-manager/models/cross-chain-trade-type.js.map +1 -1
  9. package/lib/features/cross-chain/calculation-manager/providers/common/emv-cross-chain-trade/constants/evm-common-cross-chain-abi.js +26 -8
  10. package/lib/features/cross-chain/calculation-manager/providers/common/emv-cross-chain-trade/constants/evm-common-cross-chain-abi.js.map +1 -1
  11. package/lib/features/cross-chain/calculation-manager/providers/common/models/bridge-type.d.ts +2 -1
  12. package/lib/features/cross-chain/calculation-manager/providers/common/models/default-bridge-type.d.ts +1 -0
  13. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/erc-677-abi.d.ts +2 -0
  14. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/erc-677-abi.js +17 -0
  15. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/erc-677-abi.js.map +1 -0
  16. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/fee-manager-abi.d.ts +2 -0
  17. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/fee-manager-abi.js +61 -0
  18. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/fee-manager-abi.js.map +1 -0
  19. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/foreign-bridge-abi.d.ts +2 -0
  20. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/foreign-bridge-abi.js +72 -0
  21. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/foreign-bridge-abi.js.map +1 -0
  22. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/home-bridge-abi.d.ts +2 -0
  23. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/home-bridge-abi.js +1390 -0
  24. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/home-bridge-abi.js.map +1 -0
  25. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/native-bridge-abi.d.ts +2 -0
  26. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/native-bridge-abi.js +14 -0
  27. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/native-bridge-abi.js.map +1 -0
  28. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-contract-address.d.ts +6 -0
  29. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-contract-address.js +16 -0
  30. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-contract-address.js.map +1 -0
  31. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-supported-blockchains.d.ts +2 -0
  32. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-supported-blockchains.js +9 -0
  33. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-supported-blockchains.js.map +1 -0
  34. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/bridge-manager.d.ts +7 -0
  35. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/bridge-manager.js +15 -0
  36. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/bridge-manager.js.map +1 -0
  37. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/foreign-bridge.d.ts +14 -0
  38. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/foreign-bridge.js +54 -0
  39. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/foreign-bridge.js.map +1 -0
  40. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/home-bridge.d.ts +14 -0
  41. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/home-bridge.js +54 -0
  42. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/home-bridge.js.map +1 -0
  43. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/omni-bridge.d.ts +108 -0
  44. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/omni-bridge.js +112 -0
  45. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/omni-bridge.js.map +1 -0
  46. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-provider.d.ts +19 -0
  47. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-provider.js +182 -0
  48. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-provider.js.map +1 -0
  49. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-trade.d.ts +55 -0
  50. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-trade.js +232 -0
  51. package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-trade.js.map +1 -0
  52. package/lib/features/cross-chain/calculation-manager/providers/stargate-provider/stargate-cross-chain-trade.d.ts +1 -2
  53. package/lib/features/cross-chain/calculation-manager/providers/stargate-provider/stargate-cross-chain-trade.js.map +1 -1
  54. package/lib/features/cross-chain/status-manager/cross-chain-status-manager.d.ts +1 -0
  55. package/lib/features/cross-chain/status-manager/cross-chain-status-manager.js +15 -1
  56. package/lib/features/cross-chain/status-manager/cross-chain-status-manager.js.map +1 -1
  57. package/lib/features/cross-chain/status-manager/models/rubic-backend-ps-status.d.ts +6 -0
  58. package/lib/features/cross-chain/status-manager/models/rubic-backend-ps-status.js +3 -0
  59. package/lib/features/cross-chain/status-manager/models/rubic-backend-ps-status.js.map +1 -0
  60. package/lib/index.d.ts +14 -0
  61. package/lib/index.js +14 -0
  62. package/lib/index.js.map +1 -1
  63. package/package.json +1 -1
@@ -179041,6 +179041,7 @@ const cbridge_cross_chain_provider_1 = __webpack_require__(/*! ../providers/cbri
179041
179041
  const changenow_cross_chain_provider_1 = __webpack_require__(/*! ../providers/changenow-provider/changenow-cross-chain-provider */ "./src/features/cross-chain/calculation-manager/providers/changenow-provider/changenow-cross-chain-provider.ts");
179042
179042
  const debridge_cross_chain_provider_1 = __webpack_require__(/*! ../providers/debridge-provider/debridge-cross-chain-provider */ "./src/features/cross-chain/calculation-manager/providers/debridge-provider/debridge-cross-chain-provider.ts");
179043
179043
  const lifi_cross_chain_provider_1 = __webpack_require__(/*! ../providers/lifi-provider/lifi-cross-chain-provider */ "./src/features/cross-chain/calculation-manager/providers/lifi-provider/lifi-cross-chain-provider.ts");
179044
+ const pulse_chain_cross_chain_provider_1 = __webpack_require__(/*! ../providers/pulse-chain-bridge/pulse-chain-cross-chain-provider */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-provider.ts");
179044
179045
  // import { ScrollBridgeProvider } from 'src/features/cross-chain/calculation-manager/providers/scroll-bridge/scroll-bridge-provider';
179045
179046
  const squidrouter_cross_chain_provider_1 = __webpack_require__(/*! ../providers/squidrouter-provider/squidrouter-cross-chain-provider */ "./src/features/cross-chain/calculation-manager/providers/squidrouter-provider/squidrouter-cross-chain-provider.ts");
179046
179047
  const symbiosis_cross_chain_provider_1 = __webpack_require__(/*! ../providers/symbiosis-provider/symbiosis-cross-chain-provider */ "./src/features/cross-chain/calculation-manager/providers/symbiosis-provider/symbiosis-cross-chain-provider.ts");
@@ -179055,7 +179056,8 @@ const proxyProviders = [
179055
179056
  cbridge_cross_chain_provider_1.CbridgeCrossChainProvider,
179056
179057
  lifi_cross_chain_provider_1.LifiCrossChainProvider,
179057
179058
  squidrouter_cross_chain_provider_1.SquidrouterCrossChainProvider,
179058
- rango_cross_chain_provider_1.RangoCrossChainProvider
179059
+ rango_cross_chain_provider_1.RangoCrossChainProvider,
179060
+ pulse_chain_cross_chain_provider_1.PulseChainCrossChainProvider
179059
179061
  ];
179060
179062
  const nonProxyProviders = [
179061
179063
  debridge_cross_chain_provider_1.DebridgeCrossChainProvider,
@@ -179407,7 +179409,8 @@ exports.CROSS_CHAIN_TRADE_TYPE = {
179407
179409
  SQUIDROUTER: 'squidrouter',
179408
179410
  SCROLL_BRIDGE: 'scroll_bridge',
179409
179411
  TAIKO_BRIDGE: 'taiko_bridge',
179410
- RANGO: 'rango'
179412
+ RANGO: 'rango',
179413
+ PULSE_CHAIN_BRIDGE: 'pulse_chain_bridge'
179411
179414
  };
179412
179415
 
179413
179416
 
@@ -184299,14 +184302,23 @@ exports.evmCommonCrossChainAbi = [
184299
184302
  },
184300
184303
  {
184301
184304
  components: [
184302
- { internalType: 'address payable', name: 'destination', type: 'address' }
184305
+ {
184306
+ internalType: 'address',
184307
+ name: 'receiver',
184308
+ type: 'address'
184309
+ },
184310
+ {
184311
+ internalType: 'bytes',
184312
+ name: 'data',
184313
+ type: 'bytes'
184314
+ }
184303
184315
  ],
184304
- internalType: 'struct TransferFacet.TransferData',
184305
- name: '_transferData',
184316
+ internalType: 'struct TransferAndCallData',
184317
+ name: '_transferAndCallData',
184306
184318
  type: 'tuple'
184307
184319
  }
184308
184320
  ],
184309
- name: 'startBridgeTokensViaTransfer',
184321
+ name: 'startBridgeTokensViaTransferAndCall',
184310
184322
  outputs: [],
184311
184323
  stateMutability: 'payable',
184312
184324
  type: 'function'
@@ -184348,14 +184360,23 @@ exports.evmCommonCrossChainAbi = [
184348
184360
  },
184349
184361
  {
184350
184362
  components: [
184351
- { internalType: 'address payable', name: 'destination', type: 'address' }
184363
+ {
184364
+ internalType: 'address',
184365
+ name: 'receiver',
184366
+ type: 'address'
184367
+ },
184368
+ {
184369
+ internalType: 'bytes',
184370
+ name: 'data',
184371
+ type: 'bytes'
184372
+ }
184352
184373
  ],
184353
- internalType: 'struct TransferFacet.TransferData',
184354
- name: '_transferData',
184374
+ internalType: 'struct TransferAndCallData',
184375
+ name: '_transferAndCallData',
184355
184376
  type: 'tuple'
184356
184377
  }
184357
184378
  ],
184358
- name: 'swapAndStartBridgeTokensViaTransfer',
184379
+ name: 'swapAndStartBridgeTokensViaTransferAndCall',
184359
184380
  outputs: [],
184360
184381
  stateMutability: 'payable',
184361
184382
  type: 'function'
@@ -186353,82 +186374,2566 @@ class LifiCrossChainTrade extends evm_cross_chain_trade_1.EvmCrossChainTrade {
186353
186374
  get fromContractAddress() {
186354
186375
  return this.isProxyTrade
186355
186376
  ? rubic_proxy_contract_address_1.rubicProxyContractAddress[this.fromBlockchain].gateway
186356
- : this.providerGateway;
186377
+ : this.providerGateway;
186378
+ }
186379
+ get methodName() {
186380
+ return 'startBridgeTokensViaGenericCrossChain';
186381
+ }
186382
+ constructor(crossChainTrade, providerAddress, routePath) {
186383
+ super(providerAddress, routePath);
186384
+ this.type = cross_chain_trade_type_1.CROSS_CHAIN_TRADE_TYPE.LIFI;
186385
+ this.isAggregator = true;
186386
+ this.from = crossChainTrade.from;
186387
+ this.to = crossChainTrade.to;
186388
+ this.route = crossChainTrade.route;
186389
+ this.providerGateway = this.route.steps[0].estimate.approvalAddress;
186390
+ this.gasData = crossChainTrade.gasData;
186391
+ this.toTokenAmountMin = crossChainTrade.toTokenAmountMin;
186392
+ this.feeInfo = crossChainTrade.feeInfo;
186393
+ this.slippage = crossChainTrade.slippage;
186394
+ this.priceImpact = crossChainTrade.priceImpact;
186395
+ this.onChainSubtype = crossChainTrade.onChainSubtype;
186396
+ this.bridgeType = crossChainTrade.bridgeType;
186397
+ }
186398
+ async swapDirect(options = {}) {
186399
+ try {
186400
+ await this.checkTradeErrors();
186401
+ if (options.receiverAddress) {
186402
+ throw new errors_1.RubicSdkError('Receiver address not supported');
186403
+ }
186404
+ await this.checkAllowanceAndApprove(options);
186405
+ const { onConfirm, gasLimit, gasPrice, gasPriceOptions } = options;
186406
+ let transactionHash;
186407
+ const onTransactionHash = (hash) => {
186408
+ if (onConfirm) {
186409
+ onConfirm(hash);
186410
+ }
186411
+ transactionHash = hash;
186412
+ };
186413
+ // eslint-disable-next-line no-useless-catch
186414
+ try {
186415
+ const { data, value, to } = await this.fetchSwapData(options?.receiverAddress, false, options?.directTransaction);
186416
+ await this.web3Private.trySendTransaction(to, {
186417
+ data,
186418
+ value,
186419
+ onTransactionHash,
186420
+ gas: gasLimit,
186421
+ gasPrice,
186422
+ gasPriceOptions
186423
+ });
186424
+ return transactionHash;
186425
+ }
186426
+ catch (err) {
186427
+ throw err;
186428
+ }
186429
+ }
186430
+ catch (err) {
186431
+ if ([400, 500, 503].includes(err.code)) {
186432
+ throw new errors_1.SwapRequestError();
186433
+ }
186434
+ throw err;
186435
+ }
186436
+ }
186437
+ async getContractParams(options, skipAmountChangeCheck = false) {
186438
+ const { data, value: providerValue, to: providerRouter } = await this.fetchSwapData(options?.receiverAddress, skipAmountChangeCheck, options?.directTransaction);
186439
+ const bridgeData = proxy_cross_chain_evm_trade_1.ProxyCrossChainEvmTrade.getBridgeData(options, {
186440
+ walletAddress: this.walletAddress,
186441
+ fromTokenAmount: this.from,
186442
+ toTokenAmount: this.to,
186443
+ srcChainTrade: null,
186444
+ providerAddress: this.providerAddress,
186445
+ type: `lifi:${this.bridgeType}`,
186446
+ fromAddress: this.walletAddress
186447
+ });
186448
+ const extraNativeFee = this.from.isNative
186449
+ ? new bignumber_js_1.default(providerValue).minus(this.from.stringWeiAmount).toFixed()
186450
+ : new bignumber_js_1.default(providerValue).toFixed();
186451
+ const providerData = await proxy_cross_chain_evm_trade_1.ProxyCrossChainEvmTrade.getGenericProviderData(providerRouter, data, this.fromBlockchain, providerRouter, extraNativeFee);
186452
+ const methodArguments = [bridgeData, providerData];
186453
+ const value = this.getSwapValue(providerValue);
186454
+ const transactionConfiguration = evm_web3_pure_1.EvmWeb3Pure.encodeMethodCall(rubic_proxy_contract_address_1.rubicProxyContractAddress[this.from.blockchain].router, evm_common_cross_chain_abi_1.evmCommonCrossChainAbi, this.methodName, methodArguments, value);
186455
+ const sendingToken = this.from.isNative ? [] : [this.from.address];
186456
+ const sendingAmount = this.from.isNative ? [] : [this.from.stringWeiAmount];
186457
+ return {
186458
+ contractAddress: rubic_proxy_contract_address_1.rubicProxyContractAddress[this.from.blockchain].gateway,
186459
+ contractAbi: gateway_rubic_cross_chain_abi_1.gatewayRubicCrossChainAbi,
186460
+ methodName: 'startViaRubic',
186461
+ methodArguments: [sendingToken, sendingAmount, transactionConfiguration.data],
186462
+ value
186463
+ };
186464
+ }
186465
+ async fetchSwapData(receiverAddress, skipAmountChangeCheck = false, directTransaction) {
186466
+ if (directTransaction) {
186467
+ return {
186468
+ data: directTransaction.data,
186469
+ to: directTransaction.to,
186470
+ value: directTransaction.value
186471
+ };
186472
+ }
186473
+ const firstStep = this.route.steps[0];
186474
+ const step = {
186475
+ ...firstStep,
186476
+ action: {
186477
+ ...firstStep.action,
186478
+ fromAddress: this.walletAddress,
186479
+ toAddress: receiverAddress || this.walletAddress
186480
+ },
186481
+ execution: {
186482
+ status: 'NOT_STARTED',
186483
+ process: [
186484
+ {
186485
+ message: 'Preparing transaction.',
186486
+ startedAt: Date.now(),
186487
+ status: 'STARTED',
186488
+ type: 'CROSS_CHAIN'
186489
+ }
186490
+ ]
186491
+ }
186492
+ };
186493
+ const swapResponse = await this.httpClient.post('https://li.quest/v1/advanced/stepTransaction', {
186494
+ ...step
186495
+ });
186496
+ if (!skipAmountChangeCheck) {
186497
+ evm_cross_chain_trade_1.EvmCrossChainTrade.checkAmountChange(swapResponse.transactionRequest, swapResponse.estimate.toAmount, this.to.stringWeiAmount);
186498
+ }
186499
+ return swapResponse.transactionRequest;
186500
+ }
186501
+ getTradeAmountRatio(fromUsd) {
186502
+ return fromUsd.dividedBy(this.to.tokenAmount);
186503
+ }
186504
+ getTradeInfo() {
186505
+ return {
186506
+ estimatedGas: this.estimatedGas,
186507
+ feeInfo: this.feeInfo,
186508
+ priceImpact: this.priceImpact || null,
186509
+ slippage: this.slippage * 100,
186510
+ routePath: this.routePath
186511
+ };
186512
+ }
186513
+ }
186514
+ exports.LifiCrossChainTrade = LifiCrossChainTrade;
186515
+
186516
+
186517
+ /***/ }),
186518
+
186519
+ /***/ "./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-bridge-types.ts":
186520
+ /*!**********************************************************************************************************!*\
186521
+ !*** ./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-bridge-types.ts ***!
186522
+ \**********************************************************************************************************/
186523
+ /***/ ((__unused_webpack_module, exports) => {
186524
+
186525
+ "use strict";
186526
+
186527
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
186528
+ exports.LIFI_BRIDGE_TYPES = void 0;
186529
+ exports.LIFI_BRIDGE_TYPES = {
186530
+ ACROSS: 'across',
186531
+ AMAROK: 'connext',
186532
+ ARBITRUM: 'arbitrum',
186533
+ AVALANCHE: 'avalanche',
186534
+ CBRIDGE: 'cbridge',
186535
+ CONNEXT: 'connext',
186536
+ HOP: 'hop',
186537
+ HYPHEN: 'hyphen',
186538
+ MULTICHAIN: 'multichain',
186539
+ STARGATE: 'stargate',
186540
+ // New
186541
+ ALLBRIDGE: 'allbridge',
186542
+ POLYGON_BRIDGE: 'polygon',
186543
+ OMNI_BRIDGE: 'omni',
186544
+ GNOSIS_BRIDGE: 'gnosis',
186545
+ CONNEXT_AMAROK: 'amarok',
186546
+ CIRCLE_CELER_BRIDGE: 'celercircle',
186547
+ LI_FUEL: 'lifuel',
186548
+ WORMHOLE: 'portal',
186549
+ CELERIM: 'celerim'
186550
+ };
186551
+
186552
+
186553
+ /***/ }),
186554
+
186555
+ /***/ "./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-swap-status.ts":
186556
+ /*!*********************************************************************************************************!*\
186557
+ !*** ./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-swap-status.ts ***!
186558
+ \*********************************************************************************************************/
186559
+ /***/ ((__unused_webpack_module, exports) => {
186560
+
186561
+ "use strict";
186562
+
186563
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
186564
+ exports.LIFI_SWAP_STATUS = void 0;
186565
+ exports.LIFI_SWAP_STATUS = {
186566
+ NOT_FOUND: 'NOT_FOUND',
186567
+ INVALID: 'INVALID',
186568
+ PENDING: 'PENDING',
186569
+ DONE: 'DONE',
186570
+ FAILED: 'FAILED'
186571
+ };
186572
+
186573
+
186574
+ /***/ }),
186575
+
186576
+ /***/ "./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-transaction-request.ts":
186577
+ /*!*****************************************************************************************************************!*\
186578
+ !*** ./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-transaction-request.ts ***!
186579
+ \*****************************************************************************************************************/
186580
+ /***/ ((__unused_webpack_module, exports) => {
186581
+
186582
+ "use strict";
186583
+
186584
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
186585
+
186586
+
186587
+ /***/ }),
186588
+
186589
+ /***/ "./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/uniq-lifi-bridge-types.ts":
186590
+ /*!***************************************************************************************************************!*\
186591
+ !*** ./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/uniq-lifi-bridge-types.ts ***!
186592
+ \***************************************************************************************************************/
186593
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
186594
+
186595
+ "use strict";
186596
+
186597
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
186598
+ exports.UNIQ_LIFI_BRIDGE_TYPES = void 0;
186599
+ const default_bridge_type_1 = __webpack_require__(/*! ../../common/models/default-bridge-type */ "./src/features/cross-chain/calculation-manager/providers/common/models/default-bridge-type.ts");
186600
+ const lifi_bridge_types_1 = __webpack_require__(/*! ./lifi-bridge-types */ "./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-bridge-types.ts");
186601
+ // @TODO add type
186602
+ exports.UNIQ_LIFI_BRIDGE_TYPES = {
186603
+ ACROSS: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.ACROSS,
186604
+ AMAROK: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.AMAROK,
186605
+ ARBITRUM: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.ARBITRUM_BRIDGE,
186606
+ AVALANCHE: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.AVALANCHE_BRIDGE,
186607
+ CBRIDGE: lifi_bridge_types_1.LIFI_BRIDGE_TYPES.CBRIDGE,
186608
+ CONNEXT: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.CONNEXT,
186609
+ CELERIM: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.CELERIM,
186610
+ HOP: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.HOP,
186611
+ HYPHEN: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.HYPHEN,
186612
+ MULTICHAIN: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.MULTICHAIN,
186613
+ STARGATE: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.STARGATE,
186614
+ ALLBRIDGE: lifi_bridge_types_1.LIFI_BRIDGE_TYPES.ALLBRIDGE,
186615
+ POLYGON_BRIDGE: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.POLYGON,
186616
+ OMNI_BRIDGE: lifi_bridge_types_1.LIFI_BRIDGE_TYPES.OMNI_BRIDGE,
186617
+ GNOSIS_BRIDGE: lifi_bridge_types_1.LIFI_BRIDGE_TYPES.GNOSIS_BRIDGE,
186618
+ CONNEXT_AMAROK: lifi_bridge_types_1.LIFI_BRIDGE_TYPES.CONNEXT_AMAROK,
186619
+ CIRCLE_CELER_BRIDGE: lifi_bridge_types_1.LIFI_BRIDGE_TYPES.CIRCLE_CELER_BRIDGE,
186620
+ LI_FUEL: lifi_bridge_types_1.LIFI_BRIDGE_TYPES.LI_FUEL,
186621
+ WORMHOLE: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.WORMHOLE
186622
+ };
186623
+
186624
+
186625
+ /***/ }),
186626
+
186627
+ /***/ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/erc-677-abi.ts":
186628
+ /*!************************************************************************************************************!*\
186629
+ !*** ./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/erc-677-abi.ts ***!
186630
+ \************************************************************************************************************/
186631
+ /***/ ((__unused_webpack_module, exports) => {
186632
+
186633
+ "use strict";
186634
+
186635
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
186636
+ exports.erc677Abi = void 0;
186637
+ exports.erc677Abi = [
186638
+ {
186639
+ inputs: [
186640
+ { internalType: 'address', name: 'to', type: 'address' },
186641
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
186642
+ { internalType: 'bytes', name: '', type: 'bytes' }
186643
+ ],
186644
+ name: 'transferAndCall',
186645
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
186646
+ stateMutability: 'nonpayable',
186647
+ type: 'function'
186648
+ }
186649
+ ];
186650
+
186651
+
186652
+ /***/ }),
186653
+
186654
+ /***/ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/fee-manager-abi.ts":
186655
+ /*!****************************************************************************************************************!*\
186656
+ !*** ./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/fee-manager-abi.ts ***!
186657
+ \****************************************************************************************************************/
186658
+ /***/ ((__unused_webpack_module, exports) => {
186659
+
186660
+ "use strict";
186661
+
186662
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
186663
+ exports.feeManagerAbi = void 0;
186664
+ exports.feeManagerAbi = [
186665
+ {
186666
+ inputs: [],
186667
+ name: 'FOREIGN_TO_HOME_FEE',
186668
+ outputs: [
186669
+ {
186670
+ internalType: 'bytes32',
186671
+ name: '',
186672
+ type: 'bytes32'
186673
+ }
186674
+ ],
186675
+ stateMutability: 'view',
186676
+ type: 'function'
186677
+ },
186678
+ {
186679
+ inputs: [],
186680
+ name: 'HOME_TO_FOREIGN_FEE',
186681
+ outputs: [
186682
+ {
186683
+ internalType: 'bytes32',
186684
+ name: '',
186685
+ type: 'bytes32'
186686
+ }
186687
+ ],
186688
+ stateMutability: 'view',
186689
+ type: 'function'
186690
+ },
186691
+ {
186692
+ inputs: [
186693
+ {
186694
+ internalType: 'bytes32',
186695
+ name: '_feeType',
186696
+ type: 'bytes32'
186697
+ },
186698
+ {
186699
+ internalType: 'address',
186700
+ name: '_token',
186701
+ type: 'address'
186702
+ },
186703
+ {
186704
+ internalType: 'uint256',
186705
+ name: '_value',
186706
+ type: 'uint256'
186707
+ }
186708
+ ],
186709
+ name: 'calculateFee',
186710
+ outputs: [
186711
+ {
186712
+ internalType: 'uint256',
186713
+ name: '',
186714
+ type: 'uint256'
186715
+ }
186716
+ ],
186717
+ stateMutability: 'view',
186718
+ type: 'function'
186719
+ }
186720
+ ];
186721
+
186722
+
186723
+ /***/ }),
186724
+
186725
+ /***/ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/foreign-bridge-abi.ts":
186726
+ /*!*******************************************************************************************************************!*\
186727
+ !*** ./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/foreign-bridge-abi.ts ***!
186728
+ \*******************************************************************************************************************/
186729
+ /***/ ((__unused_webpack_module, exports) => {
186730
+
186731
+ "use strict";
186732
+
186733
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
186734
+ exports.foreignBridgeAbi = void 0;
186735
+ exports.foreignBridgeAbi = [
186736
+ {
186737
+ inputs: [{ internalType: 'address', name: '_nativeToken', type: 'address' }],
186738
+ name: 'bridgedTokenAddress',
186739
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
186740
+ stateMutability: 'view',
186741
+ type: 'function'
186742
+ },
186743
+ {
186744
+ inputs: [{ internalType: 'address', name: '_token', type: 'address' }],
186745
+ name: 'isRegisteredAsNativeToken',
186746
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
186747
+ stateMutability: 'view',
186748
+ type: 'function'
186749
+ },
186750
+ {
186751
+ inputs: [{ internalType: 'address', name: '_token', type: 'address' }],
186752
+ name: 'isTokenRegistered',
186753
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
186754
+ stateMutability: 'view',
186755
+ type: 'function'
186756
+ },
186757
+ {
186758
+ inputs: [{ internalType: 'address', name: '_token', type: 'address' }],
186759
+ name: 'minPerTx',
186760
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
186761
+ stateMutability: 'view',
186762
+ type: 'function'
186763
+ },
186764
+ {
186765
+ inputs: [{ internalType: 'address', name: '_bridgedToken', type: 'address' }],
186766
+ name: 'nativeTokenAddress',
186767
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
186768
+ stateMutability: 'view',
186769
+ type: 'function'
186770
+ },
186771
+ {
186772
+ inputs: [
186773
+ { internalType: 'contract IERC677', name: 'token', type: 'address' },
186774
+ { internalType: 'address', name: '_receiver', type: 'address' },
186775
+ { internalType: 'uint256', name: '_value', type: 'uint256' }
186776
+ ],
186777
+ name: 'relayTokens',
186778
+ outputs: [],
186779
+ stateMutability: 'nonpayable',
186780
+ type: 'function'
186781
+ },
186782
+ {
186783
+ inputs: [
186784
+ { internalType: 'address', name: '_token', type: 'address' },
186785
+ { internalType: 'uint256', name: '_amount', type: 'uint256' }
186786
+ ],
186787
+ name: 'withinExecutionLimit',
186788
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
186789
+ stateMutability: 'view',
186790
+ type: 'function'
186791
+ },
186792
+ {
186793
+ inputs: [
186794
+ { internalType: 'address', name: '_token', type: 'address' },
186795
+ { internalType: 'uint256', name: '_amount', type: 'uint256' }
186796
+ ],
186797
+ name: 'withinLimit',
186798
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
186799
+ stateMutability: 'view',
186800
+ type: 'function'
186801
+ }
186802
+ ];
186803
+
186804
+
186805
+ /***/ }),
186806
+
186807
+ /***/ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/home-bridge-abi.ts":
186808
+ /*!****************************************************************************************************************!*\
186809
+ !*** ./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/home-bridge-abi.ts ***!
186810
+ \****************************************************************************************************************/
186811
+ /***/ ((__unused_webpack_module, exports) => {
186812
+
186813
+ "use strict";
186814
+
186815
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
186816
+ exports.homeBridgeAbi = void 0;
186817
+ exports.homeBridgeAbi = [
186818
+ {
186819
+ inputs: [
186820
+ {
186821
+ internalType: 'string',
186822
+ name: '_suffix',
186823
+ type: 'string'
186824
+ }
186825
+ ],
186826
+ type: 'constructor'
186827
+ },
186828
+ {
186829
+ inputs: [],
186830
+ name: 'bridgeContract',
186831
+ outputs: [
186832
+ {
186833
+ internalType: 'contract IAMB',
186834
+ name: '',
186835
+ type: 'address'
186836
+ }
186837
+ ],
186838
+ stateMutability: 'view',
186839
+ type: 'function'
186840
+ },
186841
+ {
186842
+ inputs: [
186843
+ {
186844
+ internalType: 'address',
186845
+ name: '_nativeToken',
186846
+ type: 'address'
186847
+ }
186848
+ ],
186849
+ name: 'bridgedTokenAddress',
186850
+ outputs: [
186851
+ {
186852
+ internalType: 'address',
186853
+ name: '',
186854
+ type: 'address'
186855
+ }
186856
+ ],
186857
+ stateMutability: 'view',
186858
+ type: 'function'
186859
+ },
186860
+ {
186861
+ inputs: [
186862
+ {
186863
+ internalType: 'address',
186864
+ name: '_token',
186865
+ type: 'address'
186866
+ },
186867
+ {
186868
+ internalType: 'address',
186869
+ name: '_to',
186870
+ type: 'address'
186871
+ }
186872
+ ],
186873
+ name: 'claimTokens',
186874
+ outputs: [],
186875
+ stateMutability: 'nonpayable',
186876
+ type: 'function'
186877
+ },
186878
+ {
186879
+ inputs: [
186880
+ {
186881
+ internalType: 'address',
186882
+ name: '_bridgedToken',
186883
+ type: 'address'
186884
+ },
186885
+ {
186886
+ internalType: 'address',
186887
+ name: '_token',
186888
+ type: 'address'
186889
+ },
186890
+ {
186891
+ internalType: 'address',
186892
+ name: '_to',
186893
+ type: 'address'
186894
+ }
186895
+ ],
186896
+ name: 'claimTokensFromTokenContract',
186897
+ outputs: [],
186898
+ stateMutability: 'nonpayable',
186899
+ type: 'function'
186900
+ },
186901
+ {
186902
+ inputs: [
186903
+ {
186904
+ internalType: 'address',
186905
+ name: '_token',
186906
+ type: 'address'
186907
+ }
186908
+ ],
186909
+ name: 'dailyLimit',
186910
+ outputs: [
186911
+ {
186912
+ internalType: 'uint256',
186913
+ name: '',
186914
+ type: 'uint256'
186915
+ }
186916
+ ],
186917
+ stateMutability: 'view',
186918
+ type: 'function'
186919
+ },
186920
+ {
186921
+ inputs: [
186922
+ {
186923
+ internalType: 'address',
186924
+ name: '_token',
186925
+ type: 'address'
186926
+ },
186927
+ {
186928
+ internalType: 'string',
186929
+ name: '_name',
186930
+ type: 'string'
186931
+ },
186932
+ {
186933
+ internalType: 'string',
186934
+ name: '_symbol',
186935
+ type: 'string'
186936
+ },
186937
+ {
186938
+ internalType: 'uint8',
186939
+ name: '_decimals',
186940
+ type: 'uint8'
186941
+ },
186942
+ {
186943
+ internalType: 'address',
186944
+ name: '_recipient',
186945
+ type: 'address'
186946
+ },
186947
+ {
186948
+ internalType: 'uint256',
186949
+ name: '_value',
186950
+ type: 'uint256'
186951
+ }
186952
+ ],
186953
+ name: 'deployAndHandleBridgedTokens',
186954
+ outputs: [],
186955
+ stateMutability: 'nonpayable',
186956
+ type: 'function'
186957
+ },
186958
+ {
186959
+ inputs: [
186960
+ {
186961
+ internalType: 'address',
186962
+ name: '_token',
186963
+ type: 'address'
186964
+ },
186965
+ {
186966
+ internalType: 'string',
186967
+ name: '_name',
186968
+ type: 'string'
186969
+ },
186970
+ {
186971
+ internalType: 'string',
186972
+ name: '_symbol',
186973
+ type: 'string'
186974
+ },
186975
+ {
186976
+ internalType: 'uint8',
186977
+ name: '_decimals',
186978
+ type: 'uint8'
186979
+ },
186980
+ {
186981
+ internalType: 'address',
186982
+ name: '_recipient',
186983
+ type: 'address'
186984
+ },
186985
+ {
186986
+ internalType: 'uint256',
186987
+ name: '_value',
186988
+ type: 'uint256'
186989
+ },
186990
+ {
186991
+ internalType: 'bytes',
186992
+ name: '_data',
186993
+ type: 'bytes'
186994
+ }
186995
+ ],
186996
+ name: 'deployAndHandleBridgedTokensAndCall',
186997
+ outputs: [],
186998
+ stateMutability: 'nonpayable',
186999
+ type: 'function'
187000
+ },
187001
+ {
187002
+ inputs: [
187003
+ {
187004
+ internalType: 'address',
187005
+ name: '_token',
187006
+ type: 'address'
187007
+ }
187008
+ ],
187009
+ name: 'executionDailyLimit',
187010
+ outputs: [
187011
+ {
187012
+ internalType: 'uint256',
187013
+ name: '',
187014
+ type: 'uint256'
187015
+ }
187016
+ ],
187017
+ stateMutability: 'view',
187018
+ type: 'function'
187019
+ },
187020
+ {
187021
+ inputs: [
187022
+ {
187023
+ internalType: 'address',
187024
+ name: '_token',
187025
+ type: 'address'
187026
+ }
187027
+ ],
187028
+ name: 'executionMaxPerTx',
187029
+ outputs: [
187030
+ {
187031
+ internalType: 'uint256',
187032
+ name: '',
187033
+ type: 'uint256'
187034
+ }
187035
+ ],
187036
+ stateMutability: 'view',
187037
+ type: 'function'
187038
+ },
187039
+ {
187040
+ inputs: [],
187041
+ name: 'feeManager',
187042
+ outputs: [
187043
+ {
187044
+ internalType: 'contract OmnibridgeFeeManager',
187045
+ name: '',
187046
+ type: 'address'
187047
+ }
187048
+ ],
187049
+ stateMutability: 'view',
187050
+ type: 'function'
187051
+ },
187052
+ {
187053
+ inputs: [
187054
+ {
187055
+ internalType: 'bytes32',
187056
+ name: '_messageId',
187057
+ type: 'bytes32'
187058
+ }
187059
+ ],
187060
+ name: 'fixFailedMessage',
187061
+ outputs: [],
187062
+ stateMutability: 'nonpayable',
187063
+ type: 'function'
187064
+ },
187065
+ {
187066
+ inputs: [
187067
+ {
187068
+ internalType: 'address',
187069
+ name: '_token',
187070
+ type: 'address'
187071
+ },
187072
+ {
187073
+ internalType: 'address',
187074
+ name: '_receiver',
187075
+ type: 'address'
187076
+ }
187077
+ ],
187078
+ name: 'fixMediatorBalance',
187079
+ outputs: [],
187080
+ stateMutability: 'nonpayable',
187081
+ type: 'function'
187082
+ },
187083
+ {
187084
+ inputs: [
187085
+ {
187086
+ internalType: 'address',
187087
+ name: '_homeToken',
187088
+ type: 'address'
187089
+ }
187090
+ ],
187091
+ name: 'foreignTokenAddress',
187092
+ outputs: [
187093
+ {
187094
+ internalType: 'address',
187095
+ name: '',
187096
+ type: 'address'
187097
+ }
187098
+ ],
187099
+ stateMutability: 'view',
187100
+ type: 'function'
187101
+ },
187102
+ {
187103
+ inputs: [],
187104
+ name: 'forwardingRulesManager',
187105
+ outputs: [
187106
+ {
187107
+ internalType: 'contract MultiTokenForwardingRulesManager',
187108
+ name: '',
187109
+ type: 'address'
187110
+ }
187111
+ ],
187112
+ stateMutability: 'view',
187113
+ type: 'function'
187114
+ },
187115
+ {
187116
+ inputs: [],
187117
+ name: 'gasLimitManager',
187118
+ outputs: [
187119
+ {
187120
+ internalType: 'contract SelectorTokenGasLimitManager',
187121
+ name: '',
187122
+ type: 'address'
187123
+ }
187124
+ ],
187125
+ stateMutability: 'view',
187126
+ type: 'function'
187127
+ },
187128
+ {
187129
+ inputs: [],
187130
+ name: 'getBridgeInterfacesVersion',
187131
+ outputs: [
187132
+ {
187133
+ internalType: 'uint64',
187134
+ name: 'major',
187135
+ type: 'uint64'
187136
+ },
187137
+ {
187138
+ internalType: 'uint64',
187139
+ name: 'minor',
187140
+ type: 'uint64'
187141
+ },
187142
+ {
187143
+ internalType: 'uint64',
187144
+ name: 'patch',
187145
+ type: 'uint64'
187146
+ }
187147
+ ],
187148
+ stateMutability: 'pure',
187149
+ type: 'function'
187150
+ },
187151
+ {
187152
+ inputs: [],
187153
+ name: 'getBridgeMode',
187154
+ outputs: [
187155
+ {
187156
+ internalType: 'bytes4',
187157
+ name: '_data',
187158
+ type: 'bytes4'
187159
+ }
187160
+ ],
187161
+ stateMutability: 'pure',
187162
+ type: 'function'
187163
+ },
187164
+ {
187165
+ inputs: [],
187166
+ name: 'getCurrentDay',
187167
+ outputs: [
187168
+ {
187169
+ internalType: 'uint256',
187170
+ name: '',
187171
+ type: 'uint256'
187172
+ }
187173
+ ],
187174
+ stateMutability: 'view',
187175
+ type: 'function'
187176
+ },
187177
+ {
187178
+ inputs: [
187179
+ {
187180
+ internalType: 'address',
187181
+ name: '_token',
187182
+ type: 'address'
187183
+ },
187184
+ {
187185
+ internalType: 'address',
187186
+ name: '_recipient',
187187
+ type: 'address'
187188
+ },
187189
+ {
187190
+ internalType: 'uint256',
187191
+ name: '_value',
187192
+ type: 'uint256'
187193
+ }
187194
+ ],
187195
+ name: 'handleBridgedTokens',
187196
+ outputs: [],
187197
+ stateMutability: 'nonpayable',
187198
+ type: 'function'
187199
+ },
187200
+ {
187201
+ inputs: [
187202
+ {
187203
+ internalType: 'address',
187204
+ name: '_token',
187205
+ type: 'address'
187206
+ },
187207
+ {
187208
+ internalType: 'address',
187209
+ name: '_recipient',
187210
+ type: 'address'
187211
+ },
187212
+ {
187213
+ internalType: 'uint256',
187214
+ name: '_value',
187215
+ type: 'uint256'
187216
+ },
187217
+ {
187218
+ internalType: 'bytes',
187219
+ name: '_data',
187220
+ type: 'bytes'
187221
+ }
187222
+ ],
187223
+ name: 'handleBridgedTokensAndCall',
187224
+ outputs: [],
187225
+ stateMutability: 'nonpayable',
187226
+ type: 'function'
187227
+ },
187228
+ {
187229
+ inputs: [
187230
+ {
187231
+ internalType: 'address',
187232
+ name: '_token',
187233
+ type: 'address'
187234
+ },
187235
+ {
187236
+ internalType: 'address',
187237
+ name: '_recipient',
187238
+ type: 'address'
187239
+ },
187240
+ {
187241
+ internalType: 'uint256',
187242
+ name: '_value',
187243
+ type: 'uint256'
187244
+ }
187245
+ ],
187246
+ name: 'handleNativeTokens',
187247
+ outputs: [],
187248
+ stateMutability: 'nonpayable',
187249
+ type: 'function'
187250
+ },
187251
+ {
187252
+ inputs: [
187253
+ {
187254
+ internalType: 'address',
187255
+ name: '_token',
187256
+ type: 'address'
187257
+ },
187258
+ {
187259
+ internalType: 'address',
187260
+ name: '_recipient',
187261
+ type: 'address'
187262
+ },
187263
+ {
187264
+ internalType: 'uint256',
187265
+ name: '_value',
187266
+ type: 'uint256'
187267
+ },
187268
+ {
187269
+ internalType: 'bytes',
187270
+ name: '_data',
187271
+ type: 'bytes'
187272
+ }
187273
+ ],
187274
+ name: 'handleNativeTokensAndCall',
187275
+ outputs: [],
187276
+ stateMutability: 'nonpayable',
187277
+ type: 'function'
187278
+ },
187279
+ {
187280
+ inputs: [
187281
+ {
187282
+ internalType: 'address',
187283
+ name: '_foreignToken',
187284
+ type: 'address'
187285
+ }
187286
+ ],
187287
+ name: 'homeTokenAddress',
187288
+ outputs: [
187289
+ {
187290
+ internalType: 'address',
187291
+ name: '',
187292
+ type: 'address'
187293
+ }
187294
+ ],
187295
+ stateMutability: 'view',
187296
+ type: 'function'
187297
+ },
187298
+ {
187299
+ inputs: [
187300
+ {
187301
+ internalType: 'address',
187302
+ name: '_bridgeContract',
187303
+ type: 'address'
187304
+ },
187305
+ {
187306
+ internalType: 'address',
187307
+ name: '_mediatorContract',
187308
+ type: 'address'
187309
+ },
187310
+ {
187311
+ internalType: 'uint256[3]',
187312
+ name: '_dailyLimitMaxPerTxMinPerTxArray',
187313
+ type: 'uint256[3]'
187314
+ },
187315
+ {
187316
+ internalType: 'uint256[2]',
187317
+ name: '_executionDailyLimitExecutionMaxPerTxArray',
187318
+ type: 'uint256[2]'
187319
+ },
187320
+ {
187321
+ internalType: 'address',
187322
+ name: '_gasLimitManager',
187323
+ type: 'address'
187324
+ },
187325
+ {
187326
+ internalType: 'address',
187327
+ name: '_owner',
187328
+ type: 'address'
187329
+ },
187330
+ {
187331
+ internalType: 'address',
187332
+ name: '_tokenFactory',
187333
+ type: 'address'
187334
+ },
187335
+ {
187336
+ internalType: 'address',
187337
+ name: '_feeManager',
187338
+ type: 'address'
187339
+ },
187340
+ {
187341
+ internalType: 'address',
187342
+ name: '_forwardingRulesManager',
187343
+ type: 'address'
187344
+ }
187345
+ ],
187346
+ name: 'initialize',
187347
+ outputs: [
187348
+ {
187349
+ internalType: 'bool',
187350
+ name: '',
187351
+ type: 'bool'
187352
+ }
187353
+ ],
187354
+ stateMutability: 'nonpayable',
187355
+ type: 'function'
187356
+ },
187357
+ {
187358
+ inputs: [
187359
+ {
187360
+ internalType: 'address',
187361
+ name: '_token',
187362
+ type: 'address'
187363
+ }
187364
+ ],
187365
+ name: 'isBridgedTokenDeployAcknowledged',
187366
+ outputs: [
187367
+ {
187368
+ internalType: 'bool',
187369
+ name: '',
187370
+ type: 'bool'
187371
+ }
187372
+ ],
187373
+ stateMutability: 'view',
187374
+ type: 'function'
187375
+ },
187376
+ {
187377
+ inputs: [],
187378
+ name: 'isInitialized',
187379
+ outputs: [
187380
+ {
187381
+ internalType: 'bool',
187382
+ name: '',
187383
+ type: 'bool'
187384
+ }
187385
+ ],
187386
+ stateMutability: 'view',
187387
+ type: 'function'
187388
+ },
187389
+ {
187390
+ inputs: [
187391
+ {
187392
+ internalType: 'address',
187393
+ name: '_token',
187394
+ type: 'address'
187395
+ }
187396
+ ],
187397
+ name: 'isRegisteredAsNativeToken',
187398
+ outputs: [
187399
+ {
187400
+ internalType: 'bool',
187401
+ name: '',
187402
+ type: 'bool'
187403
+ }
187404
+ ],
187405
+ stateMutability: 'view',
187406
+ type: 'function'
187407
+ },
187408
+ {
187409
+ inputs: [
187410
+ {
187411
+ internalType: 'address',
187412
+ name: '_token',
187413
+ type: 'address'
187414
+ }
187415
+ ],
187416
+ name: 'isTokenRegistered',
187417
+ outputs: [
187418
+ {
187419
+ internalType: 'bool',
187420
+ name: '',
187421
+ type: 'bool'
187422
+ }
187423
+ ],
187424
+ stateMutability: 'view',
187425
+ type: 'function'
187426
+ },
187427
+ {
187428
+ inputs: [
187429
+ {
187430
+ internalType: 'address',
187431
+ name: '_token',
187432
+ type: 'address'
187433
+ }
187434
+ ],
187435
+ name: 'maxAvailablePerTx',
187436
+ outputs: [
187437
+ {
187438
+ internalType: 'uint256',
187439
+ name: '',
187440
+ type: 'uint256'
187441
+ }
187442
+ ],
187443
+ stateMutability: 'view',
187444
+ type: 'function'
187445
+ },
187446
+ {
187447
+ inputs: [
187448
+ {
187449
+ internalType: 'address',
187450
+ name: '_token',
187451
+ type: 'address'
187452
+ }
187453
+ ],
187454
+ name: 'maxPerTx',
187455
+ outputs: [
187456
+ {
187457
+ internalType: 'uint256',
187458
+ name: '',
187459
+ type: 'uint256'
187460
+ }
187461
+ ],
187462
+ stateMutability: 'view',
187463
+ type: 'function'
187464
+ },
187465
+ {
187466
+ inputs: [
187467
+ {
187468
+ internalType: 'address',
187469
+ name: '_token',
187470
+ type: 'address'
187471
+ }
187472
+ ],
187473
+ name: 'mediatorBalance',
187474
+ outputs: [
187475
+ {
187476
+ internalType: 'uint256',
187477
+ name: '',
187478
+ type: 'uint256'
187479
+ }
187480
+ ],
187481
+ stateMutability: 'view',
187482
+ type: 'function'
187483
+ },
187484
+ {
187485
+ inputs: [],
187486
+ name: 'mediatorContractOnOtherSide',
187487
+ outputs: [
187488
+ {
187489
+ internalType: 'address',
187490
+ name: '',
187491
+ type: 'address'
187492
+ }
187493
+ ],
187494
+ stateMutability: 'view',
187495
+ type: 'function'
187496
+ },
187497
+ {
187498
+ inputs: [
187499
+ {
187500
+ internalType: 'bytes32',
187501
+ name: '_messageId',
187502
+ type: 'bytes32'
187503
+ }
187504
+ ],
187505
+ name: 'messageFixed',
187506
+ outputs: [
187507
+ {
187508
+ internalType: 'bool',
187509
+ name: '',
187510
+ type: 'bool'
187511
+ }
187512
+ ],
187513
+ stateMutability: 'view',
187514
+ type: 'function'
187515
+ },
187516
+ {
187517
+ inputs: [
187518
+ {
187519
+ internalType: 'address',
187520
+ name: '_token',
187521
+ type: 'address'
187522
+ }
187523
+ ],
187524
+ name: 'minPerTx',
187525
+ outputs: [
187526
+ {
187527
+ internalType: 'uint256',
187528
+ name: '',
187529
+ type: 'uint256'
187530
+ }
187531
+ ],
187532
+ stateMutability: 'view',
187533
+ type: 'function'
187534
+ },
187535
+ {
187536
+ inputs: [
187537
+ {
187538
+ internalType: 'address',
187539
+ name: '_bridgedToken',
187540
+ type: 'address'
187541
+ }
187542
+ ],
187543
+ name: 'nativeTokenAddress',
187544
+ outputs: [
187545
+ {
187546
+ internalType: 'address',
187547
+ name: '',
187548
+ type: 'address'
187549
+ }
187550
+ ],
187551
+ stateMutability: 'view',
187552
+ type: 'function'
187553
+ },
187554
+ {
187555
+ inputs: [
187556
+ {
187557
+ internalType: 'address',
187558
+ name: '_from',
187559
+ type: 'address'
187560
+ },
187561
+ {
187562
+ internalType: 'uint256',
187563
+ name: '_value',
187564
+ type: 'uint256'
187565
+ },
187566
+ {
187567
+ internalType: 'bytes',
187568
+ name: '_data',
187569
+ type: 'bytes'
187570
+ }
187571
+ ],
187572
+ name: 'onTokenTransfer',
187573
+ outputs: [
187574
+ {
187575
+ internalType: 'bool',
187576
+ name: '',
187577
+ type: 'bool'
187578
+ }
187579
+ ],
187580
+ stateMutability: 'nonpayable',
187581
+ type: 'function'
187582
+ },
187583
+ {
187584
+ inputs: [],
187585
+ name: 'owner',
187586
+ outputs: [
187587
+ {
187588
+ internalType: 'address',
187589
+ name: '',
187590
+ type: 'address'
187591
+ }
187592
+ ],
187593
+ stateMutability: 'view',
187594
+ type: 'function'
187595
+ },
187596
+ {
187597
+ inputs: [
187598
+ {
187599
+ internalType: 'contract IERC677',
187600
+ name: 'token',
187601
+ type: 'address'
187602
+ },
187603
+ {
187604
+ internalType: 'uint256',
187605
+ name: '_value',
187606
+ type: 'uint256'
187607
+ }
187608
+ ],
187609
+ name: 'relayTokens',
187610
+ outputs: [],
187611
+ stateMutability: 'nonpayable',
187612
+ type: 'function'
187613
+ },
187614
+ {
187615
+ inputs: [
187616
+ {
187617
+ internalType: 'contract IERC677',
187618
+ name: 'token',
187619
+ type: 'address'
187620
+ },
187621
+ {
187622
+ internalType: 'address',
187623
+ name: '_receiver',
187624
+ type: 'address'
187625
+ },
187626
+ {
187627
+ internalType: 'uint256',
187628
+ name: '_value',
187629
+ type: 'uint256'
187630
+ }
187631
+ ],
187632
+ name: 'relayTokens',
187633
+ outputs: [],
187634
+ stateMutability: 'nonpayable',
187635
+ type: 'function'
187636
+ },
187637
+ {
187638
+ inputs: [
187639
+ {
187640
+ internalType: 'contract IERC677',
187641
+ name: 'token',
187642
+ type: 'address'
187643
+ },
187644
+ {
187645
+ internalType: 'address',
187646
+ name: '_receiver',
187647
+ type: 'address'
187648
+ },
187649
+ {
187650
+ internalType: 'uint256',
187651
+ name: '_value',
187652
+ type: 'uint256'
187653
+ },
187654
+ {
187655
+ internalType: 'bytes',
187656
+ name: '_data',
187657
+ type: 'bytes'
187658
+ }
187659
+ ],
187660
+ name: 'relayTokensAndCall',
187661
+ outputs: [],
187662
+ stateMutability: 'nonpayable',
187663
+ type: 'function'
187664
+ },
187665
+ {
187666
+ inputs: [
187667
+ {
187668
+ internalType: 'bytes32',
187669
+ name: '_messageId',
187670
+ type: 'bytes32'
187671
+ }
187672
+ ],
187673
+ name: 'requestFailedMessageFix',
187674
+ outputs: [],
187675
+ stateMutability: 'nonpayable',
187676
+ type: 'function'
187677
+ },
187678
+ {
187679
+ inputs: [
187680
+ {
187681
+ internalType: 'address',
187682
+ name: '_bridgeContract',
187683
+ type: 'address'
187684
+ }
187685
+ ],
187686
+ name: 'setBridgeContract',
187687
+ outputs: [],
187688
+ stateMutability: 'nonpayable',
187689
+ type: 'function'
187690
+ },
187691
+ {
187692
+ inputs: [
187693
+ {
187694
+ internalType: 'address',
187695
+ name: '_nativeToken',
187696
+ type: 'address'
187697
+ },
187698
+ {
187699
+ internalType: 'address',
187700
+ name: '_bridgedToken',
187701
+ type: 'address'
187702
+ }
187703
+ ],
187704
+ name: 'setCustomTokenAddressPair',
187705
+ outputs: [],
187706
+ stateMutability: 'nonpayable',
187707
+ type: 'function'
187708
+ },
187709
+ {
187710
+ inputs: [
187711
+ {
187712
+ internalType: 'address',
187713
+ name: '_token',
187714
+ type: 'address'
187715
+ },
187716
+ {
187717
+ internalType: 'uint256',
187718
+ name: '_dailyLimit',
187719
+ type: 'uint256'
187720
+ }
187721
+ ],
187722
+ name: 'setDailyLimit',
187723
+ outputs: [],
187724
+ stateMutability: 'nonpayable',
187725
+ type: 'function'
187726
+ },
187727
+ {
187728
+ inputs: [
187729
+ {
187730
+ internalType: 'address',
187731
+ name: '_token',
187732
+ type: 'address'
187733
+ },
187734
+ {
187735
+ internalType: 'uint256',
187736
+ name: '_dailyLimit',
187737
+ type: 'uint256'
187738
+ }
187739
+ ],
187740
+ name: 'setExecutionDailyLimit',
187741
+ outputs: [],
187742
+ stateMutability: 'nonpayable',
187743
+ type: 'function'
187744
+ },
187745
+ {
187746
+ inputs: [
187747
+ {
187748
+ internalType: 'address',
187749
+ name: '_token',
187750
+ type: 'address'
187751
+ },
187752
+ {
187753
+ internalType: 'uint256',
187754
+ name: '_maxPerTx',
187755
+ type: 'uint256'
187756
+ }
187757
+ ],
187758
+ name: 'setExecutionMaxPerTx',
187759
+ outputs: [],
187760
+ stateMutability: 'nonpayable',
187761
+ type: 'function'
187762
+ },
187763
+ {
187764
+ inputs: [
187765
+ {
187766
+ internalType: 'address',
187767
+ name: '_feeManager',
187768
+ type: 'address'
187769
+ }
187770
+ ],
187771
+ name: 'setFeeManager',
187772
+ outputs: [],
187773
+ stateMutability: 'nonpayable',
187774
+ type: 'function'
187775
+ },
187776
+ {
187777
+ inputs: [
187778
+ {
187779
+ internalType: 'address',
187780
+ name: '_manager',
187781
+ type: 'address'
187782
+ }
187783
+ ],
187784
+ name: 'setForwardingRulesManager',
187785
+ outputs: [],
187786
+ stateMutability: 'nonpayable',
187787
+ type: 'function'
187788
+ },
187789
+ {
187790
+ inputs: [
187791
+ {
187792
+ internalType: 'address',
187793
+ name: '_manager',
187794
+ type: 'address'
187795
+ }
187796
+ ],
187797
+ name: 'setGasLimitManager',
187798
+ outputs: [],
187799
+ stateMutability: 'nonpayable',
187800
+ type: 'function'
187801
+ },
187802
+ {
187803
+ inputs: [
187804
+ {
187805
+ internalType: 'address',
187806
+ name: '_token',
187807
+ type: 'address'
187808
+ },
187809
+ {
187810
+ internalType: 'uint256',
187811
+ name: '_maxPerTx',
187812
+ type: 'uint256'
187813
+ }
187814
+ ],
187815
+ name: 'setMaxPerTx',
187816
+ outputs: [],
187817
+ stateMutability: 'nonpayable',
187818
+ type: 'function'
187819
+ },
187820
+ {
187821
+ inputs: [
187822
+ {
187823
+ internalType: 'address',
187824
+ name: '_mediatorContract',
187825
+ type: 'address'
187826
+ }
187827
+ ],
187828
+ name: 'setMediatorContractOnOtherSide',
187829
+ outputs: [],
187830
+ stateMutability: 'nonpayable',
187831
+ type: 'function'
187832
+ },
187833
+ {
187834
+ inputs: [
187835
+ {
187836
+ internalType: 'address',
187837
+ name: '_token',
187838
+ type: 'address'
187839
+ },
187840
+ {
187841
+ internalType: 'uint256',
187842
+ name: '_minPerTx',
187843
+ type: 'uint256'
187844
+ }
187845
+ ],
187846
+ name: 'setMinPerTx',
187847
+ outputs: [],
187848
+ stateMutability: 'nonpayable',
187849
+ type: 'function'
187850
+ },
187851
+ {
187852
+ inputs: [
187853
+ {
187854
+ internalType: 'address',
187855
+ name: '_tokenFactory',
187856
+ type: 'address'
187857
+ }
187858
+ ],
187859
+ name: 'setTokenFactory',
187860
+ outputs: [],
187861
+ stateMutability: 'nonpayable',
187862
+ type: 'function'
187863
+ },
187864
+ {
187865
+ inputs: [],
187866
+ name: 'tokenFactory',
187867
+ outputs: [
187868
+ {
187869
+ internalType: 'contract TokenFactory',
187870
+ name: '',
187871
+ type: 'address'
187872
+ }
187873
+ ],
187874
+ stateMutability: 'view',
187875
+ type: 'function'
187876
+ },
187877
+ {
187878
+ inputs: [
187879
+ {
187880
+ internalType: 'address',
187881
+ name: '_token',
187882
+ type: 'address'
187883
+ },
187884
+ {
187885
+ internalType: 'uint256',
187886
+ name: '_day',
187887
+ type: 'uint256'
187888
+ }
187889
+ ],
187890
+ name: 'totalExecutedPerDay',
187891
+ outputs: [
187892
+ {
187893
+ internalType: 'uint256',
187894
+ name: '',
187895
+ type: 'uint256'
187896
+ }
187897
+ ],
187898
+ stateMutability: 'view',
187899
+ type: 'function'
187900
+ },
187901
+ {
187902
+ inputs: [
187903
+ {
187904
+ internalType: 'address',
187905
+ name: '_token',
187906
+ type: 'address'
187907
+ },
187908
+ {
187909
+ internalType: 'uint256',
187910
+ name: '_day',
187911
+ type: 'uint256'
187912
+ }
187913
+ ],
187914
+ name: 'totalSpentPerDay',
187915
+ outputs: [
187916
+ {
187917
+ internalType: 'uint256',
187918
+ name: '',
187919
+ type: 'uint256'
187920
+ }
187921
+ ],
187922
+ stateMutability: 'view',
187923
+ type: 'function'
187924
+ },
187925
+ {
187926
+ inputs: [
187927
+ {
187928
+ internalType: 'address',
187929
+ name: 'newOwner',
187930
+ type: 'address'
187931
+ }
187932
+ ],
187933
+ name: 'transferOwnership',
187934
+ outputs: [],
187935
+ stateMutability: 'nonpayable',
187936
+ type: 'function'
187937
+ },
187938
+ {
187939
+ inputs: [
187940
+ {
187941
+ internalType: 'address',
187942
+ name: '_tokenFactory',
187943
+ type: 'address'
187944
+ },
187945
+ {
187946
+ internalType: 'address',
187947
+ name: '_forwardingRulesManager',
187948
+ type: 'address'
187949
+ },
187950
+ {
187951
+ internalType: 'address',
187952
+ name: '_gasLimitManager',
187953
+ type: 'address'
187954
+ },
187955
+ {
187956
+ internalType: 'uint256',
187957
+ name: '_dailyLimit',
187958
+ type: 'uint256'
187959
+ }
187960
+ ],
187961
+ name: 'upgradeToReverseMode',
187962
+ outputs: [],
187963
+ stateMutability: 'nonpayable',
187964
+ type: 'function'
187965
+ },
187966
+ {
187967
+ inputs: [
187968
+ {
187969
+ internalType: 'address',
187970
+ name: '_token',
187971
+ type: 'address'
187972
+ },
187973
+ {
187974
+ internalType: 'uint256',
187975
+ name: '_amount',
187976
+ type: 'uint256'
187977
+ }
187978
+ ],
187979
+ name: 'withinExecutionLimit',
187980
+ outputs: [
187981
+ {
187982
+ internalType: 'bool',
187983
+ name: '',
187984
+ type: 'bool'
187985
+ }
187986
+ ],
187987
+ stateMutability: 'view',
187988
+ type: 'function'
187989
+ },
187990
+ {
187991
+ inputs: [
187992
+ {
187993
+ internalType: 'address',
187994
+ name: '_token',
187995
+ type: 'address'
187996
+ },
187997
+ {
187998
+ internalType: 'uint256',
187999
+ name: '_amount',
188000
+ type: 'uint256'
188001
+ }
188002
+ ],
188003
+ name: 'withinLimit',
188004
+ outputs: [
188005
+ {
188006
+ internalType: 'bool',
188007
+ name: '',
188008
+ type: 'bool'
188009
+ }
188010
+ ],
188011
+ stateMutability: 'view',
188012
+ type: 'function'
188013
+ },
188014
+ {
188015
+ anonymous: false,
188016
+ inputs: [
188017
+ {
188018
+ indexed: true,
188019
+ name: 'token',
188020
+ type: 'address'
188021
+ },
188022
+ {
188023
+ indexed: false,
188024
+ name: 'newLimit',
188025
+ type: 'uint256'
188026
+ }
188027
+ ],
188028
+ name: 'DailyLimitChanged',
188029
+ type: 'event'
188030
+ },
188031
+ {
188032
+ anonymous: false,
188033
+ inputs: [
188034
+ {
188035
+ indexed: true,
188036
+ name: 'token',
188037
+ type: 'address'
188038
+ },
188039
+ {
188040
+ indexed: false,
188041
+ name: 'newLimit',
188042
+ type: 'uint256'
188043
+ }
188044
+ ],
188045
+ name: 'ExecutionDailyLimitChanged',
188046
+ type: 'event'
188047
+ },
188048
+ {
188049
+ anonymous: false,
188050
+ inputs: [
188051
+ {
188052
+ indexed: true,
188053
+ name: 'messageId',
188054
+ type: 'bytes32'
188055
+ },
188056
+ {
188057
+ indexed: false,
188058
+ name: 'token',
188059
+ type: 'address'
188060
+ },
188061
+ {
188062
+ indexed: false,
188063
+ name: 'recipient',
188064
+ type: 'address'
188065
+ },
188066
+ {
188067
+ indexed: false,
188068
+ name: 'value',
188069
+ type: 'uint256'
188070
+ }
188071
+ ],
188072
+ name: 'FailedMessageFixed',
188073
+ type: 'event'
188074
+ },
188075
+ {
188076
+ anonymous: false,
188077
+ inputs: [
188078
+ {
188079
+ indexed: false,
188080
+ name: 'fee',
188081
+ type: 'uint256'
188082
+ },
188083
+ {
188084
+ indexed: true,
188085
+ name: 'token',
188086
+ type: 'address'
188087
+ },
188088
+ {
188089
+ indexed: true,
188090
+ name: 'messageId',
188091
+ type: 'bytes32'
188092
+ }
188093
+ ],
188094
+ name: 'FeeDistributed',
188095
+ type: 'event'
188096
+ },
188097
+ {
188098
+ anonymous: false,
188099
+ inputs: [
188100
+ {
188101
+ indexed: true,
188102
+ name: 'token',
188103
+ type: 'address'
188104
+ },
188105
+ {
188106
+ indexed: false,
188107
+ name: 'fee',
188108
+ type: 'uint256'
188109
+ }
188110
+ ],
188111
+ name: 'FeeDistributionFailed',
188112
+ type: 'event'
188113
+ },
188114
+ {
188115
+ anonymous: false,
188116
+ inputs: [
188117
+ {
188118
+ indexed: true,
188119
+ name: 'nativeToken',
188120
+ type: 'address'
188121
+ },
188122
+ {
188123
+ indexed: true,
188124
+ name: 'bridgedToken',
188125
+ type: 'address'
188126
+ }
188127
+ ],
188128
+ name: 'NewTokenRegistered',
188129
+ type: 'event'
188130
+ },
188131
+ {
188132
+ anonymous: false,
188133
+ inputs: [
188134
+ {
188135
+ indexed: false,
188136
+ name: 'previousOwner',
188137
+ type: 'address'
188138
+ },
188139
+ {
188140
+ indexed: false,
188141
+ name: 'newOwner',
188142
+ type: 'address'
188143
+ }
188144
+ ],
188145
+ name: 'OwnershipTransferred',
188146
+ type: 'event'
188147
+ },
188148
+ {
188149
+ anonymous: false,
188150
+ inputs: [
188151
+ {
188152
+ indexed: true,
188153
+ name: 'token',
188154
+ type: 'address'
188155
+ },
188156
+ {
188157
+ indexed: true,
188158
+ name: 'recipient',
188159
+ type: 'address'
188160
+ },
188161
+ {
188162
+ indexed: false,
188163
+ name: 'value',
188164
+ type: 'uint256'
188165
+ },
188166
+ {
188167
+ indexed: true,
188168
+ name: 'messageId',
188169
+ type: 'bytes32'
188170
+ }
188171
+ ],
188172
+ name: 'TokensBridged',
188173
+ type: 'event'
188174
+ },
188175
+ {
188176
+ anonymous: false,
188177
+ inputs: [
188178
+ {
188179
+ indexed: true,
188180
+ name: 'token',
188181
+ type: 'address'
188182
+ },
188183
+ {
188184
+ indexed: true,
188185
+ name: 'sender',
188186
+ type: 'address'
188187
+ },
188188
+ {
188189
+ indexed: false,
188190
+ name: 'value',
188191
+ type: 'uint256'
188192
+ },
188193
+ {
188194
+ indexed: true,
188195
+ name: 'messageId',
188196
+ type: 'bytes32'
188197
+ }
188198
+ ],
188199
+ name: 'TokensBridgingInitiated',
188200
+ type: 'event'
188201
+ }
188202
+ ];
188203
+
188204
+
188205
+ /***/ }),
188206
+
188207
+ /***/ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/native-bridge-abi.ts":
188208
+ /*!******************************************************************************************************************!*\
188209
+ !*** ./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/native-bridge-abi.ts ***!
188210
+ \******************************************************************************************************************/
188211
+ /***/ ((__unused_webpack_module, exports) => {
188212
+
188213
+ "use strict";
188214
+
188215
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
188216
+ exports.nativeBridgeAbi = void 0;
188217
+ exports.nativeBridgeAbi = [
188218
+ {
188219
+ inputs: [{ internalType: 'address', name: '_receiver', type: 'address' }],
188220
+ name: 'wrapAndRelayTokens',
188221
+ outputs: [],
188222
+ stateMutability: 'payable',
188223
+ type: 'function'
188224
+ },
188225
+ { stateMutability: 'payable', type: 'receive' }
188226
+ ];
188227
+
188228
+
188229
+ /***/ }),
188230
+
188231
+ /***/ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-contract-address.ts":
188232
+ /*!*****************************************************************************************************************************!*\
188233
+ !*** ./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-contract-address.ts ***!
188234
+ \*****************************************************************************************************************************/
188235
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
188236
+
188237
+ "use strict";
188238
+
188239
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
188240
+ exports.omniBridgeNativeRouter = exports.pulseChainContractAddress = void 0;
188241
+ const blockchain_name_1 = __webpack_require__(/*! ../../../../../../core/blockchain/models/blockchain-name */ "./src/core/blockchain/models/blockchain-name.ts");
188242
+ exports.pulseChainContractAddress = {
188243
+ [blockchain_name_1.BLOCKCHAIN_NAME.ETHEREUM]: {
188244
+ omniBridge: '0x1715a3E4A142d8b698131108995174F37aEBA10D',
188245
+ omniBridgeWrapped: '0xe20E337DB2a00b1C37139c873B92a0AAd3F468bF'
188246
+ },
188247
+ [blockchain_name_1.BLOCKCHAIN_NAME.PULSECHAIN]: {
188248
+ omniBridge: '0x4fD0aaa7506f3d9cB8274bdB946Ec42A1b8751Ef',
188249
+ omniBridgeWrapped: '0x0e18d0d556b652794EF12Bf68B2dC857EF5f3996'
188250
+ }
188251
+ };
188252
+ exports.omniBridgeNativeRouter = '0x8AC4ae65b3656e26dC4e0e69108B392283350f55';
188253
+
188254
+
188255
+ /***/ }),
188256
+
188257
+ /***/ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-supported-blockchains.ts":
188258
+ /*!**********************************************************************************************************************************!*\
188259
+ !*** ./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-supported-blockchains.ts ***!
188260
+ \**********************************************************************************************************************************/
188261
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
188262
+
188263
+ "use strict";
188264
+
188265
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
188266
+ exports.pulseChainSupportedBlockchains = void 0;
188267
+ const blockchain_name_1 = __webpack_require__(/*! ../../../../../../core/blockchain/models/blockchain-name */ "./src/core/blockchain/models/blockchain-name.ts");
188268
+ exports.pulseChainSupportedBlockchains = [
188269
+ blockchain_name_1.BLOCKCHAIN_NAME.ETHEREUM,
188270
+ blockchain_name_1.BLOCKCHAIN_NAME.PULSECHAIN
188271
+ ];
188272
+
188273
+
188274
+ /***/ }),
188275
+
188276
+ /***/ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/bridge-manager.ts":
188277
+ /*!**************************************************************************************************************************!*\
188278
+ !*** ./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/bridge-manager.ts ***!
188279
+ \**************************************************************************************************************************/
188280
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
188281
+
188282
+ "use strict";
188283
+
188284
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
188285
+ exports.BridgeManager = void 0;
188286
+ const blockchain_name_1 = __webpack_require__(/*! ../../../../../../core/blockchain/models/blockchain-name */ "./src/core/blockchain/models/blockchain-name.ts");
188287
+ const foreign_bridge_1 = __webpack_require__(/*! ./foreign-bridge */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/foreign-bridge.ts");
188288
+ const home_bridge_1 = __webpack_require__(/*! ./home-bridge */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/home-bridge.ts");
188289
+ class BridgeManager {
188290
+ static createBridge(fromToken, toToken) {
188291
+ return fromToken.blockchain === blockchain_name_1.BLOCKCHAIN_NAME.ETHEREUM
188292
+ ? new foreign_bridge_1.ForeignBridge(fromToken, toToken)
188293
+ : new home_bridge_1.HomeBridge(fromToken, toToken);
188294
+ }
188295
+ }
188296
+ exports.BridgeManager = BridgeManager;
188297
+
188298
+
188299
+ /***/ }),
188300
+
188301
+ /***/ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/foreign-bridge.ts":
188302
+ /*!**************************************************************************************************************************!*\
188303
+ !*** ./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/foreign-bridge.ts ***!
188304
+ \**************************************************************************************************************************/
188305
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
188306
+
188307
+ "use strict";
188308
+
188309
+ var __importDefault = (this && this.__importDefault) || function (mod) {
188310
+ return (mod && mod.__esModule) ? mod : { "default": mod };
188311
+ };
188312
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
188313
+ exports.ForeignBridge = void 0;
188314
+ const bignumber_js_1 = __importDefault(__webpack_require__(/*! bignumber.js */ "./node_modules/bignumber.js/bignumber.js"));
188315
+ const errors_1 = __webpack_require__(/*! ../../../../../../common/errors */ "./src/common/errors/index.ts");
188316
+ const evm_web3_pure_1 = __webpack_require__(/*! ../../../../../../core/blockchain/web3-pure/typed-web3-pure/evm-web3-pure/evm-web3-pure */ "./src/core/blockchain/web3-pure/typed-web3-pure/evm-web3-pure/evm-web3-pure.ts");
188317
+ const erc_677_abi_1 = __webpack_require__(/*! ../constants/erc-677-abi */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/erc-677-abi.ts");
188318
+ const native_bridge_abi_1 = __webpack_require__(/*! ../constants/native-bridge-abi */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/native-bridge-abi.ts");
188319
+ const pulse_chain_contract_address_1 = __webpack_require__(/*! ../constants/pulse-chain-contract-address */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-contract-address.ts");
188320
+ const omni_bridge_1 = __webpack_require__(/*! ./omni-bridge */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/omni-bridge.ts");
188321
+ class ForeignBridge extends omni_bridge_1.OmniBridge {
188322
+ isTokenRegistered(address) {
188323
+ return this.sourceWeb3Public.callContractMethod(this.sourceBridgeAddress, this.sourceBridgeAbi, 'isTokenRegistered', [address]);
188324
+ }
188325
+ isRegisteredAsNative(address) {
188326
+ return this.sourceWeb3Public.callContractMethod(this.sourceBridgeAddress, this.sourceBridgeAbi, 'isRegisteredAsNativeToken', [address]);
188327
+ }
188328
+ getNonNativeToken(address) {
188329
+ return this.sourceWeb3Public.callContractMethod(this.sourceBridgeAddress, this.sourceBridgeAbi, 'nativeTokenAddress', [address]);
188330
+ }
188331
+ getNativeToken(address) {
188332
+ return this.targetWeb3Public.callContractMethod(this.targetBridgeAddress, this.targetBridgeAbi, 'bridgedTokenAddress', [address]);
188333
+ }
188334
+ async getMinAmountToken(address) {
188335
+ const amount = await this.sourceWeb3Public.callContractMethod(this.sourceBridgeAddress, this.sourceBridgeAbi, 'minPerTx', [address]);
188336
+ return new bignumber_js_1.default(amount);
188337
+ }
188338
+ async checkSourceLimits(address, amount) {
188339
+ const allowSend = await this.sourceWeb3Public.callContractMethod(this.sourceBridgeAddress, this.sourceBridgeAbi, 'withinLimit', [address, amount]);
188340
+ if (!allowSend) {
188341
+ throw new errors_1.RubicSdkError('Swap is not allowed due to contract limitations');
188342
+ }
188343
+ }
188344
+ async checkTargetLimits(address, amount) {
188345
+ const allowSend = await this.targetWeb3Public.callContractMethod(this.targetBridgeAddress, this.targetBridgeAbi, 'withinExecutionLimit', [address, amount]);
188346
+ if (!allowSend) {
188347
+ throw new errors_1.RubicSdkError('Swap is not allowed due to contract limitations');
188348
+ }
188349
+ }
188350
+ getDataForNativeSwap(receiverAddress, value) {
188351
+ return evm_web3_pure_1.EvmWeb3Pure.encodeMethodCall(pulse_chain_contract_address_1.omniBridgeNativeRouter, native_bridge_abi_1.nativeBridgeAbi, 'wrapAndRelayTokens', [receiverAddress], value);
188352
+ }
188353
+ getDataForTokenSwap(receiverAddress, amount, isERC677, tokenAddress) {
188354
+ if (isERC677) {
188355
+ return evm_web3_pure_1.EvmWeb3Pure.encodeMethodCall(tokenAddress, erc_677_abi_1.erc677Abi, 'transferAndCall', [this.sourceBridgeAddress, amount, receiverAddress], '0');
188356
+ }
188357
+ return evm_web3_pure_1.EvmWeb3Pure.encodeMethodCall(this.sourceBridgeAddress, this.sourceBridgeAbi, 'relayTokens', [tokenAddress, receiverAddress, amount], '0');
188358
+ }
188359
+ }
188360
+ exports.ForeignBridge = ForeignBridge;
188361
+
188362
+
188363
+ /***/ }),
188364
+
188365
+ /***/ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/home-bridge.ts":
188366
+ /*!***********************************************************************************************************************!*\
188367
+ !*** ./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/home-bridge.ts ***!
188368
+ \***********************************************************************************************************************/
188369
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
188370
+
188371
+ "use strict";
188372
+
188373
+ var __importDefault = (this && this.__importDefault) || function (mod) {
188374
+ return (mod && mod.__esModule) ? mod : { "default": mod };
188375
+ };
188376
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
188377
+ exports.HomeBridge = void 0;
188378
+ const bignumber_js_1 = __importDefault(__webpack_require__(/*! bignumber.js */ "./node_modules/bignumber.js/bignumber.js"));
188379
+ const errors_1 = __webpack_require__(/*! ../../../../../../common/errors */ "./src/common/errors/index.ts");
188380
+ const evm_web3_pure_1 = __webpack_require__(/*! ../../../../../../core/blockchain/web3-pure/typed-web3-pure/evm-web3-pure/evm-web3-pure */ "./src/core/blockchain/web3-pure/typed-web3-pure/evm-web3-pure/evm-web3-pure.ts");
188381
+ const erc_677_abi_1 = __webpack_require__(/*! ../constants/erc-677-abi */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/erc-677-abi.ts");
188382
+ const native_bridge_abi_1 = __webpack_require__(/*! ../constants/native-bridge-abi */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/native-bridge-abi.ts");
188383
+ const pulse_chain_contract_address_1 = __webpack_require__(/*! ../constants/pulse-chain-contract-address */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-contract-address.ts");
188384
+ const omni_bridge_1 = __webpack_require__(/*! ./omni-bridge */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/omni-bridge.ts");
188385
+ class HomeBridge extends omni_bridge_1.OmniBridge {
188386
+ isTokenRegistered(address) {
188387
+ return this.sourceWeb3Public.callContractMethod(this.sourceBridgeAddress, this.sourceBridgeAbi, 'isTokenRegistered', [address]);
188388
+ }
188389
+ isRegisteredAsNative(address) {
188390
+ return this.sourceWeb3Public.callContractMethod(this.sourceBridgeAddress, this.sourceBridgeAbi, 'isRegisteredAsNativeToken', [address]);
188391
+ }
188392
+ getNonNativeToken(address) {
188393
+ return this.sourceWeb3Public.callContractMethod(this.sourceBridgeAddress, this.sourceBridgeAbi, 'nativeTokenAddress', [address]);
188394
+ }
188395
+ getNativeToken(address) {
188396
+ return this.targetWeb3Public.callContractMethod(this.targetBridgeAddress, this.targetBridgeAbi, 'bridgedTokenAddress', [address]);
188397
+ }
188398
+ async getMinAmountToken(address) {
188399
+ const amount = await this.sourceWeb3Public.callContractMethod(this.sourceBridgeAddress, this.sourceBridgeAbi, 'minPerTx', [address]);
188400
+ return new bignumber_js_1.default(amount);
188401
+ }
188402
+ async checkSourceLimits(address, amount) {
188403
+ const allowSend = await this.sourceWeb3Public.callContractMethod(this.sourceBridgeAddress, this.sourceBridgeAbi, 'withinLimit', [address, amount]);
188404
+ if (!allowSend) {
188405
+ throw new errors_1.RubicSdkError('Swap is not allowed due to contract limitations');
188406
+ }
188407
+ }
188408
+ async checkTargetLimits(address, amount) {
188409
+ const allowSend = await this.targetWeb3Public.callContractMethod(this.targetBridgeAddress, this.targetBridgeAbi, 'withinExecutionLimit', [address, amount]);
188410
+ if (!allowSend) {
188411
+ throw new errors_1.RubicSdkError('Swap is not allowed due to contract limitations');
188412
+ }
188413
+ }
188414
+ getDataForNativeSwap(receiverAddress, value) {
188415
+ return evm_web3_pure_1.EvmWeb3Pure.encodeMethodCall(pulse_chain_contract_address_1.omniBridgeNativeRouter, native_bridge_abi_1.nativeBridgeAbi, 'wrapAndRelayTokens', [receiverAddress], value);
188416
+ }
188417
+ getDataForTokenSwap(receiverAddress, amount, isERC677, tokenAddress) {
188418
+ if (isERC677) {
188419
+ return evm_web3_pure_1.EvmWeb3Pure.encodeMethodCall(tokenAddress, erc_677_abi_1.erc677Abi, 'transferAndCall', [this.sourceBridgeAddress, amount, receiverAddress], '0');
188420
+ }
188421
+ return evm_web3_pure_1.EvmWeb3Pure.encodeMethodCall(this.sourceBridgeAddress, this.sourceBridgeAbi, 'relayTokens', [tokenAddress, receiverAddress, amount], '0');
188422
+ }
188423
+ }
188424
+ exports.HomeBridge = HomeBridge;
188425
+
188426
+
188427
+ /***/ }),
188428
+
188429
+ /***/ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/omni-bridge.ts":
188430
+ /*!***********************************************************************************************************************!*\
188431
+ !*** ./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/omni-bridge.ts ***!
188432
+ \***********************************************************************************************************************/
188433
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
188434
+
188435
+ "use strict";
188436
+
188437
+ var __importDefault = (this && this.__importDefault) || function (mod) {
188438
+ return (mod && mod.__esModule) ? mod : { "default": mod };
188439
+ };
188440
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
188441
+ exports.OmniBridge = void 0;
188442
+ const bignumber_js_1 = __importDefault(__webpack_require__(/*! bignumber.js */ "./node_modules/bignumber.js/bignumber.js"));
188443
+ const blockchain_1 = __webpack_require__(/*! ../../../../../../common/utils/blockchain */ "./src/common/utils/blockchain.ts");
188444
+ const blockchain_name_1 = __webpack_require__(/*! ../../../../../../core/blockchain/models/blockchain-name */ "./src/core/blockchain/models/blockchain-name.ts");
188445
+ const injector_1 = __webpack_require__(/*! ../../../../../../core/injector/injector */ "./src/core/injector/injector.ts");
188446
+ const fee_manager_abi_1 = __webpack_require__(/*! ../constants/fee-manager-abi */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/fee-manager-abi.ts");
188447
+ const foreign_bridge_abi_1 = __webpack_require__(/*! ../constants/foreign-bridge-abi */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/foreign-bridge-abi.ts");
188448
+ const home_bridge_abi_1 = __webpack_require__(/*! ../constants/home-bridge-abi */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/home-bridge-abi.ts");
188449
+ const pulse_chain_contract_address_1 = __webpack_require__(/*! ../constants/pulse-chain-contract-address */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-contract-address.ts");
188450
+ class OmniBridge {
188451
+ get web3Private() {
188452
+ return injector_1.Injector.web3PrivateService.getWeb3PrivateByBlockchain(this.sourceBlockchain);
188453
+ }
188454
+ get sourceWeb3Public() {
188455
+ return injector_1.Injector.web3PublicService.getWeb3Public(this.sourceBlockchain);
188456
+ }
188457
+ get targetWeb3Public() {
188458
+ return injector_1.Injector.web3PublicService.getWeb3Public(this.targetBlockchain);
188459
+ }
188460
+ constructor(fromToken, toToken) {
188461
+ this.fromToken = fromToken;
188462
+ this.toToken = toToken;
188463
+ this.sourceBlockchain = fromToken.blockchain;
188464
+ this.targetBlockchain = toToken.blockchain;
188465
+ this.sourceBridgeAddress = OmniBridge.isCustomWrap(fromToken)
188466
+ ? pulse_chain_contract_address_1.pulseChainContractAddress[this.sourceBlockchain].omniBridgeWrapped
188467
+ : pulse_chain_contract_address_1.pulseChainContractAddress[this.sourceBlockchain].omniBridge;
188468
+ this.targetBridgeAddress = OmniBridge.isCustomWrap(toToken)
188469
+ ? pulse_chain_contract_address_1.pulseChainContractAddress[this.targetBlockchain].omniBridgeWrapped
188470
+ : pulse_chain_contract_address_1.pulseChainContractAddress[this.targetBlockchain].omniBridge;
188471
+ if (this.sourceBlockchain === blockchain_name_1.BLOCKCHAIN_NAME.ETHEREUM) {
188472
+ this.sourceBridgeAbi = foreign_bridge_abi_1.foreignBridgeAbi;
188473
+ this.targetBridgeAbi = home_bridge_abi_1.homeBridgeAbi;
188474
+ }
188475
+ else {
188476
+ this.sourceBridgeAbi = foreign_bridge_abi_1.foreignBridgeAbi;
188477
+ this.targetBridgeAbi = home_bridge_abi_1.homeBridgeAbi;
188478
+ }
188479
+ }
188480
+ /**
188481
+ * Get bridge token address in target network.
188482
+ * @param fromAddress Token address in source network.
188483
+ */
188484
+ async getBridgeToken(fromAddress) {
188485
+ const isRegisteredAsNative = await this.isRegisteredAsNative(fromAddress);
188486
+ return isRegisteredAsNative
188487
+ ? this.getNativeToken(fromAddress)
188488
+ : this.getNonNativeToken(fromAddress);
188489
+ }
188490
+ /**
188491
+ * Check if allowed to swap.
188492
+ * @param fromAddress Token address in source network.
188493
+ * @param toAddress Token address in target network.
188494
+ * @param amount Swap amount.
188495
+ */
188496
+ async checkLimits(fromAddress, toAddress, amount) {
188497
+ await this.checkSourceLimits(fromAddress, amount);
188498
+ await this.checkTargetLimits(toAddress, amount);
188499
+ }
188500
+ /**
188501
+ * Get fee manager address.
188502
+ */
188503
+ getFeeManager() {
188504
+ const web3Public = injector_1.Injector.web3PublicService.getWeb3Public(blockchain_name_1.BLOCKCHAIN_NAME.PULSECHAIN);
188505
+ return web3Public.callContractMethod(this.sourceBlockchain === blockchain_name_1.BLOCKCHAIN_NAME.PULSECHAIN
188506
+ ? this.sourceBridgeAddress
188507
+ : this.targetBridgeAddress, home_bridge_abi_1.homeBridgeAbi, 'feeManager', []);
188508
+ }
188509
+ /**
188510
+ *
188511
+ * Get fee type for trade.
188512
+ */
188513
+ getFeeType(feeManagerAddress) {
188514
+ const web3Public = injector_1.Injector.web3PublicService.getWeb3Public(blockchain_name_1.BLOCKCHAIN_NAME.PULSECHAIN);
188515
+ return web3Public.callContractMethod(feeManagerAddress, fee_manager_abi_1.feeManagerAbi, this.sourceBlockchain === blockchain_name_1.BLOCKCHAIN_NAME.ETHEREUM
188516
+ ? 'FOREIGN_TO_HOME_FEE'
188517
+ : 'HOME_TO_FOREIGN_FEE', []);
188518
+ }
188519
+ /**
188520
+ * Calculate output amount for trade.
188521
+ * @param toAddress Token address in target network.
188522
+ * @param feeManagerAddress Fee manager contract address.
188523
+ * @param feeType Type of fee.
188524
+ * @param fromAmount Amount of tokens to send.
188525
+ */
188526
+ async getOutputAmount(toAddress, feeManagerAddress, feeType, fromAmount) {
188527
+ const web3Public = injector_1.Injector.web3PublicService.getWeb3Public(blockchain_name_1.BLOCKCHAIN_NAME.PULSECHAIN);
188528
+ const feeAmount = await web3Public.callContractMethod(feeManagerAddress, fee_manager_abi_1.feeManagerAbi, 'calculateFee', [feeType, toAddress, fromAmount]);
188529
+ return new bignumber_js_1.default(fromAmount).minus(feeAmount);
188530
+ }
188531
+ /**
188532
+ * Calculate output amount for trade.
188533
+ * @param toAddress Token address in target network.
188534
+ * @param fromAmount Amount of tokens to send.
188535
+ */
188536
+ async calculateAmount(toAddress, fromAmount) {
188537
+ const feeManagerAddress = await this.getFeeManager();
188538
+ const feeType = await this.getFeeType(feeManagerAddress);
188539
+ return this.getOutputAmount(toAddress, feeManagerAddress, feeType, fromAmount);
188540
+ }
188541
+ static isCustomWrap(token) {
188542
+ return (token.blockchain === blockchain_name_1.BLOCKCHAIN_NAME.ETHEREUM &&
188543
+ (0, blockchain_1.compareAddresses)(token.address, '0xA882606494D86804B5514E07e6Bd2D6a6eE6d68A'));
188544
+ }
188545
+ }
188546
+ exports.OmniBridge = OmniBridge;
188547
+
188548
+
188549
+ /***/ }),
188550
+
188551
+ /***/ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-provider.ts":
188552
+ /*!***********************************************************************************************************************!*\
188553
+ !*** ./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-provider.ts ***!
188554
+ \***********************************************************************************************************************/
188555
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
188556
+
188557
+ "use strict";
188558
+
188559
+ var __importDefault = (this && this.__importDefault) || function (mod) {
188560
+ return (mod && mod.__esModule) ? mod : { "default": mod };
188561
+ };
188562
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
188563
+ exports.PulseChainCrossChainProvider = void 0;
188564
+ const bignumber_js_1 = __importDefault(__webpack_require__(/*! bignumber.js */ "./node_modules/bignumber.js/bignumber.js"));
188565
+ const errors_1 = __webpack_require__(/*! ../../../../../common/errors */ "./src/common/errors/index.ts");
188566
+ const tokens_1 = __webpack_require__(/*! ../../../../../common/tokens */ "./src/common/tokens/index.ts");
188567
+ const blockchain_1 = __webpack_require__(/*! ../../../../../common/utils/blockchain */ "./src/common/utils/blockchain.ts");
188568
+ const blockchain_name_1 = __webpack_require__(/*! ../../../../../core/blockchain/models/blockchain-name */ "./src/core/blockchain/models/blockchain-name.ts");
188569
+ const web3_pure_1 = __webpack_require__(/*! ../../../../../core/blockchain/web3-pure/web3-pure */ "./src/core/blockchain/web3-pure/web3-pure.ts");
188570
+ const get_from_without_fee_1 = __webpack_require__(/*! ../../../../common/utils/get-from-without-fee */ "./src/features/common/utils/get-from-without-fee.ts");
188571
+ const cross_chain_trade_type_1 = __webpack_require__(/*! ../../models/cross-chain-trade-type */ "./src/features/cross-chain/calculation-manager/models/cross-chain-trade-type.ts");
188572
+ const cross_chain_provider_1 = __webpack_require__(/*! ../common/cross-chain-provider */ "./src/features/cross-chain/calculation-manager/providers/common/cross-chain-provider.ts");
188573
+ const proxy_cross_chain_evm_trade_1 = __webpack_require__(/*! ../common/proxy-cross-chain-evm-facade/proxy-cross-chain-evm-trade */ "./src/features/cross-chain/calculation-manager/providers/common/proxy-cross-chain-evm-facade/proxy-cross-chain-evm-trade.ts");
188574
+ const pulse_chain_supported_blockchains_1 = __webpack_require__(/*! ./constants/pulse-chain-supported-blockchains */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-supported-blockchains.ts");
188575
+ const bridge_manager_1 = __webpack_require__(/*! ./omni-bridge-entities/bridge-manager */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/bridge-manager.ts");
188576
+ const pulse_chain_cross_chain_trade_1 = __webpack_require__(/*! ./pulse-chain-cross-chain-trade */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-trade.ts");
188577
+ const typed_trade_providers_1 = __webpack_require__(/*! ../../../../on-chain/calculation-manager/constants/trade-providers/typed-trade-providers */ "./src/features/on-chain/calculation-manager/constants/trade-providers/typed-trade-providers.ts");
188578
+ class PulseChainCrossChainProvider extends cross_chain_provider_1.CrossChainProvider {
188579
+ constructor() {
188580
+ super(...arguments);
188581
+ this.type = cross_chain_trade_type_1.CROSS_CHAIN_TRADE_TYPE.PULSE_CHAIN_BRIDGE;
188582
+ }
188583
+ isSupportedBlockchain(blockchain) {
188584
+ return pulse_chain_supported_blockchains_1.pulseChainSupportedBlockchains.some(chain => chain === blockchain);
188585
+ }
188586
+ async calculate(fromToken, toToken, options) {
188587
+ const fromBlockchain = fromToken.blockchain;
188588
+ const toBlockchain = toToken.blockchain;
188589
+ const useProxy = options?.useProxy?.[this.type] ?? true;
188590
+ if (!this.areSupportedBlockchains(fromBlockchain, toBlockchain) ||
188591
+ // @TODO Remove after home bridge development
188592
+ fromToken.blockchain === blockchain_name_1.BLOCKCHAIN_NAME.PULSECHAIN) {
188593
+ return {
188594
+ trade: null,
188595
+ error: new errors_1.NotSupportedTokensError(),
188596
+ tradeType: this.type
188597
+ };
188598
+ }
188599
+ const feeInfo = await this.getFeeInfo(fromBlockchain, options.providerAddress, fromToken, useProxy);
188600
+ try {
188601
+ const sourceBridgeManager = bridge_manager_1.BridgeManager.createBridge(fromToken, toToken);
188602
+ const targetBridgeManager = bridge_manager_1.BridgeManager.createBridge(fromToken, toToken);
188603
+ const fromTokenAddress = this.getTokenAddress(fromToken);
188604
+ const toTokenAddress = this.getTokenAddress(toToken);
188605
+ const tokenRegistered = await sourceBridgeManager.isTokenRegistered(fromTokenAddress);
188606
+ const targetTokenAddress = await sourceBridgeManager.getBridgeToken(fromTokenAddress);
188607
+ if (!(0, blockchain_1.compareAddresses)(toTokenAddress, targetTokenAddress)) {
188608
+ return {
188609
+ trade: null,
188610
+ error: new errors_1.NotSupportedTokensError(),
188611
+ tradeType: this.type
188612
+ };
188613
+ }
188614
+ const fromWithoutFee = (0, get_from_without_fee_1.getFromWithoutFee)(fromToken, feeInfo.rubicProxy?.platformFee?.percent);
188615
+ let onChainTrade = null;
188616
+ let transitTokenAmount = fromWithoutFee.tokenAmount;
188617
+ let transitMinAmount = transitTokenAmount;
188618
+ let transitToken = fromWithoutFee;
188619
+ if (!tokenRegistered) {
188620
+ if (!useProxy) {
188621
+ return {
188622
+ trade: null,
188623
+ error: new errors_1.NotSupportedTokensError(),
188624
+ tradeType: this.type
188625
+ };
188626
+ }
188627
+ const transitTokenAddress = await targetBridgeManager.getBridgeToken(toToken.address);
188628
+ onChainTrade = await this.getOnChainTrade(fromWithoutFee, [], options.slippageTolerance, transitTokenAddress);
188629
+ if (!onChainTrade) {
188630
+ return {
188631
+ trade: null,
188632
+ error: new errors_1.NotSupportedTokensError(),
188633
+ tradeType: this.type
188634
+ };
188635
+ }
188636
+ transitTokenAmount = onChainTrade.to.tokenAmount;
188637
+ transitMinAmount = onChainTrade.toTokenAmountMin.tokenAmount;
188638
+ transitToken = onChainTrade.to;
188639
+ }
188640
+ const targetAmount = await sourceBridgeManager.calculateAmount(toToken.address, web3_pure_1.Web3Pure.toWei(transitTokenAmount, transitToken.decimals));
188641
+ const targetAmountMin = await sourceBridgeManager.calculateAmount(toToken.address, web3_pure_1.Web3Pure.toWei(transitMinAmount, transitToken.decimals));
188642
+ const amountsErrors = await this.getMinMaxAmountsErrors(fromTokenAddress, sourceBridgeManager, transitToken);
188643
+ if (!targetAmount) {
188644
+ throw new errors_1.RubicSdkError('Can not estimate trade');
188645
+ }
188646
+ const to = new tokens_1.PriceTokenAmount({
188647
+ ...toToken.asStruct,
188648
+ tokenAmount: web3_pure_1.Web3Pure.fromWei(targetAmount, toToken.decimals)
188649
+ });
188650
+ const gasData = options.gasCalculation === 'enabled'
188651
+ ? await pulse_chain_cross_chain_trade_1.PulseChainCrossChainTrade.getGasData(fromToken, to, onChainTrade, feeInfo, targetAmountMin, options.providerAddress, options.receiverAddress || this.getWalletAddress(fromToken.blockchain), sourceBridgeManager.sourceBridgeAddress, tokenRegistered)
188652
+ : null;
188653
+ return {
188654
+ trade: new pulse_chain_cross_chain_trade_1.PulseChainCrossChainTrade({
188655
+ from: fromToken,
188656
+ to,
188657
+ gasData,
188658
+ slippage: options.slippageTolerance,
188659
+ feeInfo: feeInfo,
188660
+ toTokenAmountMin: targetAmountMin,
188661
+ onChainTrade,
188662
+ priceImpact: fromToken.calculatePriceImpactPercent(to),
188663
+ routerAddress: sourceBridgeManager.sourceBridgeAddress,
188664
+ tokenRegistered
188665
+ }, options.providerAddress, await this.getRoutePath(fromToken, transitToken, to, onChainTrade)),
188666
+ error: amountsErrors,
188667
+ tradeType: this.type
188668
+ };
188669
+ }
188670
+ catch (err) {
188671
+ const rubicSdkError = cross_chain_provider_1.CrossChainProvider.parseError(err);
188672
+ return {
188673
+ trade: null,
188674
+ error: rubicSdkError,
188675
+ tradeType: this.type
188676
+ };
188677
+ }
188678
+ }
188679
+ async getOnChainTrade(from, _availableDexes, slippageTolerance, transitTokenAddress) {
188680
+ const fromBlockchain = from.blockchain;
188681
+ const dexes = Object.values(typed_trade_providers_1.typedTradeProviders[fromBlockchain]).filter(dex => dex.supportReceiverAddress);
188682
+ const to = await tokens_1.PriceToken.createToken({
188683
+ address: transitTokenAddress,
188684
+ blockchain: fromBlockchain
188685
+ });
188686
+ const onChainTrades = (await Promise.allSettled(dexes.map(dex => dex.calculate(from, to, {
188687
+ slippageTolerance,
188688
+ gasCalculation: 'disabled',
188689
+ useProxy: false
188690
+ }))))
188691
+ .filter(value => value.status === 'fulfilled')
188692
+ .map(value => value.value)
188693
+ .sort((a, b) => b.to.tokenAmount.comparedTo(a.to.tokenAmount));
188694
+ if (!onChainTrades.length) {
188695
+ return null;
188696
+ }
188697
+ return onChainTrades[0];
188698
+ }
188699
+ async getMinMaxAmountsErrors(fromTokenAddress, fromBridgeManager, fromToken) {
188700
+ try {
188701
+ const minAmountWei = await fromBridgeManager.getMinAmountToken(fromTokenAddress);
188702
+ const minAmount = new bignumber_js_1.default(minAmountWei);
188703
+ if (minAmount.gte(fromToken.stringWeiAmount)) {
188704
+ return new errors_1.MinAmountError(web3_pure_1.Web3Pure.fromWei(minAmount, fromToken.decimals), fromToken.symbol);
188705
+ }
188706
+ }
188707
+ catch {
188708
+ return undefined;
188709
+ }
188710
+ return undefined;
188711
+ }
188712
+ async getFeeInfo(fromBlockchain, providerAddress, percentFeeToken, useProxy) {
188713
+ return proxy_cross_chain_evm_trade_1.ProxyCrossChainEvmTrade.getFeeInfo(fromBlockchain, providerAddress, percentFeeToken, useProxy);
188714
+ }
188715
+ async getRoutePath(from, transit, to, onChainTrade) {
188716
+ const routePath = [];
188717
+ if (onChainTrade) {
188718
+ routePath.push({
188719
+ type: 'on-chain',
188720
+ path: [from, transit],
188721
+ provider: onChainTrade.type
188722
+ });
188723
+ }
188724
+ routePath.push({
188725
+ type: 'cross-chain',
188726
+ path: [transit, to],
188727
+ provider: cross_chain_trade_type_1.CROSS_CHAIN_TRADE_TYPE.PULSE_CHAIN_BRIDGE
188728
+ });
188729
+ return routePath;
188730
+ }
188731
+ getTokenAddress(token) {
188732
+ if (token.blockchain === blockchain_name_1.BLOCKCHAIN_NAME.ETHEREUM) {
188733
+ return token.isNative ? '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' : token.address;
188734
+ }
188735
+ return token.isNative ? '0xA1077a294dDE1B09bB078844df40758a5D0f9a27' : token.address;
188736
+ }
188737
+ }
188738
+ exports.PulseChainCrossChainProvider = PulseChainCrossChainProvider;
188739
+
188740
+
188741
+ /***/ }),
188742
+
188743
+ /***/ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-trade.ts":
188744
+ /*!********************************************************************************************************************!*\
188745
+ !*** ./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-trade.ts ***!
188746
+ \********************************************************************************************************************/
188747
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
188748
+
188749
+ "use strict";
188750
+
188751
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
188752
+ exports.PulseChainCrossChainTrade = void 0;
188753
+ const blockchain_name_1 = __webpack_require__(/*! ../../../../../core/blockchain/models/blockchain-name */ "./src/core/blockchain/models/blockchain-name.ts");
188754
+ const evm_web3_pure_1 = __webpack_require__(/*! ../../../../../core/blockchain/web3-pure/typed-web3-pure/evm-web3-pure/evm-web3-pure */ "./src/core/blockchain/web3-pure/typed-web3-pure/evm-web3-pure/evm-web3-pure.ts");
188755
+ const web3_pure_1 = __webpack_require__(/*! ../../../../../core/blockchain/web3-pure/web3-pure */ "./src/core/blockchain/web3-pure/web3-pure.ts");
188756
+ const injector_1 = __webpack_require__(/*! ../../../../../core/injector/injector */ "./src/core/injector/injector.ts");
188757
+ const cross_chain_trade_type_1 = __webpack_require__(/*! ../../models/cross-chain-trade-type */ "./src/features/cross-chain/calculation-manager/models/cross-chain-trade-type.ts");
188758
+ const rubic_proxy_contract_address_1 = __webpack_require__(/*! ../common/constants/rubic-proxy-contract-address */ "./src/features/cross-chain/calculation-manager/providers/common/constants/rubic-proxy-contract-address.ts");
188759
+ const evm_common_cross_chain_abi_1 = __webpack_require__(/*! ../common/emv-cross-chain-trade/constants/evm-common-cross-chain-abi */ "./src/features/cross-chain/calculation-manager/providers/common/emv-cross-chain-trade/constants/evm-common-cross-chain-abi.ts");
188760
+ const gateway_rubic_cross_chain_abi_1 = __webpack_require__(/*! ../common/emv-cross-chain-trade/constants/gateway-rubic-cross-chain-abi */ "./src/features/cross-chain/calculation-manager/providers/common/emv-cross-chain-trade/constants/gateway-rubic-cross-chain-abi.ts");
188761
+ const evm_cross_chain_trade_1 = __webpack_require__(/*! ../common/emv-cross-chain-trade/evm-cross-chain-trade */ "./src/features/cross-chain/calculation-manager/providers/common/emv-cross-chain-trade/evm-cross-chain-trade.ts");
188762
+ const bridge_type_1 = __webpack_require__(/*! ../common/models/bridge-type */ "./src/features/cross-chain/calculation-manager/providers/common/models/bridge-type.ts");
188763
+ const proxy_cross_chain_evm_trade_1 = __webpack_require__(/*! ../common/proxy-cross-chain-evm-facade/proxy-cross-chain-evm-trade */ "./src/features/cross-chain/calculation-manager/providers/common/proxy-cross-chain-evm-facade/proxy-cross-chain-evm-trade.ts");
188764
+ const bridge_manager_1 = __webpack_require__(/*! ./omni-bridge-entities/bridge-manager */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/bridge-manager.ts");
188765
+ const omni_bridge_1 = __webpack_require__(/*! ./omni-bridge-entities/omni-bridge */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/omni-bridge.ts");
188766
+ const convert_gas_price_1 = __webpack_require__(/*! ../../utils/convert-gas-price */ "./src/features/cross-chain/calculation-manager/utils/convert-gas-price.ts");
188767
+ class PulseChainCrossChainTrade extends evm_cross_chain_trade_1.EvmCrossChainTrade {
188768
+ /** @internal */
188769
+ static async getGasData(from, toToken, onChainTrade, feeInfo, toTokenAmountMin, providerAddress, receiverAddress, routerAddress, tokenRegistered) {
188770
+ const fromBlockchain = from.blockchain;
188771
+ const walletAddress = injector_1.Injector.web3PrivateService.getWeb3PrivateByBlockchain(fromBlockchain).address;
188772
+ if (!walletAddress) {
188773
+ return null;
188774
+ }
188775
+ try {
188776
+ let gasLimit;
188777
+ let gasDetails;
188778
+ const web3Public = injector_1.Injector.web3PublicService.getWeb3Public(fromBlockchain);
188779
+ if (feeInfo.rubicProxy?.fixedFee?.amount.gt(0)) {
188780
+ const { contractAddress, contractAbi, methodName, methodArguments, value } = await new PulseChainCrossChainTrade({
188781
+ from,
188782
+ to: toToken,
188783
+ gasData: null,
188784
+ priceImpact: 0,
188785
+ slippage: 0,
188786
+ feeInfo: feeInfo,
188787
+ toTokenAmountMin,
188788
+ onChainTrade: onChainTrade,
188789
+ routerAddress,
188790
+ tokenRegistered
188791
+ }, providerAddress || evm_web3_pure_1.EvmWeb3Pure.EMPTY_ADDRESS, []).getContractParams({});
188792
+ const [proxyGasLimit, proxyGasDetails] = await Promise.all([
188793
+ web3Public.getEstimatedGas(contractAbi, contractAddress, methodName, methodArguments, walletAddress, value),
188794
+ (0, convert_gas_price_1.convertGasDataToBN)(await injector_1.Injector.gasPriceApi.getGasPrice(from.blockchain))
188795
+ ]);
188796
+ gasLimit = proxyGasLimit;
188797
+ gasDetails = proxyGasDetails;
188798
+ }
188799
+ else {
188800
+ const { data, to, value } = new PulseChainCrossChainTrade({
188801
+ from,
188802
+ to: toToken,
188803
+ gasData: null,
188804
+ priceImpact: 0,
188805
+ slippage: 0,
188806
+ feeInfo: feeInfo,
188807
+ toTokenAmountMin,
188808
+ onChainTrade: onChainTrade,
188809
+ routerAddress,
188810
+ tokenRegistered
188811
+ }, providerAddress || evm_web3_pure_1.EvmWeb3Pure.EMPTY_ADDRESS, []).getTransactionRequest(receiverAddress, onChainTrade ? onChainTrade.to : from, toToken);
188812
+ const defaultGasLimit = await web3Public.getEstimatedGasByData(walletAddress, to, {
188813
+ data,
188814
+ value
188815
+ });
188816
+ const defaultGasDetails = (0, convert_gas_price_1.convertGasDataToBN)(await injector_1.Injector.gasPriceApi.getGasPrice(from.blockchain));
188817
+ gasLimit = defaultGasLimit;
188818
+ gasDetails = defaultGasDetails;
188819
+ }
188820
+ if (!gasLimit?.isFinite()) {
188821
+ return null;
188822
+ }
188823
+ const increasedGasLimit = web3_pure_1.Web3Pure.calculateGasMargin(gasLimit, 1.2);
188824
+ return {
188825
+ gasLimit: increasedGasLimit,
188826
+ ...gasDetails
188827
+ };
188828
+ }
188829
+ catch (_err) {
188830
+ return null;
188831
+ }
188832
+ }
188833
+ get fromBlockchain() {
188834
+ return this.from.blockchain;
188835
+ }
188836
+ get fromContractAddress() {
188837
+ return this.isProxyTrade
188838
+ ? rubic_proxy_contract_address_1.rubicProxyContractAddress[this.fromBlockchain].gateway
188839
+ : this.routerAddress;
186357
188840
  }
186358
188841
  get methodName() {
186359
- return 'startBridgeTokensViaGenericCrossChain';
188842
+ if (this.isErc677 && this.from.blockchain === blockchain_name_1.BLOCKCHAIN_NAME.ETHEREUM) {
188843
+ return this.onChainTrade
188844
+ ? 'swapAndStartBridgeTokensViaTransferAndCall'
188845
+ : 'startBridgeTokensViaTransferAndCall';
188846
+ }
188847
+ return this.onChainTrade
188848
+ ? 'swapAndStartBridgeTokensViaGenericCrossChain'
188849
+ : 'startBridgeTokensViaGenericCrossChain';
188850
+ }
188851
+ get isErc677() {
188852
+ return !this.isTokenRegistered || omni_bridge_1.OmniBridge.isCustomWrap(this.from);
186360
188853
  }
186361
188854
  constructor(crossChainTrade, providerAddress, routePath) {
186362
188855
  super(providerAddress, routePath);
186363
- this.type = cross_chain_trade_type_1.CROSS_CHAIN_TRADE_TYPE.LIFI;
186364
- this.isAggregator = true;
188856
+ this.type = cross_chain_trade_type_1.CROSS_CHAIN_TRADE_TYPE.PULSE_CHAIN_BRIDGE;
188857
+ this.isAggregator = false;
188858
+ this.bridgeType = bridge_type_1.BRIDGE_TYPE.PULSE_CHAIN_BRIDGE;
186365
188859
  this.from = crossChainTrade.from;
186366
188860
  this.to = crossChainTrade.to;
186367
- this.route = crossChainTrade.route;
186368
- this.providerGateway = this.route.steps[0].estimate.approvalAddress;
186369
188861
  this.gasData = crossChainTrade.gasData;
186370
- this.toTokenAmountMin = crossChainTrade.toTokenAmountMin;
186371
- this.feeInfo = crossChainTrade.feeInfo;
186372
188862
  this.slippage = crossChainTrade.slippage;
188863
+ this.toTokenAmountMin = web3_pure_1.Web3Pure.fromWei(crossChainTrade.toTokenAmountMin, crossChainTrade.to.decimals);
188864
+ this.feeInfo = crossChainTrade.feeInfo;
186373
188865
  this.priceImpact = crossChainTrade.priceImpact;
186374
- this.onChainSubtype = crossChainTrade.onChainSubtype;
186375
- this.bridgeType = crossChainTrade.bridgeType;
188866
+ this.routerAddress = crossChainTrade.routerAddress;
188867
+ this.onChainSubtype = crossChainTrade.onChainTrade
188868
+ ? { from: crossChainTrade.onChainTrade.type, to: undefined }
188869
+ : { from: undefined, to: undefined };
188870
+ this.onChainTrade = crossChainTrade.onChainTrade;
188871
+ this.isTokenRegistered = crossChainTrade.tokenRegistered;
188872
+ }
188873
+ async needApprove() {
188874
+ this.checkWalletConnected();
188875
+ if (this.from.isNative || (this.isErc677 && !this.isProxyTrade)) {
188876
+ return false;
188877
+ }
188878
+ const allowance = await this.fromWeb3Public.getAllowance(this.from.address, this.walletAddress, this.fromContractAddress);
188879
+ return this.from.weiAmount.gt(allowance);
186376
188880
  }
186377
188881
  async swapDirect(options = {}) {
186378
- try {
186379
- await this.checkTradeErrors();
186380
- if (options.receiverAddress) {
186381
- throw new errors_1.RubicSdkError('Receiver address not supported');
186382
- }
188882
+ await this.checkTradeErrors();
188883
+ if (!this.isProxyTrade || this.isTokenRegistered) {
186383
188884
  await this.checkAllowanceAndApprove(options);
186384
- const { onConfirm, gasLimit, gasPrice, gasPriceOptions } = options;
186385
- let transactionHash;
186386
- const onTransactionHash = (hash) => {
186387
- if (onConfirm) {
186388
- onConfirm(hash);
186389
- }
186390
- transactionHash = hash;
186391
- };
186392
- // eslint-disable-next-line no-useless-catch
186393
- try {
186394
- const { data, value, to } = await this.fetchSwapData(options?.receiverAddress, false, options?.directTransaction);
186395
- await this.web3Private.trySendTransaction(to, {
186396
- data,
186397
- value,
186398
- onTransactionHash,
186399
- gas: gasLimit,
186400
- gasPrice,
186401
- gasPriceOptions
186402
- });
186403
- return transactionHash;
186404
- }
186405
- catch (err) {
186406
- throw err;
188885
+ }
188886
+ const { onConfirm, gasLimit, gasPrice, gasPriceOptions } = options;
188887
+ let transactionHash;
188888
+ const onTransactionHash = (hash) => {
188889
+ if (onConfirm) {
188890
+ onConfirm(hash);
186407
188891
  }
188892
+ transactionHash = hash;
188893
+ };
188894
+ // eslint-disable-next-line no-useless-catch
188895
+ try {
188896
+ const { data, to, value } = this.getTransactionRequest(options.receiverAddress || this.walletAddress, this.from, this.to);
188897
+ await this.web3Private.trySendTransaction(to, {
188898
+ data,
188899
+ value,
188900
+ onTransactionHash,
188901
+ gas: gasLimit,
188902
+ gasPrice,
188903
+ gasPriceOptions
188904
+ });
188905
+ return transactionHash;
186408
188906
  }
186409
188907
  catch (err) {
186410
- if ([400, 500, 503].includes(err.code)) {
186411
- throw new errors_1.SwapRequestError();
186412
- }
186413
188908
  throw err;
186414
188909
  }
186415
188910
  }
186416
- async getContractParams(options, skipAmountChangeCheck = false) {
186417
- const { data, value: providerValue, to: providerRouter } = await this.fetchSwapData(options?.receiverAddress, skipAmountChangeCheck, options?.directTransaction);
188911
+ async getContractParams(options) {
188912
+ const receiverAddress = options?.receiverAddress || this.walletAddress;
188913
+ const { data, to, value: providerValue } = this.getTransactionRequest(receiverAddress, this.onChainTrade ? this.onChainTrade.to : this.from, this.to);
186418
188914
  const bridgeData = proxy_cross_chain_evm_trade_1.ProxyCrossChainEvmTrade.getBridgeData(options, {
186419
188915
  walletAddress: this.walletAddress,
186420
188916
  fromTokenAmount: this.from,
186421
188917
  toTokenAmount: this.to,
186422
- srcChainTrade: null,
188918
+ srcChainTrade: this.onChainTrade,
186423
188919
  providerAddress: this.providerAddress,
186424
- type: `lifi:${this.bridgeType}`,
188920
+ type: `native:${this.type}`,
186425
188921
  fromAddress: this.walletAddress
186426
188922
  });
186427
- const extraNativeFee = this.from.isNative
186428
- ? new bignumber_js_1.default(providerValue).minus(this.from.stringWeiAmount).toFixed()
186429
- : new bignumber_js_1.default(providerValue).toFixed();
186430
- const providerData = await proxy_cross_chain_evm_trade_1.ProxyCrossChainEvmTrade.getGenericProviderData(providerRouter, data, this.fromBlockchain, providerRouter, extraNativeFee);
186431
- const methodArguments = [bridgeData, providerData];
188923
+ const swapData = this.onChainTrade &&
188924
+ (await proxy_cross_chain_evm_trade_1.ProxyCrossChainEvmTrade.getSwapData(options, {
188925
+ walletAddress: this.walletAddress,
188926
+ contractAddress: rubic_proxy_contract_address_1.rubicProxyContractAddress[this.from.blockchain].router,
188927
+ fromTokenAmount: this.from,
188928
+ toTokenAmount: this.onChainTrade.to,
188929
+ onChainEncodeFn: this.onChainTrade.encode.bind(this.onChainTrade)
188930
+ }));
188931
+ const providerData = this.isErc677
188932
+ ? this.getProviderDataForErc677(this.from, this.to, receiverAddress)
188933
+ : await proxy_cross_chain_evm_trade_1.ProxyCrossChainEvmTrade.getGenericProviderData(to, data, this.fromBlockchain, to, '0');
188934
+ const methodArguments = swapData
188935
+ ? [bridgeData, swapData, providerData]
188936
+ : [bridgeData, providerData];
186432
188937
  const value = this.getSwapValue(providerValue);
186433
188938
  const transactionConfiguration = evm_web3_pure_1.EvmWeb3Pure.encodeMethodCall(rubic_proxy_contract_address_1.rubicProxyContractAddress[this.from.blockchain].router, evm_common_cross_chain_abi_1.evmCommonCrossChainAbi, this.methodName, methodArguments, value);
186434
188939
  const sendingToken = this.from.isNative ? [] : [this.from.address];
@@ -186441,42 +188946,6 @@ class LifiCrossChainTrade extends evm_cross_chain_trade_1.EvmCrossChainTrade {
186441
188946
  value
186442
188947
  };
186443
188948
  }
186444
- async fetchSwapData(receiverAddress, skipAmountChangeCheck = false, directTransaction) {
186445
- if (directTransaction) {
186446
- return {
186447
- data: directTransaction.data,
186448
- to: directTransaction.to,
186449
- value: directTransaction.value
186450
- };
186451
- }
186452
- const firstStep = this.route.steps[0];
186453
- const step = {
186454
- ...firstStep,
186455
- action: {
186456
- ...firstStep.action,
186457
- fromAddress: this.walletAddress,
186458
- toAddress: receiverAddress || this.walletAddress
186459
- },
186460
- execution: {
186461
- status: 'NOT_STARTED',
186462
- process: [
186463
- {
186464
- message: 'Preparing transaction.',
186465
- startedAt: Date.now(),
186466
- status: 'STARTED',
186467
- type: 'CROSS_CHAIN'
186468
- }
186469
- ]
186470
- }
186471
- };
186472
- const swapResponse = await this.httpClient.post('https://li.quest/v1/advanced/stepTransaction', {
186473
- ...step
186474
- });
186475
- if (!skipAmountChangeCheck) {
186476
- evm_cross_chain_trade_1.EvmCrossChainTrade.checkAmountChange(swapResponse.transactionRequest, swapResponse.estimate.toAmount, this.to.stringWeiAmount);
186477
- }
186478
- return swapResponse.transactionRequest;
186479
- }
186480
188949
  getTradeAmountRatio(fromUsd) {
186481
188950
  return fromUsd.dividedBy(this.to.tokenAmount);
186482
188951
  }
@@ -186484,121 +188953,31 @@ class LifiCrossChainTrade extends evm_cross_chain_trade_1.EvmCrossChainTrade {
186484
188953
  return {
186485
188954
  estimatedGas: this.estimatedGas,
186486
188955
  feeInfo: this.feeInfo,
186487
- priceImpact: this.priceImpact || null,
188956
+ priceImpact: this.priceImpact ?? null,
186488
188957
  slippage: this.slippage * 100,
186489
188958
  routePath: this.routePath
186490
188959
  };
186491
188960
  }
188961
+ getTransactionRequest(receiverAddress, fromToken, toToken) {
188962
+ const sourceBridgeManager = bridge_manager_1.BridgeManager.createBridge(fromToken, toToken);
188963
+ const tokenAddress = this.getTokenAddress(fromToken);
188964
+ if (fromToken.isNative) {
188965
+ return sourceBridgeManager.getDataForNativeSwap(receiverAddress, fromToken.stringWeiAmount);
188966
+ }
188967
+ return sourceBridgeManager.getDataForTokenSwap(receiverAddress, fromToken.stringWeiAmount, this.isErc677, tokenAddress);
188968
+ }
188969
+ getTokenAddress(token) {
188970
+ if (token.blockchain === blockchain_name_1.BLOCKCHAIN_NAME.ETHEREUM) {
188971
+ return token.isNative ? '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' : token.address;
188972
+ }
188973
+ return token.isNative ? '0xA1077a294dDE1B09bB078844df40758a5D0f9a27' : token.address;
188974
+ }
188975
+ getProviderDataForErc677(fromToken, toToken, receiverAddress) {
188976
+ const sourceBridgeManager = bridge_manager_1.BridgeManager.createBridge(fromToken, toToken);
188977
+ return [sourceBridgeManager.sourceBridgeAddress, receiverAddress];
188978
+ }
186492
188979
  }
186493
- exports.LifiCrossChainTrade = LifiCrossChainTrade;
186494
-
186495
-
186496
- /***/ }),
186497
-
186498
- /***/ "./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-bridge-types.ts":
186499
- /*!**********************************************************************************************************!*\
186500
- !*** ./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-bridge-types.ts ***!
186501
- \**********************************************************************************************************/
186502
- /***/ ((__unused_webpack_module, exports) => {
186503
-
186504
- "use strict";
186505
-
186506
- Object.defineProperty(exports, "__esModule", ({ value: true }));
186507
- exports.LIFI_BRIDGE_TYPES = void 0;
186508
- exports.LIFI_BRIDGE_TYPES = {
186509
- ACROSS: 'across',
186510
- AMAROK: 'connext',
186511
- ARBITRUM: 'arbitrum',
186512
- AVALANCHE: 'avalanche',
186513
- CBRIDGE: 'cbridge',
186514
- CONNEXT: 'connext',
186515
- HOP: 'hop',
186516
- HYPHEN: 'hyphen',
186517
- MULTICHAIN: 'multichain',
186518
- STARGATE: 'stargate',
186519
- // New
186520
- ALLBRIDGE: 'allbridge',
186521
- POLYGON_BRIDGE: 'polygon',
186522
- OMNI_BRIDGE: 'omni',
186523
- GNOSIS_BRIDGE: 'gnosis',
186524
- CONNEXT_AMAROK: 'amarok',
186525
- CIRCLE_CELER_BRIDGE: 'celercircle',
186526
- LI_FUEL: 'lifuel',
186527
- WORMHOLE: 'portal',
186528
- CELERIM: 'celerim'
186529
- };
186530
-
186531
-
186532
- /***/ }),
186533
-
186534
- /***/ "./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-swap-status.ts":
186535
- /*!*********************************************************************************************************!*\
186536
- !*** ./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-swap-status.ts ***!
186537
- \*********************************************************************************************************/
186538
- /***/ ((__unused_webpack_module, exports) => {
186539
-
186540
- "use strict";
186541
-
186542
- Object.defineProperty(exports, "__esModule", ({ value: true }));
186543
- exports.LIFI_SWAP_STATUS = void 0;
186544
- exports.LIFI_SWAP_STATUS = {
186545
- NOT_FOUND: 'NOT_FOUND',
186546
- INVALID: 'INVALID',
186547
- PENDING: 'PENDING',
186548
- DONE: 'DONE',
186549
- FAILED: 'FAILED'
186550
- };
186551
-
186552
-
186553
- /***/ }),
186554
-
186555
- /***/ "./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-transaction-request.ts":
186556
- /*!*****************************************************************************************************************!*\
186557
- !*** ./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-transaction-request.ts ***!
186558
- \*****************************************************************************************************************/
186559
- /***/ ((__unused_webpack_module, exports) => {
186560
-
186561
- "use strict";
186562
-
186563
- Object.defineProperty(exports, "__esModule", ({ value: true }));
186564
-
186565
-
186566
- /***/ }),
186567
-
186568
- /***/ "./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/uniq-lifi-bridge-types.ts":
186569
- /*!***************************************************************************************************************!*\
186570
- !*** ./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/uniq-lifi-bridge-types.ts ***!
186571
- \***************************************************************************************************************/
186572
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
186573
-
186574
- "use strict";
186575
-
186576
- Object.defineProperty(exports, "__esModule", ({ value: true }));
186577
- exports.UNIQ_LIFI_BRIDGE_TYPES = void 0;
186578
- const default_bridge_type_1 = __webpack_require__(/*! ../../common/models/default-bridge-type */ "./src/features/cross-chain/calculation-manager/providers/common/models/default-bridge-type.ts");
186579
- const lifi_bridge_types_1 = __webpack_require__(/*! ./lifi-bridge-types */ "./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-bridge-types.ts");
186580
- // @TODO add type
186581
- exports.UNIQ_LIFI_BRIDGE_TYPES = {
186582
- ACROSS: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.ACROSS,
186583
- AMAROK: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.AMAROK,
186584
- ARBITRUM: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.ARBITRUM_BRIDGE,
186585
- AVALANCHE: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.AVALANCHE_BRIDGE,
186586
- CBRIDGE: lifi_bridge_types_1.LIFI_BRIDGE_TYPES.CBRIDGE,
186587
- CONNEXT: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.CONNEXT,
186588
- CELERIM: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.CELERIM,
186589
- HOP: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.HOP,
186590
- HYPHEN: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.HYPHEN,
186591
- MULTICHAIN: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.MULTICHAIN,
186592
- STARGATE: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.STARGATE,
186593
- ALLBRIDGE: lifi_bridge_types_1.LIFI_BRIDGE_TYPES.ALLBRIDGE,
186594
- POLYGON_BRIDGE: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.POLYGON,
186595
- OMNI_BRIDGE: lifi_bridge_types_1.LIFI_BRIDGE_TYPES.OMNI_BRIDGE,
186596
- GNOSIS_BRIDGE: lifi_bridge_types_1.LIFI_BRIDGE_TYPES.GNOSIS_BRIDGE,
186597
- CONNEXT_AMAROK: lifi_bridge_types_1.LIFI_BRIDGE_TYPES.CONNEXT_AMAROK,
186598
- CIRCLE_CELER_BRIDGE: lifi_bridge_types_1.LIFI_BRIDGE_TYPES.CIRCLE_CELER_BRIDGE,
186599
- LI_FUEL: lifi_bridge_types_1.LIFI_BRIDGE_TYPES.LI_FUEL,
186600
- WORMHOLE: default_bridge_type_1.DEFAULT_BRIDGE_TYPE.WORMHOLE
186601
- };
188980
+ exports.PulseChainCrossChainTrade = PulseChainCrossChainTrade;
186602
188981
 
186603
188982
 
186604
188983
  /***/ }),
@@ -191675,7 +194054,8 @@ class CrossChainStatusManager {
191675
194054
  [cross_chain_trade_type_1.CROSS_CHAIN_TRADE_TYPE.SQUIDROUTER]: this.getSquidrouterDstSwapStatus,
191676
194055
  [cross_chain_trade_type_1.CROSS_CHAIN_TRADE_TYPE.SCROLL_BRIDGE]: this.getScrollBridgeDstSwapStatus,
191677
194056
  [cross_chain_trade_type_1.CROSS_CHAIN_TRADE_TYPE.TAIKO_BRIDGE]: this.getTaikoBridgeDstSwapStatus,
191678
- [cross_chain_trade_type_1.CROSS_CHAIN_TRADE_TYPE.RANGO]: this.getRangoDstSwapStatus
194057
+ [cross_chain_trade_type_1.CROSS_CHAIN_TRADE_TYPE.RANGO]: this.getRangoDstSwapStatus,
194058
+ [cross_chain_trade_type_1.CROSS_CHAIN_TRADE_TYPE.PULSE_CHAIN_BRIDGE]: this.getPulseChainDstSwapStatus
191679
194059
  };
191680
194060
  }
191681
194061
  /**
@@ -192136,6 +194516,19 @@ class CrossChainStatusManager {
192136
194516
  }
192137
194517
  return { status: tx_status_1.TX_STATUS.PENDING, hash: null };
192138
194518
  }
194519
+ async getPulseChainDstSwapStatus(data) {
194520
+ try {
194521
+ const network = data.fromBlockchain === blockchain_name_1.BLOCKCHAIN_NAME.ETHEREUM ? 'ethereum' : 'ethereum';
194522
+ const result = await injector_1.Injector.httpClient.get(`https://dev-api.rubic.exchange/api/v2/trades/crosschain/pulsechain_bridge_status?tx_hash=${data.srcTxHash}&network=${network}`);
194523
+ if (result.status === 'SUCCESS') {
194524
+ return { status: tx_status_1.TX_STATUS.SUCCESS, hash: result.dest_transaction };
194525
+ }
194526
+ return { status: tx_status_1.TX_STATUS.PENDING, hash: null };
194527
+ }
194528
+ catch {
194529
+ return { status: tx_status_1.TX_STATUS.PENDING, hash: null };
194530
+ }
194531
+ }
192139
194532
  async getRangoDstSwapStatus(data) {
192140
194533
  if (!data.rangoRequestId) {
192141
194534
  throw new errors_1.RubicSdkError('Must provide rangoRequestId');
@@ -192247,6 +194640,19 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
192247
194640
  Object.defineProperty(exports, "__esModule", ({ value: true }));
192248
194641
 
192249
194642
 
194643
+ /***/ }),
194644
+
194645
+ /***/ "./src/features/cross-chain/status-manager/models/rubic-backend-ps-status.ts":
194646
+ /*!***********************************************************************************!*\
194647
+ !*** ./src/features/cross-chain/status-manager/models/rubic-backend-ps-status.ts ***!
194648
+ \***********************************************************************************/
194649
+ /***/ ((__unused_webpack_module, exports) => {
194650
+
194651
+ "use strict";
194652
+
194653
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
194654
+
194655
+
192250
194656
  /***/ }),
192251
194657
 
192252
194658
  /***/ "./src/features/cross-chain/status-manager/models/scroll-api-response.ts":
@@ -215823,6 +218229,19 @@ __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/
215823
218229
  __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-swap-status */ "./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-swap-status.ts"), exports);
215824
218230
  __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-transaction-request */ "./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/lifi-transaction-request.ts"), exports);
215825
218231
  __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/lifi-provider/models/uniq-lifi-bridge-types */ "./src/features/cross-chain/calculation-manager/providers/lifi-provider/models/uniq-lifi-bridge-types.ts"), exports);
218232
+ __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/erc-677-abi */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/erc-677-abi.ts"), exports);
218233
+ __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/fee-manager-abi */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/fee-manager-abi.ts"), exports);
218234
+ __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/foreign-bridge-abi */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/foreign-bridge-abi.ts"), exports);
218235
+ __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/home-bridge-abi */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/home-bridge-abi.ts"), exports);
218236
+ __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/native-bridge-abi */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/native-bridge-abi.ts"), exports);
218237
+ __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-contract-address */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-contract-address.ts"), exports);
218238
+ __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-supported-blockchains */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/constants/pulse-chain-supported-blockchains.ts"), exports);
218239
+ __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/bridge-manager */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/bridge-manager.ts"), exports);
218240
+ __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/foreign-bridge */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/foreign-bridge.ts"), exports);
218241
+ __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/home-bridge */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/home-bridge.ts"), exports);
218242
+ __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/omni-bridge */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/omni-bridge-entities/omni-bridge.ts"), exports);
218243
+ __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-provider */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-provider.ts"), exports);
218244
+ __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-trade */ "./src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-trade.ts"), exports);
215826
218245
  __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/rango-provider/model/rango-cross-chain-api-types */ "./src/features/cross-chain/calculation-manager/providers/rango-provider/model/rango-cross-chain-api-types.ts"), exports);
215827
218246
  __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/rango-provider/model/rango-cross-chain-parser-types */ "./src/features/cross-chain/calculation-manager/providers/rango-provider/model/rango-cross-chain-parser-types.ts"), exports);
215828
218247
  __exportStar(__webpack_require__(/*! ./features/cross-chain/calculation-manager/providers/rango-provider/rango-cross-chain-provider */ "./src/features/cross-chain/calculation-manager/providers/rango-provider/rango-cross-chain-provider.ts"), exports);
@@ -215891,6 +218310,7 @@ __exportStar(__webpack_require__(/*! ./features/cross-chain/status-manager/model
215891
218310
  __exportStar(__webpack_require__(/*! ./features/cross-chain/status-manager/models/cross-chain-status */ "./src/features/cross-chain/status-manager/models/cross-chain-status.ts"), exports);
215892
218311
  __exportStar(__webpack_require__(/*! ./features/cross-chain/status-manager/models/cross-chain-trade-data */ "./src/features/cross-chain/status-manager/models/cross-chain-trade-data.ts"), exports);
215893
218312
  __exportStar(__webpack_require__(/*! ./features/cross-chain/status-manager/models/multichain-status-api-response */ "./src/features/cross-chain/status-manager/models/multichain-status-api-response.ts"), exports);
218313
+ __exportStar(__webpack_require__(/*! ./features/cross-chain/status-manager/models/rubic-backend-ps-status */ "./src/features/cross-chain/status-manager/models/rubic-backend-ps-status.ts"), exports);
215894
218314
  __exportStar(__webpack_require__(/*! ./features/cross-chain/status-manager/models/scroll-api-response */ "./src/features/cross-chain/status-manager/models/scroll-api-response.ts"), exports);
215895
218315
  __exportStar(__webpack_require__(/*! ./features/cross-chain/status-manager/models/squidrouter-api-response */ "./src/features/cross-chain/status-manager/models/squidrouter-api-response.ts"), exports);
215896
218316
  __exportStar(__webpack_require__(/*! ./features/cross-chain/status-manager/models/squidrouter-transfer-status.enum */ "./src/features/cross-chain/status-manager/models/squidrouter-transfer-status.enum.ts"), exports);