From a24b0b2d6116fef9a7796cb5e090e8d0f2c956b0 Mon Sep 17 00:00:00 2001 From: Zach Pomerantz Date: Mon, 28 Mar 2022 19:08:42 -0500 Subject: [PATCH] fix: retain ethers as dep for factories (#84) * fix: retain ethers as dep for factories * Fix code style issues with Prettier * chore: simplify ethers deps * chore: update lockfile Co-authored-by: Lint Action --- package-lock.json | 36 ++++++------------------------------ package.json | 6 +----- src/util/amounts.ts | 2 +- 3 files changed, 8 insertions(+), 36 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9a77b2837..70d6b437d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,13 +6,9 @@ "packages": { "": { "name": "@uniswap/smart-order-router", - "version": "2.5.22", + "version": "2.5.24", "license": "GPL", "dependencies": { - "@ethersproject/abi": "^5.4.0", - "@ethersproject/bignumber": "^5.4.0", - "@ethersproject/logger": "^5.4.0", - "@ethersproject/providers": "^5.4.0", "@types/async-retry": "^1.4.2", "@types/await-timeout": "^0.3.1", "@types/bunyan": "^1.8.6", @@ -31,6 +27,7 @@ "bunyan": "^1.8.15", "bunyan-blackhole": "^1.1.1", "bunyan-debug-stream": "^2.0.0", + "ethers": "^5.1.4", "graphql": "^15.5.0", "graphql-request": "^3.4.0", "lodash": "^4.17.21", @@ -58,7 +55,6 @@ "eslint-config-prettier": "^6.11.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.22.0", - "ethers": "^5.1.4", "jest": "^27.0.6", "jest-expect-message": "^1.0.2", "jest-mock": "^27.0.6", @@ -871,7 +867,6 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.6.0.tgz", "integrity": "sha512-74Ge7iqTDom0NX+mux8KbRUeJgu1eHZ3iv6utv++sLJG80FVuU9HnHeKVPfjd9s3woFhaFoQGf3B3iH/FrQmgw==", - "dev": true, "funding": [ { "type": "individual", @@ -924,7 +919,6 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.6.0.tgz", "integrity": "sha512-61g3Jp3nwDqJcL/p4nugSyLrpl/+ChXIOtCEM8UDmWeB3JCAt5FoLdOMXQc3WWkc0oM2C0aAn6GFqqMcS/mHTw==", - "dev": true, "funding": [ { "type": "individual", @@ -954,7 +948,6 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.6.0.tgz", "integrity": "sha512-fmh86jViB9r0ibWXTQipxpAGMiuxoqUf78oqJDlCAJXgnJF024hOOX7qVgqsjtbeoxmcLwpPsXNU0WEe/16qPQ==", - "dev": true, "funding": [ { "type": "individual", @@ -1037,7 +1030,6 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.6.0.tgz", "integrity": "sha512-Wu1AxTgJo3T3H6MIu/eejLFok9TYoSdgwRr5oGY1LTLfmGesDoSx05pemsbrPT2gG4cQME+baTSCp5sEo2erZQ==", - "dev": true, "funding": [ { "type": "individual", @@ -1261,7 +1253,6 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.6.0.tgz", "integrity": "sha512-tig9x0Qmh8qbo1w8/6tmtyrm/QQRviBh389EQ+d8fP4wDsBrJBf08oZfoiz1/uenKK9M78yAP4PoR7SsVoTjsw==", - "dev": true, "funding": [ { "type": "individual", @@ -1282,7 +1273,6 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.6.0.tgz", "integrity": "sha512-qMlSdOSTyp0MBeE+r7SUhr1jjDlC1zAXB8VD84hCnpijPQiSNbxr6GdiLXxpUs8UKzkDiNYYC5DRI3MZr+n+tg==", - "dev": true, "funding": [ { "type": "individual", @@ -1337,7 +1327,6 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.6.0.tgz", "integrity": "sha512-q0bxNBfIX3fUuAo9OmjlEYxP40IB8ABgb7HjEZCL5IKubzV3j30CWi2rqQbjTS2HfoyQbfINoKcTVWP4ejwR7Q==", - "dev": true, "funding": [ { "type": "individual", @@ -2744,8 +2733,7 @@ "node_modules/aes-js": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=", - "dev": true + "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" }, "node_modules/agent-base": { "version": "6.0.2", @@ -5330,7 +5318,6 @@ "version": "5.6.2", "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.6.2.tgz", "integrity": "sha512-EzGCbns24/Yluu7+ToWnMca3SXJ1Jk1BvWB7CCmVNxyOeM4LLvw2OLuIHhlkhQk1dtOcj9UMsdkxUh8RiG1dxQ==", - "dev": true, "funding": [ { "type": "individual", @@ -9885,8 +9872,7 @@ "node_modules/scrypt-js": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", - "dev": true + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" }, "node_modules/semver": { "version": "7.3.5", @@ -11929,7 +11915,6 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.6.0.tgz", "integrity": "sha512-74Ge7iqTDom0NX+mux8KbRUeJgu1eHZ3iv6utv++sLJG80FVuU9HnHeKVPfjd9s3woFhaFoQGf3B3iH/FrQmgw==", - "dev": true, "requires": { "@ethersproject/abi": "^5.6.0", "@ethersproject/abstract-provider": "^5.6.0", @@ -11962,7 +11947,6 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.6.0.tgz", "integrity": "sha512-61g3Jp3nwDqJcL/p4nugSyLrpl/+ChXIOtCEM8UDmWeB3JCAt5FoLdOMXQc3WWkc0oM2C0aAn6GFqqMcS/mHTw==", - "dev": true, "requires": { "@ethersproject/abstract-signer": "^5.6.0", "@ethersproject/basex": "^5.6.0", @@ -11982,7 +11966,6 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.6.0.tgz", "integrity": "sha512-fmh86jViB9r0ibWXTQipxpAGMiuxoqUf78oqJDlCAJXgnJF024hOOX7qVgqsjtbeoxmcLwpPsXNU0WEe/16qPQ==", - "dev": true, "requires": { "@ethersproject/abstract-signer": "^5.6.0", "@ethersproject/address": "^5.6.0", @@ -12025,7 +12008,6 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.6.0.tgz", "integrity": "sha512-Wu1AxTgJo3T3H6MIu/eejLFok9TYoSdgwRr5oGY1LTLfmGesDoSx05pemsbrPT2gG4cQME+baTSCp5sEo2erZQ==", - "dev": true, "requires": { "@ethersproject/bytes": "^5.6.0", "@ethersproject/sha2": "^5.6.0" @@ -12149,7 +12131,6 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.6.0.tgz", "integrity": "sha512-tig9x0Qmh8qbo1w8/6tmtyrm/QQRviBh389EQ+d8fP4wDsBrJBf08oZfoiz1/uenKK9M78yAP4PoR7SsVoTjsw==", - "dev": true, "requires": { "@ethersproject/bignumber": "^5.6.0", "@ethersproject/constants": "^5.6.0", @@ -12160,7 +12141,6 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.6.0.tgz", "integrity": "sha512-qMlSdOSTyp0MBeE+r7SUhr1jjDlC1zAXB8VD84hCnpijPQiSNbxr6GdiLXxpUs8UKzkDiNYYC5DRI3MZr+n+tg==", - "dev": true, "requires": { "@ethersproject/abstract-provider": "^5.6.0", "@ethersproject/abstract-signer": "^5.6.0", @@ -12195,7 +12175,6 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.6.0.tgz", "integrity": "sha512-q0bxNBfIX3fUuAo9OmjlEYxP40IB8ABgb7HjEZCL5IKubzV3j30CWi2rqQbjTS2HfoyQbfINoKcTVWP4ejwR7Q==", - "dev": true, "requires": { "@ethersproject/bytes": "^5.6.0", "@ethersproject/hash": "^5.6.0", @@ -13385,8 +13364,7 @@ "aes-js": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=", - "dev": true + "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" }, "agent-base": { "version": "6.0.2", @@ -15463,7 +15441,6 @@ "version": "5.6.2", "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.6.2.tgz", "integrity": "sha512-EzGCbns24/Yluu7+ToWnMca3SXJ1Jk1BvWB7CCmVNxyOeM4LLvw2OLuIHhlkhQk1dtOcj9UMsdkxUh8RiG1dxQ==", - "dev": true, "requires": { "@ethersproject/abi": "5.6.0", "@ethersproject/abstract-provider": "5.6.0", @@ -19102,8 +19079,7 @@ "scrypt-js": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", - "dev": true + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" }, "semver": { "version": "7.3.5", diff --git a/package.json b/package.json index 2b6c87b2c..56262f675 100644 --- a/package.json +++ b/package.json @@ -31,10 +31,6 @@ "node": ">=10" }, "dependencies": { - "@ethersproject/abi": "^5.4.0", - "@ethersproject/bignumber": "^5.4.0", - "@ethersproject/logger": "^5.4.0", - "@ethersproject/providers": "^5.4.0", "@types/async-retry": "^1.4.2", "@types/await-timeout": "^0.3.1", "@types/bunyan": "^1.8.6", @@ -53,6 +49,7 @@ "bunyan": "^1.8.15", "bunyan-blackhole": "^1.1.1", "bunyan-debug-stream": "^2.0.0", + "ethers": "^5.1.4", "graphql": "^15.5.0", "graphql-request": "^3.4.0", "lodash": "^4.17.21", @@ -80,7 +77,6 @@ "eslint-config-prettier": "^6.11.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.22.0", - "ethers": "^5.1.4", "jest": "^27.0.6", "jest-expect-message": "^1.0.2", "jest-mock": "^27.0.6", diff --git a/src/util/amounts.ts b/src/util/amounts.ts index ac169c6f2..4980d1a08 100644 --- a/src/util/amounts.ts +++ b/src/util/amounts.ts @@ -1,9 +1,9 @@ +import { parseUnits } from '@ethersproject/units'; import { Currency, CurrencyAmount as CurrencyAmountRaw, } from '@uniswap/sdk-core'; import { FeeAmount } from '@uniswap/v3-sdk'; -import { parseUnits } from 'ethers/lib/utils'; import JSBI from 'jsbi'; export class CurrencyAmount extends CurrencyAmountRaw {}