Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

[WIP] feat: SDK modernization, automated test cases, speed upgrades #178

Closed
wants to merge 13 commits into from

Conversation

koraykoska
Copy link

This PR is finalized but depends on Uniswap/sdk-core#69 being merged (we will need to update the dependency version in the package.json once the Core SDK has been published)

This is part of the sdk upgrade grant.

Updates

  • Removed tsdx (as it's not maintained anymore)
  • Added native BigInt support (with backwards compatibility for JSBI)
  • Used BigInt for calculations internally everywhere, 100xing the speed of simulations locally
  • Modernized the architecture and the code quality
  • Added an automated test case generator
  • Generated thousands of tests including lots of edge cases (on many different pools)
  • Bug fixes

Important backwards compatibility notes

(Similar to the Core SDK updates)

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 v3-sdk, but if they do they don't have to update any source code.

Florian-S-A-W and others added 13 commits May 8, 2023 16:57
chore: dependencies, testing framework and ci
* feat: bigint instead of jsbi

* feat: remove unused import

* fix: tests and calculation error in swap

* fix: sdk-core fork for now

* fix: npm package name

* fix: remove comment
* feat: bigint instead of jsbi

* feat: remove unused import

* fix: tests and calculation error in swap

* fix: sdk-core fork for now

* fix: npm package name

* feat: automated test runner and 4200 test cases on edge pools

* Fix code style issues with Prettier

* fix: comments from review

* fix: wording

---------

Co-authored-by: Lint Action <[email protected]>
@stale
Copy link

stale bot commented Oct 28, 2023

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.

@stale stale bot added the wontfix This will not be worked on label Oct 28, 2023
@koraykoska
Copy link
Author

Waiting for the core sdk to be merged.

@stale stale bot closed this Nov 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants