Skip to content

Conversation

@it4rb
Copy link

@it4rb it4rb commented Jan 19, 2024

This PR rename the package from github.com/daoleno/uniswapv3-sdk to github.com/KyberNetwork/uniswapv3-sdk-uint256, the reason is that we still want to use both version in dex-lib, after this get merged we can replace them later. All the changes for this are in the 1st commit, so in order to be easier to review please ignore it if and only review the 2nd one

Most of the changes are for replacing big.Int with uint256.Int and int256.Int in code related to swap (leave others as is, for example position/trade...)

Also there is some small differents:

  • Add(x, constant.One) -> AddUint64(x, 1)
  • x.Cmp(constants.Zero) != 0 -> !x.IsZero()
  • x.Cmp(constants.Zero) >= 0 -> x.Sign() >= 0
  • MulDivRoundingUp(x, 1, y) -> DivRoundingUp(x, y)
  • multiplyIn256 and addIn256 was changed to update the result in-place instead of allocating new one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants