You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to #6861 two biggest packages are Accounts and Eth. Discussed in today's team call:
in next major version for main web3 package size reduction:
Remove reexporting eth-accounts&wallet from main web3 package:
keep this as part of mono-repo & also on npm so it will be available for users to use, as most of time DApp users inject 3rd party wallet instead of web3-wallet functionality, and for common accounts functions these will be available in this package directly instead of reexported and using via\by main web3.
more good UX for using web3-wallet/accounts like when creating web3 instance users can explicitly set provider and wallet as two different objects , this should be documented
explore option of creating feature as well for allowing modification of accounts and wallet functions in web3 core via plugins ( like plugins can set providers and modify requests via middleware )
Removing reexporting following packages:
Eth-Personal, IBAN, NET, and see possibility of same for other non-frequently used packages that can contribute to size reduction.
Remove redundant code from web3-eth rpc functions , and define one function that takes rpc function ( string, params, validation schema, .etc ) and generate RPC function
The text was updated successfully, but these errors were encountered:
jdevcs
changed the title
web3 lib optimisations
web3 lib optimizations
Apr 16, 2024
common and tx adds 12.7% in lib so parts of these if not used should be removed and incase if it cannot be done then this functionality should be implemented in lib instead of as these were moved from ethjs/tx to web3.js. This will help to decrease around 12% size. If removing code that was moved from ethjs/tx is planned , use https://github.com/noble directly for signing in web3 lib.
According to #6861 two biggest packages are Accounts and Eth. Discussed in today's team call:
in next major version for main web3 package size reduction:
eth-accounts&wallet
from main web3 package:keep this as part of mono-repo & also on npm so it will be available for users to use, as most of time DApp users inject 3rd party wallet instead of web3-wallet functionality, and for common accounts functions these will be available in this package directly instead of reexported and using via\by main web3.
more good UX for using web3-wallet/accounts like when creating web3 instance users can explicitly set provider and wallet as two different objects , this should be documented
explore option of creating feature as well for allowing modification of accounts and wallet functions in web3 core via plugins ( like plugins can set providers and modify requests via middleware )
Removing reexporting following packages:
Eth-Personal, IBAN, NET, and see possibility of same for other non-frequently used packages that can contribute to size reduction.
Remove redundant code from web3-eth rpc functions , and define one function that takes rpc function ( string, params, validation schema, .etc ) and generate RPC function
The text was updated successfully, but these errors were encountered: