scanWindow
untyped bigintscanWindow is how many stored position records one page walks. There is no address-to-positions index anywhere in GnoSwap: gnft is a plain grc721 with no enumerable extension, so the only way to find an address's positions is to walk the records and ask each one who owns it. GnoSwap's own position realm renders a keyed lookup and says out loud that it "does not enumerate positions", which is the same ceiling talking. Queries get 3,000,000,000 gas (maxGasQuery, gno.land/pkg/sdk/vm/keeper.go), so the walk is paged rather than unbounded, and the page footer links the next one.
Value
(250 <untyped> bigint)
stakerPath
untyped stringstakerPath is the realm that custodies a staked position's NFT. Staking transfers the token to it, so for anything staked the grc721 owner is this address and not a person: see resolveOwner.
Value
"gno.land/r/gnoswap/staker"
Render
func(path string) stringRender serves three routes: the index, an address page, and the next page of an address whose records did not fit in one scan window. "" the index "g1..." that address, scanning from record 0 "g1.../from/500" the same, scanning from record 500
- OID
- 065df7…0da7:3
Render details
shortSelf
untyped stringshortSelf is this realm's own render prefix, used in the links it prints.
Value
"/r/moul/x/gsdash/v0"
renderIndex
func() string- OID
- 065df7…0da7:5
renderIndex details
renderAddress
func(addr .uverse.address, offset int) string- OID
- 065df7…0da7:6
renderAddress details
renderPositions
func(addr .uverse.address, offset int) stringrenderPositions walks one window of the position records and prints the rows belonging to addr. The walk is deliberately cheap per record and expensive per hit: identifying the owner is one or two tree lookups, while the price math behind IsInRange, the token balances and the unclaimed fees costs far more. Only a row that is actually printed pays for it.
- OID
- 065df7…0da7:7
renderPositions details
row
func(id uint64, staked bool) []stringrow is the expensive half: everything here reads pool price state or recomputes a fee, so it runs for a matched position and never for a scanned one.
- OID
- 065df7…0da7:8
row details
resolveOwner
func(id uint64) (owner .uverse.address, staked bool, ok bool)- OID
- 065df7…0da7:9
resolveOwner details
parsePath
func(path string) (addr string, offset int, ok bool)parsePath splits an address route from its optional scan offset.
- OID
- 065df7…0da7:10
parsePath details
shortPool
func(poolKey string) stringshortPool turns a pool key ("\<token0 path>.\<symbol>:\<token1 path>.\<symbol>:\<fee>") into something that fits a table cell.
- OID
- 065df7…0da7:11
shortPool details
symbolOf
func(tokenKey string) stringsymbolOf takes the symbol off a GnoSwap token key, which is the grc20 registry form "\<pkgpath>.\<Symbol>".
- OID
- 065df7…0da7:12
symbolOf details
yesNo
func(b bool) string- OID
- 065df7…0da7:13