Skip to content

Commit

Permalink
updated package dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
niftrr committed Jan 30, 2024
1 parent bf6581e commit f6ebd36
Show file tree
Hide file tree
Showing 60 changed files with 5,063 additions and 2,933 deletions.
2 changes: 1 addition & 1 deletion cli/base-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Command, flags } from '@oclif/command';
import { ParserOutput } from '@oclif/parser/lib/parse';
import DEFAULT_TOKEN_LIST from '@uniswap/default-token-list';
import { ChainId, Currency, CurrencyAmount, Token } from '@offsetcarbon/sdk-core';
import { MethodParameters } from '@uniswap/v3-sdk';
import { MethodParameters } from '@offsetcarbon/v3-sdk';
import bunyan, { default as Logger } from 'bunyan';
import bunyanDebugStream from 'bunyan-debug-stream';
import _ from 'lodash';
Expand Down
2 changes: 1 addition & 1 deletion cli/commands/quote-to-ratio.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Logger } from '@ethersproject/logger';
import { flags } from '@oclif/command';
import { Currency, Ether, Fraction, Percent } from '@offsetcarbon/sdk-core';
import { Position } from '@uniswap/v3-sdk';
import { Position } from '@offsetcarbon/v3-sdk';
import dotenv from 'dotenv';
import {
ID_TO_CHAIN_ID,
Expand Down
2 changes: 1 addition & 1 deletion cli/commands/quote.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Logger } from '@ethersproject/logger';
import { flags } from '@oclif/command';
import { Protocol } from '@uniswap/router-sdk';
import { Protocol } from '@offsetcarbon/router-sdk';
import { Currency, Percent, TradeType } from '@offsetcarbon/sdk-core';
import dotenv from 'dotenv';
import _ from 'lodash';
Expand Down
7,776 changes: 4,940 additions & 2,836 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@offsetcarbon/smart-order-router",
"version": "3.20.2",
"version": "3.20.4",
"description": "Offset Smart Order Router",
"main": "build/main/index.js",
"typings": "build/main/index.d.ts",
Expand All @@ -15,9 +15,8 @@
"compile-v3-types": "npx typechain --target ethers-v5 --out-dir src/types/v3 './node_modules/@uniswap/?(v3-core|v3-periphery)/artifacts/contracts/**/*.json'",
"compile-v2-types": "npx typechain --target ethers-v5 --out-dir src/types/v2 './node_modules/@uniswap/?(v2-core|v2-periphery)/build/*UniswapV2*.json'",
"compile-router": "npx typechain --target ethers-v5 --out-dir src/types/other './node_modules/@uniswap/swap-router-contracts/artifacts/contracts/**/*.json'",
"compile-narwhal": "npx typechain --target ethers-v5 --out-dir src/types/other './node_modules/@uniswap/narwhal/artifacts/contracts/**/*.json'",
"compile-external-types": "npx typechain --target ethers-v5 --out-dir src/types/other 'src/abis/**/*.json'",
"build": "run-p compile-v3-types compile-v2-types compile-router compile-narwhal compile-external-types && run-p build:*",
"build": "run-p compile-v3-types compile-v2-types compile-router compile-external-types && run-p build:*",
"build:main": "tsc -p tsconfig.json",
"build:module": "tsc -p tsconfig.module.json",
"fix": "run-s fix:*",
Expand All @@ -31,6 +30,11 @@
"node": ">=10"
},
"dependencies": {
"@offsetcarbon/router-sdk": "1.7.5",
"@offsetcarbon/sdk-core": "^4.0.13",
"@offsetcarbon/universal-router-sdk": "^1.6.4",
"@offsetcarbon/v2-sdk": "4.1.0",
"@offsetcarbon/v3-sdk": "^3.10.1",
"@uniswap/default-token-list": "^11.2.0",
"@uniswap/permit2-sdk": "^1.2.0",
"@uniswap/router-sdk": "^1.6.0",
Expand All @@ -41,8 +45,6 @@
"@uniswap/universal-router-sdk": "^1.5.8",
"@uniswap/v2-sdk": "^3.2.3",
"@uniswap/v3-sdk": "^3.10.0",
"@offsetcarbon/v3-sdk": "^3.10.1",
"@offsetcarbon/sdk-core": "^4.0.13",
"async-retry": "^1.3.1",
"await-timeout": "^1.1.1",
"axios": "^0.21.1",
Expand Down Expand Up @@ -70,7 +72,7 @@
"@types/jest": "^27.0.0",
"@types/jest-sinon": "^1.0.2",
"@types/lodash": "^4.14.168",
"@types/node": "^15.0.2",
"@types/node": "^20.11.10",
"@types/sinon": "^10.0.2",
"@types/stats-lite": "^2.2.0",
"@typescript-eslint/eslint-plugin": "^4.0.1",
Expand Down
4 changes: 2 additions & 2 deletions src/providers/caching/route/model/cached-route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Protocol } from '@uniswap/router-sdk';
import { Protocol } from '@offsetcarbon/router-sdk';
import { Token } from '@offsetcarbon/sdk-core';
import { Pool } from '@uniswap/v3-sdk';
import { Pool } from '@offsetcarbon/v3-sdk';

