Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v1 state

Back to all declarations

assertIsNotExpired

func(deadline int64)

assertIsNotExpired panics if the deadline is expired.

Open
OID
07aca3…f308:3
assertIsNotExpired details

Inspect func

assertValidNumberString

func(input string)

assertValidNumberString panics if the input string does not represent a valid integer.

Open
OID
07aca3…f308:5
assertValidNumberString details

Inspect func

assertValidLiquidityAmount

func(liquidity string)

assertValidLiquidityAmount panics if the liquidity amount is zero.

Open
OID
07aca3…f308:6
assertValidLiquidityAmount details

Inspect func

assertExistsPosition

func(p *v1.positionV1, positionId uint64)

assertExistsPosition panics if the position does not exist.

Open
OID
07aca3…f308:7
assertExistsPosition details

Inspect func

assertIsOwnerForToken

func(p *v1.positionV1, positionId uint64, caller .uverse.address)

assertIsOwnerForToken panics if caller is not the owner of the position.

Open
OID
07aca3…f308:8
assertIsOwnerForToken details

Inspect func

assertIsOwnerOrOperatorForToken

func(p *v1.positionV1, positionId uint64, caller .uverse.address)

assertIsOwnerOrOperatorForToken panics if caller is not the owner or operator of the position.

Open
OID
07aca3…f308:9
assertIsOwnerOrOperatorForToken details

Inspect func

assertEqualsAddress

func(prevAddr .uverse.address, otherAddr .uverse.address)

assertEqualsAddress panics if addresses are invalid or not equal.

Open
OID
07aca3…f308:10
assertEqualsAddress details

Inspect func

assertValidOperatorAddress

func(operator .uverse.address)

assertValidOperatorAddress validates operator address. Empty address is allowed (for operator removal), but non-empty addresses must be valid.

Open
OID
07aca3…f308:11
assertValidOperatorAddress details

Inspect func

assertIsNotMintToStaker

func(mintTo .uverse.address)

assertIsNotMintToStaker panics if the mintTo address is staker.

Open
OID
07aca3…f308:12
assertIsNotMintToStaker details

Inspect func

calculateTokensOwed

func(feeGrowthInsideLastX128 *uint256.Uint, positionFeeGrowthInsideLastX128 *uint256.Uint, positionLiquidity *uint256.Uint) *uint256.Uint
Open
OID
07aca3…f308:13
calculateTokensOwed details

Inspect func

errNoPermission

untyped string

Value

"[GNOSWAP-POSITION-001] caller has no permission"

errSlippage

untyped string

Value

"[GNOSWAP-POSITION-002] slippage failed"

errInvalidTokenPath

untyped string

Value

"[GNOSWAP-POSITION-003] invalid token address"

errInvalidInput

untyped string

Value

"[GNOSWAP-POSITION-004] invalid input data"

errDataNotFound

untyped string

Value

"[GNOSWAP-POSITION-005] requested data not found"

errExpired

untyped string

Value

"[GNOSWAP-POSITION-006] transaction expired"

errInvalidLiquidity

untyped string

Value

"[GNOSWAP-POSITION-007] invalid liquidity"

errNotClear

untyped string

Value

"[GNOSWAP-POSITION-008] position is not clear"

errZeroLiquidity

untyped string

Value

"[GNOSWAP-POSITION-009] zero liquidity"

errPositionExist

untyped string

Value

"[GNOSWAP-POSITION-010] position with same positionId already exists"

errInvalidAddress

untyped string

Value

"[GNOSWAP-POSITION-011] invalid address"

errPositionDoesNotExist

untyped string

Value

"[GNOSWAP-POSITION-012] position does not exist"

errUnderflow

untyped string

Value

"[GNOSWAP-POSITION-013] underflow"

errOverflow

untyped string

Value

"[GNOSWAP-POSITION-014] overflow"

errCannotMintToStaker

untyped string

Value

"[GNOSWAP-POSITION-015] cannot mint to staker"

errSpoofedRealm

untyped string

Value

"[GNOSWAP-POSITION-016] rlm does not match the current crossing frame"

newErrorWithDetail

func(message string, detail string) string

newErrorWithDetail appends additional context or details to an existing error message.

Open
OID
07aca3…f308:15
newErrorWithDetail details

Inspect func

makeErrorWithDetails

func(message string, details string) .uverse.error

makeErrorWithDetails creates an error with additional context.

Open
OID
07aca3…f308:17
makeErrorWithDetails details

Inspect func

registerPositionV1

func()
Open
OID
07aca3…f308:20
registerPositionV1 details

Inspect func

initStoreData

func(int, rlm .uverse.realm, positionStore position.IPositionStore) .uverse.error
Open
OID
07aca3…f308:21
initStoreData details

Inspect func

positionV1

type

Value

v1.positionV1

NewPositionV1

func(positionStore position.IPositionStore, accessor v1.NFTAccessor) position.IPosition
Open
OID
07aca3…f308:22
NewPositionV1 details

Inspect func

NFTAccessor

type

Value

v1.NFTAccessor

gnftAccessor

type

Value

v1.gnftAccessor

newGNFTAccessor

func() v1.NFTAccessor
Open
OID
07aca3…f308:24
newGNFTAccessor details

Inspect func

AddLiquidityParams

type

Value

v1.AddLiquidityParams

validateTokenPath

func(token0 string, token1 string) .uverse.error

validateTokenPath validates token paths are not identical, not conflicting, and in valid format.

Open
OID
07aca3…f308:25
validateTokenPath details

Inspect func

isValidTokenPath

func(tokenPath string) bool

isValidTokenPath checks if the token path is registered in the system.

Open
OID
07aca3…f308:27
isValidTokenPath details

Inspect func

parseAmounts

func(amount0Desired string, amount1Desired string, amount0Min string, amount1Min string) (*uint256.Uint, *uint256.Uint, *uint256.Uint, *uint256.Uint)

parseAmounts converts amount strings to u256.Uint values.

Open
OID
07aca3…f308:28
parseAmounts details

Inspect func

computePositionKey

func(tickLower int32, tickUpper int32) string

computePositionKey generates a compact deterministic key for a liquidity position.

Open
OID
07aca3…f308:29
computePositionKey details

Inspect func

calculatePositionBalances

func(position *position.Position) (int64, int64)

calculatePositionBalances computes token balances for a position at current price. Returns calculated token0 and token1 balances based on position liquidity and price range.

Open
OID
07aca3…f308:31
calculatePositionBalances details

Inspect func

zeroAddress

.uverse.address

Value

<gnolang.StringValue>

MintParams

type

Value

v1.MintParams

newMintParams

func(input v1.ProcessedMintInput, mintInput v1.MintInput) v1.MintParams

newMintParams creates \`MintParams\` from processed input data.

Open
OID
07aca3…f308:32
newMintParams details

Inspect func

IncreaseLiquidityParams

type

Value

v1.IncreaseLiquidityParams

DecreaseLiquidityParams

type

Value

v1.DecreaseLiquidityParams

MintInput

type

Value

v1.MintInput

TokenPair

type

Value

v1.TokenPair

ProcessedMintInput

type

Value

v1.ProcessedMintInput

FeeGrowthInside

type

FeeGrowthInside represents fee growth inside ticks

Value

v1.FeeGrowthInside

MAX_UINT256

string

Value

"115792089237316195423570985008687907853269984665640564039457584007913129639935"

mustGetStakerAddress

func() .uverse.address
Open
OID
07aca3…f308:34
mustGetStakerAddress details

Inspect func

positionIdFrom

func(positionId uint64) grc721.TokenID

positionIdFrom converts positionId to grc721.TokenID type input: positionId uint64 output: grc721.TokenID

Open
OID
07aca3…f308:36
positionIdFrom details

Inspect func

splitOf

func(poolKey string) (string, string, uint32)

splitOf divides poolKey into pToken0, pToken1, and pFee If poolKey is invalid, it will panic input: poolKey string output: - token0Path string - token1Path string - fee uint32

Open
OID
07aca3…f308:37
splitOf details

Inspect func

isSlippageExceeded

func(amount0 *uint256.Uint, amount1 *uint256.Uint, amount0Min *uint256.Uint, amount1Min *uint256.Uint) bool
Open
OID
07aca3…f308:38
isSlippageExceeded details

Inspect func
assertIsNotExpired : func(deadline int64) Inspect
assertValidNumberString : func(input string) Inspect
assertValidLiquidityAmount : func(liquidity string) Inspect
assertExistsPosition : func(p *v1.positionV1, positionId uint64) Inspect
assertIsOwnerForToken : func(p *v1.positionV1, positionId uint64, caller .uverse.address) Inspect
assertIsOwnerOrOperatorForToken : func(p *v1.positionV1, positionId uint64, caller .uverse.address) Inspect
assertEqualsAddress : func(prevAddr .uverse.address, otherAddr .uverse.address) Inspect
assertValidOperatorAddress : func(operator .uverse.address) Inspect
assertIsNotMintToStaker : func(mintTo .uverse.address) Inspect
calculateTokensOwed : func(feeGrowthInsideLastX128 *uint256.Uint, positionFeeGrowthInsideLastX128 *uint256.Uint, positionLiquidity *uint256.Uint) *uint256.Uint Inspect
errNoPermission : untyped string ="[GNOSWAP-POSITION-001] caller has no permission"
errSlippage : untyped string ="[GNOSWAP-POSITION-002] slippage failed"
errInvalidTokenPath : untyped string ="[GNOSWAP-POSITION-003] invalid token address"
errInvalidInput : untyped string ="[GNOSWAP-POSITION-004] invalid input data"
errDataNotFound : untyped string ="[GNOSWAP-POSITION-005] requested data not found"
errExpired : untyped string ="[GNOSWAP-POSITION-006] transaction expired"
errInvalidLiquidity : untyped string ="[GNOSWAP-POSITION-007] invalid liquidity"
errNotClear : untyped string ="[GNOSWAP-POSITION-008] position is not clear"
errZeroLiquidity : untyped string ="[GNOSWAP-POSITION-009] zero liquidity"
errPositionExist : untyped string ="[GNOSWAP-POSITION-010] position with same positionId already exists"
errInvalidAddress : untyped string ="[GNOSWAP-POSITION-011] invalid address"
errPositionDoesNotExist : untyped string ="[GNOSWAP-POSITION-012] position does not exist"
errUnderflow : untyped string ="[GNOSWAP-POSITION-013] underflow"
errOverflow : untyped string ="[GNOSWAP-POSITION-014] overflow"
errCannotMintToStaker : untyped string ="[GNOSWAP-POSITION-015] cannot mint to staker"
errSpoofedRealm : untyped string ="[GNOSWAP-POSITION-016] rlm does not match the current crossing frame"
newErrorWithDetail : func(message string, detail string) string Inspect
makeErrorWithDetails : func(message string, details string) .uverse.error Inspect
init.28 : func() Inspect
registerPositionV1 : func() Inspect
initStoreData : func(int, rlm .uverse.realm, positionStore position.IPositionStore) .uverse.error Inspect
positionV1 : type =v1.positionV1
NewPositionV1 : func(positionStore position.IPositionStore, accessor v1.NFTAccessor) position.IPosition Inspect
NFTAccessor : type =v1.NFTAccessor
gnftAccessor : type =v1.gnftAccessor
newGNFTAccessor : func() v1.NFTAccessor Inspect
AddLiquidityParams : type =v1.AddLiquidityParams
validateTokenPath : func(token0 string, token1 string) .uverse.error Inspect
isValidTokenPath : func(tokenPath string) bool Inspect
parseAmounts : func(amount0Desired string, amount1Desired string, amount0Min string, amount1Min string) (*uint256.Uint, *uint256.Uint, *uint256.Uint, *uint256.Uint) Inspect
computePositionKey : func(tickLower int32, tickUpper int32) string Inspect
calculatePositionBalances : func(position *position.Position) (int64, int64) Inspect
zeroAddress : .uverse.address =<gnolang.StringValue>
MintParams : type =v1.MintParams
newMintParams : func(input v1.ProcessedMintInput, mintInput v1.MintInput) v1.MintParams Inspect
IncreaseLiquidityParams : type =v1.IncreaseLiquidityParams
DecreaseLiquidityParams : type =v1.DecreaseLiquidityParams
MintInput : type =v1.MintInput
TokenPair : type =v1.TokenPair
ProcessedMintInput : type =v1.ProcessedMintInput
FeeGrowthInside : type =v1.FeeGrowthInside
MAX_UINT256 : string ="115792089237316195423570985008687907853269984665640564039457584007913129639935"
mustGetStakerAddress : func() .uverse.address Inspect
positionIdFrom : func(positionId uint64) grc721.TokenID Inspect
splitOf : func(poolKey string) (string, string, uint32) Inspect
isSlippageExceeded : func(amount0 *uint256.Uint, amount1 *uint256.Uint, amount0Min *uint256.Uint, amount1Min *uint256.Uint) bool Inspect