Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4400f9d
refactor(p/int256): changes to the int256 package implementation
jinoosss Nov 28, 2025
2e14b7b
refactor: create proxy function for backward compatibility
junghoon-vans Nov 28, 2025
795ace7
fix: failed arithmetic cased
notJoon Nov 28, 2025
3c6684a
feat(p/int256): add FromUint256 and AbsUint256 conversion functions
junghoon-vans Nov 28, 2025
8bd9006
fix: Add `NilToZero`
notJoon Nov 28, 2025
ca496f5
fix
notJoon Nov 28, 2025
bc4e95b
test: add missing tests
jinoosss Nov 28, 2025
63fa769
refactor(p/int256): change Abs() to return *u256.Uint directly
junghoon-vans Nov 28, 2025
62bcc8f
test(fuzz): Add int256 fuzzing cases
notJoon Nov 28, 2025
db55990
fix: int256 test failure
junghoon-vans Nov 28, 2025
35315ee
fix: remove redundant function test cases
junghoon-vans Nov 28, 2025
10dd8b0
fix: Div
notJoon Nov 28, 2025
1f64f49
refactor: Rename `IsNegative` to `IsNeg`, remove redundant `New` func…
junghoon-vans Nov 28, 2025
2d739fa
fix: replace i256.New() with i256.Zero()
junghoon-vans Nov 28, 2025
bcfa92e
fix: align int256 division with truncation, optimize bit shifts, and …
junghoon-vans Nov 28, 2025
c0c5d4b
fix: method names
jinoosss Nov 28, 2025
90fb6e9
test: fix int256 txtar tests
jinoosss Nov 28, 2025
3d2d3a1
Merge branch 'main' into refactor-int256-changes-to-the-int256-packag…
notJoon Nov 29, 2025
d0f1b54
test(int256): All branch tests and mathematical property checks for t…
notJoon Nov 29, 2025
fd323ca
Merge branch 'main' into refactor-int256-changes-to-the-int256-packag…
dongwon8247 Dec 1, 2025
4a21f60
refactor(int256): consolidate scattered test files
junghoon-vans Dec 1, 2025
10346fb
refactor(int256): remove unused functions
junghoon-vans Dec 1, 2025
b6055ea
refactor: remove unused error constant
junghoon-vans Dec 1, 2025
049da05
test: add unit tests for public functions
notJoon Dec 1, 2025
a6fc2b4
test: Add comprehensive Knuth Algorithm D test suite (Hacker’s Deligh…
notJoon Dec 1, 2025
0926259
chore: Remove invalid license
notJoon Dec 1, 2025
845e852
test: multiplier test
notJoon Dec 1, 2025
0949d90
fix(int256): add missing return in uquo and urem for zero dividend
junghoon-vans Dec 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions contract/p/gnoswap/gnsmath/sqrt_price_math_test.gno
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ func TestSqrtPriceMath_GetAmount0Delta(t *testing.T) {
name: "negative_liquidity",
sqrtRatioAX96: u256.MustFromDecimal("1000000"),
sqrtRatioBX96: u256.MustFromDecimal("2000000"),
liquidity: i256.New().Neg(i256.FromUint256(u256.MustFromDecimal("5000000"))),
liquidity: i256.Zero().Neg(i256.FromUint256(u256.MustFromDecimal("5000000"))),
expected: "-198070406285660843983859875840",
},
// Zero liquidity
Expand Down Expand Up @@ -1160,14 +1160,14 @@ func TestSqrtPriceMath_GetAmount1Delta(t *testing.T) {
name: "negative_liquidity",
sqrtRatioAX96: u256.MustFromDecimal("1000000"),
sqrtRatioBX96: u256.MustFromDecimal("2000000"),
liquidity: i256.New().Neg(i256.FromUint256(u256.MustFromDecimal("5000000"))),
liquidity: i256.Zero().Neg(i256.FromUint256(u256.MustFromDecimal("5000000"))),
expected: "0",
},
{
name: "negative_liquidity_large",
sqrtRatioAX96: encodePriceSqrt("1", "1"),
sqrtRatioBX96: encodePriceSqrt("4", "1"),
liquidity: i256.New().Neg(i256.FromUint256(u256.MustFromDecimal("1000000000000000000"))),
liquidity: i256.Zero().Neg(i256.FromUint256(u256.MustFromDecimal("1000000000000000000"))),
expected: "-1000000000000000000",
},
{
Expand Down
21 changes: 0 additions & 21 deletions contract/p/gnoswap/int256/LICENSE

This file was deleted.

38 changes: 0 additions & 38 deletions contract/p/gnoswap/int256/absolute.gno

This file was deleted.

184 changes: 0 additions & 184 deletions contract/p/gnoswap/int256/absolute_test.gno

This file was deleted.

Loading
Loading