Skip to content

Commit

Permalink
Merge pull request #189 from gnoswap-labs/GSW-907-remove-requires
Browse files Browse the repository at this point in the history
GSW-907 remove requires
  • Loading branch information
r3v4s authored Mar 11, 2024
2 parents d2e57ca + 978a14b commit 9abf1c7
Show file tree
Hide file tree
Showing 39 changed files with 759 additions and 575 deletions.
2 changes: 1 addition & 1 deletion packages/big/uint256/uint256.gno
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ func (z *Uint) fromDecimal(bs string) error {
z.SetUint64(num)
} else {
base := NewUint(num)
z.Add(z, base.Mul(base, mult))
z.UnsafeAdd(z, base.Mul(base, mult))
}
// Chop off another 19 characters
if remaining > 19 {
Expand Down
1 change: 0 additions & 1 deletion packages/big/uint256/uint256_test.gno
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ func TestFuncs(t *testing.T) {
y := MustFromDecimal("130406999485845074795897568971")

z := new(Uint).Add(x, y)
println("z:", z.ToString()) // 130486188034278082001322316149

if z.ToString() != "130486188034278082001322316149" {
t.Error("Expected 130486188034278082001322316149, got ", z.ToString())
Expand Down
6 changes: 0 additions & 6 deletions packages/common/tick_math.gno
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,6 @@ func gt(x, y *u256.Uint) *u256.Uint {
return u256.Zero()
}

func require(condition bool, message string) {
if !condition {
panic(message)
}
}

func abs(x int32) int32 {
if x < 0 {
return -x
Expand Down
Loading

0 comments on commit 9abf1c7

Please sign in to comment.