import { MixedRoute, V2Route, V3Route } from '../../../../routers';

Expand Down
2 changes: 1 addition & 1 deletion src/providers/caching/route/model/cached-routes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Protocol } from '@uniswap/router-sdk';
import { Protocol } from '@offsetcarbon/router-sdk';
import { ChainId, Token, TradeType } from '@offsetcarbon/sdk-core';
import _ from 'lodash';

Expand Down
2 changes: 1 addition & 1 deletion src/providers/caching/route/route-caching-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @export
* @interface IRouteCachingProvider
*/
import { Protocol } from '@uniswap/router-sdk';
import { Protocol } from '@offsetcarbon/router-sdk';
import {
ChainId,
Currency,
Expand Down
4 changes: 2 additions & 2 deletions src/providers/on-chain-quote-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
encodeMixedRouteToPath,
MixedRouteSDK,
Protocol,
} from '@uniswap/router-sdk';
} from '@offsetcarbon/router-sdk';
import { ChainId } from '@offsetcarbon/sdk-core';
import { encodeRouteToPath } from '@uniswap/v3-sdk';
import { encodeRouteToPath } from '@offsetcarbon/v3-sdk';
import retry, { Options as RetryOptions } from 'async-retry';
import _ from 'lodash';
import stats from 'stats-lite';
Expand Down
2 changes: 1 addition & 1 deletion src/providers/portion-provider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BigNumber } from '@ethersproject/bignumber';
import { ZERO } from '@uniswap/router-sdk';
import { ZERO } from '@offsetcarbon/router-sdk';
import { Fraction, TradeType } from '@offsetcarbon/sdk-core';

import {
Expand Down
2 changes: 1 addition & 1 deletion src/providers/simulation-provider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { JsonRpcProvider } from '@ethersproject/providers';
import { ChainId, TradeType } from '@offsetcarbon/sdk-core';
import { PERMIT2_ADDRESS } from '@uniswap/universal-router-sdk';
import { PERMIT2_ADDRESS } from '@offsetcarbon/universal-router-sdk';
import { BigNumber } from 'ethers/lib/ethers';

import {
Expand Down
2 changes: 1 addition & 1 deletion src/providers/swap-router-provider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ApprovalTypes } from '@uniswap/router-sdk';
import { ApprovalTypes } from '@offsetcarbon/router-sdk';
import { ChainId, Currency, CurrencyAmount } from '@offsetcarbon/sdk-core';

import { SwapRouter02__factory } from '../types/other/factories/SwapRouter02__factory';
Expand Down
2 changes: 1 addition & 1 deletion src/providers/tenderly-simulation-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ChainId } from '@offsetcarbon/sdk-core';
import {
PERMIT2_ADDRESS,
UNIVERSAL_ROUTER_ADDRESS,
} from '@uniswap/universal-router-sdk';
} from '@offsetcarbon/universal-router-sdk';
import axios, { AxiosRequestConfig } from 'axios';
import { BigNumber } from 'ethers/lib/ethers';

Expand Down
2 changes: 1 addition & 1 deletion src/providers/v2/caching-pool-provider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChainId, Token } from '@offsetcarbon/sdk-core';
import { Pair } from '@uniswap/v2-sdk';
import { Pair } from '@offsetcarbon/v2-sdk';
import _ from 'lodash';

