-
Notifications
You must be signed in to change notification settings - Fork 358
feat: native bigint support, modernization of sdk #69
base: main
Are you sure you want to change the base?
Conversation
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bigint changes look good to me. can we do the tests reorganization in a separate PR ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thank you!, but because it's a foundational repo I think we should be careful with big changes. Can you justify changing from esm to cjs? I'm worried that this change may break downstream users, especially because the compilation and distribution are changed in this PR.
Also, because it's a foundational repo, Is there any way you could break this up into discrete PRs for each functional change (or any reason that you can't): esm->cjs, add jest, native bigint support?
Co-authored-by: Zach Pomerantz <[email protected]>
If you have reasons to switch to es modules only and are ok with support for older JS projects being dropped I can go ahead. |
could you remove the depdnency on @ethersproject/address |
I'll look into it, it's only used once in the project I think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but I don't have experience working with BigInt's to comment on the actual changes. I had a look from the infrastructure and packaging perspective, since this is what I am working on on a daily basis.
@koraykoska, any ETA on this? |
@krzkaczor Waiting for the final reviews. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
@just-toby Please re-run the linter workflow. I had to enable push permissions for github actions |
@zzmp @JFrankfurt Can someone please re-run the linter workflow please? |
@just-toby @zzmp @JFrankfurt Please fix the permission issue with the linter and re-run it :) |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Yes this is still relevant. This can be merged after rerunning the actions. |
How hard is it for them to run the actions? Lol. |
Yes this is still relevant |
Please don't let this go over more than 1 year |
This is part of the sdk upgrade grant.
Updates
BigInt
is orders of magnitude faster than JSBI and more concise, easier to read and code)Important backwards compatibility notes
The updates in this PR are fully source-code compatible and non-breaking. But explicit < es2020 projects will not be able to compile it.
So, if people use a modern setup, they won't have to change anything in their existing code but can start using native BigInt (and even if not will feel a performance difference).
Because of the above, I propose making a major version bump anyways. That way, users will need to explicitly opt-in to the new core-sdk, but if they do they don't have to update any source code.
BigInt reduces verbosity-based bugs and helps code to be concise and easier to read. So people will be able to read through the source code going forward more easily and possibly make better contributions because of that.