@fuel-ts/account 0.0.0-rc-1935-20240325115321 → 0.0.0-rc-1936-20240325124311

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
@@ -3431,17 +3431,15 @@ var TransactionResponse = class {
3431
3431
  };
3432
3432
 
3433
3433
  // src/providers/transaction-response/getDecodedLogs.ts
3434
- import { BigNumberCoder } from "@fuel-ts/abi-coder";
3434
+ import { Interface as Interface3, BigNumberCoder } from "@fuel-ts/abi-coder";
3435
3435
  import { ReceiptType as ReceiptType5 } from "@fuel-ts/transactions";
3436
- function getDecodedLogs(receipts, abiInterface) {
3437
- return receipts.reduce((logs, r) => {
3438
- if (r.type === ReceiptType5.LogData) {
3439
- logs.push(abiInterface.decodeLog(r.data, r.val1.toNumber(), r.id)[0]);
3440
- }
3441
- if (r.type === ReceiptType5.Log) {
3442
- logs.push(
3443
- abiInterface.decodeLog(new BigNumberCoder("u64").encode(r.val0), r.val1.toNumber(), r.id)[0]
3444
- );
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);
3445
3443
  }
3446
3444
  return logs;
3447
3445
  }, []);
@@ -8572,7 +8570,7 @@ var StorageAbstract = class {
8572
8570
 
8573
8571
  // src/predicate/predicate.ts
8574
8572
  import {
8575
- Interface as Interface3,
8573
+ Interface as Interface4,
8576
8574
  INPUT_COIN_FIXED_SIZE,
8577
8575
  WORD_SIZE,
8578
8576
  calculateVmTxMemory as calculateVmTxMemory2,
@@ -8706,7 +8704,7 @@ var Predicate = class extends Account {
8706
8704
  let predicateBytes = arrayify20(bytes);
8707
8705
  let abiInterface;
8708
8706
  if (jsonAbi) {
8709
- abiInterface = new Interface3(jsonAbi);
8707
+ abiInterface = new Interface4(jsonAbi);
8710
8708
  if (abiInterface.functions.main === void 0) {
8711
8709
  throw new FuelError23(
8712
8710
  ErrorCode23.ABI_MAIN_METHOD_MISSING,