import { log } from '../../util/log';
Expand Down
2 changes: 1 addition & 1 deletion src/providers/v2/pool-provider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BigNumber } from '@ethersproject/bignumber';
import { ChainId, Token } from '@offsetcarbon/sdk-core';
import { Pair } from '@uniswap/v2-sdk';
import { Pair } from '@offsetcarbon/v2-sdk';
import retry, { Options as RetryOptions } from 'async-retry';
import _ from 'lodash';

Expand Down
2 changes: 1 addition & 1 deletion src/providers/v2/quote-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { TradeType } from '@offsetcarbon/sdk-core';
import {
InsufficientInputAmountError,
InsufficientReservesError,
} from '@uniswap/v2-sdk';
} from '@offsetcarbon/v2-sdk';

import { V2Route } from '../../routers/router';
import { CurrencyAmount } from '../../util/amounts';
Expand Down
3 changes: 2 additions & 1 deletion src/providers/v2/static-subgraph-provider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChainId, Token } from '@offsetcarbon/sdk-core';
import { Pair } from '@uniswap/v2-sdk';
import { Pair } from '@offsetcarbon/v2-sdk';
import _ from 'lodash';

import { WRAPPED_NATIVE_CURRENCY } from '../../util/chains';
Expand Down Expand Up @@ -29,6 +29,7 @@ const BASES_TO_CHECK_TRADES_AGAINST: ChainTokenList = {
[ChainId.SEPOLIA]: [WRAPPED_NATIVE_CURRENCY[ChainId.SEPOLIA]!],
//v2 not deployed on [optimism, arbitrum, polygon, celo, gnosis, moonbeam, bnb, avalanche] and their testnets
[ChainId.OPTIMISM]: [],
[ChainId.OPTIMISM_SEPOLIA]: [],
[ChainId.ARBITRUM_ONE]: [],
[ChainId.ARBITRUM_GOERLI]: [],
[ChainId.ARBITRUM_SEPOLIA]: [WRAPPED_NATIVE_CURRENCY[ChainId.ARBITRUM_SEPOLIA]!],
Expand Down
2 changes: 1 addition & 1 deletion src/providers/v3/caching-pool-provider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChainId, Token } from '@offsetcarbon/sdk-core';
import { FeeAmount, Pool } from '@uniswap/v3-sdk';
import { FeeAmount, Pool } from '@offsetcarbon/v3-sdk';
import _ from 'lodash';

import { metric, MetricLoggerUnit } from '../../util';
Expand Down
2 changes: 1 addition & 1 deletion src/providers/v3/pool-provider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BigNumber } from '@ethersproject/bignumber';
import { ChainId, Token } from '@offsetcarbon/sdk-core';
import { computePoolAddress, FeeAmount, Pool } from '@uniswap/v3-sdk';
import { computePoolAddress, FeeAmount, Pool } from '@offsetcarbon/v3-sdk';
import retry, { Options as RetryOptions } from 'async-retry';
import _ from 'lodash';

Expand Down
3 changes: 2 additions & 1 deletion src/providers/v3/static-subgraph-provider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { ChainId, Token } from '@offsetcarbon/sdk-core';
import { FeeAmount, Pool } from '@uniswap/v3-sdk';
import { FeeAmount, Pool } from '@offsetcarbon/v3-sdk';
import JSBI from 'jsbi';
import _ from 'lodash';

Expand Down Expand Up @@ -95,6 +95,7 @@ const BASES_TO_CHECK_TRADES_AGAINST: ChainTokenList = {
WBTC_OPTIMISM,
OP_OPTIMISM,
],
[ChainId.OPTIMISM_SEPOLIA]: [WRAPPED_NATIVE_CURRENCY[ChainId.OPTIMISM_SEPOLIA]!],
[ChainId.ARBITRUM_ONE]: [
WRAPPED_NATIVE_CURRENCY[ChainId.ARBITRUM_ONE]!,
WBTC_ARBITRUM,
Expand Down
4 changes: 2 additions & 2 deletions src/routers/alpha-router/alpha-router.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BigNumber } from '@ethersproject/bignumber';
import { BaseProvider, JsonRpcProvider } from '@ethersproject/providers';
import DEFAULT_TOKEN_LIST from '@uniswap/default-token-list';
import { Protocol, SwapRouter, Trade, ZERO } from '@uniswap/router-sdk';
import { Protocol, SwapRouter, Trade, ZERO } from '@offsetcarbon/router-sdk';
import {
ChainId,
Currency,
Expand All @@ -10,7 +10,7 @@ import {
TradeType,
} from '@offsetcarbon/sdk-core';
import { TokenList } from '@uniswap/token-lists';
import { Pool, Position, SqrtPriceMath, TickMath } from '@uniswap/v3-sdk';
import { Pool, Position, SqrtPriceMath, TickMath } from '@offsetcarbon/v3-sdk';
import retry from 'async-retry';
import JSBI from 'jsbi';
import _ from 'lodash';
Expand Down
4 changes: 2 additions & 2 deletions src/routers/alpha-router/entities/route-with-valid-quote.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BigNumber } from '@ethersproject/bignumber';
import { Protocol } from '@uniswap/router-sdk';
import { Protocol } from '@offsetcarbon/router-sdk';
import { Token, TradeType } from '@offsetcarbon/sdk-core';
import { Pool } from '@uniswap/v3-sdk';
import { Pool } from '@offsetcarbon/v3-sdk';
import _ from 'lodash';

