Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR rename the package from
github.com/daoleno/uniswapv3-sdk
togithub.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 oneMost of the changes are for replacing
big.Int
withuint256.Int
andint256.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
andaddIn256
was changed to update the result in-place instead of allocating new one