Skip to content

fix: reject unsupported UniswapX chains#11

Open
Genmin wants to merge 1 commit intokcolbchain:mainfrom
Genmin:fix/uniswapx-supported-chain-errors-5
Open

fix: reject unsupported UniswapX chains#11
Genmin wants to merge 1 commit intokcolbchain:mainfrom
Genmin:fix/uniswapx-supported-chain-errors-5

Conversation

@Genmin
Copy link
Copy Markdown

@Genmin Genmin commented May 1, 2026

Summary

  • replace the silent UniswapX mainnet fallback with explicit supported-chain handling
  • return ResolverError::Intent for Optimism, Polygon, and Unichain instead of querying Ethereum orders
  • add Unichain to the Chain enum and CLI parser so chain id 130 round-trips cleanly
  • add regression tests for supported UniswapX URLs and unsupported-chain errors

Fixes #5

Notes

The current Uniswap API docs list UniswapX support for V2 on Mainnet (1), Arbitrum (42161), and Base (8453), plus V3 on Arbitrum. Polygon, Optimism, and Unichain are supported swapping chains but are not currently listed as UniswapX chains, so this PR rejects them rather than adding endpoints that would still be invalid.

Docs checked: https://developers.uniswap.org/docs/trading/swapping-api/supported-chains

Validation

  • cargo test
  • cargo fmt --check
  • cargo clippy -- -D warnings
  • git diff --check

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.

[good first issue] UniswapX decoder: proper Polygon/Optimism/Unichain handling, no silent mainnet fallback

1 participant