@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.

@@ -2299,7 +2299,6 @@ var ScriptTransactionRequest = class extends BaseTransactionRequest {
2299
2299
  script;
2300
2300
  /** Script input data (parameters) */
2301
2301
  scriptData;
2302
- abis;
2303
2302
  /**
2304
2303
  * Constructor for `ScriptTransactionRequest`.
2305
2304
  *
@@ -2310,7 +2309,6 @@ var ScriptTransactionRequest = class extends BaseTransactionRequest {
2310
2309
  this.gasLimit = (0, import_math9.bn)(gasLimit);
2311
2310
  this.script = (0, import_utils15.arrayify)(script ?? returnZeroScript.bytes);
2312
2311
  this.scriptData = (0, import_utils15.arrayify)(scriptData ?? returnZeroScript.encodeScriptData());
2313
- this.abis = rest.abis;
2314
2312
  }
2315
2313
  /**
2316
2314
  * Converts the transaction request to a `TransactionScript`.
@@ -2478,7 +2476,7 @@ var transactionRequestify = (obj) => {
2478
2476
  // src/providers/transaction-response/transaction-response.ts
2479
2477
  var import_errors12 = require("@fuel-ts/errors");
2480
2478
  var import_math13 = require("@fuel-ts/math");
2481
- var import_transactions16 = require("@fuel-ts/transactions");
2479
+ var import_transactions15 = require("@fuel-ts/transactions");
2482
2480
  var import_utils21 = require("@fuel-ts/utils");
2483
2481
 
2484
2482
  // src/providers/transaction-summary/assemble-transaction-summary.ts
@@ -3176,21 +3174,6 @@ function assembleTransactionSummary(params) {
3176
3174
  return transactionSummary;
3177
3175
  }
3178
3176
 
3179
- // src/providers/transaction-response/getDecodedLogs.ts
3180
- var import_abi_coder3 = require("@fuel-ts/abi-coder");
3181
- var import_transactions15 = require("@fuel-ts/transactions");
3182
- function getDecodedLogs(receipts, mainAbi, externalAbis = {}) {
3183
- return receipts.reduce((logs, receipt) => {
3184
- if (receipt.type === import_transactions15.ReceiptType.LogData || receipt.type === import_transactions15.ReceiptType.Log) {
3185
- const interfaceToUse = new import_abi_coder3.Interface(externalAbis[receipt.id] || mainAbi);
3186
- const data = receipt.type === import_transactions15.ReceiptType.Log ? new import_abi_coder3.BigNumberCoder("u64").encode(receipt.val0) : receipt.data;
3187
- const [decodedLog] = interfaceToUse.decodeLog(data, receipt.val1.toNumber());
3188
- logs.push(decodedLog);
3189
- }
3190
- return logs;
3191
- }, []);
3192
- }
3193
-
3194
3177
  // src/providers/transaction-response/transaction-response.ts
3195
3178
  var TransactionResponse = class {
3196
3179
  /** Transaction ID */
@@ -3201,17 +3184,15 @@ var TransactionResponse = class {
3201
3184
  gasUsed = (0, import_math13.bn)(0);
3202
3185
  /** The graphql Transaction with receipts object. */
3203
3186
  gqlTransaction;
3204
- abis;
3205
3187
  /**
3206
3188
  * Constructor for `TransactionResponse`.
3207
3189
  *
3208
3190
  * @param id - The transaction ID.
3209
3191
  * @param provider - The provider.
3210
3192
  */
3211
- constructor(id, provider, abis) {
3193
+ constructor(id, provider) {
3212
3194
  this.id = id;
3213
3195
  this.provider = provider;
3214
- this.abis = abis;
3215
3196
  }
3216
3197
  /**
3217
3198
  * Async constructor for `TransactionResponse`. This method can be used to create
@@ -3221,8 +3202,8 @@ var TransactionResponse = class {
3221
3202
  * @param id - The transaction ID.
3222
3203
  * @param provider - The provider.
3223
3204
  */
3224
- static async create(id, provider, abis) {
3225
- const response = new TransactionResponse(id, provider, abis);
3205
+ static async create(id, provider) {
3206
+ const response = new TransactionResponse(id, provider);
3226
3207
  await response.fetch();
3227
3208
  return response;
3228
3209
  }
@@ -3256,7 +3237,7 @@ var TransactionResponse = class {
3256
3237
  * @returns The decoded transaction.
3257
3238
  */
3258
3239
  decodeTransaction(transactionWithReceipts) {
3259
- return new import_transactions16.TransactionCoder().decode(
3240
+ return new import_transactions15.TransactionCoder().decode(
3260
3241
  (0, import_utils21.arrayify)(transactionWithReceipts.rawPayload),
3261
3242
  0
3262
3243
  )?.[0];
@@ -3326,14 +3307,6 @@ var TransactionResponse = class {
3326
3307
  gqlTransaction: this.gqlTransaction,
3327
3308
  ...transactionSummary
3328
3309
  };
3329
- if (this.abis) {
3330
- const logs = getDecodedLogs(
3331
- transactionSummary.receipts,
3332
- this.abis.main,
3333
- this.abis.otherContractsAbis
3334
- );
3335
- transactionResult.logs = logs;
3336
- }
3337
3310
  return transactionResult;
3338
3311
  }
3339
3312
  /**
@@ -3353,6 +3326,10 @@ var TransactionResponse = class {
3353
3326
  }
3354
3327
  };
3355
3328
 
3329
+ // src/providers/transaction-response/getDecodedLogs.ts
3330
+ var import_abi_coder3 = require("@fuel-ts/abi-coder");
3331
+ var import_transactions16 = require("@fuel-ts/transactions");
3332
+
3356
3333
  // src/providers/utils/auto-retry-fetch.ts
3357
3334
  function getWaitDelay(options, retryAttemptNum) {
3358
3335
  const duration = options.baseDelay ?? 150;
@@ -3687,10 +3664,6 @@ var _Provider = class {
3687
3664
  await this.estimateTxDependencies(transactionRequest);
3688
3665
  }
3689
3666
  const encodedTransaction = (0, import_utils22.hexlify)(transactionRequest.toTransactionBytes());
3690
- let abis;
3691
- if (transactionRequest.type === import_transactions17.TransactionType.Script) {
3692
- abis = transactionRequest.abis;
3693
- }
3694
3667
  if (awaitExecution) {
3695
3668
  const subscription = this.operations.submitAndAwait({ encodedTransaction });
3696
3669
  for await (const { submitAndAwait } of subscription) {
@@ -3705,14 +3678,14 @@ var _Provider = class {
3705
3678
  }
3706
3679
  }
3707
3680
  const transactionId2 = transactionRequest.getTransactionId(this.getChainId());
3708
- const response = new TransactionResponse(transactionId2, this, abis);
3681
+ const response = new TransactionResponse(transactionId2, this);
3709
3682
  await response.fetch();
3710
3683
  return response;
3711
3684
  }
3712
3685
  const {
3713
3686
  submit: { id: transactionId }
3714
3687
  } = await this.operations.submit({ encodedTransaction });
3715
- return new TransactionResponse(transactionId, this, abis);
3688
+ return new TransactionResponse(transactionId, this);
3716
3689
  }
3717
3690
  /**
3718
3691
  * Executes a transaction without actually submitting it to the chain.