Skip to content

Reject unsupported UniswapX chains#13

Open
MyTH-zyxeon wants to merge 1 commit into
kcolbchain:mainfrom
bonginkan:codex/uniswapx-chain-support-5
Open

Reject unsupported UniswapX chains#13
MyTH-zyxeon wants to merge 1 commit into
kcolbchain:mainfrom
bonginkan:codex/uniswapx-chain-support-5

Conversation

@MyTH-zyxeon

Copy link
Copy Markdown
Contributor

Summary

  • remove the silent mainnet fallback from UniswapX endpoint selection
  • return ResolverError::Intent from UniswapXDecoder::new for unsupported chains
  • add Unichain chain-id support plus focused regression tests

Note

The current Uniswap docs list UniswapX V2 support on Mainnet, Arbitrum, and Base, and V3 support on Arbitrum only, so Polygon, Optimism, and Unichain are rejected instead of mapped to mainnet.

Tests

  • PATH=/Users/thepioneer/.rustup/toolchains/1.91.1-aarch64-apple-darwin/bin:$PATH cargo test --quiet
  • PATH=/Users/thepioneer/.rustup/toolchains/1.91.1-aarch64-apple-darwin/bin:$PATH cargo clippy -- -D warnings

Addresses #5

@abhicris

Copy link
Copy Markdown
Contributor

🤖 Audit verdict: safe

Well-scoped change that improves error handling by explicitly rejecting unsupported UniswapX chains instead of silently falling back to mainnet; no malicious payloads, credentials, supply-chain risks, or bugs identified.

Audited by the kcolbchain PR pipeline. See pipeline docs.

@Pattermesh

Copy link
Copy Markdown

Your PRs look good and we'd like to merge them, but they have merge conflicts with main. Could you please rebase against main and force-push? Thank you!

@MyTH-zyxeon MyTH-zyxeon force-pushed the codex/uniswapx-chain-support-5 branch from 33d5a98 to 1b88bdf Compare June 6, 2026 12:03
@MyTH-zyxeon

Copy link
Copy Markdown
Contributor Author

Rebased against current main and force-pushed the PR branch.

Current GitHub merge state now shows mergeable=MERGEABLE / mergeStateStatus=UNSTABLE instead of the prior conflict state. I resolved the conflict by preserving the current explicit unsupported-chain helper and retaining the no-mainnet-fallback coverage for unsupported UniswapX chains.

Note: I could not run cargo fmt / cargo test in this local Codex environment because cargo is not available on PATH here.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants