fix(sdk-core): split Quoter and QuoterV2, correct deployment addresses - #668
Open
TanmayDagur wants to merge 2 commits into
Open
Conversation
|
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.
Resolves #659
Summary
This pull request addresses the architectural conflation of
Quoter(V1) andQuoterV2within thesdk-coreaddress inventory, and fixes several missing or incorrect TickLens and SwapRouter02 records. Treating V2 addresses as V1 (or vice versa) can cause ABI decoding failures due to their different return types.Changes
ChainAddressesinterface to makequoterAddressoptional, and added an optionalquoterV2Address.quoterAddressfromDEFAULT_ADDRESSESsince many chains (e.g. Sepolia, Zora) do not have a V1 deployment.export const QUOTER_V2_ADDRESSESto surface true V2 addresses.developers.uniswap.org/deployments.jsonfeed and programmatically mapped the correctquoterAddress,quoterV2Address,tickLensAddress, andswapRouter02Addressdeployments for all active networks.SWAP_ROUTER_02_ADDRESSESandQUOTER_ADDRESSESto correctly returnundefinedfor chains where they are not deployed, rather than defaulting to the Ethereum mainnet router/quoter.Verification
bun testpasses successfully for all 387 test cases.bun run typecheckpasses with no strict null check errors.bun run buildgenerates the required distribution and.d.tsfiles without issues.bun run lintshows no warnings or errors.