assertIsNotExpired
func(deadline int64)assertIsNotExpired panics if the deadline is expired.
- OID
- 07aca3…f308:3
assertIsNotExpired details
assertValidNumberString
func(input string)assertValidNumberString panics if the input string does not represent a valid integer.
- OID
- 07aca3…f308:5
assertValidNumberString details
assertValidLiquidityAmount
func(liquidity string)assertValidLiquidityAmount panics if the liquidity amount is zero.
- OID
- 07aca3…f308:6
assertValidLiquidityAmount details
assertExistsPosition
func(p *v1.positionV1, positionId uint64)assertExistsPosition panics if the position does not exist.
- OID
- 07aca3…f308:7
assertExistsPosition details
assertIsOwnerForToken
func(p *v1.positionV1, positionId uint64, caller .uverse.address)assertIsOwnerForToken panics if caller is not the owner of the position.
- OID
- 07aca3…f308:8
assertIsOwnerForToken details
assertIsOwnerOrOperatorForToken
func(p *v1.positionV1, positionId uint64, caller .uverse.address)assertIsOwnerOrOperatorForToken panics if caller is not the owner or operator of the position.
- OID
- 07aca3…f308:9
assertIsOwnerOrOperatorForToken details
assertEqualsAddress
func(prevAddr .uverse.address, otherAddr .uverse.address)assertEqualsAddress panics if addresses are invalid or not equal.
- OID
- 07aca3…f308:10
assertEqualsAddress details
assertValidOperatorAddress
func(operator .uverse.address)assertValidOperatorAddress validates operator address. Empty address is allowed (for operator removal), but non-empty addresses must be valid.
- OID
- 07aca3…f308:11
assertValidOperatorAddress details
assertIsNotMintToStaker
func(mintTo .uverse.address)assertIsNotMintToStaker panics if the mintTo address is staker.
- OID
- 07aca3…f308:12
assertIsNotMintToStaker details
calculateTokensOwed
func(feeGrowthInsideLastX128 *uint256.Uint, positionFeeGrowthInsideLastX128 *uint256.Uint, positionLiquidity *uint256.Uint) *uint256.Uint- OID
- 07aca3…f308:13
calculateTokensOwed details
errNoPermission
untyped stringValue
"[GNOSWAP-POSITION-001] caller has no permission"
errSlippage
untyped stringValue
"[GNOSWAP-POSITION-002] slippage failed"
errInvalidTokenPath
untyped stringValue
"[GNOSWAP-POSITION-003] invalid token address"
errInvalidInput
untyped stringValue
"[GNOSWAP-POSITION-004] invalid input data"
errDataNotFound
untyped stringValue
"[GNOSWAP-POSITION-005] requested data not found"
errExpired
untyped stringValue
"[GNOSWAP-POSITION-006] transaction expired"
errInvalidLiquidity
untyped stringValue
"[GNOSWAP-POSITION-007] invalid liquidity"
errNotClear
untyped stringValue
"[GNOSWAP-POSITION-008] position is not clear"
errZeroLiquidity
untyped stringValue
"[GNOSWAP-POSITION-009] zero liquidity"
errPositionExist
untyped stringValue
"[GNOSWAP-POSITION-010] position with same positionId already exists"
errInvalidAddress
untyped stringValue
"[GNOSWAP-POSITION-011] invalid address"
errPositionDoesNotExist
untyped stringValue
"[GNOSWAP-POSITION-012] position does not exist"
errUnderflow
untyped stringValue
"[GNOSWAP-POSITION-013] underflow"
errOverflow
untyped stringValue
"[GNOSWAP-POSITION-014] overflow"
errCannotMintToStaker
untyped stringValue
"[GNOSWAP-POSITION-015] cannot mint to staker"
errSpoofedRealm
untyped stringValue
"[GNOSWAP-POSITION-016] rlm does not match the current crossing frame"
newErrorWithDetail
func(message string, detail string) stringnewErrorWithDetail appends additional context or details to an existing error message.
- OID
- 07aca3…f308:15
newErrorWithDetail details
makeErrorWithDetails
func(message string, details string) .uverse.errormakeErrorWithDetails creates an error with additional context.
- OID
- 07aca3…f308:17
makeErrorWithDetails details
init.28
func()- OID
- 07aca3…f308:18
init.28 details
registerPositionV1
func()- OID
- 07aca3…f308:20
registerPositionV1 details
initStoreData
func(int, rlm .uverse.realm, positionStore position.IPositionStore) .uverse.error- OID
- 07aca3…f308:21
initStoreData details
positionV1
typeValue
v1.positionV1
NewPositionV1
func(positionStore position.IPositionStore, accessor v1.NFTAccessor) position.IPosition- OID
- 07aca3…f308:22
NewPositionV1 details
NFTAccessor
typeValue
v1.NFTAccessor
gnftAccessor
typeValue
v1.gnftAccessor
newGNFTAccessor
func() v1.NFTAccessor- OID
- 07aca3…f308:24
newGNFTAccessor details
AddLiquidityParams
typeValue
v1.AddLiquidityParams
validateTokenPath
func(token0 string, token1 string) .uverse.errorvalidateTokenPath validates token paths are not identical, not conflicting, and in valid format.
- OID
- 07aca3…f308:25
validateTokenPath details
isValidTokenPath
func(tokenPath string) boolisValidTokenPath checks if the token path is registered in the system.
- OID
- 07aca3…f308:27
isValidTokenPath details
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.
- OID
- 07aca3…f308:28
parseAmounts details
computePositionKey
func(tickLower int32, tickUpper int32) stringcomputePositionKey generates a compact deterministic key for a liquidity position.
- OID
- 07aca3…f308:29
computePositionKey details
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.
- OID
- 07aca3…f308:31
calculatePositionBalances details
zeroAddress
.uverse.addressValue
<gnolang.StringValue>
MintParams
typeValue
v1.MintParams
newMintParams
func(input v1.ProcessedMintInput, mintInput v1.MintInput) v1.MintParamsnewMintParams creates \`MintParams\` from processed input data.
- OID
- 07aca3…f308:32
newMintParams details
IncreaseLiquidityParams
typeValue
v1.IncreaseLiquidityParams
DecreaseLiquidityParams
typeValue
v1.DecreaseLiquidityParams
MintInput
typeValue
v1.MintInput
TokenPair
typeValue
v1.TokenPair
ProcessedMintInput
typeValue
v1.ProcessedMintInput
FeeGrowthInside
typeFeeGrowthInside represents fee growth inside ticks
Value
v1.FeeGrowthInside
MAX_UINT256
stringValue
"115792089237316195423570985008687907853269984665640564039457584007913129639935"
mustGetStakerAddress
func() .uverse.address- OID
- 07aca3…f308:34
mustGetStakerAddress details
positionIdFrom
func(positionId uint64) grc721.TokenIDpositionIdFrom converts positionId to grc721.TokenID type input: positionId uint64 output: grc721.TokenID
- OID
- 07aca3…f308:36
positionIdFrom details
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
- OID
- 07aca3…f308:37
splitOf details
isSlippageExceeded
func(amount0 *uint256.Uint, amount1 *uint256.Uint, amount0Min *uint256.Uint, amount1Min *uint256.Uint) bool- OID
- 07aca3…f308:38