Skip to content

Conversation

@Florian-S-A-W
Copy link

Update all examples to use the new v3-sdk version published by the Uniswap foundation.
Delete multicall example.

Florian-S-A-W and others added 30 commits June 4, 2023 12:31
Remove unused functions and constants in range-order, update readme.
Return actual target price of range order instead of user defined price from which order is created
Add get pool data via multicall code example
Remove unused Wallet, rename multicall provider
Switch quoting example to quoteExactInput function
@socket-security
Copy link

socket-security bot commented Dec 27, 2023

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@babel/code-frame@7.23.4 None 0 23.3 kB nicolo-ribaudo
npm/@babel/compat-data@7.23.3 None 0 64.6 kB nicolo-ribaudo
npm/@babel/core@7.23.3 environment, filesystem, unsafe +20 11.8 MB nicolo-ribaudo
npm/@babel/core@7.23.6 environment, filesystem, unsafe +9 10.8 MB nicolo-ribaudo
npm/@babel/generator@7.23.4 Transitive: environment +5 3.25 MB nicolo-ribaudo
npm/@babel/helper-compilation-targets@7.22.15 Transitive: environment, filesystem +8 4.61 MB nicolo-ribaudo
npm/@babel/helper-create-class-features-plugin@7.22.15 Transitive: environment, filesystem, unsafe +26 12.1 MB nicolo-ribaudo
npm/@babel/helper-create-class-features-plugin@7.23.6 Transitive: environment, filesystem, unsafe +10 11 MB nicolo-ribaudo
npm/@babel/parser@7.23.4 None 0 1.89 MB nicolo-ribaudo
npm/@babel/parser@7.23.6 None 0 1.89 MB nicolo-ribaudo
npm/@babel/preset-env@7.23.3 environment Transitive: filesystem, unsafe +102 15.3 MB nicolo-ribaudo
npm/@babel/preset-env@7.23.6 environment Transitive: filesystem, unsafe +18 12.6 MB nicolo-ribaudo
npm/@babel/runtime@7.23.4 None +1 275 kB nicolo-ribaudo
npm/@babel/runtime@7.23.6 None 0 246 kB nicolo-ribaudo
npm/@babel/template@7.22.15 Transitive: environment +5 8.69 MB nicolo-ribaudo
npm/@babel/traverse@7.23.4 Transitive: environment +9 5.84 MB nicolo-ribaudo
npm/@babel/traverse@7.23.6 Transitive: environment +2 4.91 MB nicolo-ribaudo
npm/@babel/types@7.23.4 environment 0 2.41 MB nicolo-ribaudo
npm/@babel/types@7.23.6 environment 0 2.41 MB nicolo-ribaudo
npm/@jridgewell/trace-mapping@0.3.20 None +2 265 kB jridgewell
npm/@types/babel__traverse@7.20.4 Transitive: environment +2 4.91 MB types
npm/@types/eslint@8.44.7 None +2 236 kB types
npm/@types/eslint@8.44.9 None 0 185 kB types
npm/@types/eslint@8.56.0 None 0 185 kB types
npm/@types/express-serve-static-core@4.17.41 None +7 10.6 MB types
npm/@types/node@16.18.63 None 0 3.51 MB types
npm/@types/node@16.18.65 None 0 3.51 MB types
npm/@types/node@16.18.68 None 0 3.51 MB types
npm/@types/react-dom@18.2.16 None +4 1.63 MB types
npm/@types/react-dom@18.2.17 None 0 33.1 kB types
npm/@types/react@18.2.38 None +3 1.59 MB types
npm/@types/react@18.2.45 None 0 365 kB types
npm/@uniswap/smart-order-router@3.19.0 environment, network Transitive: filesystem, shell +50 24.2 MB jsy1218
npm/@uniswap/universal-router@1.5.1 None +3 6.41 MB emag3m
npm/@uniswapfoundation/sdk-core@5.0.1 None 0 83.2 kB koraykoska
npm/@uniswapfoundation/v3-sdk@4.0.3 None +1 499 kB
npm/acorn@8.11.2 None 0 531 kB marijn
npm/browserslist@4.22.1 environment, filesystem +5 4.49 MB ai
npm/browserslist@4.22.2 environment, filesystem +4 4.48 MB ai
npm/caniuse-lite@1.0.30001563 None 0 1.93 MB caniuse-lite
npm/caniuse-lite@1.0.30001564 None 0 1.94 MB caniuse-lite
npm/caniuse-lite@1.0.30001570 None 0 1.94 MB caniuse-lite
npm/caniuse-lite@1.0.30001571 None 0 1.94 MB caniuse-lite
npm/core-js-compat@3.33.3 Transitive: environment, filesystem +6 5.17 MB zloirock
npm/core-js-compat@3.34.0 Transitive: environment, filesystem +5 5.17 MB zloirock
npm/eslint@8.54.0 environment, filesystem Transitive: unsafe +23 7.58 MB eslintbot
npm/eslint@8.55.0 environment, filesystem +1 3.05 MB eslintbot
npm/follow-redirects@1.15.3 network 0 28.6 kB rubenverborgh
npm/postcss-selector-parser@6.0.14 None 0 186 kB evilebottnawi
npm/postcss@8.4.31 environment, filesystem +1 221 kB ai
npm/postcss@8.4.32 environment, filesystem 0 197 kB ai
npm/safe-array-concat@1.0.1 Transitive: eval +8 173 kB ljharb
npm/terser@5.24.0 environment, eval +6 3.23 MB fabiosantoscode
npm/terser@5.26.0 environment, eval 0 2.12 MB fabiosantoscode
npm/undici-types@5.26.5 None 0 73.1 kB ethan_arrowood

