Skip to content

Add tron metadata - #10

Open
define-null wants to merge 1 commit into
masterfrom
defnull/add-tron-metadata
Open

Add tron metadata#10
define-null wants to merge 1 commit into
masterfrom
defnull/add-tron-metadata

Conversation

@define-null

Copy link
Copy Markdown

No description provided.

Ports the Tron data model from subsquid/data (crates/data/src/tron chunk
builders, crates/query/src/query/tron.rs query surface) into a catalog entry.
No engine changes: 4 tables, 3 query aliases, relations, a virtual field and
two column_alias filters are all expressible in metadata today.

- blocks, transactions, logs, internal_transactions (queryName
  internalTransactions), with the builders' sort keys, stats and dictionary
  flags, and the two weight columns the reference declares.
- transferTransactions / transferAssetTransactions /
  triggerSmartContractTransactions aliases, each pinning `type` and remapping
  owner/to/asset/contract/sighash onto the `_`-prefixed extraction columns,
  which are `system` so they filter but never appear in output.
- logs.topics as a roll of topic0..3; caller/transferTo as column_alias
  filters, matching the names the reference uses.
- Column order reproduces the reference's projection order, so output field
  order matches; Tron hex is emitted bare, without an 0x prefix.

10 fixture tests against the reference's chunk. Verified out of band against
the legacy engine: byte-identical output including JSON key order on all 10,
and 499/499 on a generated query matrix covering every table, filter shape,
relation combination and block range.

Closes GAPS #9. Opens GAPS #24: the reference case-folds Tron hex filters and
this schema cannot, because the engine has no encoding meaning "hex bytes,
rendered bare" — `hex` would prefix the output with 0x. Filters therefore
compare byte-exactly; an upper-cased address matches nothing. Fix is a
follow-up, prototyped on defnull/tron-encoding-and-keyorder.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@define-null
define-null force-pushed the defnull/add-tron-metadata branch from 2885816 to 8a3ffc3 Compare August 24, 2026 15:10
@define-null
define-null marked this pull request as ready for review August 24, 2026 15:11
@define-null
define-null requested a review from mo4islona August 24, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant