@lukso/transaction-decoder 1.3.0-dev.c21633f → 1.3.0

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.
Files changed (71) hide show
  1. package/dist/browser.cjs +73 -41
  2. package/dist/browser.cjs.map +1 -1
  3. package/dist/browser.d.cts +1 -1
  4. package/dist/browser.d.ts +1 -1
  5. package/dist/browser.js +4 -4
  6. package/dist/cdn/transaction-decoder.global.js +13 -13
  7. package/dist/cdn/transaction-decoder.global.js.map +1 -1
  8. package/dist/{chunk-2ZO6MJJX.js → chunk-G7JZHSYX.js} +12 -11
  9. package/dist/chunk-G7JZHSYX.js.map +1 -0
  10. package/dist/{chunk-FKBKAWB3.js → chunk-GGBHTWJL.js} +5 -5
  11. package/dist/chunk-GGBHTWJL.js.map +1 -0
  12. package/dist/{chunk-NDBDNXBI.js → chunk-GXZOF3QY.js} +27 -3
  13. package/dist/chunk-GXZOF3QY.js.map +1 -0
  14. package/dist/{chunk-T4H2HHIB.js → chunk-XVHJWV5U.js} +32 -25
  15. package/dist/chunk-XVHJWV5U.js.map +1 -0
  16. package/dist/data.cjs +62 -31
  17. package/dist/data.cjs.map +1 -1
  18. package/dist/data.d.cts +2 -2
  19. package/dist/data.d.ts +2 -2
  20. package/dist/data.js +2 -2
  21. package/dist/index.cjs +73 -41
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +2 -2
  24. package/dist/index.d.ts +2 -2
  25. package/dist/index.js +4 -4
  26. package/dist/server.cjs +43 -31
  27. package/dist/server.cjs.map +1 -1
  28. package/dist/server.d.cts +2 -1
  29. package/dist/server.d.ts +2 -1
  30. package/dist/server.js +12 -7
  31. package/dist/server.js.map +1 -1
  32. package/dist/{utils-BEpSreRR.d.cts → utils-CBAkjQh3.d.cts} +1 -1
  33. package/dist/{utils-De_c6fUK.d.ts → utils-xT9-km0r.d.ts} +1 -1
  34. package/package.json +3 -3
  35. package/src/core/dataModel.ts +31 -1
  36. package/src/core/integrateDecoder.ts +2 -1
  37. package/src/decoder/browserCache.ts +6 -1
  38. package/src/decoder/errors.ts +2 -2
  39. package/src/decoder/events.ts +3 -3
  40. package/src/decoder/functionSignature.ts +9 -9
  41. package/src/decoder/getDataFromExternalSources.ts +2 -2
  42. package/src/decoder/interfaces.ts +1 -1
  43. package/src/decoder/kvCache.ts +6 -1
  44. package/src/decoder/lruCache.ts +6 -1
  45. package/src/decoder/lsp7TransferBatch.test.ts +3 -0
  46. package/src/decoder/plugins/enhanceBurntPix.ts +2 -1
  47. package/src/decoder/plugins/enhanceGraffiti.ts +17 -3
  48. package/src/decoder/plugins/enhanceLSP26FollowerSystem.ts +8 -4
  49. package/src/decoder/plugins/enhanceLSP6KeyManager.ts +1 -0
  50. package/src/decoder/plugins/enhanceLSP7DigitalAsset.ts +7 -5
  51. package/src/decoder/plugins/enhanceLSP9Vault.ts +8 -7
  52. package/src/decoder/plugins/enhanceRetrieveAbi.ts +6 -5
  53. package/src/decoder/plugins/index.ts +1 -3
  54. package/src/decoder/plugins/schemaDefault.ts +4 -3
  55. package/src/decoder/plugins/standardPlugin.ts +1 -1
  56. package/src/decoder/singleGQL.ts +2 -2
  57. package/src/decoder/transaction.ts +2 -1
  58. package/src/decoder/utils.ts +2 -2
  59. package/src/example/usage.ts +4 -3
  60. package/src/server/addressResolver.ts +1 -1
  61. package/src/server/decodeTransactionSync.ts +1 -0
  62. package/src/server/decodeTransactionsBatch.ts +1 -1
  63. package/src/server/finishDecoding.ts +8 -4
  64. package/src/server/lsp23Resolver.ts +3 -2
  65. package/src/server/types.ts +1 -1
  66. package/src/shared/addressResolver.ts +4 -4
  67. package/src/utils/json-bigint.ts +4 -4
  68. package/dist/chunk-2ZO6MJJX.js.map +0 -1
  69. package/dist/chunk-FKBKAWB3.js.map +0 -1
  70. package/dist/chunk-NDBDNXBI.js.map +0 -1
  71. package/dist/chunk-T4H2HHIB.js.map +0 -1