🚮 Removed packages: npm/@babel/compat-data@7.20.10, npm/@babel/core@7.20.7, npm/@babel/generator@7.20.7, npm/@babel/helper-compilation-targets@7.20.7, npm/@babel/helper-create-class-features-plugin@7.20.7, npm/@babel/helper-module-transforms@7.20.11, npm/@babel/helper-replace-supers@7.20.7, npm/@babel/parser@7.20.7, npm/@babel/plugin-proposal-optional-chaining@7.20.7, npm/@babel/plugin-transform-parameters@7.20.7, npm/@babel/template@7.20.7, npm/@babel/traverse@7.20.10, npm/@babel/types@7.20.7, npm/@types/express-serve-static-core@4.17.32, npm/@types/express@4.17.15, npm/@types/node@16.18.11, npm/@typescript-eslint/eslint-plugin@5.48.0, npm/@typescript-eslint/parser@5.48.0, npm/@typescript-eslint/utils@5.48.0, npm/@uniswap/sdk-core@3.2.6, npm/@uniswap/smart-order-router@3.20.2, npm/@uniswap/v3-sdk@3.10.2, npm/caniuse-lite@1.0.30001441, npm/core-js-pure@3.27.1, npm/es-abstract@1.20.5, npm/eslint-config-prettier@8.6.0, npm/eslint@8.31.0, npm/postcss@8.4.20, npm/ts-node@10.9.2

View full report↗︎

@socket-security
Copy link

socket-security bot commented Jan 25, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/@uniswap/v2-sdk@4.0.0

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

@Florian-S-A-W
Copy link
Author

@SocketSecurity ignore npm/@uniswap/v2-sdk@4.0.0

@Florian-S-A-W
Copy link
Author

How does this bot not recognize 4.0.0 is newer than 3.3.0

@hodl4fun
Copy link

@Florian-S-A-W Sorry about this, I'll look into why Socket is not recognizing version 4. Feel free to merge anyway.

"@types/react-dom": "^18.0.0",
"@uniswap/sdk-core": "^3.1.0",
"@uniswap/v3-sdk": "^3.9.0",
"@uniswap/sdk-core": "npm:@uniswapfoundation/sdk-core@^5.0.0",
Copy link

@hodl4fun hodl4fun Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: this appears to be where the issue is

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: This is not the issue

@feross
Copy link

feross commented Jan 25, 2024

I know this message doesn't make much sense, but the package @uniswap/v2-sdk@v4.0.0 actually has been deprecated by the maintainer with the message "Use >3.3.0". You can see the same information displayed on the official npm package page: https://www.npmjs.com/package/@uniswap/v2-sdk/v/4.0.0

Is it possible to bump the package to @uniswap/v2-sdk@4.0.1 which is not deprecated?

version "3.0.1"
resolved "https://registry.yarnpkg.com/@uniswap/v2-sdk/-/v2-sdk-3.0.1.tgz#690c484104c1debd1db56a236e5497def53d698b"
integrity sha512-eSpm2gjo2CZh9FACH5fq42str/oSNyWcDxB27o5k44bEew4sxb+pld4gGIf/byJndLBvArR9PtH8c0n/goNOTw==
"@uniswap/v2-sdk@npm:@uniswapfoundation/v2-sdk@^4.0.0":

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the line that is causing the GitHub bot to get confused. It should be loading @uniswapfoundation/v2-sdk not @uniswap/v2-sdk.

Sorry about this mistake.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mikolalysenko. This should be the undeprecated package https://www.npmjs.com/package/@uniswapfoundation/v2-sdk

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update this package to a newer version.

@Florian-S-A-W
Copy link
Author

The latest commit fixes this issue @mr-uniswap
@feross SocketSecurity doesn't seem to recognize package aliases - we use @uniswapfoundation/v2-sdk here as the package source for @uniswap/v2-sdk.

Copy link

@HossaWii HossaWii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/lint-v3-sdk-collecting-fees.yaml

@Florian-S-A-W
Copy link
Author

There are no changes to the lint that fails here.


export const WETH_TOKEN = new Token(
SupportedChainId.MAINNET,
SUPPORTED_CHAINS[0],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you consider importing ChainId instead? Then you can do ChainId.MAINNET on line 13 and 21

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that would make more sense here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants