Skip to content

Commit

Permalink
Merge pull request #196 from gnoswap-labs/GSW-959-fix-change-package-…
Browse files Browse the repository at this point in the history
…deploy-path

GSW-959 fix: change package deploy path
  • Loading branch information
notJoon authored Mar 19, 2024
2 parents c1fb2a0 + af42fef commit 61c959c
Show file tree
Hide file tree
Showing 45 changed files with 74 additions and 74 deletions.
2 changes: 1 addition & 1 deletion _lib_package/big/int256/gno.mod
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module gno.land/p/big/int256
module gno.land/p/demo/big/int256
2 changes: 1 addition & 1 deletion _lib_package/big/int256/int256.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package int256

import (
"gno.land/p/big/uint256"
"gno.land/p/demo/big/uint256"
)

var one = uint256.NewUint(1)
Expand Down
2 changes: 1 addition & 1 deletion _lib_package/big/uint256/gno.mod
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module gno.land/p/big/uint256
module gno.land/p/demo/big/uint256
2 changes: 1 addition & 1 deletion _lib_realm/gnoswap/common/liquidity_amounts.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package common
import (
"gno.land/r/gnoswap/consts"

u256 "gno.land/p/big/uint256"
u256 "gno.land/p/demo/big/uint256"
)

// toAscendingOrder checkes if the first value is greater than
Expand Down
4 changes: 2 additions & 2 deletions _lib_realm/gnoswap/common/tick_math.gno
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package common

import (
i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"
)

var tickRatioMap = map[int32]*u256.Uint{
Expand Down
4 changes: 2 additions & 2 deletions pool/_GET_no_receiver.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pool
import (
"gno.land/p/demo/ufmt"

i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"
)

func PoolGetSlot0SqrtPriceX96(poolPath string) *u256.Uint {
Expand Down
4 changes: 2 additions & 2 deletions pool/_GET_receiver.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pool
import (
"gno.land/p/demo/ufmt"

i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"
)

// PoolGetPoolList returns a list of all pool paths
Expand Down
4 changes: 2 additions & 2 deletions pool/_RPC_dry.gno
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"gno.land/r/gnoswap/consts"

i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"
)

// DrySwap simulates a swap and returns the amount0, amount1 that would be received and a boolean indicating if the swap is possible
Expand Down
2 changes: 1 addition & 1 deletion pool/_TEST_pool_multi_token_test.gnoa
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"gno.land/r/demo/gns"

u256 "gno.land/p/big/uint256"
u256 "gno.land/p/demo/big/uint256"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pool/_TEST_pool_single_lp_test.gnoa
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"gno.land/r/gnoswap/consts"

u256 "gno.land/p/big/uint256"
u256 "gno.land/p/demo/big/uint256"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pool/bit_math.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package pool
import (
"gno.land/r/gnoswap/consts"

u256 "gno.land/p/big/uint256"
u256 "gno.land/p/demo/big/uint256"
)

type bitShift struct {
Expand Down
4 changes: 2 additions & 2 deletions pool/liquidity_math.gno
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package pool

import (
i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"
)

func liquidityMathAddDelta(x *u256.Uint, y *i256.Int) *u256.Uint {
Expand Down
4 changes: 2 additions & 2 deletions pool/pool.gno
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

gv "gno.land/r/demo/gov"

i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"
)

// Mint creates a new position and mints liquidity tokens then return amount0, amount1 in string
Expand Down
2 changes: 1 addition & 1 deletion pool/pool_manager.gno
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"gno.land/r/demo/gns"

u256 "gno.land/p/big/uint256"
u256 "gno.land/p/demo/big/uint256"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions pool/position.gno
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"gno.land/p/demo/ufmt"
"gno.land/r/gnoswap/consts"

i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"
)

func positionGetKey(
Expand Down
2 changes: 1 addition & 1 deletion pool/position_modify.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package pool
import (
"gno.land/r/gnoswap/common"

i256 "gno.land/p/big/int256"
i256 "gno.land/p/demo/big/int256"
)

func (pool *Pool) modifyPosition(params ModifyPositionParams) (PositionInfo, *i256.Int, *i256.Int) {
Expand Down
2 changes: 1 addition & 1 deletion pool/position_update.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package pool
import (
"std"

i256 "gno.land/p/big/int256"
i256 "gno.land/p/demo/big/int256"
)

func (pool *Pool) updatePosition(
Expand Down
4 changes: 2 additions & 2 deletions pool/sqrt_price_math.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pool
import (
"gno.land/r/gnoswap/consts"

i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"
)

func sqrtPriceMathGetNextSqrtPriceFromAmount0RoundingUp(
Expand Down
4 changes: 2 additions & 2 deletions pool/swap_math.gno
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package pool

import (
i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"
)

func swapMathComputeSwapStep(
Expand Down
4 changes: 2 additions & 2 deletions pool/tick.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pool
import (
"gno.land/r/gnoswap/consts"

i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"
)

func tickTickSpacingToMaxLiquidityPerTick(tickSpacing int32) *u256.Uint {
Expand Down
2 changes: 1 addition & 1 deletion pool/tick_bitmap.gno
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"gno.land/p/demo/ufmt"
"gno.land/r/gnoswap/consts"

u256 "gno.land/p/big/uint256"
u256 "gno.land/p/demo/big/uint256"
)

func tickBitmapPosition(tick int32) (int16, uint8) {
Expand Down
4 changes: 2 additions & 2 deletions pool/type.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pool
import (
"std"

i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"
)

type Slot0 struct {
Expand Down
2 changes: 1 addition & 1 deletion pool/utils.gno
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"gno.land/r/gnoswap/consts"

u256 "gno.land/p/big/uint256"
u256 "gno.land/p/demo/big/uint256"
)

func checkTicks(tickLower, tickUpper int32) {
Expand Down
2 changes: 1 addition & 1 deletion pool/withdrawal_fee.gno
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"gno.land/p/demo/ufmt"

u256 "gno.land/p/big/uint256"
u256 "gno.land/p/demo/big/uint256"
)

// withdrawalFee is the fee that is charged when a user withdraws their collected fees
Expand Down
2 changes: 1 addition & 1 deletion position/_GET_no_receiver.gno.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package position
import (
"std"

u256 "gno.land/p/big/uint256"
u256 "gno.land/p/demo/big/uint256"
)

// type Position
Expand Down
2 changes: 1 addition & 1 deletion position/_RPC_api.gno
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

pl "gno.land/r/demo/pool"

u256 "gno.land/p/big/uint256"
u256 "gno.land/p/demo/big/uint256"
)

type RpcPosition struct {
Expand Down
4 changes: 2 additions & 2 deletions position/_RPC_dry.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package position
import (
"gno.land/r/gnoswap/common"

i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"
)

// DryMint simulates a mint and returns the amount0, amount1 that would be minted
Expand Down
2 changes: 1 addition & 1 deletion position/liquidity_management.gno
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

pl "gno.land/r/demo/pool"

u256 "gno.land/p/big/uint256"
u256 "gno.land/p/demo/big/uint256"
)

func addLiquidity(params AddLiquidityParams) (*u256.Uint, *u256.Uint, *u256.Uint) { // uint128, uint256, uint256
Expand Down
26 changes: 13 additions & 13 deletions position/position.gno
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"gno.land/r/demo/gnft"
"gno.land/r/demo/wugnot"

u256 "gno.land/p/big/uint256"
u256 "gno.land/p/demo/big/uint256"

"gno.land/r/gnoswap/common"
"gno.land/r/gnoswap/consts"
Expand Down Expand Up @@ -412,23 +412,23 @@ func decreaseLiquidity(params DecreaseLiquidityParams) (uint64, *u256.Uint, *u25
if !params.unwrapResult {
return params.tokenId, liquidityToRemove, fee0, fee1, amount0, amount1, position.poolKey
}

var (
unwrapAmount uint64
unwrapFee uint64
unwrapAmount uint64
unwrapFee uint64
)
switch {
case pToken0 == consts.WRAPPED_WUGNOT:
unwrapAmount = amount0.Uint64()
unwrapFee = fee0.Uint64()
case pToken1 == consts.WRAPPED_WUGNOT:
unwrapAmount = amount1.Uint64()
unwrapFee = fee1.Uint64()
}
unwrap(unwrapAmount)
unwrap(unwrapFee)
return params.tokenId, liquidityToRemove, fee0, fee1, amount0, amount1, position.poolKey
unwrapFee = fee0.Uint64()
case pToken1 == consts.WRAPPED_WUGNOT:
unwrapAmount = amount1.Uint64()
unwrapFee = fee1.Uint64()
}
unwrap(unwrapAmount)
unwrap(unwrapFee)

return params.tokenId, liquidityToRemove, fee0, fee1, amount0, amount1, position.poolKey
}

// CollectFee collects swap fee from the position
Expand Down
4 changes: 2 additions & 2 deletions position/sqrt_price_math.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package position
import (
"gno.land/r/gnoswap/consts"

i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"
)

func sqrtPriceMathGetNextSqrtPriceFromAmount0RoundingUp(
Expand Down
2 changes: 1 addition & 1 deletion position/type.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package position
import (
"std"

u256 "gno.land/p/big/uint256"
u256 "gno.land/p/demo/big/uint256"
)

type Position struct {
Expand Down
2 changes: 1 addition & 1 deletion router/_RPC_api.gno
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
pl "gno.land/r/demo/pool"
"gno.land/r/gnoswap/consts"

u256 "gno.land/p/big/uint256"
u256 "gno.land/p/demo/big/uint256"
)

type TokenRatio struct {
Expand Down
2 changes: 1 addition & 1 deletion router/comptue_routes.gno
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

pl "gno.land/r/demo/pool"

u256 "gno.land/p/big/uint256"
u256 "gno.land/p/demo/big/uint256"
)

// PoolWithMeta is a struct that contains poolPath, token0Path, token1Path, fee, tokenPair, and liquidity
Expand Down
4 changes: 2 additions & 2 deletions router/router.gno
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"gno.land/r/gnoswap/common"
"gno.land/r/gnoswap/consts"

i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"

"gno.land/r/demo/wugnot"
)
Expand Down
4 changes: 2 additions & 2 deletions router/router_dry.gno
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"gno.land/p/demo/ufmt"

i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"
)

// DrySwapRoute simulates the swap route and returns the result amount
Expand Down
4 changes: 2 additions & 2 deletions router/swap_inner.gno
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"gno.land/r/gnoswap/consts"

i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"
)

func _swap(
Expand Down
4 changes: 2 additions & 2 deletions router/swap_multi.gno
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"gno.land/r/gnoswap/consts"

i256 "gno.land/p/big/int256"
u256 "gno.land/p/big/uint256"
i256 "gno.land/p/demo/big/int256"
u256 "gno.land/p/demo/big/uint256"
)

func multiSwap(params SwapParams, currentPoolIndex, numPools int, swapPath string) (*u256.Uint, *u256.Uint) { // firstAmountIn, lastAmountOut
Expand Down
Loading

0 comments on commit 61c959c

Please sign in to comment.