blocknative / web3-onboard

Client library to onboard users to web3 apps
https://onboard.blocknative.com/
MIT License
817 stars 479 forks source link

Enhancement - Add viem support and remove ethers (NOT hw-wallets) #2190

Closed Adamj1232 closed 2 months ago

Adamj1232 commented 2 months ago

Description

This PR removes Ethers and Bignumber.js from Core, common and injected and implements Viem support to handle balance checking and ENS details fetching. This resulted in reducing the bundle size of the core module from 861 kB -> 459.8 kB when minified! Bundlephobia for latest core & viem core

The packages are tagged with a -viem.x tag for release and testing in build envs.

So far common, core and injected have successfully published and I will test with them. There after I will incrementally add other packages to test with.

Any feedback would be very helpful

This will remain in draft until all packages have been tested and are ready for an alpha release

socket-security[bot] commented 2 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.

View full report↗︎

socket-security[bot] commented 2 months ago

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

Package New capabilities Transitives Size Publisher
npm/@lit/reactive-element@1.6.1 None +1 800 kB lit-robot
npm/browserify-aes@1.2.0 None +1 34.6 kB cwmma
npm/browserify-rsa@4.1.0 None 0 3.68 kB cwmma
npm/call-bind@1.0.7 None +3 77.7 kB ljharb
npm/cipher-base@1.0.4 None 0 7.95 kB cwmma
npm/create-hash@1.2.0 None +1 12.9 kB cwmma
npm/create-hmac@1.1.7 None 0 5.81 kB cwmma
npm/define-data-property@1.1.4 None +3 62.7 kB ljharb
npm/define-properties@1.2.1 None 0 12.9 kB ljharb
npm/evp_bytestokey@1.0.3 None +1 12.8 kB dcousens
npm/fast-glob@3.2.12 filesystem 0 91.9 kB mrmlnc
npm/get-intrinsic@1.2.4 eval +4 106 kB ljharb
npm/has-property-descriptors@1.0.2 None +1 22.7 kB ljharb
npm/has-tostringtag@1.0.2 None 0 17.6 kB ljharb
npm/hash-base@3.0.4 None 0 6.03 kB dcousens
npm/minimist@1.2.6 None 0 33.2 kB substack

đźš® Removed packages: npm/@babel/core@7.23.2, npm/@babel/helper-environment-visitor@7.22.20, npm/@babel/helper-function-name@7.23.0, npm/@babel/parser@7.23.0, npm/@babel/plugin-syntax-jsx@7.22.5, npm/@babel/types@7.23.0, npm/@jridgewell/gen-mapping@0.3.3, npm/@jridgewell/trace-mapping@0.3.19, npm/@solid-primitives/event-listener@2.3.0, npm/@solid-primitives/rootless@1.4.2, npm/@solid-primitives/utils@6.2.1, npm/bignumber.js@9.1.2, npm/prettier-plugin-svelte@2.9.0, npm/prettier@2.8.3, npm/rollup-plugin-polyfill-node@0.12.0, npm/solid-devtools@0.27.7, npm/solid-js@1.8.1, npm/stream-browserify@3.0.0, npm/svelte-check@3.0.3, npm/svelte-preprocess@5.0.1, npm/svelte@3.55.1, npm/tslib@2.5.0, npm/tsup-preset-solid@2.1.0, npm/tsup@7.2.0, npm/typescript@4.9.5, npm/typescript@5.2.2, npm/vite@4.5.3

View full report↗︎

Adamj1232 commented 2 months ago

Closing as this will go out with wagmi support