diff --git a/package-lock.json b/package-lock.json index a95fb75..923aa2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,18 @@ { "name": "@orionprotocol/sdk", - "version": "0.18.23", + "version": "0.18.24", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@orionprotocol/sdk", - "version": "0.18.23", + "version": "0.18.24", "license": "ISC", "dependencies": { "@babel/runtime": "^7.21.0", "@ethersproject/abstract-signer": "^5.7.0", "@ethersproject/providers": "^5.7.2", - "@orionprotocol/contracts": "0.11.0", + "@orionprotocol/contracts": "1.0.2", "bignumber.js": "^9.1.1", "bson-objectid": "^2.0.4", "buffer": "^6.0.3", @@ -2326,9 +2326,9 @@ } }, "node_modules/@orionprotocol/contracts": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@orionprotocol/contracts/-/contracts-0.11.0.tgz", - "integrity": "sha512-8SnSvD3/+NIH6VEgxMGQuOHCclEG8qpraaFL5Lzx5hb4LBdk0q64FLg1FhAoaHHI+oaTbdsAOcPJZoQtNXf6YQ==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@orionprotocol/contracts/-/contracts-1.0.2.tgz", + "integrity": "sha512-mEf7eh6Udu72xkEX6kvKYM57ckD+G0+J1O0GoB5L6mfobygLfuQkriJr1MTdAsUjfZ2gNfJiMRrIf8HLW5+R/A==" }, "node_modules/@sinclair/typebox": { "version": "0.25.23", @@ -12361,9 +12361,9 @@ } }, "@orionprotocol/contracts": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@orionprotocol/contracts/-/contracts-0.11.0.tgz", - "integrity": "sha512-8SnSvD3/+NIH6VEgxMGQuOHCclEG8qpraaFL5Lzx5hb4LBdk0q64FLg1FhAoaHHI+oaTbdsAOcPJZoQtNXf6YQ==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@orionprotocol/contracts/-/contracts-1.0.2.tgz", + "integrity": "sha512-mEf7eh6Udu72xkEX6kvKYM57ckD+G0+J1O0GoB5L6mfobygLfuQkriJr1MTdAsUjfZ2gNfJiMRrIf8HLW5+R/A==" }, "@sinclair/typebox": { "version": "0.25.23", diff --git a/package.json b/package.json index ae5caee..fb74e2f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@orionprotocol/sdk", - "version": "0.18.24", + "version": "0.18.25", "description": "Orion Protocol SDK", "main": "./lib/index.cjs", "module": "./lib/index.js", @@ -82,7 +82,7 @@ "@babel/runtime": "^7.21.0", "@ethersproject/abstract-signer": "^5.7.0", "@ethersproject/providers": "^5.7.2", - "@orionprotocol/contracts": "0.11.0", + "@orionprotocol/contracts": "1.0.2", "bignumber.js": "^9.1.1", "bson-objectid": "^2.0.4", "buffer": "^6.0.3", diff --git a/src/BalanceGuard.ts b/src/BalanceGuard.ts index 1f39ec3..6b559ca 100644 --- a/src/BalanceGuard.ts +++ b/src/BalanceGuard.ts @@ -1,7 +1,7 @@ import { BigNumber } from 'bignumber.js'; import { ethers } from 'ethers'; import clone from 'just-clone'; -import { ERC20__factory } from '@orionprotocol/contracts'; +import { ERC20__factory } from '@orionprotocol/contracts/lib/ethers-v5'; import { APPROVE_ERC20_GAS_LIMIT, NATIVE_CURRENCY_PRECISION } from './constants/index.js'; import type { AggregatedBalanceRequirement, ApproveFix, Asset, BalanceIssue, BalanceRequirement, Source, diff --git a/src/Orion/bridge/swap.ts b/src/Orion/bridge/swap.ts index 5a60053..d91d75e 100644 --- a/src/Orion/bridge/swap.ts +++ b/src/Orion/bridge/swap.ts @@ -1,6 +1,6 @@ import { BigNumber } from 'bignumber.js'; import { ethers } from 'ethers'; -import { Exchange__factory } from '@orionprotocol/contracts'; +import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v5'; import getBalances from '../../utils/getBalances.js'; import BalanceGuard from '../../BalanceGuard.js'; import getAvailableSources from '../../utils/getAvailableFundsSources.js'; diff --git a/src/OrionUnit/Exchange/deposit.ts b/src/OrionUnit/Exchange/deposit.ts index b73b286..7c575b2 100644 --- a/src/OrionUnit/Exchange/deposit.ts +++ b/src/OrionUnit/Exchange/deposit.ts @@ -1,6 +1,6 @@ import { BigNumber } from 'bignumber.js'; import { ethers } from 'ethers'; -import { Exchange__factory } from '@orionprotocol/contracts'; +import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v5'; import getBalances from '../../utils/getBalances.js'; import BalanceGuard from '../../BalanceGuard.js'; import type OrionUnit from '../index.js'; diff --git a/src/OrionUnit/Exchange/swapLimit.ts b/src/OrionUnit/Exchange/swapLimit.ts index 04eb287..6c830b5 100644 --- a/src/OrionUnit/Exchange/swapLimit.ts +++ b/src/OrionUnit/Exchange/swapLimit.ts @@ -1,6 +1,6 @@ import { BigNumber } from 'bignumber.js'; import { ethers } from 'ethers'; -import { Exchange__factory } from '@orionprotocol/contracts'; +import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v5'; import getBalances from '../../utils/getBalances.js'; import BalanceGuard from '../../BalanceGuard.js'; import getAvailableSources from '../../utils/getAvailableFundsSources.js'; diff --git a/src/OrionUnit/Exchange/swapMarket.ts b/src/OrionUnit/Exchange/swapMarket.ts index 0f83ef8..5a46f0a 100644 --- a/src/OrionUnit/Exchange/swapMarket.ts +++ b/src/OrionUnit/Exchange/swapMarket.ts @@ -1,6 +1,6 @@ import { BigNumber } from 'bignumber.js'; import { ethers } from 'ethers'; -import { Exchange__factory } from '@orionprotocol/contracts'; +import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v5'; import getBalances from '../../utils/getBalances.js'; import BalanceGuard from '../../BalanceGuard.js'; import getAvailableSources from '../../utils/getAvailableFundsSources.js'; diff --git a/src/OrionUnit/Exchange/withdraw.ts b/src/OrionUnit/Exchange/withdraw.ts index a0dff66..ce8af4f 100644 --- a/src/OrionUnit/Exchange/withdraw.ts +++ b/src/OrionUnit/Exchange/withdraw.ts @@ -1,6 +1,6 @@ import { BigNumber } from 'bignumber.js'; import { ethers } from 'ethers'; -import { Exchange__factory } from '@orionprotocol/contracts'; +import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v5'; import getBalances from '../../utils/getBalances.js'; import BalanceGuard from '../../BalanceGuard.js'; import type OrionUnit from '../index.js'; diff --git a/src/OrionUnit/FarmingManager/index.ts b/src/OrionUnit/FarmingManager/index.ts index 552dc4a..a6d72ef 100644 --- a/src/OrionUnit/FarmingManager/index.ts +++ b/src/OrionUnit/FarmingManager/index.ts @@ -1,4 +1,4 @@ -import { Exchange__factory, IUniswapV2Pair__factory, IUniswapV2Router__factory } from '@orionprotocol/contracts'; +import { Exchange__factory, IUniswapV2Pair__factory, IUniswapV2Router__factory } from '@orionprotocol/contracts/lib/ethers-v5'; import { BigNumber } from 'bignumber.js'; import { ethers } from 'ethers'; import { simpleFetch } from 'simple-typed-fetch'; diff --git a/src/utils/checkIsToken.ts b/src/utils/checkIsToken.ts index dca4156..0995713 100644 --- a/src/utils/checkIsToken.ts +++ b/src/utils/checkIsToken.ts @@ -1,4 +1,4 @@ -import { ERC20__factory } from '@orionprotocol/contracts'; +import { ERC20__factory } from '@orionprotocol/contracts/lib/ethers-v5'; import { ethers } from 'ethers'; import invariant from 'tiny-invariant'; diff --git a/src/utils/getBalance.ts b/src/utils/getBalance.ts index da29706..2c93732 100644 --- a/src/utils/getBalance.ts +++ b/src/utils/getBalance.ts @@ -1,5 +1,5 @@ -import { ERC20__factory, type Exchange } from '@orionprotocol/contracts'; - +import type { Exchange } from '@orionprotocol/contracts/lib/ethers-v5'; +import { ERC20__factory } from '@orionprotocol/contracts/lib/ethers-v5' import type { BigNumber } from 'bignumber.js'; import { ethers } from 'ethers'; import { INTERNAL_ORION_PRECISION, NATIVE_CURRENCY_PRECISION } from '../constants/index.js'; diff --git a/src/utils/getBalances.ts b/src/utils/getBalances.ts index 732754a..9e3da5e 100644 --- a/src/utils/getBalances.ts +++ b/src/utils/getBalances.ts @@ -1,4 +1,4 @@ -import type { Exchange } from '@orionprotocol/contracts'; +import type { Exchange } from '@orionprotocol/contracts/lib/ethers-v5'; import type { BigNumber } from 'bignumber.js'; import type { ethers } from 'ethers'; import type { OrionAggregator } from '../services/OrionAggregator/index.js'; diff --git a/src/utils/parseExchangeTradeTransaction.ts b/src/utils/parseExchangeTradeTransaction.ts index fdd6255..fad93fb 100644 --- a/src/utils/parseExchangeTradeTransaction.ts +++ b/src/utils/parseExchangeTradeTransaction.ts @@ -1,4 +1,4 @@ -import { Exchange__factory } from '@orionprotocol/contracts'; +import { Exchange__factory } from '@orionprotocol/contracts/lib/ethers-v5'; import { ethers } from 'ethers'; import { z } from 'zod';