feat: Cross-chain route filters (bridge/DEX-source filtering)#6
Merged
Conversation
…swap sources) Add --included-bridges, --excluded-bridges, and --excluded-swap-sources flags to `0x cross-chain`, wiring the includedBridges/excludedBridges/ excludedSwapSources params of the cross-chain getQuotes endpoint. - CSV or repeated flags (clap value_delimiter); omitted -> param not sent. - --included-bridges and --excluded-bridges are mutually exclusive (clap conflicts_with -> input error, exit 2). - No client-side name validation; unknown names pass through to the API. Refactors get_cross_chain_quotes onto a CrossChainQuoteParams struct (the positional signature had hit too_many_arguments) with a testable query_pairs builder. Adds arg-parsing and query-construction unit tests and documents the flags in the cross-chain skill reference.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds three routing-filter flags to
0x cross-chain, wiring the previously-unreachablegetQuotesparams:--included-bridges <CSV>→includedBridges--excluded-bridges <CSV>→excludedBridges--excluded-swap-sources <CSV>→excludedSwapSourcesCSV or repeated flags; omitted → not sent.
--included-bridgesand--excluded-bridgesare mutually exclusive (clap conflict → exit 2). Names aren't validated client-side; unknown names pass through to the API.Refactors
get_cross_chain_quotesonto aCrossChainQuoteParamsstruct (dropstoo_many_arguments). Adds arg-parsing + query-construction unit tests. Verified live against api.0x.org: excludingacross_v4and pinningrelayboth change the returned bridge set.