PathrockNetwork Gno Explorer
HomeBlocksTransactionsRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/gnoswap/position

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
position
Namespace
gnoswap
Files
12 (README)(gnomod.toml)
Exported functions
33
Module
gno.land/r/gnoswap/position
gno
0.9

Files (12)

  • README.mdmarkdown
  • gnomod.tomltoml
  • errors.gnogno
  • getter_utils.gnogno
  • getter.gnogno
  • position.gnogno
  • proxy.gnogno
  • render.gnogno
  • state.gnogno
  • store.gnogno
  • types.gnogno
  • upgrade.gnogno
  • proxy.gnogno
    1package position23// Mint creates a new liquidity position NFT.4//5// Parameters:6//   - cur: current realm context; callers use cross(cur) when crossing into this realm7//   - token0: path of the first token in the pool8

    Functions

    • CollectFee(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, positionId uint64) (uint64, string, string, string, string, string)

    • DecreaseLiquidity(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, positionId uint64, liquidityStr string, amount0MinStr string, amount1MinStr string, deadline int64) (uint64, string, string, string, string, string, string)

    • GetImplementationPackagePath() string

    • GetPositionFeeGrowthInside0LastX128(positionId uint64) (string, interface {Error func() string})

    • GetPositionFeeGrowthInside1LastX128(positionId uint64) (string, interface {Error func() string})

    • GetPositionFeeGrowthInsideLastX128(positionId uint64) (string, string, interface {Error func() string})

    • GetPositionLiquidity(positionId uint64) (string, interface {Error func() string})

    • GetPositionOperator(positionId uint64) (string, interface {Error func() string})

    • GetPositionOwner(positionId uint64) (string, interface {Error func() string})

    • GetPositionPoolKey(positionId uint64) (string, interface {Error func() string})

    • GetPositions() *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree

    • GetPositionTickLower(positionId uint64) (int32, interface {Error func() string})

    • GetPositionTicks(positionId uint64) (int32, int32, interface {Error func() string})

    • GetPositionTickUpper(positionId uint64) (int32, interface {Error func() string})

    • GetPositionToken0Balance(positionId uint64) (int64, interface {Error func() string})

    • GetPositionToken1Balance(positionId uint64) (int64, interface {Error func() string})

    • GetPositionTokenBalances(positionId uint64) (int64, int64, interface {Error func() string})

    • GetPositionTokensOwed(positionId uint64) (int64, int64, interface {Error func() string})

    • GetPositionTokensOwed0(positionId uint64) (int64, interface {Error func() string})

    • GetPositionTokensOwed1(positionId uint64) (int64, interface {Error func() string})

    • GetUnclaimedFee(positionId uint64) (string, string, interface {Error func() string})

    • IncreaseLiquidity(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, positionId uint64, amount0DesiredStr string, amount1DesiredStr string, amount0MinStr string, amount1MinStr string, deadline int64) (uint64, string, string, string, string)

    • IsBurned(positionId uint64) (bool, interface {Error func() string})

    • IsInRange(positionId uint64) (bool, interface {Error func() string})

    • Mint(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, token0 string, token1 string, fee uint32, tickLower int32, tickUpper int32, amount0Desired string, amount1Desired string, amount0Min string, amount1Min string, deadline int64, mintTo string, referrer string) (uint64, string, string, string)

    • NewPosition(poolKey string, tickLower int32, tickUpper int32, liquidity string, feeGrowthInside0LastX128 string, feeGrowthInside1LastX128 string, tokensOwed0 int64, tokensOwed1 int64, burned bool, operator string) *gno.land/r/gnoswap/position.Position

    • NewPositionStore(kvStore interface {AddAuthorizedCaller func(int, .uverse.realm, .uverse.address, gno.land/p/gnoswap/store/v1.Permission) .uverse.error; Delete func(int, .uverse.realm, string) .uverse.error; Get func(string) (interface {}, .uverse.error); GetAddress func(string) (.uverse.address, .uverse.error); GetAllKeys func() ([]string, .uverse.error); GetAuthorizedCallers func() (map[.uverse.address]gno.land/p/gnoswap/store/v1.Permission, .uverse.error); GetBPTree func(string) (*gno.land/p/nt/bptree/v0.BPTree, .uverse.error); GetBool func(string) (bool, .uverse.error); GetDomainAddress func() .uverse.address; GetInt64 func(string) (int64, .uverse.error); GetString func(string) (string, .uverse.error); GetUint64 func(string) (uint64, .uverse.error); Has func(string) bool; IsWriteAuthorized func(.uverse.address) bool; RemoveAuthorizedCaller func(int, .uverse.realm, .uverse.address) .uverse.error; Set func(int, .uverse.realm, string, interface {}) .uverse.error; UpdateAuthorizedCaller func(int, .uverse.realm, .uverse.address, gno.land/p/gnoswap/store/v1.Permission) .uverse.error}) interface {GetPosition func(uint64) (gno.land/r/gnoswap/position.Position, bool); GetPositionNextID func() uint64; GetPositions func() *gno.land/p/nt/bptree/v0.BPTree; HasPosition func(uint64) bool; HasPositionNextIDStoreKey func() bool; HasPositionsStoreKey func() bool; RemovePosition func(int, .uverse.realm, uint64) .uverse.error; SetPosition func(int, .uverse.realm, uint64, gno.land/r/gnoswap/position.Position) .uverse.error; SetPositionNextID func(int, .uverse.realm, uint64) .uverse.error; SetPositions func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error}

    • NewPositionsTree() *gno.land/p/nt/bptree/v0.BPTree

    • RegisterInitializer(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, initializer func(int, .uverse.realm, gno.land/r/gnoswap/position.IPositionStore) gno.land/r/gnoswap/position.IPosition)

    • Render(path string) string

    • Reposition(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, positionId uint64, tickLower int32, tickUpper int32, amount0DesiredStr string, amount1DesiredStr string, amount0MinStr string, amount1MinStr string, deadline int64) (uint64, string, int32, int32, string, string)

    • SetPositionOperator(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, positionId uint64, operator string)

    • UpgradeImpl(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, packagePath string)

    Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

    Rendered

    RenderedRawgnoweb ↗
    // - token1: path of the second token in the pool
    9// - fee: pool fee tier used to identify the pool
    10// - tickLower: lower tick boundary of the position's price range
    11// - tickUpper: upper tick boundary of the position's price range
    12// - amount0Desired: desired amount of token0 to provide
    13// - amount1Desired: desired amount of token1 to provide
    14// - amount0Min: minimum acceptable amount of token0 after price/slippage calculation
    15// - amount1Min: minimum acceptable amount of token1 after price/slippage calculation
    16// - deadline: transaction expiration timestamp
    17// - mintTo: recipient address of the position NFT
    18// - referrer: referrer identifier used for reward tracking
    19//
    20// Returns:
    21// - positionId: newly minted position NFT token ID
    22// - liquidity: liquidity minted into the position, represented as a decimal string
    23// - amount0: actual amount of token0 added to the position, represented as a decimal string
    24// - amount1: actual amount of token1 added to the position, represented as a decimal string
    25//
    26// Halt check: reverts while the Position halt scope is active.
    27func Mint(
    28 cur realm,
    29 token0 string,
    30 token1 string,
    31 fee uint32,
    32 tickLower int32,
    33 tickUpper int32,
    34 amount0Desired string,
    35 amount1Desired string,
    36 amount0Min string,
    37 amount1Min string,
    38 deadline int64,
    39 mintTo address,
    40 referrer string,
    41) (uint64, string, string, string) {
    42 return getImplementation().Mint(0, cur, token0, token1, fee, tickLower, tickUpper, amount0Desired, amount1Desired, amount0Min, amount1Min, deadline, mintTo, referrer)
    43}
    44
    45// IncreaseLiquidity adds liquidity to an existing position.
    46//
    47// Parameters:
    48// - cur: current realm context; callers use cross(cur) when crossing into this realm
    49// - positionId: position NFT token ID to increase
    50// - amount0DesiredStr: desired token0 amount, represented as a decimal string
    51// - amount1DesiredStr: desired token1 amount, represented as a decimal string
    52// - amount0MinStr: minimum acceptable token0 amount for slippage protection
    53// - amount1MinStr: minimum acceptable token1 amount for slippage protection
    54// - deadline: transaction expiration timestamp
    55//
    56// Returns:
    57// - positionId: position NFT token ID that received the liquidity
    58// - liquidity: liquidity amount added to the position (the delta), represented as a decimal string
    59// - amount0: actual token0 amount added, represented as a decimal string
    60// - amount1: actual token1 amount added, represented as a decimal string
    61// - poolKey: canonical pool key for the position
    62//
    63// Halt check: reverts while the Position halt scope is active.
    64func IncreaseLiquidity(
    65 cur realm,
    66 positionId uint64,
    67 amount0DesiredStr string,
    68 amount1DesiredStr string,
    69 amount0MinStr string,
    70 amount1MinStr string,
    71 deadline int64,
    72) (uint64, string, string, string, string) {
    73 return getImplementation().IncreaseLiquidity(0, cur, positionId, amount0DesiredStr, amount1DesiredStr, amount0MinStr, amount1MinStr, deadline)
    74}
    75
    76// DecreaseLiquidity removes liquidity from a position.
    77//
    78// Parameters:
    79// - cur: current realm context; callers use cross(cur) when crossing into this realm
    80// - positionId: position NFT token ID to decrease
    81// - liquidityStr: liquidity amount to remove, represented as a decimal string
    82// - amount0MinStr: minimum acceptable token0 amount for slippage protection
    83// - amount1MinStr: minimum acceptable token1 amount for slippage protection
    84// - deadline: transaction expiration timestamp
    85//
    86// The accrued swap fees are collected first, so the returned fee amounts are
    87// net of the withdrawal fee while the returned principal is not subject to it.
    88//
    89// Returns:
    90// - positionId: position NFT token ID that had liquidity removed
    91// - liquidity: removed liquidity amount, represented as a decimal string
    92// - fee0: token0 fees collected, net of the withdrawal fee
    93// - fee1: token1 fees collected, net of the withdrawal fee
    94// - amount0: principal amount of token0 returned to the caller
    95// - amount1: principal amount of token1 returned to the caller
    96// - poolKey: canonical pool key for the position
    97//
    98// Halt check: reverts while the Withdraw halt scope is active.
    99func DecreaseLiquidity(
    100 cur realm,
    101 positionId uint64,
    102 liquidityStr string,
    103 amount0MinStr string,
    104 amount1MinStr string,
    105 deadline int64,
    106) (uint64, string, string, string, string, string, string) {
    107 return getImplementation().DecreaseLiquidity(0, cur, positionId, liquidityStr, amount0MinStr, amount1MinStr, deadline)
    108}
    109
    110// Reposition changes the tick range of a position.
    111//
    112// Parameters:
    113// - cur: current realm context; callers use cross(cur) when crossing into this realm
    114// - positionId: position NFT token ID to reposition
    115// - tickLower: new lower tick boundary of the position's price range
    116// - tickUpper: new upper tick boundary of the position's price range
    117// - amount0DesiredStr: desired token0 amount for the new range, represented as a decimal string
    118// - amount1DesiredStr: desired token1 amount for the new range, represented as a decimal string
    119// - amount0MinStr: minimum acceptable token0 amount for slippage protection
    120// - amount1MinStr: minimum acceptable token1 amount for slippage protection
    121// - deadline: transaction expiration timestamp
    122//
    123// Returns:
    124// - positionId: position NFT token ID that was repositioned
    125// - liquidity: new liquidity amount, represented as a decimal string
    126// - tickLower: new lower tick boundary
    127// - tickUpper: new upper tick boundary
    128// - amount0: actual token0 amount added to the new range, represented as a decimal string
    129// - amount1: actual token1 amount added to the new range, represented as a decimal string
    130//
    131// Halt check: reverts while the Position halt scope is active.
    132func Reposition(
    133 cur realm,
    134 positionId uint64,
    135 tickLower int32,
    136 tickUpper int32,
    137 amount0DesiredStr string,
    138 amount1DesiredStr string,
    139 amount0MinStr string,
    140 amount1MinStr string,
    141 deadline int64,
    142) (uint64, string, int32, int32, string, string) {
    143 return getImplementation().Reposition(0, cur, positionId, tickLower, tickUpper, amount0DesiredStr, amount1DesiredStr, amount0MinStr, amount1MinStr, deadline)
    144}
    145
    146// CollectFee collects accumulated fees from a position.
    147//
    148// Parameters:
    149// - cur: current realm context; callers use cross(cur) when crossing into this realm
    150// - positionId: position NFT token ID whose fees are collected
    151//
    152// Returns:
    153// - positionId: position NFT token ID whose fees were collected
    154// - tokensCollected0: token0 fees paid out to the caller, net of the withdrawal fee
    155// - tokensCollected1: token1 fees paid out to the caller, net of the withdrawal fee
    156// - poolKey: canonical pool key for the position
    157// - totalAmount0: token0 fees collected before the withdrawal fee
    158// - totalAmount1: token1 fees collected before the withdrawal fee
    159//
    160// Halt check: reverts while the Withdraw halt scope is active.
    161func CollectFee(
    162 cur realm,
    163 positionId uint64,
    164) (uint64, string, string, string, string, string) {
    165 return getImplementation().CollectFee(0, cur, positionId)
    166}
    167
    168// SetPositionOperator sets an operator for a position.
    169//
    170// Parameters:
    171// - cur: current realm context; callers use cross(cur) when crossing into this realm
    172// - positionId: position NFT token ID whose operator is changed
    173// - operator: operator address to approve; the zero address removes the operator
    174func SetPositionOperator(
    175 cur realm,
    176 positionId uint64,
    177 operator address,
    178) {
    179 getImplementation().SetPositionOperator(0, cur, positionId, operator)
    180}
    181

    vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.