diff --git a/README.md b/README.md index 3c61284b1..831650174 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ The best way to develop and test the API is to deploy your own instance to AWS. # MAINNET = 1 # ROPSTEN = 3 # RINKEBY = 4 - # GOERLI = 5 + # GÖRLI = 5 # KOVAN = 42 # OPTIMISM = 10 # OPTIMISTIC_KOVAN = 69 @@ -29,7 +29,7 @@ The best way to develop and test the API is to deploy your own instance to AWS. # ARBITRUM_RINKEBY = 421611 # POLYGON = 137 # POLYGON_MUMBAI = 80001 - # BNB = 56 + # BSC = 56 TENDERLY_USER = '' # For enabling Tenderly simulations TENDERLY_PROJECT = '' # For enabling Tenderly simulations TENDERLY_ACCESS_KEY = '' # For enabling Tenderly simulations diff --git a/bin/app.ts b/bin/app.ts index aab2af60f..059e43c55 100644 --- a/bin/app.ts +++ b/bin/app.ts @@ -1,4 +1,4 @@ -import { ChainId } from '@uniswap/sdk-core' +import { ChainId } from '@uniswap/smart-order-router' import * as cdk from 'aws-cdk-lib' import { CfnOutput, SecretValue, Stack, StackProps, Stage, StageProps } from 'aws-cdk-lib' import * as chatbot from 'aws-cdk-lib/aws-chatbot' @@ -269,7 +269,6 @@ const jsonRpcProviders = { WEB3_RPC_42220: process.env.JSON_RPC_PROVIDER_42220!, WEB3_RPC_44787: process.env.JSON_RPC_PROVIDER_44787!, WEB3_RPC_56: process.env.JSON_RPC_PROVIDER_56!, - WEB3_RPC_43114: process.env.JSON_RPC_PROVIDER_43114!, } // Local dev stack diff --git a/bin/stacks/routing-api-stack.ts b/bin/stacks/routing-api-stack.ts index 61457ff50..c8e7de8c2 100644 --- a/bin/stacks/routing-api-stack.ts +++ b/bin/stacks/routing-api-stack.ts @@ -1,6 +1,5 @@ -import { SUPPORTED_CHAINS } from '@uniswap/smart-order-router' +import { ChainId, SUPPORTED_CHAINS } from '@uniswap/smart-order-router' import * as cdk from 'aws-cdk-lib' -import { ChainId } from '@uniswap/sdk-core' import { CfnOutput, Duration } from 'aws-cdk-lib' import * as aws_apigateway from 'aws-cdk-lib/aws-apigateway' import { MethodLoggingLevel } from 'aws-cdk-lib/aws-apigateway' @@ -17,7 +16,7 @@ import { RoutingDashboardStack } from './routing-dashboard-stack' import { RoutingLambdaStack } from './routing-lambda-stack' import { RoutingDatabaseStack } from './routing-database-stack' -export const CHAINS_NOT_MONITORED: ChainId[] = [ChainId.GOERLI, ChainId.POLYGON_MUMBAI] +export const CHAINS_NOT_MONITORED: ChainId[] = [ChainId.GÖRLI, ChainId.POLYGON_MUMBAI] export class RoutingAPIStack extends cdk.Stack { public readonly url: CfnOutput diff --git a/bin/stacks/routing-dashboard-stack.ts b/bin/stacks/routing-dashboard-stack.ts index 3f9a2879b..97d044f22 100644 --- a/bin/stacks/routing-dashboard-stack.ts +++ b/bin/stacks/routing-dashboard-stack.ts @@ -1,4 +1,4 @@ -import { ChainId } from '@uniswap/sdk-core' +import { ChainId } from '@uniswap/smart-order-router' import * as cdk from 'aws-cdk-lib' import * as aws_cloudwatch from 'aws-cdk-lib/aws-cloudwatch' import { Construct } from 'constructs' @@ -36,7 +36,7 @@ export class RoutingDashboardStack extends cdk.NestedStack { const TESTNETS = [ ChainId.ARBITRUM_GOERLI, ChainId.POLYGON_MUMBAI, - ChainId.GOERLI, + ChainId.GÖRLI, ChainId.SEPOLIA, ChainId.CELO_ALFAJORES, ] diff --git a/lib/cron/cache-config.ts b/lib/cron/cache-config.ts index 2df91bb0d..b672d9f8d 100644 --- a/lib/cron/cache-config.ts +++ b/lib/cron/cache-config.ts @@ -1,6 +1,5 @@ import { Protocol } from '@uniswap/router-sdk' -import { V2SubgraphProvider, V3SubgraphProvider } from '@uniswap/smart-order-router' -import { ChainId } from '@uniswap/sdk-core' +import { ChainId, V2SubgraphProvider, V3SubgraphProvider } from '@uniswap/smart-order-router' export const chainProtocols = [ // V3. @@ -30,15 +29,9 @@ export const chainProtocols = [ }, { protocol: Protocol.V3, - chainId: ChainId.BNB, + chainId: ChainId.BSC, timeout: 90000, - provider: new V3SubgraphProvider(ChainId.BNB, 3, 90000), - }, - { - protocol: Protocol.V3, - chainId: ChainId.AVALANCHE, - timeout: 90000, - provider: new V3SubgraphProvider(ChainId.AVALANCHE, 3, 90000), + provider: new V3SubgraphProvider(ChainId.BSC, 3, 90000), }, // Currently there is no working V3 subgraph for Optimism so we use a static provider. // V2. diff --git a/lib/cron/cache-pools.ts b/lib/cron/cache-pools.ts index 7b5186053..c1b888216 100644 --- a/lib/cron/cache-pools.ts +++ b/lib/cron/cache-pools.ts @@ -1,8 +1,7 @@ import { Protocol } from '@uniswap/router-sdk' -import { setGlobalLogger } from '@uniswap/smart-order-router' +import { ChainId, setGlobalLogger } from '@uniswap/smart-order-router' import { EventBridgeEvent, ScheduledHandler } from 'aws-lambda' import { S3 } from 'aws-sdk' -import { ChainId } from '@uniswap/sdk-core' import { default as bunyan, default as Logger } from 'bunyan' import { S3_POOL_CACHE_KEY } from '../util/pool-cache-key' import { chainProtocols } from './cache-config' diff --git a/lib/dashboards/quote-amounts-widgets-factory.ts b/lib/dashboards/quote-amounts-widgets-factory.ts index 4f40d8c81..78cd79978 100644 --- a/lib/dashboards/quote-amounts-widgets-factory.ts +++ b/lib/dashboards/quote-amounts-widgets-factory.ts @@ -1,5 +1,5 @@ -import { ChainId, TradeType } from '@uniswap/sdk-core' -import { ID_TO_NETWORK_NAME } from '@uniswap/smart-order-router' +import { TradeType } from '@uniswap/sdk-core' +import { ChainId, ID_TO_NETWORK_NAME } from '@uniswap/smart-order-router' import _ from 'lodash' import { PAIRS_TO_TRACK } from '../handlers/quote/util/pairs-to-track' import { Widget } from './core/model/widget' diff --git a/lib/handlers/injector-sor.ts b/lib/handlers/injector-sor.ts index 80c96ea1c..7cd88d603 100644 --- a/lib/handlers/injector-sor.ts +++ b/lib/handlers/injector-sor.ts @@ -1,9 +1,10 @@ -import { ChainId, Token } from '@uniswap/sdk-core' +import { Token } from '@uniswap/sdk-core' import { CachingGasStationProvider, CachingTokenListProvider, CachingTokenProviderWithFallback, CachingV3PoolProvider, + ChainId, EIP1559GasPriceProvider, FallbackTenderlySimulator, TenderlySimulator, @@ -51,12 +52,11 @@ export const SUPPORTED_CHAINS: ChainId[] = [ ChainId.ARBITRUM_GOERLI, ChainId.POLYGON, ChainId.POLYGON_MUMBAI, - ChainId.GOERLI, + ChainId.GÖRLI, ChainId.SEPOLIA, ChainId.CELO, ChainId.CELO_ALFAJORES, - ChainId.BNB, - ChainId.AVALANCHE, + ChainId.BSC, ] const DEFAULT_TOKEN_LIST = 'https://gateway.ipfs.io/ipns/tokens.uniswap.org' diff --git a/lib/handlers/marshalling/cached-routes-marshaller.ts b/lib/handlers/marshalling/cached-routes-marshaller.ts index 3b874e92c..8a2e29707 100644 --- a/lib/handlers/marshalling/cached-routes-marshaller.ts +++ b/lib/handlers/marshalling/cached-routes-marshaller.ts @@ -1,5 +1,6 @@ import { CachedRoutes } from '@uniswap/smart-order-router' -import { ChainId, TradeType } from '@uniswap/sdk-core' +import { ChainId } from '@uniswap/smart-order-router/build/main/util' +import { TradeType } from '@uniswap/sdk-core' import { Protocol } from '@uniswap/router-sdk' import { MarshalledToken, TokenMarshaller } from './token-marshaller' import { CachedRouteMarshaller, MarshalledCachedRoute } from './cached-route-marshaller' diff --git a/lib/handlers/pools/pool-caching/v3/dynamo-caching-pool-provider.ts b/lib/handlers/pools/pool-caching/v3/dynamo-caching-pool-provider.ts index e5a7f5f79..05c78f5a7 100644 --- a/lib/handlers/pools/pool-caching/v3/dynamo-caching-pool-provider.ts +++ b/lib/handlers/pools/pool-caching/v3/dynamo-caching-pool-provider.ts @@ -1,5 +1,5 @@ -import { IV3PoolProvider, V3PoolAccessor } from '@uniswap/smart-order-router' -import { ChainId, Token } from '@uniswap/sdk-core' +import { ChainId, IV3PoolProvider, V3PoolAccessor } from '@uniswap/smart-order-router' +import { Token } from '@uniswap/sdk-core' import { ProviderConfig } from '@uniswap/smart-order-router/build/main/providers/provider' import { FeeAmount, Pool } from '@uniswap/v3-sdk' import { IDynamoCache } from '../cache-dynamo' diff --git a/lib/handlers/quote/quote.ts b/lib/handlers/quote/quote.ts index d5022c00a..41e2ed818 100644 --- a/lib/handlers/quote/quote.ts +++ b/lib/handlers/quote/quote.ts @@ -2,7 +2,7 @@ import Joi from '@hapi/joi' import { Protocol } from '@uniswap/router-sdk' import { UNIVERSAL_ROUTER_ADDRESS } from '@uniswap/universal-router-sdk' import { PermitSingle } from '@uniswap/permit2-sdk' -import { ChainId, Currency, CurrencyAmount, TradeType } from '@uniswap/sdk-core' +import { Currency, CurrencyAmount, TradeType } from '@uniswap/sdk-core' import { AlphaRouterConfig, IRouter, @@ -13,6 +13,7 @@ import { SwapType, SimulationStatus, IMetric, + ChainId, ID_TO_NETWORK_NAME, } from '@uniswap/smart-order-router' import { Pool } from '@uniswap/v3-sdk' diff --git a/lib/handlers/quote/util/pairs-to-track.ts b/lib/handlers/quote/util/pairs-to-track.ts index fa3fd6618..c458d1310 100644 --- a/lib/handlers/quote/util/pairs-to-track.ts +++ b/lib/handlers/quote/util/pairs-to-track.ts @@ -1,4 +1,5 @@ -import { ChainId, TradeType } from '@uniswap/sdk-core' +import { TradeType } from '@uniswap/sdk-core' +import { ChainId } from '@uniswap/smart-order-router' export const PAIRS_TO_TRACK: Map> = new Map([ [ diff --git a/lib/handlers/router-entities/aws-subgraph-provider.ts b/lib/handlers/router-entities/aws-subgraph-provider.ts index c633ff609..c70fbf853 100644 --- a/lib/handlers/router-entities/aws-subgraph-provider.ts +++ b/lib/handlers/router-entities/aws-subgraph-provider.ts @@ -1,5 +1,6 @@ import { Protocol } from '@uniswap/router-sdk' import { + ChainId, IV2SubgraphProvider, IV3SubgraphProvider, log, @@ -7,7 +8,6 @@ import { V3SubgraphPool, } from '@uniswap/smart-order-router' import { S3 } from 'aws-sdk' -import { ChainId } from '@uniswap/sdk-core' import NodeCache from 'node-cache' import { S3_POOL_CACHE_KEY } from '../../util/pool-cache-key' diff --git a/lib/handlers/router-entities/aws-token-list-provider.ts b/lib/handlers/router-entities/aws-token-list-provider.ts index 0881943e4..5a73a7f74 100644 --- a/lib/handlers/router-entities/aws-token-list-provider.ts +++ b/lib/handlers/router-entities/aws-token-list-provider.ts @@ -1,11 +1,11 @@ import { CachingTokenListProvider, + ChainId, ITokenListProvider, ITokenProvider, log, NodeJSCache, } from '@uniswap/smart-order-router' -import { ChainId } from '@uniswap/sdk-core' import { TokenList } from '@uniswap/token-lists' import S3 from 'aws-sdk/clients/s3' import NodeCache from 'node-cache' diff --git a/lib/handlers/router-entities/route-caching/cached-routes-configuration.ts b/lib/handlers/router-entities/route-caching/cached-routes-configuration.ts index 93329a671..6b43bb325 100644 --- a/lib/handlers/router-entities/route-caching/cached-routes-configuration.ts +++ b/lib/handlers/router-entities/route-caching/cached-routes-configuration.ts @@ -1,5 +1,5 @@ -import { ChainId, TradeType } from '@uniswap/sdk-core' -import { CacheMode } from '@uniswap/smart-order-router' +import { TradeType } from '@uniswap/sdk-core' +import { CacheMode, ChainId } from '@uniswap/smart-order-router' import { CachedRoutesStrategy } from './model/cached-routes-strategy' import { PairTradeTypeChainId } from './model/pair-trade-type-chain-id' import { CachedRoutesBucket } from './model/cached-routes-bucket' diff --git a/lib/handlers/router-entities/route-caching/dynamo-route-caching-provider.ts b/lib/handlers/router-entities/route-caching/dynamo-route-caching-provider.ts index 3eb63ed52..ff95d0532 100644 --- a/lib/handlers/router-entities/route-caching/dynamo-route-caching-provider.ts +++ b/lib/handlers/router-entities/route-caching/dynamo-route-caching-provider.ts @@ -2,12 +2,13 @@ import { CachedRoute, CachedRoutes, CacheMode, + ChainId, IRouteCachingProvider, log, routeToString, } from '@uniswap/smart-order-router' import { DynamoDB } from 'aws-sdk' -import { ChainId, Currency, CurrencyAmount, Token, TradeType } from '@uniswap/sdk-core' +import { Currency, CurrencyAmount, Token, TradeType } from '@uniswap/sdk-core' import { Protocol } from '@uniswap/router-sdk' import { CACHED_ROUTES_CONFIGURATION } from './cached-routes-configuration' import { PairTradeTypeChainId } from './model/pair-trade-type-chain-id' diff --git a/lib/handlers/router-entities/route-caching/model/cached-routes-strategy.ts b/lib/handlers/router-entities/route-caching/model/cached-routes-strategy.ts index 07dedf565..f006b4e12 100644 --- a/lib/handlers/router-entities/route-caching/model/cached-routes-strategy.ts +++ b/lib/handlers/router-entities/route-caching/model/cached-routes-strategy.ts @@ -1,6 +1,6 @@ -import { ChainId, Currency, CurrencyAmount, TradeType } from '@uniswap/sdk-core' +import { Currency, CurrencyAmount, TradeType } from '@uniswap/sdk-core' import { CachedRoutesBucket } from './cached-routes-bucket' -import { CacheMode } from '@uniswap/smart-order-router' +import { CacheMode, ChainId } from '@uniswap/smart-order-router' interface CachedRoutesStrategyArgs { pair: string diff --git a/lib/handlers/router-entities/route-caching/model/pair-trade-type-chain-id.ts b/lib/handlers/router-entities/route-caching/model/pair-trade-type-chain-id.ts index 6ba61a19a..cc57665cf 100644 --- a/lib/handlers/router-entities/route-caching/model/pair-trade-type-chain-id.ts +++ b/lib/handlers/router-entities/route-caching/model/pair-trade-type-chain-id.ts @@ -1,5 +1,5 @@ -import { ChainId, TradeType } from '@uniswap/sdk-core' -import { CachedRoutes } from '@uniswap/smart-order-router' +import { TradeType } from '@uniswap/sdk-core' +import { CachedRoutes, ChainId } from '@uniswap/smart-order-router' interface PairTradeTypeChainIdArgs { tokenIn: string diff --git a/lib/handlers/router-entities/v3-aws-subgraph-provider.ts b/lib/handlers/router-entities/v3-aws-subgraph-provider.ts index 1eb0c179e..e6f4ac539 100644 --- a/lib/handlers/router-entities/v3-aws-subgraph-provider.ts +++ b/lib/handlers/router-entities/v3-aws-subgraph-provider.ts @@ -1,6 +1,5 @@ -import { IV3SubgraphProvider, log, V3SubgraphPool, V3SubgraphProvider } from '@uniswap/smart-order-router' +import { ChainId, IV3SubgraphProvider, log, V3SubgraphPool, V3SubgraphProvider } from '@uniswap/smart-order-router' import { S3 } from 'aws-sdk' -import { ChainId } from '@uniswap/sdk-core' import _ from 'lodash' import NodeCache from 'node-cache' diff --git a/lib/handlers/shared.ts b/lib/handlers/shared.ts index 0d53f91bc..67c778b19 100644 --- a/lib/handlers/shared.ts +++ b/lib/handlers/shared.ts @@ -1,6 +1,7 @@ -import { ChainId, Currency, Percent } from '@uniswap/sdk-core' +import { Currency, Percent } from '@uniswap/sdk-core' import { AlphaRouterConfig, + ChainId, ITokenListProvider, ITokenProvider, MapWithLowerCaseKey, diff --git a/lib/util/pool-cache-key.ts b/lib/util/pool-cache-key.ts index 724a4ad1e..dbadae26c 100644 --- a/lib/util/pool-cache-key.ts +++ b/lib/util/pool-cache-key.ts @@ -1,5 +1,5 @@ import { Protocol } from '@uniswap/router-sdk' -import { ChainId } from '@uniswap/sdk-core' +import { ChainId } from '@uniswap/smart-order-router' export const S3_POOL_CACHE_KEY = (baseKey: string, chain: ChainId, protocol: Protocol) => `${baseKey}-${chain}-${protocol}` diff --git a/package-lock.json b/package-lock.json index fe018cb1d..b4d0231f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,18 +23,18 @@ "@types/qs": "^6.9.7", "@types/sinon": "^10.0.6", "@types/stats-lite": "^2.2.0", - "@uniswap/default-token-list": "^11.2.0", + "@uniswap/default-token-list": "^4.1.0", "@uniswap/permit2-sdk": "^1.2.0", "@uniswap/router-sdk": "^1.3.0", - "@uniswap/sdk-core": "^3.2.6", - "@uniswap/smart-order-router": "3.13.5", - "@uniswap/token-lists": "^1.0.0-beta.31", - "@uniswap/universal-router-sdk": "^1.5.3", + "@uniswap/sdk-core": "^3.0.1", + "@uniswap/smart-order-router": "3.13.2-hotfix2", + "@uniswap/token-lists": "^1.0.0-beta.24", + "@uniswap/universal-router-sdk": "^1.3.0", "@uniswap/v2-sdk": "^3.0.0", "@uniswap/v3-periphery": "^1.1.0", "@uniswap/v3-sdk": "^3.7.1", "async-retry": "^1.3.1", - "aws-cdk-lib": "^2.85.0", + "aws-cdk-lib": "^2.24.1", "aws-embedded-metrics": "^2.0.6", "aws-sdk": "^2.927.0", "aws-xray-sdk": "^3.3.3", @@ -117,21 +117,6 @@ "node": ">=6.0.0" } }, - "node_modules/@aws-cdk/asset-awscli-v1": { - "version": "2.2.198", - "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.198.tgz", - "integrity": "sha512-RfOMXFMyZ5Ca8ytB3/vs6srFH5HVV4M2JS9Wsb/uXPEpSblEmuf31iGVfN6Q+xRoNPm8icsquCRQ79JBqH4yjA==" - }, - "node_modules/@aws-cdk/asset-kubectl-v20": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@aws-cdk/asset-kubectl-v20/-/asset-kubectl-v20-2.1.2.tgz", - "integrity": "sha512-3M2tELJOxQv0apCIiuKQ4pAbncz9GuLwnKFqxifWfe77wuMxyTRPmxssYHs42ePqzap1LT6GDcPygGs+hHstLg==" - }, - "node_modules/@aws-cdk/asset-node-proxy-agent-v5": { - "version": "2.0.165", - "resolved": "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v5/-/asset-node-proxy-agent-v5-2.0.165.tgz", - "integrity": "sha512-bsyLQD/vqXQcc9RDmlM1XqiFNO/yewgVFXmkMcQkndJbmE/jgYkzewwYGrBlfL725hGLQipXq19+jwWwdsXQqg==" - }, "node_modules/@aws-sdk/service-error-classification": { "version": "3.186.0", "resolved": "https://registry.npmjs.org/@aws-sdk/service-error-classification/-/service-error-classification-3.186.0.tgz", @@ -4260,9 +4245,9 @@ "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==" }, "node_modules/@uniswap/default-token-list": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/@uniswap/default-token-list/-/default-token-list-11.2.0.tgz", - "integrity": "sha512-royMoeeONKRheGEQD7eeLKdwWvdl6l4qzpFr5Jh9Mp09xdQoBaF7zqZuM/5URIXV0cvvWGWnbIqVKbtFikkMRA==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@uniswap/default-token-list/-/default-token-list-4.1.0.tgz", + "integrity": "sha512-NxFW4OhYpnAunD37CKDRadG5ujp3r6cYnfBzTD1Eq4jwdr3ULt01xGqGljq0SuGAGhTsD+bmR46vPg3TdDwW0g==" }, "node_modules/@uniswap/lib": { "version": "4.0.1-alpha", @@ -4294,9 +4279,9 @@ } }, "node_modules/@uniswap/sdk-core": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@uniswap/sdk-core/-/sdk-core-3.2.6.tgz", - "integrity": "sha512-MvH/3G0W0sM2g7XjaUy9qU7IabxL/KQp/ucU0AQGpVxiTaAhmVRtsjkkv9UDyzpIXVrmevl4kRgV7KKE29UuXA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@uniswap/sdk-core/-/sdk-core-3.1.0.tgz", + "integrity": "sha512-YRrp6vYAbYmi3uDXQGkvj2eT8BMpNnUdCFb8GifDG0Ei+ohIpC4RNAB+5/ru3zR2Byhx8VahGrSKuvdd6BVMyA==", "dependencies": { "@ethersproject/address": "^5.0.2", "big.js": "^5.2.2", @@ -4310,15 +4295,15 @@ } }, "node_modules/@uniswap/smart-order-router": { - "version": "3.13.5", - "resolved": "https://registry.npmjs.org/@uniswap/smart-order-router/-/smart-order-router-3.13.5.tgz", - "integrity": "sha512-U+XG9Wgzzpii8LLFLUu86pUjxp+JsL0sCkuCYr+arV9KbNWUhhNQi1gTia7VYCs9+EUaVwulRoC9eWytCxobcw==", + "version": "3.13.2-hotfix2", + "resolved": "https://registry.npmjs.org/@uniswap/smart-order-router/-/smart-order-router-3.13.2-hotfix2.tgz", + "integrity": "sha512-wYtURcWkjtkqDDLvTVrs+QPiHH4Qgr/D+R6o9+ptYiEyXbW4aq95i3QK9JRZQWIsFeUyHT+VRBlfdmgwu+rpXA==", "dependencies": { - "@uniswap/default-token-list": "^11.2.0", + "@uniswap/default-token-list": "^2.0.0", "@uniswap/permit2-sdk": "^1.2.0", "@uniswap/router-sdk": "^1.3.0", "@uniswap/swap-router-contracts": "^1.3.0", - "@uniswap/token-lists": "^1.0.0-beta.31", + "@uniswap/token-lists": "^1.0.0-beta.25", "@uniswap/universal-router": "^1.0.1", "@uniswap/universal-router-sdk": "^1.3.9", "@uniswap/v2-sdk": "^3.0.1", @@ -4348,6 +4333,11 @@ "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.4.2-solc-0.7.tgz", "integrity": "sha512-W6QmqgkADuFcTLzHL8vVoNBtkwjvQRpYIAom7KiUNoLKghyx3FgH0GBjt8NRvigV1ZmMOBllvE1By1C+bi8WpA==" }, + "node_modules/@uniswap/smart-order-router/node_modules/@uniswap/default-token-list": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@uniswap/default-token-list/-/default-token-list-2.3.0.tgz", + "integrity": "sha512-yfd4snv9K20tEbNwy9Vjym41RU3Yb2lN0seKxsgkr+m3f6oub2lWyXfTiNwgGFbOQPDvX4dxjMhA+M+S7mxqKg==" + }, "node_modules/@uniswap/smart-order-router/node_modules/@uniswap/swap-router-contracts": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@uniswap/swap-router-contracts/-/swap-router-contracts-1.3.0.tgz", @@ -4436,9 +4426,9 @@ } }, "node_modules/@uniswap/universal-router": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@uniswap/universal-router/-/universal-router-1.4.3.tgz", - "integrity": "sha512-SZmYfhYZtsuxrTMCitcA39iJuG9sbe2nvm9iQfd70WjMpbB0+GuEs5OqSHc5tB/ujrVKzPJ1LOoNNGOs0xPEeA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@uniswap/universal-router/-/universal-router-1.2.1.tgz", + "integrity": "sha512-F3S1wKylncuvIG2qwC1ciXXc1z1QmKsalo4p6H2A90LSRylEEhNp7ITxs7qCcnfRh+ZNkGJ0yQ0zmuVJSBezOQ==", "dependencies": { "@openzeppelin/contracts": "4.7.0", "@uniswap/v2-core": "1.0.1", @@ -4449,14 +4439,14 @@ } }, "node_modules/@uniswap/universal-router-sdk": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@uniswap/universal-router-sdk/-/universal-router-sdk-1.5.3.tgz", - "integrity": "sha512-C6JuOY9JxHjN5Eec67CIMFm3SAP4uqiGFnaUzBQM30HfWUBOdc8NJZ+5v5UIluydKu4VepB0xH3bnQ6tgsCx2Q==", + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/@uniswap/universal-router-sdk/-/universal-router-sdk-1.3.9.tgz", + "integrity": "sha512-uXhdK8IDuyZZRMKiua9dJ6jj5MJ5xUrGflczWwhp6i0cb2VvXoLNQqc7aq3130NfIrKEYfkBGMjsqStZmqqKug==", "dependencies": { "@uniswap/permit2-sdk": "^1.2.0", "@uniswap/router-sdk": "^1.4.0", "@uniswap/sdk-core": "^3.1.0", - "@uniswap/universal-router": "1.4.3", + "@uniswap/universal-router": "1.2.1", "@uniswap/v2-sdk": "^3.0.1", "@uniswap/v3-sdk": "^3.9.0", "bignumber.js": "^9.0.2", @@ -4974,6 +4964,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, "engines": { "node": ">=8" } @@ -5043,9 +5034,9 @@ } }, "node_modules/aws-cdk-lib": { - "version": "2.85.0", - "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.85.0.tgz", - "integrity": "sha512-u+ypK8XEMRH3tGRMSmcbPYxLet7xBdGIztUkMcPtlNJGhS/vxqh12yYkem3g3zzmHwdX8OPLSnlZ2sIuiIqp/g==", + "version": "2.45.0", + "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.45.0.tgz", + "integrity": "sha512-oEeZZF8xjub9KYAB7n01A60wwQXSzNapmiih3t5uf9aEvlvqT+0as8/WrPdNIeAaf9Lhb0WQXdZ2o2DlsFHbAg==", "bundleDependencies": [ "@balena/dockerignore", "case", @@ -5055,22 +5046,17 @@ "minimatch", "punycode", "semver", - "table", "yaml" ], "dependencies": { - "@aws-cdk/asset-awscli-v1": "^2.2.177", - "@aws-cdk/asset-kubectl-v20": "^2.1.1", - "@aws-cdk/asset-node-proxy-agent-v5": "^2.0.148", "@balena/dockerignore": "^1.0.2", "case": "1.6.3", - "fs-extra": "^11.1.1", - "ignore": "^5.2.4", + "fs-extra": "^9.1.0", + "ignore": "^5.2.0", "jsonschema": "^1.4.1", "minimatch": "^3.1.2", - "punycode": "^2.3.0", - "semver": "^7.5.1", - "table": "^6.8.1", + "punycode": "^2.1.1", + "semver": "^7.3.7", "yaml": "1.10.2" }, "engines": { @@ -5085,49 +5071,12 @@ "inBundle": true, "license": "Apache-2.0" }, - "node_modules/aws-cdk-lib/node_modules/ajv": { - "version": "8.12.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/aws-cdk-lib/node_modules/ansi-regex": { - "version": "5.0.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/aws-cdk-lib/node_modules/ansi-styles": { - "version": "4.3.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/aws-cdk-lib/node_modules/astral-regex": { - "version": "2.0.0", + "node_modules/aws-cdk-lib/node_modules/at-least-node": { + "version": "1.0.0", "inBundle": true, - "license": "MIT", + "license": "ISC", "engines": { - "node": ">=8" + "node": ">= 4.0.0" } }, "node_modules/aws-cdk-lib/node_modules/balanced-match": { @@ -5152,76 +5101,38 @@ "node": ">= 0.8.0" } }, - "node_modules/aws-cdk-lib/node_modules/color-convert": { - "version": "2.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/aws-cdk-lib/node_modules/color-name": { - "version": "1.1.4", - "inBundle": true, - "license": "MIT" - }, "node_modules/aws-cdk-lib/node_modules/concat-map": { "version": "0.0.1", "inBundle": true, "license": "MIT" }, - "node_modules/aws-cdk-lib/node_modules/emoji-regex": { - "version": "8.0.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/aws-cdk-lib/node_modules/fast-deep-equal": { - "version": "3.1.3", - "inBundle": true, - "license": "MIT" - }, "node_modules/aws-cdk-lib/node_modules/fs-extra": { - "version": "11.1.1", + "version": "9.1.0", "inBundle": true, "license": "MIT", "dependencies": { + "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" }, "engines": { - "node": ">=14.14" + "node": ">=10" } }, "node_modules/aws-cdk-lib/node_modules/graceful-fs": { - "version": "4.2.11", + "version": "4.2.10", "inBundle": true, "license": "ISC" }, "node_modules/aws-cdk-lib/node_modules/ignore": { - "version": "5.2.4", + "version": "5.2.0", "inBundle": true, "license": "MIT", "engines": { "node": ">= 4" } }, - "node_modules/aws-cdk-lib/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/aws-cdk-lib/node_modules/json-schema-traverse": { - "version": "1.0.0", - "inBundle": true, - "license": "MIT" - }, "node_modules/aws-cdk-lib/node_modules/jsonfile": { "version": "6.1.0", "inBundle": true, @@ -5241,11 +5152,6 @@ "node": "*" } }, - "node_modules/aws-cdk-lib/node_modules/lodash.truncate": { - "version": "4.4.2", - "inBundle": true, - "license": "MIT" - }, "node_modules/aws-cdk-lib/node_modules/lru-cache": { "version": "6.0.0", "inBundle": true, @@ -5269,23 +5175,15 @@ } }, "node_modules/aws-cdk-lib/node_modules/punycode": { - "version": "2.3.0", + "version": "2.1.1", "inBundle": true, "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/aws-cdk-lib/node_modules/require-from-string": { - "version": "2.0.2", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/aws-cdk-lib/node_modules/semver": { - "version": "7.5.2", + "version": "7.3.7", "inBundle": true, "license": "ISC", "dependencies": { @@ -5298,61 +5196,6 @@ "node": ">=10" } }, - "node_modules/aws-cdk-lib/node_modules/slice-ansi": { - "version": "4.0.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/aws-cdk-lib/node_modules/string-width": { - "version": "4.2.3", - "inBundle": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/aws-cdk-lib/node_modules/strip-ansi": { - "version": "6.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/aws-cdk-lib/node_modules/table": { - "version": "6.8.1", - "inBundle": true, - "license": "BSD-3-Clause", - "dependencies": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/aws-cdk-lib/node_modules/universalify": { "version": "2.0.0", "inBundle": true, @@ -5361,14 +5204,6 @@ "node": ">= 10.0.0" } }, - "node_modules/aws-cdk-lib/node_modules/uri-js": { - "version": "4.4.1", - "inBundle": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, "node_modules/aws-cdk-lib/node_modules/yallist": { "version": "4.0.0", "inBundle": true, @@ -18024,6 +17859,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true, "engines": { "node": ">= 4" } @@ -19792,7 +19628,8 @@ "node_modules/lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==" + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "dev": true }, "node_modules/log-symbols": { "version": "4.0.0", @@ -22473,6 +22310,7 @@ "version": "7.3.8", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, "dependencies": { "lru-cache": "^6.0.0" }, @@ -22487,6 +22325,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -22497,7 +22336,8 @@ "node_modules/semver/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, "node_modules/serialize-javascript": { "version": "5.0.1", @@ -22623,6 +22463,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -23036,6 +22877,7 @@ "version": "6.8.0", "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", + "dev": true, "dependencies": { "ajv": "^8.0.1", "lodash.truncate": "^4.4.2", @@ -24166,21 +24008,6 @@ "@jridgewell/trace-mapping": "^0.3.9" } }, - "@aws-cdk/asset-awscli-v1": { - "version": "2.2.198", - "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.198.tgz", - "integrity": "sha512-RfOMXFMyZ5Ca8ytB3/vs6srFH5HVV4M2JS9Wsb/uXPEpSblEmuf31iGVfN6Q+xRoNPm8icsquCRQ79JBqH4yjA==" - }, - "@aws-cdk/asset-kubectl-v20": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@aws-cdk/asset-kubectl-v20/-/asset-kubectl-v20-2.1.2.tgz", - "integrity": "sha512-3M2tELJOxQv0apCIiuKQ4pAbncz9GuLwnKFqxifWfe77wuMxyTRPmxssYHs42ePqzap1LT6GDcPygGs+hHstLg==" - }, - "@aws-cdk/asset-node-proxy-agent-v5": { - "version": "2.0.165", - "resolved": "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v5/-/asset-node-proxy-agent-v5-2.0.165.tgz", - "integrity": "sha512-bsyLQD/vqXQcc9RDmlM1XqiFNO/yewgVFXmkMcQkndJbmE/jgYkzewwYGrBlfL725hGLQipXq19+jwWwdsXQqg==" - }, "@aws-sdk/service-error-classification": { "version": "3.186.0", "resolved": "https://registry.npmjs.org/@aws-sdk/service-error-classification/-/service-error-classification-3.186.0.tgz", @@ -27333,9 +27160,9 @@ "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==" }, "@uniswap/default-token-list": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/@uniswap/default-token-list/-/default-token-list-11.2.0.tgz", - "integrity": "sha512-royMoeeONKRheGEQD7eeLKdwWvdl6l4qzpFr5Jh9Mp09xdQoBaF7zqZuM/5URIXV0cvvWGWnbIqVKbtFikkMRA==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@uniswap/default-token-list/-/default-token-list-4.1.0.tgz", + "integrity": "sha512-NxFW4OhYpnAunD37CKDRadG5ujp3r6cYnfBzTD1Eq4jwdr3ULt01xGqGljq0SuGAGhTsD+bmR46vPg3TdDwW0g==" }, "@uniswap/lib": { "version": "4.0.1-alpha", @@ -27364,9 +27191,9 @@ } }, "@uniswap/sdk-core": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@uniswap/sdk-core/-/sdk-core-3.2.6.tgz", - "integrity": "sha512-MvH/3G0W0sM2g7XjaUy9qU7IabxL/KQp/ucU0AQGpVxiTaAhmVRtsjkkv9UDyzpIXVrmevl4kRgV7KKE29UuXA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@uniswap/sdk-core/-/sdk-core-3.1.0.tgz", + "integrity": "sha512-YRrp6vYAbYmi3uDXQGkvj2eT8BMpNnUdCFb8GifDG0Ei+ohIpC4RNAB+5/ru3zR2Byhx8VahGrSKuvdd6BVMyA==", "requires": { "@ethersproject/address": "^5.0.2", "big.js": "^5.2.2", @@ -27377,15 +27204,15 @@ } }, "@uniswap/smart-order-router": { - "version": "3.13.5", - "resolved": "https://registry.npmjs.org/@uniswap/smart-order-router/-/smart-order-router-3.13.5.tgz", - "integrity": "sha512-U+XG9Wgzzpii8LLFLUu86pUjxp+JsL0sCkuCYr+arV9KbNWUhhNQi1gTia7VYCs9+EUaVwulRoC9eWytCxobcw==", + "version": "3.13.2-hotfix2", + "resolved": "https://registry.npmjs.org/@uniswap/smart-order-router/-/smart-order-router-3.13.2-hotfix2.tgz", + "integrity": "sha512-wYtURcWkjtkqDDLvTVrs+QPiHH4Qgr/D+R6o9+ptYiEyXbW4aq95i3QK9JRZQWIsFeUyHT+VRBlfdmgwu+rpXA==", "requires": { - "@uniswap/default-token-list": "^11.2.0", + "@uniswap/default-token-list": "^2.0.0", "@uniswap/permit2-sdk": "^1.2.0", "@uniswap/router-sdk": "^1.3.0", "@uniswap/swap-router-contracts": "^1.3.0", - "@uniswap/token-lists": "^1.0.0-beta.31", + "@uniswap/token-lists": "^1.0.0-beta.25", "@uniswap/universal-router": "^1.0.1", "@uniswap/universal-router-sdk": "^1.3.9", "@uniswap/v2-sdk": "^3.0.1", @@ -27409,6 +27236,11 @@ "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.4.2-solc-0.7.tgz", "integrity": "sha512-W6QmqgkADuFcTLzHL8vVoNBtkwjvQRpYIAom7KiUNoLKghyx3FgH0GBjt8NRvigV1ZmMOBllvE1By1C+bi8WpA==" }, + "@uniswap/default-token-list": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@uniswap/default-token-list/-/default-token-list-2.3.0.tgz", + "integrity": "sha512-yfd4snv9K20tEbNwy9Vjym41RU3Yb2lN0seKxsgkr+m3f6oub2lWyXfTiNwgGFbOQPDvX4dxjMhA+M+S7mxqKg==" + }, "@uniswap/swap-router-contracts": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@uniswap/swap-router-contracts/-/swap-router-contracts-1.3.0.tgz", @@ -27480,9 +27312,9 @@ "integrity": "sha512-BQVoelKCRf64IToPEs1wxiXOnhr/ukwPOF78XG11PrTAOL4F8umjYKFb8ZPv1/dIJsPaC7GhLSriEqyp94SasQ==" }, "@uniswap/universal-router": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@uniswap/universal-router/-/universal-router-1.4.3.tgz", - "integrity": "sha512-SZmYfhYZtsuxrTMCitcA39iJuG9sbe2nvm9iQfd70WjMpbB0+GuEs5OqSHc5tB/ujrVKzPJ1LOoNNGOs0xPEeA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@uniswap/universal-router/-/universal-router-1.2.1.tgz", + "integrity": "sha512-F3S1wKylncuvIG2qwC1ciXXc1z1QmKsalo4p6H2A90LSRylEEhNp7ITxs7qCcnfRh+ZNkGJ0yQ0zmuVJSBezOQ==", "requires": { "@openzeppelin/contracts": "4.7.0", "@uniswap/v2-core": "1.0.1", @@ -27497,14 +27329,14 @@ } }, "@uniswap/universal-router-sdk": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@uniswap/universal-router-sdk/-/universal-router-sdk-1.5.3.tgz", - "integrity": "sha512-C6JuOY9JxHjN5Eec67CIMFm3SAP4uqiGFnaUzBQM30HfWUBOdc8NJZ+5v5UIluydKu4VepB0xH3bnQ6tgsCx2Q==", + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/@uniswap/universal-router-sdk/-/universal-router-sdk-1.3.9.tgz", + "integrity": "sha512-uXhdK8IDuyZZRMKiua9dJ6jj5MJ5xUrGflczWwhp6i0cb2VvXoLNQqc7aq3130NfIrKEYfkBGMjsqStZmqqKug==", "requires": { "@uniswap/permit2-sdk": "^1.2.0", "@uniswap/router-sdk": "^1.4.0", "@uniswap/sdk-core": "^3.1.0", - "@uniswap/universal-router": "1.4.3", + "@uniswap/universal-router": "1.2.1", "@uniswap/v2-sdk": "^3.0.1", "@uniswap/v3-sdk": "^3.9.0", "bignumber.js": "^9.0.2", @@ -27868,7 +27700,8 @@ "astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true }, "async": { "version": "2.6.4", @@ -27923,22 +27756,18 @@ "integrity": "sha512-gsDXAS6XVc4Jt+7S92MPX6Noq69bdeXUPEaXd8dk3+yVr629LTDLxNt4j1ycBbrU+AStK2PhKIyNIM+xzWMVOQ==" }, "aws-cdk-lib": { - "version": "2.85.0", - "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.85.0.tgz", - "integrity": "sha512-u+ypK8XEMRH3tGRMSmcbPYxLet7xBdGIztUkMcPtlNJGhS/vxqh12yYkem3g3zzmHwdX8OPLSnlZ2sIuiIqp/g==", + "version": "2.45.0", + "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.45.0.tgz", + "integrity": "sha512-oEeZZF8xjub9KYAB7n01A60wwQXSzNapmiih3t5uf9aEvlvqT+0as8/WrPdNIeAaf9Lhb0WQXdZ2o2DlsFHbAg==", "requires": { - "@aws-cdk/asset-awscli-v1": "^2.2.177", - "@aws-cdk/asset-kubectl-v20": "^2.1.1", - "@aws-cdk/asset-node-proxy-agent-v5": "^2.0.148", "@balena/dockerignore": "^1.0.2", "case": "1.6.3", - "fs-extra": "^11.1.1", - "ignore": "^5.2.4", + "fs-extra": "^9.1.0", + "ignore": "^5.2.0", "jsonschema": "^1.4.1", "minimatch": "^3.1.2", - "punycode": "^2.3.0", - "semver": "^7.5.1", - "table": "^6.8.1", + "punycode": "^2.1.1", + "semver": "^7.3.7", "yaml": "1.10.2" }, "dependencies": { @@ -27946,29 +27775,8 @@ "version": "1.0.2", "bundled": true }, - "ajv": { - "version": "8.12.0", - "bundled": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "5.0.1", - "bundled": true - }, - "ansi-styles": { - "version": "4.3.0", - "bundled": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "astral-regex": { - "version": "2.0.0", + "at-least-node": { + "version": "1.0.0", "bundled": true }, "balanced-match": { @@ -27987,52 +27795,26 @@ "version": "1.6.3", "bundled": true }, - "color-convert": { - "version": "2.0.1", - "bundled": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "bundled": true - }, "concat-map": { "version": "0.0.1", "bundled": true }, - "emoji-regex": { - "version": "8.0.0", - "bundled": true - }, - "fast-deep-equal": { - "version": "3.1.3", - "bundled": true - }, "fs-extra": { - "version": "11.1.1", + "version": "9.1.0", "bundled": true, "requires": { + "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "graceful-fs": { - "version": "4.2.11", + "version": "4.2.10", "bundled": true }, "ignore": { - "version": "5.2.4", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "bundled": true - }, - "json-schema-traverse": { - "version": "1.0.0", + "version": "5.2.0", "bundled": true }, "jsonfile": { @@ -28047,10 +27829,6 @@ "version": "1.4.1", "bundled": true }, - "lodash.truncate": { - "version": "4.4.2", - "bundled": true - }, "lru-cache": { "version": "6.0.0", "bundled": true, @@ -28066,67 +27844,20 @@ } }, "punycode": { - "version": "2.3.0", - "bundled": true - }, - "require-from-string": { - "version": "2.0.2", + "version": "2.1.1", "bundled": true }, "semver": { - "version": "7.5.2", + "version": "7.3.7", "bundled": true, "requires": { "lru-cache": "^6.0.0" } }, - "slice-ansi": { - "version": "4.0.0", - "bundled": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - } - }, - "string-width": { - "version": "4.2.3", - "bundled": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "bundled": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "table": { - "version": "6.8.1", - "bundled": true, - "requires": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - } - }, "universalify": { "version": "2.0.0", "bundled": true }, - "uri-js": { - "version": "4.4.1", - "bundled": true, - "requires": { - "punycode": "^2.1.0" - } - }, "yallist": { "version": "4.0.0", "bundled": true @@ -37841,7 +37572,8 @@ "ignore": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==" + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true }, "immutable": { "version": "4.1.0", @@ -39136,7 +38868,8 @@ "lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==" + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "dev": true }, "log-symbols": { "version": "4.0.0", @@ -41089,6 +40822,7 @@ "version": "7.3.8", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, "requires": { "lru-cache": "^6.0.0" }, @@ -41097,6 +40831,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, "requires": { "yallist": "^4.0.0" } @@ -41104,7 +40839,8 @@ "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true } } }, @@ -41213,6 +40949,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, "requires": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -41535,6 +41272,7 @@ "version": "6.8.0", "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", + "dev": true, "requires": { "ajv": "^8.0.1", "lodash.truncate": "^4.4.2", diff --git a/package.json b/package.json index ab477cfa2..e710cd539 100644 --- a/package.json +++ b/package.json @@ -76,18 +76,18 @@ "@types/qs": "^6.9.7", "@types/sinon": "^10.0.6", "@types/stats-lite": "^2.2.0", - "@uniswap/default-token-list": "^11.2.0", + "@uniswap/default-token-list": "^4.1.0", "@uniswap/permit2-sdk": "^1.2.0", "@uniswap/router-sdk": "^1.3.0", - "@uniswap/sdk-core": "^3.2.6", - "@uniswap/smart-order-router": "3.13.5", - "@uniswap/token-lists": "^1.0.0-beta.31", - "@uniswap/universal-router-sdk": "^1.5.3", + "@uniswap/sdk-core": "^3.0.1", + "@uniswap/smart-order-router": "3.13.2-hotfix2", + "@uniswap/token-lists": "^1.0.0-beta.24", + "@uniswap/universal-router-sdk": "^1.3.0", "@uniswap/v2-sdk": "^3.0.0", "@uniswap/v3-periphery": "^1.1.0", "@uniswap/v3-sdk": "^3.7.1", "async-retry": "^1.3.1", - "aws-cdk-lib": "^2.85.0", + "aws-cdk-lib": "^2.24.1", "aws-embedded-metrics": "^2.0.6", "aws-sdk": "^2.927.0", "aws-xray-sdk": "^3.3.3", diff --git a/test/jest/unit/handlers/router-entities/route-caching/cached-routes-configuration.test.ts b/test/jest/unit/handlers/router-entities/route-caching/cached-routes-configuration.test.ts index b1175db07..3bbf7951d 100644 --- a/test/jest/unit/handlers/router-entities/route-caching/cached-routes-configuration.test.ts +++ b/test/jest/unit/handlers/router-entities/route-caching/cached-routes-configuration.test.ts @@ -1,4 +1,5 @@ -import { ChainId, CurrencyAmount, Token, TradeType } from '@uniswap/sdk-core' +import { CurrencyAmount, Token, TradeType } from '@uniswap/sdk-core' +import { ChainId } from '@uniswap/smart-order-router' import { describe, it, expect } from '@jest/globals' import { CACHED_ROUTES_CONFIGURATION, diff --git a/test/jest/unit/handlers/router-entities/route-caching/model/cached-routes-strategy.test.ts b/test/jest/unit/handlers/router-entities/route-caching/model/cached-routes-strategy.test.ts index 0e6c91b27..7cfe4ddd3 100644 --- a/test/jest/unit/handlers/router-entities/route-caching/model/cached-routes-strategy.test.ts +++ b/test/jest/unit/handlers/router-entities/route-caching/model/cached-routes-strategy.test.ts @@ -1,10 +1,10 @@ -import { CacheMode } from '@uniswap/smart-order-router' -import { ChainId, CurrencyAmount, Token, TradeType } from '@uniswap/sdk-core' import { CachedRoutesBucket, CachedRoutesStrategy, } from '../../../../../../../lib/handlers/router-entities/route-caching' +import { CacheMode, ChainId } from '@uniswap/smart-order-router' import { describe, it, expect } from '@jest/globals' +import { CurrencyAmount, Token, TradeType } from '@uniswap/sdk-core' describe('CachedRoutesStrategy', () => { const WETH = new Token(ChainId.MAINNET, '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', 18, 'WETH') diff --git a/test/jest/unit/handlers/router-entities/route-caching/model/pair-trade-type-chain-id.test.ts b/test/jest/unit/handlers/router-entities/route-caching/model/pair-trade-type-chain-id.test.ts index 05b6d6ecf..0725b6dc8 100644 --- a/test/jest/unit/handlers/router-entities/route-caching/model/pair-trade-type-chain-id.test.ts +++ b/test/jest/unit/handlers/router-entities/route-caching/model/pair-trade-type-chain-id.test.ts @@ -1,6 +1,7 @@ import { PairTradeTypeChainId } from '../../../../../../../lib/handlers/router-entities/route-caching' -import { ChainId, TradeType } from '@uniswap/sdk-core' +import { TradeType } from '@uniswap/sdk-core' import { describe, it, expect } from '@jest/globals' +import { ChainId } from '@uniswap/smart-order-router' describe('PairTradeTypeChainId', () => { const WETH = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' diff --git a/test/mocha/integ/quote.test.ts b/test/mocha/integ/quote.test.ts index 0d29f426c..d7f10dea8 100644 --- a/test/mocha/integ/quote.test.ts +++ b/test/mocha/integ/quote.test.ts @@ -1,9 +1,10 @@ import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' import { AllowanceTransfer, PermitSingle } from '@uniswap/permit2-sdk' -import { ChainId, Currency, CurrencyAmount, Ether, Fraction, Token, WETH9 } from '@uniswap/sdk-core' +import { Currency, CurrencyAmount, Ether, Fraction, Token, WETH9 } from '@uniswap/sdk-core' import { CEUR_CELO, CEUR_CELO_ALFAJORES, + ChainId, CUSD_CELO, CUSD_CELO_ALFAJORES, DAI_MAINNET, @@ -1888,7 +1889,7 @@ describe('quote', function () { const TEST_ERC20_1: { [chainId in ChainId]: null | Token } = { [ChainId.MAINNET]: USDC_ON(1), - [ChainId.GOERLI]: USDC_ON(ChainId.GOERLI), + [ChainId.GÖRLI]: USDC_ON(ChainId.GÖRLI), [ChainId.SEPOLIA]: USDC_ON(ChainId.SEPOLIA), [ChainId.OPTIMISM]: USDC_ON(ChainId.OPTIMISM), [ChainId.OPTIMISM_GOERLI]: USDC_ON(ChainId.OPTIMISM_GOERLI), @@ -1900,13 +1901,12 @@ describe('quote', function () { [ChainId.MOONBEAM]: null, [ChainId.GNOSIS]: null, [ChainId.ARBITRUM_GOERLI]: null, - [ChainId.BNB]: USDC_ON(ChainId.BNB), - [ChainId.AVALANCHE]: USDC_ON(ChainId.AVALANCHE), + [ChainId.BSC]: USDC_ON(ChainId.BSC), } const TEST_ERC20_2: { [chainId in ChainId]: Token | null } = { [ChainId.MAINNET]: DAI_ON(1), - [ChainId.GOERLI]: DAI_ON(ChainId.GOERLI), + [ChainId.GÖRLI]: DAI_ON(ChainId.GÖRLI), [ChainId.SEPOLIA]: DAI_ON(ChainId.SEPOLIA), [ChainId.OPTIMISM]: DAI_ON(ChainId.OPTIMISM), [ChainId.OPTIMISM_GOERLI]: DAI_ON(ChainId.OPTIMISM_GOERLI), @@ -1918,8 +1918,7 @@ describe('quote', function () { [ChainId.MOONBEAM]: null, [ChainId.GNOSIS]: null, [ChainId.ARBITRUM_GOERLI]: null, - [ChainId.BNB]: USDT_ON(ChainId.BNB), - [ChainId.AVALANCHE]: DAI_ON(ChainId.AVALANCHE), + [ChainId.BSC]: USDT_ON(ChainId.BSC), } // TODO: Find valid pools/tokens on optimistic kovan and polygon mumbai. We skip those tests for now. @@ -1929,7 +1928,7 @@ describe('quote', function () { c != ChainId.POLYGON_MUMBAI && c != ChainId.ARBITRUM_GOERLI && c != ChainId.CELO_ALFAJORES && - c != ChainId.GOERLI && + c != ChainId.GÖRLI && c != ChainId.SEPOLIA )) { for (const type of ['exactIn', 'exactOut']) { diff --git a/test/mocha/unit/handlers/pools/pool-caching/v3/dynamo-caching-pool-provider.test.ts b/test/mocha/unit/handlers/pools/pool-caching/v3/dynamo-caching-pool-provider.test.ts index 9cc7e27e5..a337e3539 100644 --- a/test/mocha/unit/handlers/pools/pool-caching/v3/dynamo-caching-pool-provider.test.ts +++ b/test/mocha/unit/handlers/pools/pool-caching/v3/dynamo-caching-pool-provider.test.ts @@ -1,8 +1,9 @@ import { setupTables } from '../../../../../dbSetup' import { DynamoDBCachingV3PoolProvider } from '../../../../../../../lib/handlers/pools/pool-caching/v3/dynamo-caching-pool-provider' +import { ChainId } from '@uniswap/smart-order-router/build/main/util/chains' import { getMockedV3PoolProvider, TEST_ROUTE_TABLE } from '../../../../../../test-utils/mocked-dependencies' import { SUPPORTED_POOLS } from '../../../../../../test-utils/mocked-data' -import { ChainId, Token } from '@uniswap/sdk-core' +import { Token } from '@uniswap/sdk-core' import { FeeAmount, Pool } from '@uniswap/v3-sdk' import { ProviderConfig } from '@uniswap/smart-order-router/build/main/providers/provider' import { expect } from 'chai' @@ -14,7 +15,7 @@ describe('DynamoDBCachingV3PoolProvider', async () => { it('caches pools properly with a given block number', async () => { const dynamoPoolCache = new DynamoDBCachingV3PoolProvider( - ChainId.GOERLI, + ChainId.GÖRLI, getMockedV3PoolProvider(), TEST_ROUTE_TABLE.TableName ) @@ -26,7 +27,7 @@ describe('DynamoDBCachingV3PoolProvider', async () => { // First ensure the dynamo cache doesn't have the pools yet for (const pool of SUPPORTED_POOLS) { const poolAddress = getMockedV3PoolProvider().getPoolAddress(pool.token0, pool.token1, pool.fee).poolAddress - const hasCachedPool = await dynamoCache.get(`pool-${ChainId.GOERLI}-${poolAddress}`, blockNumber) + const hasCachedPool = await dynamoCache.get(`pool-${ChainId.GÖRLI}-${poolAddress}`, blockNumber) expect(hasCachedPool).to.not.exist } @@ -38,7 +39,7 @@ describe('DynamoDBCachingV3PoolProvider', async () => { // Then ensure the dynamo cache has the pools yet for (const pool of SUPPORTED_POOLS) { const poolAddress = getMockedV3PoolProvider().getPoolAddress(pool.token0, pool.token1, pool.fee).poolAddress - const hasCachedPool = await dynamoCache.get(`pool-${ChainId.GOERLI}-${poolAddress}`, blockNumber) + const hasCachedPool = await dynamoCache.get(`pool-${ChainId.GÖRLI}-${poolAddress}`, blockNumber) expect(hasCachedPool).to.exist expect(hasCachedPool?.token0.chainId).equals(pool.token0.chainId) @@ -61,7 +62,7 @@ describe('DynamoDBCachingV3PoolProvider', async () => { it('caches do not cache when no block number', async () => { const dynamoPoolCache = new DynamoDBCachingV3PoolProvider( - ChainId.GOERLI, + ChainId.GÖRLI, getMockedV3PoolProvider(), TEST_ROUTE_TABLE.TableName ) @@ -73,8 +74,8 @@ describe('DynamoDBCachingV3PoolProvider', async () => { // First ensure the dynamo cache doesn't have the pools yet for (const pool of SUPPORTED_POOLS) { const poolAddress = getMockedV3PoolProvider().getPoolAddress(pool.token0, pool.token1, pool.fee).poolAddress - log.info(`check if pool pool-${ChainId.GOERLI}-${poolAddress} block ${blockNumber} contains the cache`) - const hasCachedPool = await dynamoCache.get(`pool-${ChainId.GOERLI}-${poolAddress}`, blockNumber) + log.info(`check if pool pool-${ChainId.GÖRLI}-${poolAddress} block ${blockNumber} contains the cache`) + const hasCachedPool = await dynamoCache.get(`pool-${ChainId.GÖRLI}-${poolAddress}`, blockNumber) expect(hasCachedPool).to.not.exist } @@ -86,8 +87,8 @@ describe('DynamoDBCachingV3PoolProvider', async () => { // Then ensure the dynamo cache won't have the pools for (const pool of SUPPORTED_POOLS) { const poolAddress = getMockedV3PoolProvider().getPoolAddress(pool.token0, pool.token1, pool.fee).poolAddress - log.info(`check if pool pool-${ChainId.GOERLI}-${poolAddress} block ${blockNumber} contains the cache`) - const hasCachedPool = await dynamoCache.get(`pool-${ChainId.GOERLI}-${poolAddress}`, blockNumber) + log.info(`check if pool pool-${ChainId.GÖRLI}-${poolAddress} block ${blockNumber} contains the cache`) + const hasCachedPool = await dynamoCache.get(`pool-${ChainId.GÖRLI}-${poolAddress}`, blockNumber) expect(hasCachedPool).to.not.equals } }) diff --git a/test/mocha/unit/handlers/pools/provider-migration/traffic-switch-pool-provider.test.ts b/test/mocha/unit/handlers/pools/provider-migration/traffic-switch-pool-provider.test.ts index 3960efbcf..cd49276f7 100644 --- a/test/mocha/unit/handlers/pools/provider-migration/traffic-switch-pool-provider.test.ts +++ b/test/mocha/unit/handlers/pools/provider-migration/traffic-switch-pool-provider.test.ts @@ -1,10 +1,11 @@ import { TrafficSwitchV3PoolProvider } from '../../../../../../lib/handlers/pools/provider-migration/v3/traffic-switch-v3-pool-provider' import { DynamoDBCachingV3PoolProvider } from '../../../../../../lib/handlers/pools/pool-caching/v3/dynamo-caching-pool-provider' +import { ChainId } from '@uniswap/smart-order-router/build/main/util/chains' import { getMockedV3PoolProvider, TEST_ROUTE_TABLE } from '../../../../../test-utils/mocked-dependencies' import { CachingV3PoolProvider, MetricLoggerUnit, NodeJSCache } from '@uniswap/smart-order-router' import NodeCache from 'node-cache' import sinon from 'sinon' -import { ChainId, Token } from '@uniswap/sdk-core' +import { Token } from '@uniswap/sdk-core' import { encodeSqrtRatioX96, FeeAmount, Pool } from '@uniswap/v3-sdk' import { DAI_USDT_LOW, @@ -37,15 +38,11 @@ describe('TrafficSwitchV3PoolProvider', async () => { const underlyingPool = getMockedV3PoolProvider() const inMemoryPoolCache = new CachingV3PoolProvider( - ChainId.GOERLI, + ChainId.GÖRLI, underlyingPool, new NodeJSCache(new NodeCache({ stdTTL: 15, useClones: false })) ) - const dynamoPoolCache = new DynamoDBCachingV3PoolProvider( - ChainId.GOERLI, - underlyingPool, - TEST_ROUTE_TABLE.TableName - ) + const dynamoPoolCache = new DynamoDBCachingV3PoolProvider(ChainId.GÖRLI, underlyingPool, TEST_ROUTE_TABLE.TableName) const trafficSwitchProvider = new (class SwitchTrafficSwitchV3PoolProvider extends TrafficSwitchV3PoolProvider { override readonly SHOULD_SWITCH_TRAFFIC = () => true override readonly SHOULD_SAMPLE_TRAFFIC = () => true @@ -83,15 +80,11 @@ describe('TrafficSwitchV3PoolProvider', async () => { DAI_USDT_LOW, ]) const inMemoryPoolCache = new CachingV3PoolProvider( - ChainId.GOERLI, + ChainId.GÖRLI, underlyingPool, new NodeJSCache(new NodeCache({ stdTTL: 15, useClones: false })) ) - const dynamoPoolCache = new DynamoDBCachingV3PoolProvider( - ChainId.GOERLI, - underlyingPool, - TEST_ROUTE_TABLE.TableName - ) + const dynamoPoolCache = new DynamoDBCachingV3PoolProvider(ChainId.GÖRLI, underlyingPool, TEST_ROUTE_TABLE.TableName) const trafficSwitchProvider = new (class SwitchTrafficSwitchV3PoolProvider extends TrafficSwitchV3PoolProvider { override readonly SHOULD_SWITCH_TRAFFIC = () => false override readonly SHOULD_SAMPLE_TRAFFIC = () => true @@ -129,15 +122,11 @@ describe('TrafficSwitchV3PoolProvider', async () => { DAI_USDT_LOW, ]) const inMemoryPoolCache = new CachingV3PoolProvider( - ChainId.GOERLI, + ChainId.GÖRLI, underlyingPool, new NodeJSCache(new NodeCache({ stdTTL: 15, useClones: false })) ) - const dynamoPoolCache = new DynamoDBCachingV3PoolProvider( - ChainId.GOERLI, - underlyingPool, - TEST_ROUTE_TABLE.TableName - ) + const dynamoPoolCache = new DynamoDBCachingV3PoolProvider(ChainId.GÖRLI, underlyingPool, TEST_ROUTE_TABLE.TableName) const trafficSwitchProvider = new (class SwitchTrafficSwitchV3PoolProvider extends TrafficSwitchV3PoolProvider { override readonly SHOULD_SWITCH_TRAFFIC = () => false override readonly SHOULD_SAMPLE_TRAFFIC = () => true diff --git a/test/mocha/unit/handlers/router-entities/route-caching/dynamo-route-caching-provider.test.ts b/test/mocha/unit/handlers/router-entities/route-caching/dynamo-route-caching-provider.test.ts index 466fd7d91..ba5ca1d54 100644 --- a/test/mocha/unit/handlers/router-entities/route-caching/dynamo-route-caching-provider.test.ts +++ b/test/mocha/unit/handlers/router-entities/route-caching/dynamo-route-caching-provider.test.ts @@ -4,11 +4,19 @@ import 'reflect-metadata' import { setupTables } from '../../../../dbSetup' import { DynamoRouteCachingProvider } from '../../../../../../lib/handlers/router-entities/route-caching' import { Protocol } from '@uniswap/router-sdk' -import { ChainId, CurrencyAmount, TradeType } from '@uniswap/sdk-core' +import { CurrencyAmount, TradeType } from '@uniswap/sdk-core' import JSBI from 'jsbi' import { FeeAmount, Pool } from '@uniswap/v3-sdk' import { WNATIVE_ON } from '../../../../../utils/tokens' -import { CacheMode, CachedRoute, CachedRoutes, UNI_MAINNET, USDC_MAINNET, V3Route } from '@uniswap/smart-order-router' +import { + CacheMode, + CachedRoute, + CachedRoutes, + ChainId, + UNI_MAINNET, + USDC_MAINNET, + V3Route, +} from '@uniswap/smart-order-router' chai.use(chaiAsPromised) diff --git a/test/utils/tokens.ts b/test/utils/tokens.ts index 7dabca016..0875b8bd4 100644 --- a/test/utils/tokens.ts +++ b/test/utils/tokens.ts @@ -1,11 +1,11 @@ import DEFAULT_TOKEN_LIST from '@uniswap/default-token-list' -import { ChainId, Token } from '@uniswap/sdk-core' +import { Token } from '@uniswap/sdk-core' import { CachingTokenListProvider, + ChainId, DAI_ARBITRUM, - DAI_AVAX, - DAI_BNB, - DAI_GOERLI, + DAI_BSC, + DAI_GÖRLI, DAI_MAINNET, DAI_OPTIMISM, DAI_OPTIMISM_GOERLI, @@ -15,9 +15,8 @@ import { log, NodeJSCache, USDC_ARBITRUM, - USDC_AVAX, - USDC_BNB, - USDC_GOERLI, + USDC_BSC, + USDC_GÖRLI, USDC_MAINNET, USDC_OPTIMISM, USDC_OPTIMISM_GOERLI, @@ -25,8 +24,8 @@ import { USDC_POLYGON_MUMBAI, USDC_SEPOLIA, USDT_ARBITRUM, - USDT_BNB, - USDT_GOERLI, + USDT_BSC, + USDT_GÖRLI, USDT_MAINNET, USDT_OPTIMISM, WRAPPED_NATIVE_CURRENCY, @@ -58,14 +57,14 @@ export const UNI_MAINNET = new Token( 'Uniswap' ) -export const UNI_GORLI = new Token(ChainId.GOERLI, '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984', 18, 'UNI', 'Uni token') +export const UNI_GORLI = new Token(ChainId.GÖRLI, '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984', 18, 'UNI', 'Uni token') export const DAI_ON = (chainId: ChainId): Token => { switch (chainId) { case ChainId.MAINNET: return DAI_MAINNET - case ChainId.GOERLI: - return DAI_GOERLI + case ChainId.GÖRLI: + return DAI_GÖRLI case ChainId.SEPOLIA: return DAI_SEPOLIA case ChainId.OPTIMISM: @@ -78,10 +77,8 @@ export const DAI_ON = (chainId: ChainId): Token => { return DAI_POLYGON case ChainId.POLYGON_MUMBAI: return DAI_POLYGON_MUMBAI - case ChainId.BNB: - return DAI_BNB - case ChainId.AVALANCHE: - return DAI_AVAX + case ChainId.BSC: + return DAI_BSC default: throw new Error(`Chain id: ${chainId} not supported`) } @@ -91,14 +88,14 @@ export const USDT_ON = (chainId: ChainId): Token => { switch (chainId) { case ChainId.MAINNET: return USDT_MAINNET - case ChainId.GOERLI: - return USDT_GOERLI + case ChainId.GÖRLI: + return USDT_GÖRLI case ChainId.OPTIMISM: return USDT_OPTIMISM case ChainId.ARBITRUM_ONE: return USDT_ARBITRUM - case ChainId.BNB: - return USDT_BNB + case ChainId.BSC: + return USDT_BSC default: throw new Error(`Chain id: ${chainId} not supported`) } @@ -108,8 +105,8 @@ export const USDC_ON = (chainId: ChainId): Token => { switch (chainId) { case ChainId.MAINNET: return USDC_MAINNET - case ChainId.GOERLI: - return USDC_GOERLI + case ChainId.GÖRLI: + return USDC_GÖRLI case ChainId.SEPOLIA: return USDC_SEPOLIA case ChainId.OPTIMISM: @@ -122,10 +119,8 @@ export const USDC_ON = (chainId: ChainId): Token => { return USDC_POLYGON case ChainId.POLYGON_MUMBAI: return USDC_POLYGON_MUMBAI - case ChainId.BNB: - return USDC_BNB - case ChainId.AVALANCHE: - return USDC_AVAX + case ChainId.BSC: + return USDC_BSC default: throw new Error(`Chain id: ${chainId} not supported`) }