Skip to content

Conversation

@DenisCarriere
Copy link
Contributor

This pull request updates how contract metadata is queried in both swap and transfer SQL pipelines to ensure the most recent metadata is reliably retrieved. The main change is switching from using ORDER BY ... LIMIT 1 BY ... to using argMax aggregation functions, which improves accuracy and performance when fetching contract details.

Metadata querying improvements:

  • Updated the contract metadata selection in src/sql/swaps/evm.sql to use argMax for name, symbol, and decimals, grouped by network and contract, ensuring the latest metadata is selected.
  • Applied the same argMax-based metadata selection logic to src/sql/transfers/evm.sql for consistency and correctness.

Documentation:

  • Added a changeset file .changeset/young-times-tease.md documenting the update as a patch for the token-api package, referencing the metadata contract improvements.

@changeset-bot
Copy link

changeset-bot bot commented Jan 30, 2026

🦋 Changeset detected

Latest commit: b04ec25

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
token-api Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@YaroShkvorets YaroShkvorets temporarily deployed to fix/metadata - token-api PR #330 January 30, 2026 19:29 — with Render Destroyed
@DenisCarriere DenisCarriere merged commit 02ae871 into main Jan 30, 2026
1 check passed
@DenisCarriere DenisCarriere deleted the fix/metadata branch January 30, 2026 19:29
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.

3 participants