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

@@ -2277,7 +2277,6 @@ var ScriptTransactionRequest = class extends BaseTransactionRequest {
2277
2277
  script;
2278
2278
  /** Script input data (parameters) */
2279
2279
  scriptData;
2280
- abis;
2281
2280
  /**
2282
2281
  * Constructor for `ScriptTransactionRequest`.
2283
2282
  *
@@ -2288,7 +2287,6 @@ var ScriptTransactionRequest = class extends BaseTransactionRequest {
2288
2287
  this.gasLimit = bn9(gasLimit);
2289
2288
  this.script = arrayify8(script ?? returnZeroScript.bytes);
2290
2289
  this.scriptData = arrayify8(scriptData ?? returnZeroScript.encodeScriptData());
2291
- this.abis = rest.abis;
2292
2290
  }
2293
2291
  /**
2294
2292
  * Converts the transaction request to a `TransactionScript`.
@@ -3154,21 +3152,6 @@ function assembleTransactionSummary(params) {
3154
3152
  return transactionSummary;
3155
3153
  }
3156
3154
 
3157
- // src/providers/transaction-response/getDecodedLogs.ts
3158
- import { Interface as Interface3, BigNumberCoder } from "@fuel-ts/abi-coder";
3159
- import { ReceiptType as ReceiptType5 } from "@fuel-ts/transactions";
3160
- function getDecodedLogs(receipts, mainAbi, externalAbis = {}) {
3161
- return receipts.reduce((logs, receipt) => {
3162
- if (receipt.type === ReceiptType5.LogData || receipt.type === ReceiptType5.Log) {
3163
- const interfaceToUse = new Interface3(externalAbis[receipt.id] || mainAbi);
3164
- const data = receipt.type === ReceiptType5.Log ? new BigNumberCoder("u64").encode(receipt.val0) : receipt.data;
3165
- const [decodedLog] = interfaceToUse.decodeLog(data, receipt.val1.toNumber());
3166
- logs.push(decodedLog);
3167
- }
3168
- return logs;
3169
- }, []);
3170
- }
3171
-
3172
3155
  // src/providers/transaction-response/transaction-response.ts
3173
3156
  var TransactionResponse = class {
3174
3157
  /** Transaction ID */
@@ -3179,17 +3162,15 @@ var TransactionResponse = class {
3179
3162
  gasUsed = bn13(0);
3180
3163
  /** The graphql Transaction with receipts object. */
3181
3164
  gqlTransaction;
3182
- abis;
3183
3165
  /**
3184
3166
  * Constructor for `TransactionResponse`.
3185
3167
  *
3186
3168
  * @param id - The transaction ID.
3187
3169
  * @param provider - The provider.
3188
3170
  */
3189
- constructor(id, provider, abis) {
3171
+ constructor(id, provider) {
3190
3172
  this.id = id;
3191
3173
  this.provider = provider;
3192
- this.abis = abis;
3193
3174
  }
3194
3175
  /**
3195
3176
  * Async constructor for `TransactionResponse`. This method can be used to create
@@ -3199,8 +3180,8 @@ var TransactionResponse = class {
3199
3180
  * @param id - The transaction ID.
3200
3181
  * @param provider - The provider.
3201
3182
  */
3202
- static async create(id, provider, abis) {
3203
- const response = new TransactionResponse(id, provider, abis);
3183
+ static async create(id, provider) {
3184
+ const response = new TransactionResponse(id, provider);
3204
3185
  await response.fetch();
3205
3186
  return response;
3206
3187
  }
@@ -3304,14 +3285,6 @@ var TransactionResponse = class {
3304
3285
  gqlTransaction: this.gqlTransaction,
3305
3286
  ...transactionSummary
3306
3287
  };
3307
- if (this.abis) {
3308
- const logs = getDecodedLogs(
3309
- transactionSummary.receipts,
3310
- this.abis.main,
3311
- this.abis.otherContractsAbis
3312
- );
3313
- transactionResult.logs = logs;
3314
- }
3315
3288
  return transactionResult;
3316
3289
  }
3317
3290
  /**
@@ -3331,6 +3304,10 @@ var TransactionResponse = class {
3331
3304
  }
3332
3305
  };
3333
3306
 
3307
+ // src/providers/transaction-response/getDecodedLogs.ts
3308
+ import { Interface as Interface3, BigNumberCoder } from "@fuel-ts/abi-coder";
3309
+ import { ReceiptType as ReceiptType5 } from "@fuel-ts/transactions";
3310
+
3334
3311
  // src/providers/utils/auto-retry-fetch.ts
3335
3312
  function getWaitDelay(options, retryAttemptNum) {
3336
3313
  const duration = options.baseDelay ?? 150;
@@ -3665,10 +3642,6 @@ var _Provider = class {
3665
3642
  await this.estimateTxDependencies(transactionRequest);
3666
3643
  }
3667
3644
  const encodedTransaction = hexlify12(transactionRequest.toTransactionBytes());
3668
- let abis;
3669
- if (transactionRequest.type === TransactionType8.Script) {
3670
- abis = transactionRequest.abis;
3671
- }
3672
3645
  if (awaitExecution) {
3673
3646
  const subscription = this.operations.submitAndAwait({ encodedTransaction });
3674
3647
  for await (const { submitAndAwait } of subscription) {
@@ -3683,14 +3656,14 @@ var _Provider = class {
3683
3656
  }
3684
3657
  }
3685
3658
  const transactionId2 = transactionRequest.getTransactionId(this.getChainId());
3686
- const response = new TransactionResponse(transactionId2, this, abis);
3659
+ const response = new TransactionResponse(transactionId2, this);
3687
3660
  await response.fetch();
3688
3661
  return response;
3689
3662
  }
3690
3663
  const {
3691
3664
  submit: { id: transactionId }
3692
3665
  } = await this.operations.submit({ encodedTransaction });
3693
- return new TransactionResponse(transactionId, this, abis);
3666
+ return new TransactionResponse(transactionId, this);
3694
3667
  }
3695
3668
  /**
3696
3669
  * Executes a transaction without actually submitting it to the chain.