package/dist/data.d.cts CHANGED
@@ -3,7 +3,7 @@ import { Abi, Chain } from 'viem';
3
3
  import * as _preact_signals_core from '@preact/signals-core';
4
4
  import { D as DataModelOptions, I as IDataModel, a as DecodeEventResult, A as ArrayArgs, T as TransactionState, b as DecoderResult, E as EnhancedInfo, c as DataKey } from './index-BzXh7poJ.cjs';
5
5
  export { d as AddressState, C as CustomDecodeFunctionDataReturn, e as Info, N as NamedArgs, R as ResultShared, f as ResultType } from './index-BzXh7poJ.cjs';
6
- export { e as createNamedArgs, f as customDecodeFunctionData, d as dataModel, b as decodeKeyValue, c as decodeKeyValueRaw, a as decodeTransaction, g as extractAddress, h as getPublicClient, s as standardSchemaPlugin } from './utils-BEpSreRR.cjs';
6
+ export { e as createNamedArgs, f as customDecodeFunctionData, d as dataModel, b as decodeKeyValue, c as decodeKeyValueRaw, a as decodeTransaction, g as extractAddress, h as getPublicClient, s as standardSchemaPlugin } from './utils-CBAkjQh3.cjs';
7
7
  import { ERC725JSONSchema } from '@erc725/erc725.js';
8
8
 
9
9
  /**
@@ -24,7 +24,7 @@ declare const defaultSchema: ERC725JSONSchema[];
24
24
  * @param log Transaction to decode (should have data/input)
25
25
  * @returns Promise<ResultType>
26
26
  */
