@fuel-ts/account 0.0.0-rc-1935-20240325113902 → 0.0.0-rc-1936-20240325123930

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.

@@ -1,5 +1,5 @@
1
- import type { Interface } from '@fuel-ts/abi-coder';
1
+ import type { JsonAbi } from '@fuel-ts/abi-coder';
2
2
  import type { TransactionResultReceipt } from './transaction-response';
3
3
  /** @hidden */
4
- export declare function getDecodedLogs<T = unknown>(receipts: Array<TransactionResultReceipt>, abiInterface: Interface): T[];
4
+ export declare function getDecodedLogs<T = unknown>(receipts: Array<TransactionResultReceipt>, mainAbiInterface: JsonAbi, externalAbis?: Record<string, JsonAbi>): T[];
5
5
  //# sourceMappingURL=getDecodedLogs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDecodedLogs.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-response/getDecodedLogs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAIpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,cAAc;AACd,wBAAgB,cAAc,CAAC,CAAC,GAAG,OAAO,EACxC,QAAQ,EAAE,KAAK,CAAC,wBAAwB,CAAC,EACzC,YAAY,EAAE,SAAS,GACtB,CAAC,EAAE,CAcL"}
1
+ {"version":3,"file":"getDecodedLogs.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-response/getDecodedLogs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,cAAc;AACd,wBAAgB,cAAc,CAAC,CAAC,GAAG,OAAO,EACxC,QAAQ,EAAE,KAAK,CAAC,wBAAwB,CAAC,EACzC,gBAAgB,EAAE,OAAO,EACzB,YAAY,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACzC,CAAC,EAAE,CAkBL"}
@@ -36661,18 +36661,9 @@ This unreleased fuel-core build may include features and updates not yet support
36661
36661
  var Interface = class {
36662
36662
  functions;
36663
36663
  configurables;
36664
- /*
36665
- TODO: Refactor so that there's no need for externalLoggedTypes
36666
-
36667
- This is dedicated to external contracts added via `<base-invocation-scope.ts>.addContracts()` method.
36668
- This is used to decode logs from contracts other than the main contract
36669
- we're interacting with.
36670
- */
36671
- externalLoggedTypes;
36672
36664
  jsonAbi;
36673
36665
  constructor(jsonAbi) {
36674
36666
  this.jsonAbi = jsonAbi;
36675
- this.externalLoggedTypes = {};
36676
36667
  this.functions = Object.fromEntries(
36677
36668
  this.jsonAbi.functions.map((x) => [x.name, new FunctionFragment(this.jsonAbi, x.name)])
36678
36669
  );
@@ -36713,20 +36704,12 @@ This unreleased fuel-core build may include features and updates not yet support
36713
36704
  const fragment = typeof functionFragment === "string" ? this.getFunction(functionFragment) : functionFragment;
36714
36705
  return fragment.decodeOutput(data);
36715
36706
  }
36716
- decodeLog(data, logId, receiptId) {
36717
- const isExternalLoggedType = this.externalLoggedTypes[receiptId];
36718
- if (isExternalLoggedType) {
36719
- const externalInterface = this.externalLoggedTypes[receiptId];
36720
- return externalInterface.decodeLog(data, logId, receiptId);
36721
- }
36707
+ decodeLog(data, logId) {
36722
36708
  const { loggedType } = findOrThrow(this.jsonAbi.loggedTypes, (type3) => type3.logId === logId);
36723
36709
  return AbiCoder.decode(this.jsonAbi, loggedType, arrayify(data), 0, {
36724
36710
  encoding: this.jsonAbi.encoding
36725
36711
  });
36726
36712
  }
36727
- updateExternalLoggedTypes(id, loggedTypes) {
36728
- this.externalLoggedTypes[id] = loggedTypes;
36729
- }
36730
36713
  encodeConfigurable(name, value) {
36731
36714
  const configurable = findOrThrow(
36732
36715
  this.jsonAbi.configurables,