import { IV2PoolProvider } from '../../../providers/v2/pool-provider';
Expand Down
2 changes: 1 addition & 1 deletion src/routers/alpha-router/functions/best-swap-route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BigNumber } from '@ethersproject/bignumber';
import { Protocol } from '@uniswap/router-sdk';
import { Protocol } from '@offsetcarbon/router-sdk';
import { ChainId, TradeType } from '@offsetcarbon/sdk-core';
import JSBI from 'jsbi';
import _ from 'lodash';
Expand Down
4 changes: 2 additions & 2 deletions src/routers/alpha-router/functions/compute-all-routes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Token } from '@offsetcarbon/sdk-core';
import { Pair } from '@uniswap/v2-sdk';
import { Pool } from '@uniswap/v3-sdk';
import { Pair } from '@offsetcarbon/v2-sdk';
import { Pool } from '@offsetcarbon/v3-sdk';

import { log } from '../../../util/log';
import { poolToString, routeToString } from '../../../util/routes';
Expand Down
4 changes: 2 additions & 2 deletions src/routers/alpha-router/functions/get-candidate-pools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Protocol } from '@uniswap/router-sdk';
import { Protocol } from '@offsetcarbon/router-sdk';
import { ChainId, Token, TradeType } from '@offsetcarbon/sdk-core';
import { FeeAmount } from '@uniswap/v3-sdk';
import { FeeAmount } from '@offsetcarbon/v3-sdk';
import _ from 'lodash';

import {
Expand Down
4 changes: 2 additions & 2 deletions src/routers/alpha-router/gas-models/gas-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
CurrencyAmount as CurrencyAmountRaw,
Token,
} from '@offsetcarbon/sdk-core';
import { Pair } from '@uniswap/v2-sdk';
import { Pool } from '@uniswap/v3-sdk';
import { Pair } from '@offsetcarbon/v2-sdk';
import { Pool } from '@offsetcarbon/v3-sdk';

import { ProviderConfig } from '../../../providers/provider';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { BigNumber } from '@ethersproject/bignumber';
import { partitionMixedRouteByProtocol } from '@uniswap/router-sdk';
import { partitionMixedRouteByProtocol } from '@offsetcarbon/router-sdk';
import { ChainId } from '@offsetcarbon/sdk-core';
import { Pair } from '@uniswap/v2-sdk';
import { Pool } from '@uniswap/v3-sdk';
import { Pair } from '@offsetcarbon/v2-sdk';
import { Pool } from '@offsetcarbon/v3-sdk';
import JSBI from 'jsbi';
import _ from 'lodash';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BigNumber } from '@ethersproject/bignumber';
import { ChainId, Token } from '@offsetcarbon/sdk-core';
import { Pair } from '@uniswap/v2-sdk';
import { Pair } from '@offsetcarbon/v2-sdk';
import _ from 'lodash';

import { ProviderConfig } from '../../../../providers/provider';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BigNumber } from '@ethersproject/bignumber';
import { ChainId, Percent, Price, TradeType } from '@offsetcarbon/sdk-core';
import { Pool } from '@uniswap/v3-sdk';
import { Pool } from '@offsetcarbon/v3-sdk';
import _ from 'lodash';

