Uniswap / examples

120 stars 147 forks source link

Update examples for new v3-sdk version #61

Open Florian-S-A-W opened 9 months ago

Florian-S-A-W commented 9 months ago

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

socket-security[bot] commented 9 months ago

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[bot] commented 8 months ago

👍 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 commented 8 months ago

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

Florian-S-A-W commented 8 months ago

How does this bot not recognize 4.0.0 is newer than 3.3.0

mr-uniswap commented 8 months ago

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

feross commented 8 months ago

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?

Florian-S-A-W commented 8 months ago

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.

Florian-S-A-W commented 5 months ago

There are no changes to the lint that fails here.