-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Decrease SDK size / introduce submodules #9235
Comments
The SDK is extremely large! This is a huge issue for those who are cognizant about bundle size. Most of the SDK size comes from contract artifacts that are consumed by the SDK in a way such that treeshaking cannot occur. It's not because the sdk itself is very large, it's mostly just one single file. So breaking it up into modules actually won't fix the issue unless the underlying contracts artifacts issue is also fixed. And even then treeshaking for ethers v5 and our class based sdk makes it better but still not great. For context we created op-viem to address this issue. Op-viem has all the functionality of the SDK in it at a much smaller bundle size hit that gets even better if you only use some of op-viem both viem and op-viem are tree shakable. Depending on your use case you might not even need op-viem because viem supports the op stack natively We have no plans to update the |
Thanks for the issue and if you either
Just let me know and I'm happy to help :) |
Hello OP team
Is your feature request related to a problem? Please describe.
I found that the SDK size is beyond expected. However, only fraction of the components can be used for the everyday "userspace" tasks.
Describe the solution you'd like
It'd be great to introduce modules so user can choose what functionality needed. For some use cases it'd be just a gas price computation, for other - full blown testing dependencies with FaultDisputeGame.
Describe alternatives you've considered
When building the prod image one of the options is prune test-related contracts using plain
rm -rf
, releasing about 80Mb of disk space but it's a band-aid solution.Current version
3.1.8
Steps to reproduce
(in the new folder, no deps installed)
The text was updated successfully, but these errors were encountered: