Skip to content

Clarify and test decoded calldata Map preservation in simplified receipts #219

Description

@kawasemaster3130-dev

At v2-dev commit 8c899cc53bdb17372782ac538a8d77e166be912a, the default receipt projection appears to omit decoded method/argument Maps, rather than only removing raw presentation metadata.

Source path:

  • src/abi/calldata/decoder.ts: TYPE_MAP returns a JavaScript Map.
  • src/transactions/decoders.ts: decodeInputData assigns the decoded value to txDataDecoded.callData or constructorArgs.
  • The simplifier uses Object.entries; a Map becomes an empty object and is omitted by the parent filter.
  • waitForTransactionReceipt defaults fullTransaction to false and applies that simplifier.

A minimal shape-level observation using simplifyTransactionReceipt:

const tx = {
  txDataDecoded: {
    callData: new Map<string, unknown>([['', 'inspect_delivery'], ['args', ['synthetic-reference']]]),
    leaderOnly: false,
    type: 'call',
  },
};
// Input callData contains the method and arguments.
// The simplified result is:
// { txDataDecoded: { leaderOnly: false, type: 'call' } }

This also occurs for a Map-shaped constructorArgs. Should these decoded fields remain available in the default receipt, or should their omission be explicitly documented? A focused regression fixture at this boundary would help callers inspecting which method/conditions a receipt corresponds to. This is distinct from the existing readContract JSON-safe conversion in #107 and the calldata-string formatting work in #210.

Validation: source inspection plus a dependency-free extraction of the pure simplifier; 11 synthetic observation/control tests passed and were independently rerun. The actual ABI decoder, SDK client, RPC and full upstream suite were not executed. This is pinned-development-source evidence, not a published-release or production-incident claim.

The raw transaction data is not destroyed, and fullTransaction: true bypasses this simplifier. Intentional metadata removal introduced in #101 is not itself a bug; this question concerns the decoded Map fields specifically.

Activity

  1. ygd58 commented on Sep 18, 2026

    @ygd58

    Opened #222 — root cause confirmed exactly as you traced it: Object.entries() on a Map always returns [], so callData/constructorArgs silently became {} and got dropped by the empty-object filter. Fixed with an explicit Map branch mirroring the existing Array.isArray one. 4 new regression tests using your exact repro shape, full suite (88 tests) passing.

  2. ahd7474 commented on Sep 30, 2026

    @ahd7474

    wow root case confirm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions