diff --git a/pool/_TEST_/__TEST_0_INIT_VARIABLE_AND_HELPER_test.gno b/pool/_TEST_/__TEST_0_INIT_VARIABLE_AND_HELPER_test.gno index 18a4a5e04..82b463fd3 100644 --- a/pool/_TEST_/__TEST_0_INIT_VARIABLE_AND_HELPER_test.gno +++ b/pool/_TEST_/__TEST_0_INIT_VARIABLE_AND_HELPER_test.gno @@ -46,18 +46,6 @@ func shouldNEQ(t *testing.T, got, expected interface{}) { } } -func shouldGT(t *testing.T, l, r interface{}) { - if !(l < r) { - t.Errorf("expected %v < %v", l, r) - } -} - -func shouldLT(t *testing.T, l, r interface{}) { - if !(l > r) { - t.Errorf("expected %v > %v", l, r) - } -} - func shouldPanic(t *testing.T, f func()) { defer func() { if r := recover(); r == nil { diff --git a/position/_TEST_/__TEST_0_INIT_VARS_HELPERS_test.gno b/position/_TEST_/__TEST_0_INIT_VARS_HELPERS_test.gno index f53cf7edc..203b191d9 100644 --- a/position/_TEST_/__TEST_0_INIT_VARS_HELPERS_test.gno +++ b/position/_TEST_/__TEST_0_INIT_VARS_HELPERS_test.gno @@ -52,18 +52,6 @@ func shouldNEQ(t *testing.T, got, expected interface{}) { } } -func shouldGT(t *testing.T, l, r interface{}) { - if !(l < r) { - t.Errorf("expected %v < %v", l, r) - } -} - -func shouldLT(t *testing.T, l, r interface{}) { - if !(l > r) { - t.Errorf("expected %v > %v", l, r) - } -} - func shouldPanic(t *testing.T, f func()) { defer func() { if r := recover(); r == nil { diff --git a/position/_TEST_/__TEST_position_increase_decrease_test.gnoA b/position/_TEST_/__TEST_position_increase_decrease_test.gnoA index eab325a29..42b512d42 100644 --- a/position/_TEST_/__TEST_position_increase_decrease_test.gnoA +++ b/position/_TEST_/__TEST_position_increase_decrease_test.gnoA @@ -156,7 +156,7 @@ func TestSwap2(t *testing.T) { // --- event: {GNOSWAP gno.land/r/demo/pool Swap [{m_callType INDIRECT} {m_origCaller g13f63ua8uhmuf9mgc0x8zfz04yrsaqh7j78vcgq} {m_prevRealm gno.land/r/demo/router} {p_poolPath gno.land/r/demo/bar:gno.land/r/demo/foo:500} {p_zeroForOne true} {p_amountSpecified 1000000} {p_sqrtPriceLimitX96 4295128740} {p_payer g13f63ua8uhmuf9mgc0x8zfz04yrsaqh7j78vcgq} {p_recipient g13f63ua8uhmuf9mgc0x8zfz04yrsaqh7j78vcgq} {amount0 1000000} {amount1 -2676640} {protocol_fee0 0} {protocol_fee1 0} {swap_fee 500}]} // UNCLAIMED_FEE - + std.TestSetRealm(gsaRealm) std.TestSetOrigCaller(gsa) oldFee0, oldFee1 := unclaimedFee(uint64(1)) diff --git a/router/_TEST_/__TEST_0_INIT_VARS_HELPERS_test.gno b/router/_TEST_/__TEST_0_INIT_VARS_HELPERS_test.gno index 842de6697..61271470d 100644 --- a/router/_TEST_/__TEST_0_INIT_VARS_HELPERS_test.gno +++ b/router/_TEST_/__TEST_0_INIT_VARS_HELPERS_test.gno @@ -48,18 +48,6 @@ func shouldNEQ(t *testing.T, got, expected interface{}) { } } -func shouldGT(t *testing.T, l, r interface{}) { - if !(l < r) { - t.Errorf("expected %v < %v", l, r) - } -} - -func shouldLT(t *testing.T, l, r interface{}) { - if !(l > r) { - t.Errorf("expected %v > %v", l, r) - } -} - func shouldPanic(t *testing.T, f func()) { defer func() { if r := recover(); r == nil { diff --git a/router/_TEST_/__TEST_router_all_2_route_2_hop_test.gnoA b/router/_TEST_/__TEST_router_all_2_route_2_hop_test.gnoA index 6d4e8c1c4..36813cacf 100644 --- a/router/_TEST_/__TEST_router_all_2_route_2_hop_test.gnoA +++ b/router/_TEST_/__TEST_router_all_2_route_2_hop_test.gnoA @@ -20,8 +20,8 @@ func TestCreatePool(t *testing.T) { gns.Approve(a2u(consts.POOL_ADDR), consts.POOL_CREATION_FEE*2) - pl.CreatePool(barPath, bazPath, uint16(500), "130621891405341611593710811006") // tick = 10_000, ratio = 2.71814592682522526700950038502924144268035888671875 - pl.CreatePool(bazPath, quxPath, uint16(500), "130621891405341611593710811006") // tick = 10_000, ratio = 2.71814592682522526700950038502924144268035888671875 + pl.CreatePool(barPath, bazPath, uint32(500), "130621891405341611593710811006") // tick = 10_000, ratio = 2.71814592682522526700950038502924144268035888671875 + pl.CreatePool(bazPath, quxPath, uint32(500), "130621891405341611593710811006") // tick = 10_000, ratio = 2.71814592682522526700950038502924144268035888671875 // --- event: {GNOSWAP gno.land/r/demo/pool CreatePool [{m_callType DIRECT} {m_origCaller g13f63ua8uhmuf9mgc0x8zfz04yrsaqh7j78vcgq} {m_prevRealm } {p_poolPath gno.land/r/demo/bar:gno.land/r/demo/baz:500}]} // --- event: {GNOSWAP gno.land/r/demo/pool CreatePool [{m_callType DIRECT} {m_origCaller g13f63ua8uhmuf9mgc0x8zfz04yrsaqh7j78vcgq} {m_prevRealm } {p_poolPath gno.land/r/demo/baz:gno.land/r/demo/qux:500}]} } @@ -35,8 +35,8 @@ func TestPositionMint(t *testing.T) { qux.Approve(a2u(consts.POOL_ADDR), consts.UINT64_MAX) // Mint - pn.Mint(barPath, bazPath, uint16(500), int32(9000), int32(11000), "100000", "100000", "0", "0", max_timeout, gsa.String()) - pn.Mint(bazPath, quxPath, uint16(500), int32(9000), int32(11000), "100000", "100000", "0", "0", max_timeout, gsa.String()) + pn.Mint(barPath, bazPath, uint32(500), int32(9000), int32(11000), "100000", "100000", "0", "0", max_timeout, gsa.String()) + pn.Mint(bazPath, quxPath, uint32(500), int32(9000), int32(11000), "100000", "100000", "0", "0", max_timeout, gsa.String()) // --- event: {GNOSWAP gno.land/r/demo/position Mint [{m_callType DIRECT} {m_origCaller g13f63ua8uhmuf9mgc0x8zfz04yrsaqh7j78vcgq} {m_prevRealm } {p_poolPath gno.land/r/demo/bar:gno.land/r/demo/baz:500} {p_tickLower 9000} {p_tickUpper 11000} {tokenId 1} {liquidity 1243732} {amount0 36790} {amount1 100000}]} // --- event: {GNOSWAP gno.land/r/demo/position Mint [{m_callType DIRECT} {m_origCaller g13f63ua8uhmuf9mgc0x8zfz04yrsaqh7j78vcgq} {m_prevRealm } {p_poolPath gno.land/r/demo/baz:gno.land/r/demo/qux:500} {p_tickLower 9000} {p_tickUpper 11000} {tokenId 2} {liquidity 1243732} {amount0 36790} {amount1 100000}]} } diff --git a/router/_TEST_/__TEST_router_swap_route_2route_2hop_test.gnoA b/router/_TEST_/__TEST_router_swap_route_2route_2hop_test.gnoA index 3c4ba0dbf..58ddb09cb 100644 --- a/router/_TEST_/__TEST_router_swap_route_2route_2hop_test.gnoA +++ b/router/_TEST_/__TEST_router_swap_route_2route_2hop_test.gnoA @@ -19,10 +19,10 @@ func TestCreatePool(t *testing.T) { std.TestSetRealm(gsaRealm) gns.Approve(a2u(consts.POOL_ADDR), consts.POOL_CREATION_FEE*2) - pl.CreatePool(barPath, bazPath, uint16(500), "130621891405341611593710811006") // tick = 10_000, ratio = 2.71814592682522526700950038502924144268035888671875 + pl.CreatePool(barPath, bazPath, uint32(500), "130621891405341611593710811006") // tick = 10_000, ratio = 2.71814592682522526700950038502924144268035888671875 // --- event: {GNOSWAP gno.land/r/demo/pool CreatePool [{m_callType DIRECT} {m_origCaller g13f63ua8uhmuf9mgc0x8zfz04yrsaqh7j78vcgq} {m_prevRealm } {p_poolPath gno.land/r/demo/bar:gno.land/r/demo/baz:500}]} - pl.CreatePool(bazPath, quxPath, uint16(500), "130621891405341611593710811006") // tick = 10_000, ratio = 2.71814592682522526700950038502924144268035888671875 + pl.CreatePool(bazPath, quxPath, uint32(500), "130621891405341611593710811006") // tick = 10_000, ratio = 2.71814592682522526700950038502924144268035888671875 // --- event: {GNOSWAP gno.land/r/demo/pool CreatePool [{m_callType DIRECT} {m_origCaller g13f63ua8uhmuf9mgc0x8zfz04yrsaqh7j78vcgq} {m_prevRealm } {p_poolPath gno.land/r/demo/baz:gno.land/r/demo/qux:500}]} // jsonOutput := pl.ApiGetPools() @@ -39,10 +39,10 @@ func TestPositionMint(t *testing.T) { qux.Approve(a2u(consts.POOL_ADDR), consts.UINT64_MAX) // Mint - pn.Mint(barPath, bazPath, uint16(500), int32(9000), int32(11000), "100000", "100000", "0", "0", max_timeout, gsa.String()) + pn.Mint(barPath, bazPath, uint32(500), int32(9000), int32(11000), "100000", "100000", "0", "0", max_timeout, gsa.String()) // --- event: {GNOSWAP gno.land/r/demo/position Mint [{m_callType DIRECT} {m_origCaller g13f63ua8uhmuf9mgc0x8zfz04yrsaqh7j78vcgq} {m_prevRealm } {p_poolPath gno.land/r/demo/bar:gno.land/r/demo/baz:500} {p_tickLower 9000} {p_tickUpper 11000} {tokenId 1} {liquidity 1243732} {amount0 36790} {amount1 100000}]} - pn.Mint(bazPath, quxPath, uint16(500), int32(9000), int32(11000), "100000", "100000", "0", "0", max_timeout, gsa.String()) + pn.Mint(bazPath, quxPath, uint32(500), int32(9000), int32(11000), "100000", "100000", "0", "0", max_timeout, gsa.String()) // --- event: {GNOSWAP gno.land/r/demo/position Mint [{m_callType DIRECT} {m_origCaller g13f63ua8uhmuf9mgc0x8zfz04yrsaqh7j78vcgq} {m_prevRealm } {p_poolPath gno.land/r/demo/baz:gno.land/r/demo/qux:500} {p_tickLower 9000} {p_tickUpper 11000} {tokenId 2} {liquidity 1243732} {amount0 36790} {amount1 100000}]} } diff --git a/staker/_TEST_/__TEST_0_INIT_VARIABLE_AND_HELPER_test.gno b/staker/_TEST_/__TEST_0_INIT_VARIABLE_AND_HELPER_test.gno index 4c13cffa7..c9e94f4ee 100644 --- a/staker/_TEST_/__TEST_0_INIT_VARIABLE_AND_HELPER_test.gno +++ b/staker/_TEST_/__TEST_0_INIT_VARIABLE_AND_HELPER_test.gno @@ -31,7 +31,7 @@ var ( var ( gsaRealm = std.NewUserRealm(gsa) iraRealm = std.NewUserRealm(ira) - + posRealm = std.NewCodeRealm(consts.POSITION_PATH) rouRealm = std.NewCodeRealm(consts.ROUTER_PATH) stkRealm = std.NewCodeRealm(consts.STAKER_PATH) @@ -61,18 +61,6 @@ func shouldNEQ(t *testing.T, got, expected interface{}) { } } -func shouldGT(t *testing.T, l, r interface{}) { - if !(l < r) { - t.Errorf("expected %v < %v", l, r) - } -} - -func shouldLT(t *testing.T, l, r interface{}) { - if !(l > r) { - t.Errorf("expected %v > %v", l, r) - } -} - func shouldPanic(t *testing.T, f func()) { defer func() { if r := recover(); r == nil { diff --git a/staker/_TEST_/__TEST_Z_z4_mint_and_stake_filetest.gnoA b/staker/_TEST_/__TEST_Z_z4_mint_and_stake_filetest.gnoA index e0a1e7879..1c0a9782d 100644 --- a/staker/_TEST_/__TEST_Z_z4_mint_and_stake_filetest.gnoA +++ b/staker/_TEST_/__TEST_Z_z4_mint_and_stake_filetest.gnoA @@ -235,7 +235,6 @@ func main() { mintAndStake() collectFee() collectReward() - unstakeToken() } func createPool() { diff --git a/staker/_TEST_/__TEST_staker_collect_reward_test.gnoA b/staker/_TEST_/__TEST_staker_collect_reward_test.gnoA index 0cc2cbb6f..4677fb29a 100644 --- a/staker/_TEST_/__TEST_staker_collect_reward_test.gnoA +++ b/staker/_TEST_/__TEST_staker_collect_reward_test.gnoA @@ -52,7 +52,7 @@ func TestPositionMint01(t *testing.T) { lpTokenId, liquidity, amount0, amount1 := pn.Mint( barPath, // token0 quxPath, // token1 - uint16(500), // fee + uint32(500), // fee int32(9000), // tickLower int32(11000), // tickUpper "1000", // amount0Desired @@ -86,7 +86,7 @@ func TestPositionMint02(t *testing.T) { lpTokenId, liquidity, amount0, amount1 := pn.Mint( barPath, // token0 quxPath, // token1 - uint16(500), // fee + uint32(500), // fee int32(9100), // tickLower int32(12000), // tickUpper "5000", // amount0Desired diff --git a/staker/_TEST_/__TEST_staker_get_test.gnoA b/staker/_TEST_/__TEST_staker_get_test.gnoA index cbe59c30d..50f2ce85a 100644 --- a/staker/_TEST_/__TEST_staker_get_test.gnoA +++ b/staker/_TEST_/__TEST_staker_get_test.gnoA @@ -24,7 +24,7 @@ func TestPoolInitCreatePool(t *testing.T) { gns.Approve(a2u(consts.POOL_ADDR), consts.POOL_CREATION_FEE) std.TestSkipHeights(2) - pl.CreatePool(barPath, quxPath, 500, "130621891405341611593710811006") // tick 10_000 ≈ x2.7 + pl.CreatePool(barPath, quxPath, uint32(500), "130621891405341611593710811006") // tick 10_000 ≈ x2.7 // --- event: {GNOSWAP gno.land/r/demo/pool CreatePool [{m_callType DIRECT} {m_origCaller g13f63ua8uhmuf9mgc0x8zfz04yrsaqh7j78vcgq} {m_prevRealm } {p_poolPath gno.land/r/demo/bar:gno.land/r/demo/qux:500}]} std.TestSkipHeights(1) @@ -39,7 +39,7 @@ func TestPositionMint01(t *testing.T) { lpTokenId, liquidity, amount0, amount1 := pn.Mint( barPath, // token0 quxPath, // token1 - uint16(500), // fee + uint32(500), // fee int32(9000), // tickLower int32(11000), // tickUpper "1000", // amount0Desired @@ -73,7 +73,7 @@ func TestPositionMint02(t *testing.T) { lpTokenId, liquidity, amount0, amount1 := pn.Mint( barPath, // token0 quxPath, // token1 - uint16(500), // fee + uint32(500), // fee int32(9100), // tickLower int32(12000), // tickUpper "5000", // amount0Desired diff --git a/staker/_TEST_/__TEST_staker_native_create_collect_unstake_test.gnoA b/staker/_TEST_/__TEST_staker_native_create_collect_unstake_test.gnoA index a9633d3be..5f708a79f 100644 --- a/staker/_TEST_/__TEST_staker_native_create_collect_unstake_test.gnoA +++ b/staker/_TEST_/__TEST_staker_native_create_collect_unstake_test.gnoA @@ -35,7 +35,7 @@ func TestPoolInitCreatePool(t *testing.T) { gns.Approve(a2u(consts.POOL_ADDR), consts.POOL_CREATION_FEE) std.TestSkipHeights(1) - pl.CreatePool(consts.GNS_PATH, consts.GNOT, 500, "130621891405341611593710811006") // tick 10_000 ≈ x2.7 + pl.CreatePool(consts.GNS_PATH, consts.GNOT, uint32(500), "130621891405341611593710811006") // tick 10_000 ≈ x2.7 // --- event: {GNOSWAP gno.land/r/demo/pool CreatePool [{m_callType DIRECT} {m_origCaller g13f63ua8uhmuf9mgc0x8zfz04yrsaqh7j78vcgq} {m_prevRealm } {p_poolPath gno.land/r/demo/gns:gno.land/r/demo/wugnot:500}]} std.TestSkipHeights(1) } @@ -67,7 +67,7 @@ func TestPositionMintNative01(t *testing.T) { lpTokenId, liquidity, amount0, amount1 := pn.Mint( consts.GNS_PATH, // token0 consts.GNOT, // token1 - uint16(500), // fee + uint32(500), // fee int32(9000), // tickLower int32(11000), // tickUpper "1000", // amount0Desired @@ -115,7 +115,7 @@ func TestPositionMintNative02(t *testing.T) { lpTokenId, liquidity, amount0, amount1 := pn.Mint( consts.GNS_PATH, // token0 consts.GNOT, // token1 - uint16(500), // fee + uint32(500), // fee int32(9000), // tickLower int32(11000), // tickUpper "1000", // amount0Desired diff --git a/staker/_TEST_/__TEST_staker_one_increase_external_test.gnoA b/staker/_TEST_/__TEST_staker_one_increase_external_test.gnoA index b51c5cc87..8e05401eb 100644 --- a/staker/_TEST_/__TEST_staker_one_increase_external_test.gnoA +++ b/staker/_TEST_/__TEST_staker_one_increase_external_test.gnoA @@ -39,7 +39,7 @@ func TestPoolCreatePool(t *testing.T) { gns.Approve(a2u(consts.POOL_ADDR), consts.POOL_CREATION_FEE) std.TestSkipHeights(1) - pl.CreatePool(fooPath, barPath, 500, "130621891405341611593710811006") // tick 10_000 ≈ x2.7 + pl.CreatePool(fooPath, barPath, uint32(500), "130621891405341611593710811006") // tick 10_000 ≈ x2.7 // --- event: {GNOSWAP gno.land/r/demo/pool CreatePool [{m_callType DIRECT} {m_origCaller g13f63ua8uhmuf9mgc0x8zfz04yrsaqh7j78vcgq} {m_prevRealm } {p_poolPath gno.land/r/demo/bar:gno.land/r/demo/foo:500}]} std.TestSkipHeights(1) @@ -54,7 +54,7 @@ func TestPositionMint01(t *testing.T) { lpTokenId, liquidity, amount0, amount1 := pn.Mint( fooPath, // token0 barPath, // token1 - uint16(500), // fee + uint32(500), // fee int32(9000), // tickLower int32(11000), // tickUpper "1000", // amount0Desired @@ -88,7 +88,7 @@ func TestPositionMint02(t *testing.T) { lpTokenId, liquidity, amount0, amount1 := pn.Mint( fooPath, // token0 barPath, // token1 - uint16(500), // fee + uint32(500), // fee int32(9100), // tickLower int32(12000), // tickUpper "5000", // amount0Desired diff --git a/staker/_TEST_/__TEST_staker_rpc_api_test.gnoA b/staker/_TEST_/__TEST_staker_rpc_api_test.gnoA index df439080d..ea2004f73 100644 --- a/staker/_TEST_/__TEST_staker_rpc_api_test.gnoA +++ b/staker/_TEST_/__TEST_staker_rpc_api_test.gnoA @@ -39,10 +39,10 @@ func TestPoolCreatePool(t *testing.T) { gns.Approve(a2u(consts.POOL_ADDR), consts.POOL_CREATION_FEE) std.TestSkipHeights(1) - pl.CreatePool(fooPath, barPath, 500, "130621891405341611593710811006") // tick 10_000 ≈ x2.7 + pl.CreatePool(fooPath, barPath, uint32(500), "130621891405341611593710811006") // tick 10_000 ≈ x2.7 // --- event: {GNOSWAP gno.land/r/demo/pool CreatePool [{m_callType DIRECT} {m_origCaller g13f63ua8uhmuf9mgc0x8zfz04yrsaqh7j78vcgq} {m_prevRealm } {p_poolPath gno.land/r/demo/bar:gno.land/r/demo/foo:500}]} - pl.CreatePool(bazPath, quxPath, 500, "130621891405341611593710811006") // tick 10_000 ≈ x2.7 + pl.CreatePool(bazPath, quxPath, uint32(500), "130621891405341611593710811006") // tick 10_000 ≈ x2.7 // --- event: {GNOSWAP gno.land/r/demo/pool CreatePool [{m_callType DIRECT} {m_origCaller g13f63ua8uhmuf9mgc0x8zfz04yrsaqh7j78vcgq} {m_prevRealm } {p_poolPath gno.land/r/demo/baz:gno.land/r/demo/qux:500}]} std.TestSkipHeights(1) @@ -57,7 +57,7 @@ func TestPositionMintFooBar01(t *testing.T) { lpTokenId, liquidity, amount0, amount1 := pn.Mint( fooPath, // token0 barPath, // token1 - uint16(500), // fee + uint32(500), // fee int32(9000), // tickLower int32(11000), // tickUpper "1000", // amount0Desired @@ -91,7 +91,7 @@ func TestPositionMintFooBar02(t *testing.T) { lpTokenId, liquidity, amount0, amount1 := pn.Mint( fooPath, // token0 barPath, // token1 - uint16(500), // fee + uint32(500), // fee int32(9100), // tickLower int32(12000), // tickUpper "5000", // amount0Desired @@ -125,7 +125,7 @@ func TestPositionMintBazQux01(t *testing.T) { lpTokenId, liquidity, amount0, amount1 := pn.Mint( bazPath, // token0 quxPath, // token1 - uint16(500), // fee + uint32(500), // fee int32(9100), // tickLower int32(12000), // tickUpper "5000", // amount0Desired