@fuel-ts/account 0.0.0-rc-1964-20240328130004 → 0.0.0-rc-1936-20240328132546

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.

Potentially problematic release.


This version of @fuel-ts/account might be problematic. Click here for more details.

package/dist/index.mjs CHANGED
@@ -2356,7 +2356,6 @@ var ScriptTransactionRequest = class extends BaseTransactionRequest {
2356
2356
  script;
2357
2357
  /** Script input data (parameters) */
2358
2358
  scriptData;
2359
- abis;
2360
2359
  /**
2361
2360
  * Constructor for `ScriptTransactionRequest`.
2362
2361
  *
@@ -2367,7 +2366,6 @@ var ScriptTransactionRequest = class extends BaseTransactionRequest {
2367
2366
  this.gasLimit = bn9(gasLimit);
2368
2367
  this.script = arrayify8(script ?? returnZeroScript.bytes);
2369
2368
  this.scriptData = arrayify8(scriptData ?? returnZeroScript.encodeScriptData());
2370
- this.abis = rest.abis;
2371
2369
  }
2372
2370
  /**
2373
2371
  * Converts the transaction request to a `TransactionScript`.
@@ -3280,21 +3278,6 @@ function assembleTransactionSummary(params) {
3280
3278
  return transactionSummary;
3281
3279
  }
3282
3280
 
3283
- // src/providers/transaction-response/getDecodedLogs.ts
3284
- import { Interface as Interface3, BigNumberCoder } from "@fuel-ts/abi-coder";
3285
- import { ReceiptType as ReceiptType5 } from "@fuel-ts/transactions";
3286
- function getDecodedLogs(receipts, mainAbi, externalAbis = {}) {
3287
- return receipts.reduce((logs, receipt) => {
3288
- if (receipt.type === ReceiptType5.LogData || receipt.type === ReceiptType5.Log) {
3289
- const interfaceToUse = new Interface3(externalAbis[receipt.id] || mainAbi);
3290
- const data = receipt.type === ReceiptType5.Log ? new BigNumberCoder("u64").encode(receipt.val0) : receipt.data;
3291
- const [decodedLog] = interfaceToUse.decodeLog(data, receipt.val1.toNumber());
3292
- logs.push(decodedLog);
3293
- }
3294
- return logs;
3295
- }, []);
3296
- }
3297
-
3298
3281
  // src/providers/transaction-response/transaction-response.ts
3299
3282
  var TransactionResponse = class {
3300
3283
  /** Transaction ID */
@@ -3305,17 +3288,15 @@ var TransactionResponse = class {
3305
3288
  gasUsed = bn13(0);
3306
3289
  /** The graphql Transaction with receipts object. */
3307
3290
  gqlTransaction;
3308
- abis;
3309
3291
  /**
3310
3292
  * Constructor for `TransactionResponse`.
3311
3293
  *
3312
3294
  * @param id - The transaction ID.
3313
3295
  * @param provider - The provider.
3314
3296
  */
3315
- constructor(id, provider, abis) {
3297
+ constructor(id, provider) {
3316
3298
  this.id = id;
3317
3299
  this.provider = provider;
3318
- this.abis = abis;
3319
3300
  }
3320
3301
  /**
3321
3302
  * Async constructor for `TransactionResponse`. This method can be used to create
@@ -3325,8 +3306,8 @@ var TransactionResponse = class {
3325
3306
  * @param id - The transaction ID.
3326
3307
  * @param provider - The provider.
3327
3308
  */
3328
- static async create(id, provider, abis) {
3329
- const response = new TransactionResponse(id, provider, abis);
3309
+ static async create(id, provider) {
3310
+ const response = new TransactionResponse(id, provider);
3330
3311
  await response.fetch();
3331
3312
  return response;
3332
3313
  }
@@ -3430,14 +3411,6 @@ var TransactionResponse = class {
3430
3411
  gqlTransaction: this.gqlTransaction,
3431
3412
  ...transactionSummary
3432
3413
  };
3433
- if (this.abis) {
3434
- const logs = getDecodedLogs(
3435
- transactionSummary.receipts,
3436
- this.abis.main,
3437
- this.abis.otherContractsAbis
3438
- );
3439
- transactionResult.logs = logs;
3440
- }
3441
3414
  return transactionResult;
3442
3415
  }
3443
3416
  /**
@@ -3457,6 +3430,21 @@ var TransactionResponse = class {
3457
3430
  }
3458
3431
  };
3459
3432
 
3433
+ // src/providers/transaction-response/getDecodedLogs.ts
3434
+ import { Interface as Interface3, BigNumberCoder } from "@fuel-ts/abi-coder";
3435
+ import { ReceiptType as ReceiptType5 } from "@fuel-ts/transactions";
3436
+ function getDecodedLogs(receipts, mainAbi, externalAbis = {}) {
3437
+ return receipts.reduce((logs, receipt) => {
3438
+ if (receipt.type === ReceiptType5.LogData || receipt.type === ReceiptType5.Log) {
3439
+ const interfaceToUse = externalAbis[receipt.id] ? new Interface3(externalAbis[receipt.id]) : new Interface3(mainAbi);
3440
+ const data = receipt.type === ReceiptType5.Log ? new BigNumberCoder("u64").encode(receipt.val0) : receipt.data;
3441
+ const [decodedLog] = interfaceToUse.decodeLog(data, receipt.val1.toNumber());
3442
+ logs.push(decodedLog);
3443
+ }
3444
+ return logs;
3445
+ }, []);
3446
+ }
3447
+
3460
3448
  // src/providers/utils/auto-retry-fetch.ts
3461
3449
  function getWaitDelay(options, retryAttemptNum) {
3462
3450
  const duration = options.baseDelay ?? 150;
@@ -3791,10 +3779,6 @@ var _Provider = class {
3791
3779
  await this.estimateTxDependencies(transactionRequest);
3792
3780
  }
3793
3781
  const encodedTransaction = hexlify12(transactionRequest.toTransactionBytes());
3794
- let abis;
3795
- if (transactionRequest.type === TransactionType8.Script) {
3796
- abis = transactionRequest.abis;
3797
- }
3798
3782
  if (awaitExecution) {
3799
3783
  const subscription = this.operations.submitAndAwait({ encodedTransaction });
3800
3784
  for await (const { submitAndAwait } of subscription) {
@@ -3809,14 +3793,14 @@ var _Provider = class {
3809
3793
  }
3810
3794
  }
3811
3795
  const transactionId2 = transactionRequest.getTransactionId(this.getChainId());
3812
- const response = new TransactionResponse(transactionId2, this, abis);
3796
+ const response = new TransactionResponse(transactionId2, this);
3813
3797
  await response.fetch();
3814
3798
  return response;
3815
3799
  }
3816
3800
  const {
3817
3801
  submit: { id: transactionId }
3818
3802
  } = await this.operations.submit({ encodedTransaction });
3819
- return new TransactionResponse(transactionId, this, abis);
3803
+ return new TransactionResponse(transactionId, this);
3820
3804
  }
3821
3805
  /**
3822
3806
  * Executes a transaction without actually submitting it to the chain.