import {
Expand Down
6 changes: 3 additions & 3 deletions src/routers/alpha-router/quoters/base-quoter.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { BigNumber } from '@ethersproject/bignumber';
import { Protocol } from '@uniswap/router-sdk';
import { Protocol } from '@offsetcarbon/router-sdk';
import { ChainId, Currency, Token, TradeType } from '@offsetcarbon/sdk-core';
import { Pair } from '@uniswap/v2-sdk';
import { Pool } from '@uniswap/v3-sdk';
import { Pair } from '@offsetcarbon/v2-sdk';
import { Pool } from '@offsetcarbon/v3-sdk';
import _ from 'lodash';

import {
Expand Down
2 changes: 1 addition & 1 deletion src/routers/alpha-router/quoters/mixed-quoter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Protocol } from '@uniswap/router-sdk';
import { Protocol } from '@offsetcarbon/router-sdk';
import { ChainId, Currency, Token, TradeType } from '@offsetcarbon/sdk-core';
import _ from 'lodash';

Expand Down
2 changes: 1 addition & 1 deletion src/routers/alpha-router/quoters/v2-quoter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BigNumber } from '@ethersproject/bignumber';
import { Protocol } from '@uniswap/router-sdk';
import { Protocol } from '@offsetcarbon/router-sdk';
import { ChainId, Currency, Token, TradeType } from '@offsetcarbon/sdk-core';
import _ from 'lodash';

Expand Down
2 changes: 1 addition & 1 deletion src/routers/alpha-router/quoters/v3-quoter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Protocol } from '@uniswap/router-sdk';
import { Protocol } from '@offsetcarbon/router-sdk';
import { ChainId, Currency, Token, TradeType } from '@offsetcarbon/sdk-core';
import _ from 'lodash';

Expand Down
3 changes: 3 additions & 0 deletions src/routers/legacy-router/bases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export const BASES_TO_CHECK_TRADES_AGAINST = (
[ChainId.OPTIMISM_GOERLI]: [
WRAPPED_NATIVE_CURRENCY[ChainId.OPTIMISM_GOERLI]!,
],
[ChainId.OPTIMISM_SEPOLIA]: [
WRAPPED_NATIVE_CURRENCY[ChainId.OPTIMISM_SEPOLIA]!,
],
[ChainId.ARBITRUM_ONE]: [WRAPPED_NATIVE_CURRENCY[ChainId.ARBITRUM_ONE]!],
[ChainId.ARBITRUM_GOERLI]: [
WRAPPED_NATIVE_CURRENCY[ChainId.ARBITRUM_GOERLI]!,
Expand Down
4 changes: 2 additions & 2 deletions src/routers/legacy-router/legacy-router.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { BigNumber } from '@ethersproject/bignumber';
import { Logger } from '@ethersproject/logger';
import { SwapRouter, Trade } from '@uniswap/router-sdk';
import { SwapRouter, Trade } from '@offsetcarbon/router-sdk';
import { ChainId, Currency, Token, TradeType } from '@offsetcarbon/sdk-core';
import { FeeAmount, MethodParameters, Pool, Route } from '@uniswap/v3-sdk';
import { FeeAmount, MethodParameters, Pool, Route } from '@offsetcarbon/v3-sdk';
import _ from 'lodash';

import { IOnChainQuoteProvider, RouteWithQuotes } from '../../providers';
Expand Down
8 changes: 4 additions & 4 deletions src/routers/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ import {
MixedRouteSDK,
Protocol,
Trade,
} from '@uniswap/router-sdk';
} from '@offsetcarbon/router-sdk';
import {
Currency,
Fraction,
Percent,
Token,
TradeType,
} from '@offsetcarbon/sdk-core';
import { SwapOptions as UniversalRouterSwapOptions } from '@uniswap/universal-router-sdk';
import { Route as V2RouteRaw } from '@uniswap/v2-sdk';
import { SwapOptions as UniversalRouterSwapOptions } from '@offsetcarbon/universal-router-sdk';
import { Route as V2RouteRaw } from '@offsetcarbon/v2-sdk';
import {
Pool,
Position,
MethodParameters as SDKMethodParameters,
Route as V3RouteRaw,
} from '@uniswap/v3-sdk';
} from '@offsetcarbon/v3-sdk';

import { SimulationStatus } from '../providers';
import { CurrencyAmount } from '../util/amounts';
Expand Down
Loading

0 comments on commit f6ebd36

Please sign in to comment.