Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update examples for new v3-sdk version #61

Open
wants to merge 82 commits into
base: main
Choose a base branch
from

Conversation

Florian-S-A-W
Copy link
Contributor

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
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/[email protected] None 0 23.3 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 64.6 kB nicolo-ribaudo
npm/@babel/[email protected] environment, filesystem, unsafe +20 11.8 MB nicolo-ribaudo
npm/@babel/[email protected] environment, filesystem, unsafe +9 10.8 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment +5 3.25 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment, filesystem +8 4.61 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment, filesystem, unsafe +26 12.1 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment, filesystem, unsafe +10 11 MB nicolo-ribaudo
npm/@babel/[email protected] None 0 1.89 MB nicolo-ribaudo
npm/@babel/[email protected] None 0 1.89 MB nicolo-ribaudo
npm/@babel/[email protected] environment Transitive: filesystem, unsafe +102 15.3 MB nicolo-ribaudo
npm/@babel/[email protected] environment Transitive: filesystem, unsafe +18 12.6 MB nicolo-ribaudo
npm/@babel/[email protected] None +1 275 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 246 kB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment +5 8.69 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment +9 5.84 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment +2 4.91 MB nicolo-ribaudo
npm/@babel/[email protected] environment 0 2.41 MB nicolo-ribaudo
npm/@babel/[email protected] environment 0 2.41 MB nicolo-ribaudo
npm/@jridgewell/[email protected] None +2 265 kB jridgewell
npm/@types/[email protected] Transitive: environment +2 4.91 MB types
npm/@types/[email protected] None +2 236 kB types
npm/@types/[email protected] None 0 185 kB types
npm/@types/[email protected] None 0 185 kB types
npm/@types/[email protected] None +7 10.6 MB types
npm/@types/[email protected] None 0 3.51 MB types
npm/@types/[email protected] None 0 3.51 MB types
npm/@types/[email protected] None 0 3.51 MB types
npm/@types/[email protected] None +4 1.63 MB types
npm/@types/[email protected] None 0 33.1 kB types
npm/@types/[email protected] None +3 1.59 MB types
npm/@types/[email protected] None 0 365 kB types
npm/@uniswap/[email protected] environment, network Transitive: filesystem, shell +50 24.2 MB jsy1218
npm/@uniswap/[email protected] None +3 6.41 MB emag3m
npm/@uniswapfoundation/[email protected] None 0 83.2 kB koraykoska
npm/@uniswapfoundation/[email protected] None +1 499 kB
npm/[email protected] None 0 531 kB marijn
npm/[email protected] environment, filesystem +5 4.49 MB ai
npm/[email protected] environment, filesystem +4 4.48 MB ai
npm/[email protected] None 0 1.93 MB caniuse-lite
npm/[email protected] None 0 1.94 MB caniuse-lite
npm/[email protected] None 0 1.94 MB caniuse-lite
npm/[email protected] None 0 1.94 MB caniuse-lite
npm/[email protected] Transitive: environment, filesystem +6 5.17 MB zloirock
npm/[email protected] Transitive: environment, filesystem +5 5.17 MB zloirock
npm/[email protected] environment, filesystem Transitive: unsafe +23 7.58 MB eslintbot
npm/[email protected] environment, filesystem +1 3.05 MB eslintbot
npm/[email protected] network 0 28.6 kB rubenverborgh
npm/[email protected] None 0 186 kB evilebottnawi
npm/[email protected] environment, filesystem +1 221 kB ai
npm/[email protected] environment, filesystem 0 197 kB ai
npm/[email protected] Transitive: eval +8 173 kB ljharb
npm/[email protected] environment, eval +6 3.23 MB fabiosantoscode
npm/[email protected] environment, eval 0 2.12 MB fabiosantoscode
npm/[email protected] None 0 73.1 kB ethan_arrowood

🚮 Removed packages: npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@typescript-eslint/[email protected], npm/@typescript-eslint/[email protected], npm/@typescript-eslint/[email protected], npm/@uniswap/[email protected], npm/@uniswap/[email protected], npm/@uniswap/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

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/[email protected]

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/[email protected] or ignore all packages with @SocketSecurity ignore-all

@Florian-S-A-W
Copy link
Contributor Author

@SocketSecurity ignore npm/@uniswap/[email protected]

@Florian-S-A-W
Copy link
Contributor Author

How does this bot not recognize 4.0.0 is newer than 3.3.0

@mr-uniswap
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.

@@ -6,8 +6,8 @@
"@types/node": "^16.7.13",
"@types/react": "^18.0.0",
"@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

@mr-uniswap mr-uniswap 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/[email protected] 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/[email protected] 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
Contributor 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
Contributor 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
Contributor Author

There are no changes to the lint that fails here.


// Currencies and Tokens

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
Contributor 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