27
- declare function decodeEvent<abi extends Abi | readonly unknown[] = Abi>(_chain: Chain, abi: abi, log: DecodeEventResult): ({
27
+ declare function decodeEvent<abi extends Abi | readonly unknown[] = Abi>(chain: Chain, abi: abi, log: DecodeEventResult): ({
28
28
  eventName: string;
29
29
  args: ArrayArgs;
30
30
  } & DecodeEventResult) | undefined;
package/dist/data.d.ts CHANGED
@@ -3,7 +3,7 @@ import { Abi, Chain } from 'viem';
3
3
  import * as _preact_signals_core from '@preact/signals-core';
4
4
  import { D as DataModelOptions, I as IDataModel, a as DecodeEventResult, A as ArrayArgs, T as TransactionState, b as DecoderResult, E as EnhancedInfo, c as DataKey } from './index-BzXh7poJ.js';
5
5
  export { d as AddressState, C as CustomDecodeFunctionDataReturn, e as Info, N as NamedArgs, R as ResultShared, f as ResultType } from './index-BzXh7poJ.js';
6
- export { e as createNamedArgs, f as customDecodeFunctionData, d as dataModel, b as decodeKeyValue, c as decodeKeyValueRaw, a as decodeTransaction, g as extractAddress, h as getPublicClient, s as standardSchemaPlugin } from './utils-De_c6fUK.js';
6
+ export { e as createNamedArgs, f as customDecodeFunctionData, d as dataModel, b as decodeKeyValue, c as decodeKeyValueRaw, a as decodeTransaction, g as extractAddress, h as getPublicClient, s as standardSchemaPlugin } from './utils-xT9-km0r.js';
7
7
  import { ERC725JSONSchema } from '@erc725/erc725.js';
8
8
 
9
9
  /**
@@ -24,7 +24,7 @@ declare const defaultSchema: ERC725JSONSchema[];
24
24
  * @param log Transaction to decode (should have data/input)
25
25
  * @returns Promise<ResultType>
26
26
  */
27
- declare function decodeEvent<abi extends Abi | readonly unknown[] = Abi>(_chain: Chain, abi: abi, log: DecodeEventResult): ({
27
+ declare function decodeEvent<abi extends Abi | readonly unknown[] = Abi>(chain: Chain, abi: abi, log: DecodeEventResult): ({
28
28
  eventName: string;
29
29
  args: ArrayArgs;
30
30
  } & DecodeEventResult) | undefined;
package/dist/data.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  createDataModel,
3
3
  dataModel,
4
4
  decodeTransaction
5
- } from "./chunk-NDBDNXBI.js";
5
+ } from "./chunk-GXZOF3QY.js";
6
6
  import {
7
7
  IPFS_GATEWAY,
8
8
  createNamedArgs,
@@ -14,7 +14,7 @@ import {
14
14
  extractAddress,
15
15
  getPublicClient,
16
16
  standardSchemaPlugin
17
- } from "./chunk-T4H2HHIB.js";
17
+ } from "./chunk-XVHJWV5U.js";
18
18
 
19
19
  // src/data.ts
20
20
  var addTransactions = dataModel.addTransactions.bind(dataModel);
package/dist/index.cjs CHANGED
@@ -3,7 +3,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
3
3
 
4
4
  // src/core/dataModel.ts
5
5
  import { batch, effect, signal } from "@preact/signals-core";
6
- import { isHex as isHex2, size as size2 } from "viem";
6
+ import { hexToBigInt, isHex as isHex2, size as size2, slice as slice2 } from "viem";
7
7
 
8
8
  // src/core/addressCollector.ts
9
9
  import { isHex, size } from "viem";
@@ -236,6 +236,30 @@ var DataModel = class {
236
236
  constructor(options = {}) {
237
237
  this.options = options;
238
238
  }
239
+ /**
240
+ * Extract a 20-byte address from a potentially 32-byte hex value
241
+ * If the input is 32 bytes, validates it's zero-padded and takes the rightmost 20 bytes
242
+ * If the input is 20 bytes, returns it as-is
243
+ */
244
+ extractAddress(hex) {
245
+ if (!isHex2(hex)) {
246
+ throw new Error(`Invalid hex value: ${hex}`);
247
+ }
248
+ const bytes = size2(hex);
249
+ if (bytes === 32) {
250
+ const first12Bytes = slice2(hex, 0, 12);
251
+ if (hexToBigInt(first12Bytes) !== 0n) {
252
+ throw new Error(
253
+ `Invalid 32-byte address: first 12 bytes must be zero for a padded address, got ${first12Bytes}`
254
+ );
255
+ }
256
+ return slice2(hex, 12, 32);
257
+ }
258
+ if (bytes === 20) {
259
+ return hex;
260
+ }
261
+ throw new Error(`Invalid address length: ${bytes} bytes`);
262
+ }
239
263
  /**
240
264
  * Get or create a signal for a specific key
241
265
  */
@@ -1167,7 +1191,7 @@ async function fetchMultipleAddresses(addresses, graphqlEndpoint, cache) {
1167
1191
  }
1168
1192
  if (data.Token) {
1169
1193
  for (const token of data.Token) {
1170
- const { id: _id, baseAsset, tokenId, ...rest } = token;
1194
+ const { id, baseAsset, tokenId, ...rest } = token;
1171
1195
  if (baseAsset?.id && tokenId) {
1172
1196
  const enhancedInfo = {
1173
1197
  address: baseAsset.id,
@@ -1331,7 +1355,7 @@ async function getImage(images, options) {
1331
1355
  return options.fallback ? { src: options.fallback, width: 128, height: 128 } : void 0;
1332
1356
  }
1333
1357
  try {
1334
- let isImage;
1358
+ let isImage = void 0;
1335
1359
  if (typeof caches !== "undefined" && !ignoreHead) {
1336
1360
  const cache = await caches.open("image-types");
1337
1361
  const cached = await cache.match(url);
@@ -1343,7 +1367,7 @@ async function getImage(images, options) {
1343
1367
  }
1344
1368
  }
1345
1369
  if (!isImage && !ignoreHead) {
1346
- const _now = Date.now();
1370
+ const now = Date.now();
1347
1371
  isImage = await fetch(url, { method: "HEAD" }).then((response) => {
1348
1372
  if (response.ok) {
1349
1373
  const mime = response.headers.get("content-type") || "";
@@ -1693,7 +1717,7 @@ function createNamedPlugin(name, plugin) {
1693
1717
  __name(createNamedPlugin, "createNamedPlugin");
1694
1718
 
1695
1719
  // src/decoder/transaction.ts
1696
- import { isAddress, isAddressEqual, slice as slice2, zeroAddress } from "viem";
1720
+ import { isAddress, isAddressEqual, slice as slice3, zeroAddress } from "viem";
1697
1721
  async function decodeTransaction(fullTransaction, options) {
1698
1722
  const { preferError } = options;
1699
1723
  const {
@@ -1719,7 +1743,7 @@ async function decodeTransaction(fullTransaction, options) {
1719
1743
  isDecoded: true,
1720
1744
  functionName: void 0,
1721
1745
  __decoder: void 0,
1722
- sig: slice2(data || "0x", 0, 4),
1746
+ sig: slice3(data || "0x", 0, 4),
1723
1747
  resultType: "error",
1724
1748
  errorType: "INVALID" /* INVALID */,
1725
1749
  ...createNamedArgs([], []),
@@ -1733,13 +1757,13 @@ async function decodeTransaction(fullTransaction, options) {
1733
1757
  functionName: void 0,
1734
1758
  __decoder: void 0,
1735
1759
  standard: void 0,
1736
- sig: slice2(data || "0x", 0, 4),
1760
+ sig: slice3(data || "0x", 0, 4),
1737
1761
  ...createNamedArgs([], []),
1738
1762
  resultType: "execute",
1739
1763
  phase: "enhanced"
1740
1764
  };
1741
1765
  }
1742
- let _lastError;
1766
+ let lastError;
1743
1767
  const activePlugins = options.plugins;
1744
1768
  for (const plugin of activePlugins) {
1745
1769
  if (to && isAddress(to) && isAddressEqual(to, zeroAddress)) {
@@ -1802,6 +1826,7 @@ async function decodeTransaction(fullTransaction, options) {
1802
1826
  }
1803
1827
  } catch (e) {
1804
1828
  console.error(e);
1829
+ continue;
1805
1830
  }
1806
1831
  }
1807
1832
  let phase = "functionName" in transaction && transaction.functionName && transaction.standard || transaction.input === "0x" || !transaction.input ? "enhanced" : "immediate";
@@ -1820,7 +1845,7 @@ async function decodeTransaction(fullTransaction, options) {
1820
1845
  __decoder: void 0,
1821
1846
  resultType: "raw",
1822
1847
  phase,
1823
- sig: slice2(
1848
+ sig: slice3(
1824
1849
  fullTransaction.input || "data" in fullTransaction && fullTransaction.data || "0x",
1825
1850
  0,
1826
1851
  4
@@ -2407,7 +2432,7 @@ var getDataFromExternalSources = /* @__PURE__ */ __name((schemas, dataFromChain,
2407
2432
  urlDataWithHash,
2408
2433
  ipfsGateway
2409
2434
  ));
2410
- let _length = "unknown";
2435
+ let length = "unknown";
2411
2436
  if (!url.startsWith("data:") && /[=?/]$/.test(url)) {
2412
2437
  return dataEntry;
2413
2438
  }
@@ -2419,7 +2444,7 @@ var getDataFromExternalSources = /* @__PURE__ */ __name((schemas, dataFromChain,
2419
2444
  }
2420
2445
  return response.arrayBuffer().then((buffer) => new Uint8Array(buffer));
2421
2446
  });
2422
- _length = receivedData.length.toString();
2447
+ length = receivedData.length.toString();
2423
2448
  const captureHashes = {};
2424
2449
  const captureErrors = [];
2425
2450
  if (receivedData.length >= 2) {
@@ -2539,7 +2564,7 @@ function decodeKeyValuePlugin(defaultSchema2, process2) {
2539
2564
  });
2540
2565
  if (schema) {
2541
2566
  try {
2542
- const name = schema.name.replace(/[:[\]]|<.*?>/g, "");
2567
+ const name = schema.name.replace(/[:\[\]]|<.*?>/g, "");
2543
2568
  if (schema.keyType === "Array") {
2544
2569
  if (schema.key === key) {
2545
2570
  const hexString = value.slice(2);
@@ -2547,7 +2572,7 @@ function decodeKeyValuePlugin(defaultSchema2, process2) {
2547
2572
  for (let i = 0; i < hexString.length; i += 2) {
2548
2573
  all[i / 2] = Number.parseInt(hexString.substring(i, i + 2), 16);
2549
2574
  }
2550
- const [{ start: _start, end } = { start: 0, end: 0 }] = all.reduce(
2575
+ const [{ start, end } = { start: 0, end: 0 }] = all.reduce(
2551
2576
  (acc, byte, index_) => {
2552
2577
  let isZero = byte === 0 || index_ === 0;
2553
2578
  const last = acc.at(-1);
@@ -2613,7 +2638,7 @@ function decodeKeyValuePlugin(defaultSchema2, process2) {
2613
2638
  value: data2
2614
2639
  };
2615
2640
  }
2616
- let dynamicKeyParts;
2641
+ let dynamicKeyParts = void 0;
2617
2642
  if (isDynamicKeyName(schema.name)) {
2618
2643
  dynamicKeyParts = decodeMappingKey(key, schema).map(
2619
2644
  ({ value: value2 }) => isHex3(value2) ? value2.toLowerCase() : `${value2}`
@@ -3177,9 +3202,9 @@ function customDecodeEventLog(parameters) {
3177
3202
  };
3178
3203
  }
3179
3204
  __name(customDecodeEventLog, "customDecodeEventLog");
3180
- function decodeEvent(_chain, abi3, log) {
3181
- const { data: _data } = log;
3182
- let _lastError;
3205
+ function decodeEvent(chain, abi3, log) {
3206
+ const { data: _data, address, ...rest } = log;
3207
+ let lastError;
3183
3208
  try {
3184
3209
  const result = customDecodeEventLog({
3185
3210
  abi: abi3,
@@ -3831,7 +3856,7 @@ var enhanceBurntPixPlugin = standardPlugin(
3831
3856
  aggregations: [refineAggregation]
3832
3857
  }
3833
3858
  );
3834
- async function enhanceBurntPix(result, pluginOptions, _options) {
3859
+ async function enhanceBurntPix(result, pluginOptions, options) {
3835
3860
  if ("functionName" in result && result.functionName === "refine") {
3836
3861
  return {
3837
3862
  ...result,
@@ -3846,22 +3871,27 @@ __name(enhanceBurntPix, "enhanceBurntPix");
3846
3871
  var enhanceBurntPix_default = enhanceBurntPixPlugin;
3847
3872
 
3848
3873
  // src/decoder/plugins/enhanceGraffiti.ts
3849
- import { bytesToString, hexToBytes, size as size4, slice as slice3 } from "viem";
3874
+ import {
3875
+ bytesToString,
3876
+ hexToBytes,
3877
+ size as size4,
3878
+ slice as slice4
3879
+ } from "viem";
3850
3880
  var enhanceGraffitiPlugin = Object.freeze({
3851
3881
  enhance: /* @__PURE__ */ __name(async (result, options) => enhanceGraffiti(
3852
3882
  result,
3853
3883
  { abiName: "graffiti", decoderName: "graffiti" },
3854
3884
  options
3855
3885
  ), "enhance"),
3856
- decodeEvent: /* @__PURE__ */ __name(async (_log, _options) => void 0, "decodeEvent"),
3886
+ decodeEvent: /* @__PURE__ */ __name(async (log, options) => void 0, "decodeEvent"),
3857
3887
  required: true,
3858
3888
  priority: 1e3,
3859
3889
  name: "graffiti"
3860
3890
  });
3861
3891
  async function enhanceGraffiti(result, _pluginOptions, _options) {
3862
- const { input } = result;
3863
- if (input && size4(input || "0x") >= 4 && slice3(input || "0x", 0, 4) === "0x00000000") {
3864
- let graffiti = slice3(input, 4);
3892
+ const { functionName, sig, args, input } = result;
3893
+ if (input && size4(input || "0x") >= 4 && slice4(input || "0x", 0, 4) === "0x00000000") {
3894
+ let graffiti = slice4(input, 4);
3865
3895
  try {
3866
3896
  graffiti = bytesToString(hexToBytes(graffiti));
3867
3897
  } catch {
@@ -4778,6 +4808,7 @@ async function enhanceKeyManager(result, pluginOptions, options) {
4778
4808
  sig,
4779
4809
  args,
4780
4810
  input,
4811
+ blockNumber,
4781
4812
  to: _to,
4782
4813
  from: _from,
4783
4814
  value
@@ -5047,7 +5078,7 @@ async function enhanceLSP7Metadata(result, options) {
5047
5078
  }
5048
5079
  __name(enhanceLSP7Metadata, "enhanceLSP7Metadata");
5049
5080
  async function enhanceLSP26FollowerSystem(result, _pluginOptions, _options) {
5050
- const { functionName } = result;
5081
+ const { functionName, sig, args, input, blockNumber, to, from, value } = result;
5051
5082
  switch (functionName) {
5052
5083
  }
5053
5084
  return void 0;
@@ -5207,8 +5238,8 @@ var enhanceLSP9VaultPlugin = standardPlugin(
5207
5238
  }, "decodeEvent")
5208
5239
  }
5209
5240
  );
5210
- async function enhanceLSP9Vault(result, _pluginOptions, _options) {
5211
- const { functionName } = result;
5241
+ async function enhanceLSP9Vault(result, pluginOptions, options) {
5242
+ const { functionName, sig, args, input, blockNumber, to, from, value } = result;
5212
5243
  switch (functionName) {
5213
5244
  }
5214
5245
  return void 0;
@@ -5239,7 +5270,7 @@ var enhanceLSP26FollowerSystemPlugin = standardPlugin(
5239
5270
  }
5240
5271
  );
5241
5272
  async function enhanceLSP26FollowerSystem2(result, _pluginOptions, _options) {
5242
- const { functionName, args } = result;
5273
+ const { functionName, sig, args, input, blockNumber, to, from, value } = result;
5243
5274
  const { args: _args, ...partialResult } = result;
5244
5275
  switch (functionName) {
5245
5276
  case "follow":
@@ -5255,6 +5286,7 @@ async function enhanceLSP26FollowerSystem2(result, _pluginOptions, _options) {
5255
5286
  }
5256
5287
  ]
5257
5288
  };
5289
+ break;
5258
5290
  case "followBatch":
5259
5291
  case "unfollowBatch":
5260
5292
  return {
@@ -5266,6 +5298,7 @@ async function enhanceLSP26FollowerSystem2(result, _pluginOptions, _options) {
5266
5298
  address
5267
5299
  }))
5268
5300
  };
5301
+ break;
5269
5302
  }
5270
5303
  return void 0;
5271
5304
  }
@@ -5981,7 +6014,7 @@ var LRUDecoderCache = class {
5981
6014
  if (cached && (!cached.expires || now < cached.expires)) {
5982
6015
  return cached.value;
5983
6016
  }
5984
- if (cached?.stale && now < cached.stale && !this.promises.has(key)) {
6017
+ if (cached && cached.stale && now < cached.stale && !this.promises.has(key)) {
5985
6018
  const backgroundPromise = factory(options?.signal).then(async (fresh) => {
5986
6019
  await this.set(key, fresh, options);
5987
6020
  return fresh;
@@ -6063,7 +6096,7 @@ async function fetchAbi(chain, address, options) {
6063
6096
  let isProxy = false;
6064
6097
  let decoderVerifiedContract = false;
6065
6098
  let factoryName;
6066
- const _originalKey = key;
6099
+ const originalKey = key;
6067
6100
  const addressUrl = new URL(`/api/v2/addresses/${key}`, explorer);
6068
6101
  const addressRes = await fetch(addressUrl, { signal: signal3 });
6069
6102
  if (addressRes.ok) {
@@ -6231,7 +6264,7 @@ var getFunctionSignature = /* @__PURE__ */ __name(async (chain, input, to, prefe
6231
6264
  __decoder: methods.__decoder || FUNCTION_DICTIONARY_URL
6232
6265
  };
6233
6266
  }
6234
- } catch (_error) {
6267
+ } catch (error) {
6235
6268
  }
6236
6269
  }
6237
6270
  }
@@ -6270,7 +6303,7 @@ var enhanceRetrieveAbiPlugin = standardPlugin(
6270
6303
  }
6271
6304
  );
6272
6305
  async function enhanceRetrieveAbi(result, _pluginOptions, options) {
6273
- const { input, to, from, value } = result;
6306
+ const { functionName, sig, args, input, blockNumber, to, from, value } = result;
6274
6307
  try {
6275
6308
  const decoded = await getFunctionSignature(
6276
6309
  options.chain,
@@ -6297,9 +6330,7 @@ __name(enhanceRetrieveAbi, "enhanceRetrieveAbi");
6297
6330
  var enhanceRetrieveAbi_default = enhanceRetrieveAbiPlugin;
6298
6331
 
6299
6332
  // src/decoder/plugins/index.ts
6300
- [enhanceLSP0ERC725Account_default, enhanceLSP6KeyManager_default, enhanceLSP7DigitalAsset_default, enhanceLSP8IdentifiableDigitalAsset_default, enhanceLSP9Vault_default, enhanceLSP26FollowerSystem_default, enhanceBurntPix_default].forEach((p) => {
6301
- p;
6302
- });
6333
+ [enhanceLSP0ERC725Account_default, enhanceLSP6KeyManager_default, enhanceLSP7DigitalAsset_default, enhanceLSP8IdentifiableDigitalAsset_default, enhanceLSP9Vault_default, enhanceLSP26FollowerSystem_default, enhanceBurntPix_default].forEach((p) => p);
6303
6334
  var defaultPlugins = Object.freeze([
6304
6335
  enhanceGraffiti_default,
6305
6336
  enhanceLSP6KeyManager_default,
@@ -6410,7 +6441,7 @@ var DecoderIntegration = class {
6410
6441
  */
6411
6442
  async addAndDecodeTransactions(transactions) {
6412
6443
  const signals = this.dataModel.addTransactions(transactions);
6413
- const decodingPromises = transactions.map(async (tx, _index) => {
6444
+ const decodingPromises = transactions.map(async (tx, index) => {
6414
6445
  const transactionOptions = {
6415
6446
  ...this.decoderOptions,
6416
6447
  wrappers: []
@@ -6649,7 +6680,8 @@ function buildLSP23DeploymentQuery(config) {
6649
6680
  controllerAddresses,
6650
6681
  profileAddresses,
6651
6682
  fromBlock = 0,
6652
- toBlock
6683
+ toBlock,
6684
+ chainId
6653
6685
  } = config;
6654
6686
  if (profileAddresses && profileAddresses.length > 0) {
6655
6687
  return {
@@ -6732,7 +6764,7 @@ function parseLSP23DeploymentsFromHypersync(response, chainId, controllerAddress
6732
6764
  }
6733
6765
  }
6734
6766
  const controllerSet = controllerAddresses ? new Set(controllerAddresses.map((addr) => addr.toLowerCase())) : null;
6735
- for (const [txHash, _profileAddress] of create2Traces) {
6767
+ for (const [txHash, profileAddress] of create2Traces) {
6736
6768
  const tx = txMap.get(txHash);
6737
6769
  if (!tx) continue;
6738
6770
  if (controllerSet && !controllerSet.has(tx.from.toLowerCase())) {
@@ -6770,12 +6802,12 @@ var JSONbigString = {
6770
6802
  /**
6771
6803
  * Stringify an object, converting BigInt values to strings with 'n' suffix
6772
6804
  */
6773
- stringify: /* @__PURE__ */ __name((obj, _replacer, space) => {
6805
+ stringify: /* @__PURE__ */ __name((obj, replacer, space) => {
6774
6806
  return JSON.stringify(
6775
6807
  obj,
6776
- (_key, value) => {
6808
+ (key, value) => {
6777
6809
  if (typeof value === "bigint") {
6778
- return `${value.toString()}n`;
6810
+ return value.toString() + "n";
6779
6811
  }
6780
6812
  return value;
6781
6813
  },
@@ -6786,7 +6818,7 @@ var JSONbigString = {
6786
6818
  * Parse a JSON string, converting strings ending with 'n' back to BigInt
6787
6819
  */
6788
6820
  parse: /* @__PURE__ */ __name((text) => {
6789
- return JSON.parse(text, (_key, value) => {
6821
+ return JSON.parse(text, (key, value) => {
6790
6822
  if (typeof value === "string" && /^\d+n$/.test(value)) {
6791
6823
  return BigInt(value.slice(0, -1));
6792
6824
  }