Skip to content

Conversation

@AryanGodara
Copy link
Member

Fixes subgraph pagination failure when fetching UniswapV3 pools from Goldsky-hosted subgraph on Plasma.

The driver was failing to initialize UniswapV3 liquidity with error:

Failed to decode `Bytes` value: `Odd number of digits`

This error originated from the subgraph (not our Rust code) when processing paginated queries.

Root Cause

PoolData::get_id() in crates/shared/src/sources/uniswap_v3/graph_api.rs:308:4-311:5 used H160::to_string() which produces a truncated display format:

0xe67f…018c

When this truncated ID was passed as lastId for pagination (id_gt: $lastId), the subgraph failed to parse it as a valid Bytes type due to the ellipsis creating an odd number of hex digits.

Fix

Changed self.id.to_string() to format!("{:#x}", self.id) which produces the full 42-character hex string:

0xe67f889fddb48845add87a8d59bc805d853d018c

Testing

  • Driver successfully initializes 930 pools from Goldsky subgraph
  • Quote requests return valid estimates via UniswapV3 liquidity

- Add BaselineSource::UniswapV3 to Plasma chain's default baseline sources
- Fix PoolData ID formatting to use hex representation with 0x prefix

Signed-off-by: Aryan Godara <aryangodara03@gmail.com>
@AryanGodara AryanGodara requested a review from a team as a code owner December 2, 2025 19:20
@AryanGodara AryanGodara requested a review from fafk December 2, 2025 19:21
@fafk fafk enabled auto-merge December 2, 2025 19:26
@fafk fafk added this pull request to the merge queue Dec 2, 2025
Merged via the queue into main with commit 777d75c Dec 2, 2025
18 checks passed
@fafk fafk deleted the aryan/uniswap-v3-for-plasma branch December 2, 2025 19:47
@github-actions github-actions bot locked and limited conversation to collaborators Dec 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants