Skip to content

Commit

Permalink
chore: bump sor to 3.51.0 - feat: mixed routing with v4 hookless pools (
Browse files Browse the repository at this point in the history
#833)

* chore: bump sor to 3.51.0 - feat: mixed routing with v4 hookless pools

* chore: bump sor to 3.51.0 - feat: mixed routing with v4 hookless pools
  • Loading branch information
jsy1218 committed Sep 16, 2024
1 parent cbd8e71 commit 817492c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 24 deletions.
13 changes: 9 additions & 4 deletions lib/handlers/injector-sor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
IV4SubgraphProvider,
LegacyGasPriceProvider,
MIXED_ROUTE_QUOTER_V1_ADDRESSES,
MIXED_ROUTE_QUOTER_V2_ADDRESSES,
NEW_QUOTER_V2_ADDRESSES,
NodeJSCache,
OnChainGasPriceProvider,
Expand Down Expand Up @@ -361,9 +362,11 @@ export abstract class InjectorSOR<Router, QueryParams> extends Injector<
SUCCESS_RATE_FAILURE_OVERRIDES[chainId],
BLOCK_NUMBER_CONFIGS[chainId],
// We will only enable shadow sample mixed quoter on Base
(useMixedRouteQuoter: boolean, protocol: Protocol) =>
(useMixedRouteQuoter: boolean, mixedRouteContainsV4Pool: boolean, protocol: Protocol) =>
useMixedRouteQuoter
? MIXED_ROUTE_QUOTER_V1_ADDRESSES[chainId]
? mixedRouteContainsV4Pool
? MIXED_ROUTE_QUOTER_V2_ADDRESSES[chainId]
: MIXED_ROUTE_QUOTER_V1_ADDRESSES[chainId]
: protocol === Protocol.V3
? QUOTER_V2_ADDRESSES[chainId]
: PROTOCOL_V4_QUOTER_ADDRESSES[chainId]
Expand All @@ -382,9 +385,11 @@ export abstract class InjectorSOR<Router, QueryParams> extends Injector<
GAS_ERROR_FAILURE_OVERRIDES[chainId],
SUCCESS_RATE_FAILURE_OVERRIDES[chainId],
BLOCK_NUMBER_CONFIGS[chainId],
(useMixedRouteQuoter: boolean, protocol: Protocol) =>
(useMixedRouteQuoter: boolean, mixedRouteContainsV4Pool: boolean, protocol: Protocol) =>
useMixedRouteQuoter
? MIXED_ROUTE_QUOTER_V1_ADDRESSES[chainId]
? mixedRouteContainsV4Pool
? MIXED_ROUTE_QUOTER_V2_ADDRESSES[chainId]
: MIXED_ROUTE_QUOTER_V1_ADDRESSES[chainId]
: protocol === Protocol.V3
? NEW_QUOTER_V2_ADDRESSES[chainId]
: PROTOCOL_V4_QUOTER_ADDRESSES[chainId],
Expand Down
36 changes: 18 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@
"@uniswap/default-token-list": "^11.13.0",
"@uniswap/permit2-sdk": "^1.3.0",
"@uniswap/router-sdk": "^1.11.2",
"@uniswap/sdk-core": "^5.3.0",
"@uniswap/sdk-core": "^5.4.0",
"@types/semver": "^7.5.8",
"@uniswap/smart-order-router": "3.50.0",
"@uniswap/smart-order-router": "3.51.0",
"@uniswap/token-lists": "^1.0.0-beta.33",
"@uniswap/universal-router-sdk": "^3.0.2",
"@uniswap/v2-sdk": "^4.3.2",
Expand Down

0 comments on commit 817492c

Please sign in to comment.