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

@@ -28952,7 +28952,7 @@ spurious results.`);
28952
28952
  // ../versions/dist/index.mjs
28953
28953
  function getBuiltinVersions() {
28954
28954
  return {
28955
- FORC: "0.49.3",
28955
+ FORC: "0.51.1",
28956
28956
  FUEL_CORE: "0.22.1",
28957
28957
  FUELS: "0.78.0"
28958
28958
  };
@@ -40107,7 +40107,6 @@ ${MessageCoinFragmentFragmentDoc}`;
40107
40107
  script;
40108
40108
  /** Script input data (parameters) */
40109
40109
  scriptData;
40110
- abis;
40111
40110
  /**
40112
40111
  * Constructor for `ScriptTransactionRequest`.
40113
40112
  *
@@ -40118,7 +40117,6 @@ ${MessageCoinFragmentFragmentDoc}`;
40118
40117
  this.gasLimit = bn(gasLimit);
40119
40118
  this.script = arrayify(script ?? returnZeroScript.bytes);
40120
40119
  this.scriptData = arrayify(scriptData ?? returnZeroScript.encodeScriptData());
40121
- this.abis = rest.abis;
40122
40120
  }
40123
40121
  /**
40124
40122
  * Converts the transaction request to a `TransactionScript`.
@@ -41004,19 +41002,6 @@ ${MessageCoinFragmentFragmentDoc}`;
41004
41002
  return transactionSummary;
41005
41003
  }
41006
41004
 
41007
- // src/providers/transaction-response/getDecodedLogs.ts
41008
- function getDecodedLogs(receipts, mainAbi, externalAbis = {}) {
41009
- return receipts.reduce((logs, receipt) => {
41010
- if (receipt.type === ReceiptType.LogData || receipt.type === ReceiptType.Log) {
41011
- const interfaceToUse = new Interface(externalAbis[receipt.id] || mainAbi);
41012
- const data = receipt.type === ReceiptType.Log ? new BigNumberCoder("u64").encode(receipt.val0) : receipt.data;
41013
- const [decodedLog] = interfaceToUse.decodeLog(data, receipt.val1.toNumber());
41014
- logs.push(decodedLog);
41015
- }
41016
- return logs;
41017
- }, []);
41018
- }
41019
-
41020
41005
  // src/providers/transaction-response/transaction-response.ts
41021
41006
  var TransactionResponse2 = class {
41022
41007
  /** Transaction ID */
@@ -41027,17 +41012,15 @@ ${MessageCoinFragmentFragmentDoc}`;
41027
41012
  gasUsed = bn(0);
41028
41013
  /** The graphql Transaction with receipts object. */
41029
41014
  gqlTransaction;
41030
- abis;
41031
41015
  /**
41032
41016
  * Constructor for `TransactionResponse`.
41033
41017
  *
41034
41018
  * @param id - The transaction ID.
41035
41019
  * @param provider - The provider.
41036
41020
  */
41037
- constructor(id, provider, abis) {
41021
+ constructor(id, provider) {
41038
41022
  this.id = id;
41039
41023
  this.provider = provider;
41040
- this.abis = abis;
41041
41024
  }
41042
41025
  /**
41043
41026
  * Async constructor for `TransactionResponse`. This method can be used to create
@@ -41047,8 +41030,8 @@ ${MessageCoinFragmentFragmentDoc}`;
41047
41030
  * @param id - The transaction ID.
41048
41031
  * @param provider - The provider.
41049
41032
  */
41050
- static async create(id, provider, abis) {
41051
- const response = new TransactionResponse2(id, provider, abis);
41033
+ static async create(id, provider) {
41034
+ const response = new TransactionResponse2(id, provider);
41052
41035
  await response.fetch();
41053
41036
  return response;
41054
41037
  }
@@ -41152,14 +41135,6 @@ ${MessageCoinFragmentFragmentDoc}`;
41152
41135
  gqlTransaction: this.gqlTransaction,
41153
41136
  ...transactionSummary
41154
41137
  };
41155
- if (this.abis) {
41156
- const logs = getDecodedLogs(
41157
- transactionSummary.receipts,
41158
- this.abis.main,
41159
- this.abis.otherContractsAbis
41160
- );
41161
- transactionResult.logs = logs;
41162
- }
41163
41138
  return transactionResult;
41164
41139
  }
41165
41140
  /**
@@ -41179,6 +41154,19 @@ ${MessageCoinFragmentFragmentDoc}`;
41179
41154
  }
41180
41155
  };
41181
41156
 
41157
+ // src/providers/transaction-response/getDecodedLogs.ts
41158
+ function getDecodedLogs(receipts, mainAbi, externalAbis = {}) {
41159
+ return receipts.reduce((logs, receipt) => {
41160
+ if (receipt.type === ReceiptType.LogData || receipt.type === ReceiptType.Log) {
41161
+ const interfaceToUse = externalAbis[receipt.id] ? new Interface(externalAbis[receipt.id]) : new Interface(mainAbi);
41162
+ const data = receipt.type === ReceiptType.Log ? new BigNumberCoder("u64").encode(receipt.val0) : receipt.data;
41163
+ const [decodedLog] = interfaceToUse.decodeLog(data, receipt.val1.toNumber());
41164
+ logs.push(decodedLog);
41165
+ }
41166
+ return logs;
41167
+ }, []);
41168
+ }
41169
+
41182
41170
  // src/providers/utils/auto-retry-fetch.ts
41183
41171
  function getWaitDelay(options, retryAttemptNum) {
41184
41172
  const duration = options.baseDelay ?? 150;
@@ -41513,10 +41501,6 @@ ${MessageCoinFragmentFragmentDoc}`;
41513
41501
  await this.estimateTxDependencies(transactionRequest);
41514
41502
  }
41515
41503
  const encodedTransaction = hexlify(transactionRequest.toTransactionBytes());
41516
- let abis;
41517
- if (transactionRequest.type === TransactionType.Script) {
41518
- abis = transactionRequest.abis;
41519
- }
41520
41504
  if (awaitExecution) {
41521
41505
  const subscription = this.operations.submitAndAwait({ encodedTransaction });
41522
41506
  for await (const { submitAndAwait } of subscription) {
@@ -41531,14 +41515,14 @@ ${MessageCoinFragmentFragmentDoc}`;
41531
41515
  }
41532
41516
  }
41533
41517
  const transactionId2 = transactionRequest.getTransactionId(this.getChainId());
41534
- const response = new TransactionResponse2(transactionId2, this, abis);
41518
+ const response = new TransactionResponse2(transactionId2, this);
41535
41519
  await response.fetch();
41536
41520
  return response;
41537
41521
  }
41538
41522
  const {
41539
41523
  submit: { id: transactionId }
41540
41524
  } = await this.operations.submit({ encodedTransaction });
41541
- return new TransactionResponse2(transactionId, this, abis);
41525
+ return new TransactionResponse2(transactionId, this);
41542
41526
  }
41543
41527
  /**
41544
41528
  * Executes a transaction without actually submitting it to the chain.