@pyxisjs/chains 0.2.5 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -2887,7 +2887,6 @@ import {
2887
2887
  PyxisUtils,
2888
2888
  getLayerZeroEndpointId,
2889
2889
  getEstimatedBridgeTime,
2890
- getLayerZeroGasLimit,
2891
2890
  BridgeMethod
2892
2891
  } from "@pyxisjs/core";
2893
2892
  import { Options } from "@layerzerolabs/lz-v2-utilities";
@@ -8552,9 +8551,7 @@ var AptosChainAdapter = class extends BaseChainAdapter {
8552
8551
  "quote_bridge",
8553
8552
  lzTellerAddress
8554
8553
  );
8555
- const gasLimit = getLayerZeroGasLimit(this.chain.id, destinationChain);
8556
- const options = Options.newOptions().addExecutorLzReceiveOption(gasLimit);
8557
- const extraOptions = options.toBytes();
8554
+ const extraOptions = Options.newOptions().toBytes();
8558
8555
  const payInZro = false;
8559
8556
  const dstEid = getLayerZeroEndpointId(destinationChain);
8560
8557
  const recipientBytes = this.addressToBytes(recipient);
@@ -8688,7 +8685,7 @@ var AptosChainAdapter = class extends BaseChainAdapter {
8688
8685
  "atomicQueue",
8689
8686
  "get_minimum_request_age"
8690
8687
  );
8691
- const result = await this.viewContract({
8688
+ const [result] = await this.viewContract({
8692
8689
  address: this.getContractAddress("atomicQueue"),
8693
8690
  function: functionSignature,
8694
8691
  arguments: [args.vault],
@@ -8707,7 +8704,7 @@ var AptosChainAdapter = class extends BaseChainAdapter {
8707
8704
  "atomicQueue",
8708
8705
  "get_user_atomic_requests"
8709
8706
  );
8710
- const withdrawalRequests = await this.viewContract({
8707
+ const [withdrawalRequests] = await this.viewContract({
8711
8708
  address: this.getContractAddress("atomicQueue"),
8712
8709
  function: getUserRequestsFn,
8713
8710
  arguments: [vault, userAddress, requestFlag, matchAll],
@@ -8718,8 +8715,8 @@ var AptosChainAdapter = class extends BaseChainAdapter {
8718
8715
  "get_request_updated_at"
8719
8716
  );
8720
8717
  const updatedAtResults = await Promise.allSettled(
8721
- withdrawalRequests.map(
8722
- (request) => this.viewContract({
8718
+ withdrawalRequests.map(async (request) => {
8719
+ const [updatedAtResult] = await this.viewContract({
8723
8720
  address: this.getContractAddress("atomicQueue"),
8724
8721
  function: getUpdatedAtFn,
8725
8722
  arguments: [
@@ -8729,8 +8726,9 @@ var AptosChainAdapter = class extends BaseChainAdapter {
8729
8726
  request.want_token.inner
8730
8727
  ],
8731
8728
  abi: this.getContractABI("atomicQueue")
8732
- })
8733
- )
8729
+ });
8730
+ return updatedAtResult;
8731
+ })
8734
8732
  );
8735
8733
  return withdrawalRequests.map(
8736
8734
  (request, index) => {
@@ -9045,7 +9043,7 @@ import {
9045
9043
  getChainConfig as getChainConfig3,
9046
9044
  getEstimatedBridgeTime as getEstimatedBridgeTime2,
9047
9045
  getLayerZeroEndpointId as getLayerZeroEndpointId2,
9048
- getLayerZeroGasLimit as getLayerZeroGasLimit2
9046
+ getLayerZeroGasLimit
9049
9047
  } from "@pyxisjs/core";
9050
9048
  import {
9051
9049
  createPublicClient,
@@ -9309,7 +9307,7 @@ var EthereumChainAdapter = class extends BaseChainAdapter3 {
9309
9307
  const bridgeData = {
9310
9308
  chainSelector: dstEid,
9311
9309
  destinationChainReceiver: recipient,
9312
- messageGas: getLayerZeroGasLimit2(this.chain.id, destinationChain),
9310
+ messageGas: getLayerZeroGasLimit(this.chain.id, destinationChain),
9313
9311
  bridgeFeeToken: ethAddress,
9314
9312
  data: "0x"
9315
9313
  // Empty extra data
@@ -9326,7 +9324,7 @@ var EthereumChainAdapter = class extends BaseChainAdapter3 {
9326
9324
  method: BridgeMethod2.LayerZero,
9327
9325
  estimatedTime: getEstimatedBridgeTime2(this.chain.id, destinationChain),
9328
9326
  extraOptions: Options2.newOptions().addExecutorLzReceiveOption(
9329
- getLayerZeroGasLimit2(this.chain.id, destinationChain)
9327
+ getLayerZeroGasLimit(this.chain.id, destinationChain)
9330
9328
  ).toBytes(),
9331
9329
  zroFee: "0"
9332
9330
  };
@@ -9350,7 +9348,7 @@ var EthereumChainAdapter = class extends BaseChainAdapter3 {
9350
9348
  const extraOptionsHex = "0x" + Buffer.from(args.extraOptions).toString("hex");
9351
9349
  const bridgeData = {
9352
9350
  chainSelector: dstEid,
9353
- messageGas: args.fee,
9351
+ messageGas: getLayerZeroGasLimit(this.chain.id, args.destinationChain),
9354
9352
  destinationChainReceiver: args.recipient,
9355
9353
  bridgeFeeToken: ethAddress,
9356
9354
  data: extraOptionsHex