PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

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/staker

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
staker
Namespace
gnoswap
Files
17 (README)(gnomod.toml)
Exported functions
102
Module
gno.land/r/gnoswap/staker
gno
0.9

Files (17)

  • README.mdmarkdown
  • gnomod.tomltoml
  • accessor.gnogno
  • counter.gnogno
  • deposit.gnogno
  • doc.gnogno
  • getter_utils.gnogno
  • getter.gnogno
  • pool.gnogno
  • proxy.gnogno
  • render.gnogno
  • state.gnogno
  • store.gnogno
  • tree.gnogno
  • types.gnogno
  • unstaked_position.gnogno
  • upgrade.gnogno
  • unstaked_position.gnogno
    1package staker23// UnstakedPosition is the exit checkpoint of a position that left the pool before collecting.4//5// It pins the pool state a later collect must reproduce the exit-time reward from: the tick6// observed at the exit, the two boundary ticks (which the unstake may prune from the pool),7// and the tier context (which a later tier change would otherwise re-rate the window with).

    Functions

    • AddToken(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}, tokenPath string)

    • CancelExternalIncentive(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}, targetPoolPath string, incentiveId string)

    • ChangePoolTier(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}, poolPath string, tier uint64)

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

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

    • CollectEmissionReward(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) (int64, int64)

    • CollectExternalIncentivePenalty(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}, targetPoolPath string, incentiveId string, refundAddress string) int64

    • CollectExternalIncentiveReward(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, incentiveId string) (int64, int64)

    • CollectReward(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) (string, string, map[string]int64, map[string]int64)

    • CreateExternalIncentive(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}, targetPoolPath string, rewardToken string, rewardAmount int64, startTimestamp int64, endTimestamp int64)

    • DefaultAllowedTokens() []string

    • DefaultWarmupTemplate() []gno.land/r/gnoswap/staker.Warmup

    • EndExternalIncentive(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}, targetPoolPath string, incentiveId string, refundAddress string)

    • GetAllowedTokens() []string

    • GetCreatedHeightOfIncentive(poolPath string, incentiveId string) (int64, interface {Error func() string})

    • GetDeniedRewardTokens() []string

    • GetDeposit(lpTokenId uint64) (*gno.land/r/gnoswap/staker.Deposit, interface {Error func() string})

    • GetDepositCollectedExternalReward(lpTokenId uint64, incentiveId string) (int64, interface {Error func() string})

    • GetDepositCollectedInternalReward(lpTokenId uint64) (int64, interface {Error func() string})

    • GetDepositExternalIncentiveIdList(lpTokenId uint64) ([]string, interface {Error func() string})

    • GetDepositExternalRewardLastCollectTimestamp(lpTokenId uint64, incentiveId string) (int64, interface {Error func() string})

    • GetDepositGnsAmount() int64

    • GetDepositInternalRewardLastCollectTimestamp(lpTokenId uint64) (int64, interface {Error func() string})

    • GetDepositLiquidity(lpTokenId uint64) (*gno.land/p/gnoswap/uint256/v1.Uint, interface {Error func() string})

    • GetDepositLiquidityAsString(lpTokenId uint64) (string, interface {Error func() string})

    • GetDepositOwner(lpTokenId uint64) (string, interface {Error func() string})

    • GetDepositStakeTime(lpTokenId uint64) (int64, interface {Error func() string})

    • GetDepositTargetPoolPath(lpTokenId uint64) (string, interface {Error func() string})

    • GetDepositTickLower(lpTokenId uint64) (int32, interface {Error func() string})

    • GetDepositTickUpper(lpTokenId uint64) (int32, interface {Error func() string})

    • GetDepositWarmUp(lpTokenId uint64) ([]gno.land/r/gnoswap/staker.Warmup, interface {Error func() string})

    • GetExternalIncentiveByPoolPath(poolPath string) ([]gno.land/r/gnoswap/staker.ExternalIncentive, interface {Error func() string})

    • GetImplementationPackagePath() string

    • GetIncentiveAccumulatedPenaltyAmount(poolPath string, incentiveId string) (int64, interface {Error func() string})

    • GetIncentiveCreatedTimestamp(poolPath string, incentiveId string) (int64, interface {Error func() string})

    • GetIncentiveCreator(poolPath string, incentiveId string) (string, interface {Error func() string})

    • GetIncentiveDepositGnsAmount(poolPath string, incentiveId string) (int64, interface {Error func() string})

    • GetIncentiveDistributedRewardAmount(poolPath string, incentiveId string) (int64, interface {Error func() string})

    • GetIncentiveEndTimestamp(poolPath string, incentiveId string) (int64, interface {Error func() string})

    • GetIncentiveRefunded(poolPath string, incentiveId string) (bool, interface {Error func() string})

    • GetIncentiveRemainingRewardAmount(poolPath string, incentiveId string) (int64, interface {Error func() string})

    • GetIncentiveRewardAmount(poolPath string, incentiveId string) (*gno.land/p/gnoswap/uint256/v1.Uint, interface {Error func() string})

    • GetIncentiveRewardAmountAsString(poolPath string, incentiveId string) (string, interface {Error func() string})

    • GetIncentiveRewardPerSecondX128(poolPath string, incentiveId string) (*gno.land/p/gnoswap/uint256/v1.Uint, interface {Error func() string})

    • GetIncentiveRewardToken(poolPath string, incentiveId string) (string, interface {Error func() string})

    • GetIncentiveStartTimestamp(poolPath string, incentiveId string) (int64, interface {Error func() string})

    • GetIncentiveTotalRewardAmount(poolPath string, incentiveId string) (int64, interface {Error func() string})

    • GetMinimumRewardAmount() int64

    • GetMinimumRewardAmountForToken(tokenPath string) int64

    • GetPendingProtocolFees() map[string]int64

    • GetPool(poolPath string) (*gno.land/r/gnoswap/staker.Pool, interface {Error func() string})

    • GetPoolGlobalRewardRatioAccumulations(poolPath string) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree

    • GetPoolHistoricalTicks(poolPath string) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree

    • GetPoolIncentives(poolPath string) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree

    • GetPoolReward(tier uint64) (int64, interface {Error func() string})

    • GetPoolRewardCaches(poolPath string) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree

    • GetPoolsByTier(tier uint64) ([]string, interface {Error func() string})

    • GetPoolStakedLiquidity(poolPath string) (string, interface {Error func() string})

    • GetPoolTier(poolPath string) uint64

    • GetPoolTierCount(tier uint64) uint64

    • GetPoolTierRatio(poolPath string) (uint64, interface {Error func() string})

    • GetSpecificTokenMinimumRewardAmount(tokenPath string) (int64, bool)

    • GetTargetPoolPathByIncentiveId(poolPath string, incentiveId string) (string, interface {Error func() string})

    • GetTotalEmissionSent() int64

    • GetUncollectedIncentiveCount(incentiveId string) int64

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

    • GetUnstakedPositionPendingIncentives(positionId uint64) ([]string, interface {Error func() string})

    • GetUnstakingFee() uint64

    • GetWarmupTemplate() []gno.land/r/gnoswap/staker.Warmup

    • HasUnstakedPosition(positionId uint64) bool

    • IsIncentiveActive(poolPath string, incentiveId string) (bool, interface {Error func() string})

    • IsStaked(positionId uint64) bool

    • NewBPTreeN(fanout int) *gno.land/p/nt/bptree/v0.BPTree

    • NewCounter() *gno.land/r/gnoswap/staker.Counter

    • NewDeposit(owner string, targetPoolPath string, liquidity *gno.land/p/gnoswap/uint256/v1.Uint, currentTime int64, tickLower int32, tickUpper int32, warmups []gno.land/r/gnoswap/staker.Warmup) *gno.land/r/gnoswap/staker.Deposit

    • NewExternalIncentive(incentiveId string, targetPoolPath string, rewardToken string, rewardAmount int64, startTimestamp int64, endTimestamp int64, creator string, depositGnsAmount int64, createdHeight int64, currentTime int64) *gno.land/r/gnoswap/staker.ExternalIncentive

    • NewIncentives(targetPoolPath string) *gno.land/r/gnoswap/staker.Incentives

    • NewPool(poolPath string, currentTime int64) *gno.land/r/gnoswap/staker.Pool

    • NewStakerStore(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 {AddAllowedToken func(int, .uverse.realm, string) .uverse.error; AddDeniedRewardToken func(int, .uverse.realm, string) .uverse.error; GetAllowedTokens func() []string; GetCurrentSwapBatch func() *gno.land/r/gnoswap/staker.SwapBatchProcessor; GetDeniedRewardTokens func() []string; GetDepositGnsAmount func() int64; GetDeposits func() *gno.land/p/nt/bptree/v0.BPTree; GetExternalIncentives func() *gno.land/p/nt/bptree/v0.BPTree; GetIncentiveCounter func() *gno.land/r/gnoswap/staker.Counter; GetMinimumRewardAmount func() int64; GetPendingProtocolFee func(string) int64; GetPendingProtocolFees func() map[string]int64; GetPoolTierCounts func() [4]uint64; GetPoolTierCurrentEmission func() int64; GetPoolTierGetEmission func() func() (int64, .uverse.error); GetPoolTierGetHalvingBlocksInRange func() func(int64, int64) ([]int64, []int64, .uverse.error); GetPoolTierLastRewardCacheTimestamp func() int64; GetPoolTierMemberships func() *gno.land/p/nt/bptree/v0.BPTree; GetPoolTierRatio func() gno.land/r/gnoswap/staker.TierRatio; GetPools func() *gno.land/p/nt/bptree/v0.BPTree; GetTokenSpecificMinimumRewards func() map[string]int64; GetTotalEmissionSent func() int64; GetUncollectedIncentiveCounts func() *gno.land/p/nt/bptree/v0.BPTree; GetUnstakedPositions func() *gno.land/p/nt/bptree/v0.BPTree; GetUnstakingFee func() uint64; GetWarmupTemplate func() []gno.land/r/gnoswap/staker.Warmup; HasAllowedTokensStoreKey func() bool; HasCurrentSwapBatchStoreKey func() bool; HasDeniedRewardTokensStoreKey func() bool; HasDepositGnsAmountStoreKey func() bool; HasDepositsStoreKey func() bool; HasExternalIncentivesStoreKey func() bool; HasIncentiveCounterStoreKey func() bool; HasMinimumRewardAmountStoreKey func() bool; HasPendingProtocolFeesStoreKey func() bool; HasPoolTierCountsStoreKey func() bool; HasPoolTierCurrentEmissionStoreKey func() bool; HasPoolTierGetEmissionStoreKey func() bool; HasPoolTierGetHalvingBlocksInRangeStoreKey func() bool; HasPoolTierLastRewardCacheTimestampStoreKey func() bool; HasPoolTierMembershipsStoreKey func() bool; HasPoolTierRatioStoreKey func() bool; HasPoolsStoreKey func() bool; HasTokenSpecificMinimumRewardsStoreKey func() bool; HasTotalEmissionSentStoreKey func() bool; HasUncollectedIncentiveCountsStoreKey func() bool; HasUnstakedPositionsStoreKey func() bool; HasUnstakingFeeStoreKey func() bool; HasWarmupTemplateStoreKey func() bool; NextIncentiveID func(.uverse.address, int64) string; RemoveAllowedToken func(int, .uverse.realm, string) .uverse.error; RemoveDeniedRewardToken func(int, .uverse.realm, string) .uverse.error; RemovePendingProtocolFee func(int, .uverse.realm, string) .uverse.error; RemoveTokenSpecificMinimumRewardItem func(int, .uverse.realm, string) .uverse.error; SetAllowedTokens func(int, .uverse.realm, []string) .uverse.error; SetCurrentSwapBatch func(int, .uverse.realm, *gno.land/r/gnoswap/staker.SwapBatchProcessor) .uverse.error; SetDepositGnsAmount func(int, .uverse.realm, int64) .uverse.error; SetDeposits func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetExternalIncentives func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetIncentiveCounter func(int, .uverse.realm, *gno.land/r/gnoswap/staker.Counter) .uverse.error; SetMinimumRewardAmount func(int, .uverse.realm, int64) .uverse.error; SetPendingProtocolFee func(int, .uverse.realm, string, int64) .uverse.error; SetPendingProtocolFees func(int, .uverse.realm, map[string]int64) .uverse.error; SetPoolTierCounts func(int, .uverse.realm, [4]uint64) .uverse.error; SetPoolTierCurrentEmission func(int, .uverse.realm, int64) .uverse.error; SetPoolTierGetEmission func(int, .uverse.realm, func() (int64, .uverse.error)) .uverse.error; SetPoolTierGetHalvingBlocksInRange func(int, .uverse.realm, func(int64, int64) ([]int64, []int64, .uverse.error)) .uverse.error; SetPoolTierLastRewardCacheTimestamp func(int, .uverse.realm, int64) .uverse.error; SetPoolTierMemberships func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetPoolTierRatio func(int, .uverse.realm, gno.land/r/gnoswap/staker.TierRatio) .uverse.error; SetPools func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetTokenSpecificMinimumRewardItem func(int, .uverse.realm, string, int64) .uverse.error; SetTokenSpecificMinimumRewards func(int, .uverse.realm, map[string]int64) .uverse.error; SetTotalEmissionSent func(int, .uverse.realm, int64) .uverse.error; SetUncollectedIncentiveCounts func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetUnstakedPositions func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetUnstakingFee func(int, .uverse.realm, uint64) .uverse.error; SetWarmupTemplate func(int, .uverse.realm, []gno.land/r/gnoswap/staker.Warmup) .uverse.error}

    • NewSwapBatchProcessor(poolPath string, pool *gno.land/r/gnoswap/staker.Pool, timestamp int64) *gno.land/r/gnoswap/staker.SwapBatchProcessor

    • NewSwapTickCross(tickID int32, zeroForOne bool, delta *gno.land/p/gnoswap/int256/v1.Int) *gno.land/r/gnoswap/staker.SwapTickCross

    • NewTick(tickId int32) *gno.land/r/gnoswap/staker.Tick

    • NewTicks() struct{tree *gno.land/p/nt/bptree/v0.BPTree}

    • NewTierRatio(tier1 uint64, tier2 uint64, tier3 uint64) struct{Tier1 uint64; Tier2 uint64; Tier3 uint64}

    • NewUintTree() *gno.land/r/gnoswap/staker.UintTree

    • NewUintTreeN(fanout int) *gno.land/r/gnoswap/staker.UintTree

    • NewUnstakedPosition(deposit *gno.land/r/gnoswap/staker.Deposit, exitTime int64, exitTick int32, lowerTick *gno.land/r/gnoswap/staker.Tick, upperTick *gno.land/r/gnoswap/staker.Tick, lowerOutsideAcc string, upperOutsideAcc string, tier uint64, tierRatio uint64, tierCount uint64, unstakingFee uint64, pendingIncentiveIds []string) *gno.land/r/gnoswap/staker.UnstakedPosition

    • NewWarmup(timeDuration int64, nextWarmupTime int64, warmupRatio uint64) struct{TimeDuration int64; NextWarmupTime int64; WarmupRatio uint64}

    • 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/staker.IStakerStore, gno.land/r/gnoswap/staker.PoolAccessor, gno.land/r/gnoswap/staker.EmissionAccessor, gno.land/r/gnoswap/staker.NFTAccessor) gno.land/r/gnoswap/staker.IStaker)

    • RemovePoolTier(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}, poolPath string)

    • RemoveToken(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}, tokenPath string)

    • Render(path string) string

    • SetDeniedRewardToken(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}, tokenPath string, denied bool)

    • SetDepositGnsAmount(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}, amount int64)

    • SetMinimumRewardAmount(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}, amount int64)

    • SetPoolTier(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}, poolPath string, tier uint64)

    • SetTokenMinimumRewardAmount(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}, paramsStr string)

    • SetUnStakingFee(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}, fee uint64)

    • SetWarmUp(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}, pct int64, timeDuration int64)

    • StakeToken(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, referrer string) string

    • UnStakeToken(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) 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 ↗
    8// Collection is per source, so the checkpoint tracks what is left and is dropped when nothing is.
    9type UnstakedPosition struct {
    10 deposit *Deposit
    11 exitTime int64
    12 exitTick int32
    13 lowerTick *Tick
    14 upperTick *Tick
    15
    16 // Outside accumulations of the two boundary ticks at exitTime, as decimal strings. Entries
    17 // before exitTime can no longer change, but the one at exitTime can be overwritten by a tick
    18 // cross later in the same block, so it is pinned rather than read back.
    19 lowerOutsideAcc string
    20 upperOutsideAcc string
    21
    22 tier uint64
    23 tierRatio uint64
    24 tierCount uint64
    25
    26 // unstakingFee is the staking-reward fee rate in force at exitTime. The window closed under
    27 // it, so a later rate change must not apply retroactively at collect time.
    28 unstakingFee uint64
    29
    30 emissionCollected bool
    31 pendingIncentiveIds map[string]bool
    32}
    33
    34// NewUnstakedPosition creates an exit checkpoint owing every reward source of the deposit.
    35//
    36// Parameters:
    37// - deposit: Deposit state captured when the position leaves the pool.
    38// - exitTime: Unix timestamp when staking ended and this checkpoint's reward window stopped.
    39// - exitTick: Pool tick observed at exitTime for reconstructing in-range rewards.
    40// - lowerTick: Snapshot of the position's lower boundary tick, retained if the live pool prunes it.
    41// - upperTick: Snapshot of the position's upper boundary tick, retained if the live pool prunes it.
    42// - lowerOutsideAcc: Decimal-encoded outside reward-ratio accumulation of the lower tick at exitTime.
    43// - upperOutsideAcc: Decimal-encoded outside reward-ratio accumulation of the upper tick at exitTime.
    44// - tier: Pool emission tier at exitTime; zero denotes that the pool was not tiered.
    45// - tierRatio: Tier reward-share ratio, in its stored scaled form, at exitTime.
    46// - tierCount: Number of pools sharing the tier at exitTime for dividing tier rewards.
    47// - unstakingFee: Staking-reward fee rate in basis points at exitTime (0-1,000; 100 = 1%).
    48// - pendingIncentiveIds: External incentive IDs whose rewards are still owed by the position.
    49//
    50// Returns:
    51// - position: New exit checkpoint retaining the deposit and exit-time reward context; emission is initially uncollected and every supplied incentive is pending.
    52func NewUnstakedPosition(
    53 deposit *Deposit,
    54 exitTime int64,
    55 exitTick int32,
    56 lowerTick *Tick,
    57 upperTick *Tick,
    58 lowerOutsideAcc string,
    59 upperOutsideAcc string,
    60 tier uint64,
    61 tierRatio uint64,
    62 tierCount uint64,
    63 unstakingFee uint64,
    64 pendingIncentiveIds []string,
    65) *UnstakedPosition {
    66 // Allocated here so this realm owns it; a map built by the caller is readonly tainted.
    67 pending := make(map[string]bool)
    68 for _, incentiveId := range pendingIncentiveIds {
    69 pending[incentiveId] = true
    70 }
    71
    72 return &UnstakedPosition{
    73 deposit: deposit,
    74 exitTime: exitTime,
    75 exitTick: exitTick,
    76 lowerTick: lowerTick,
    77 upperTick: upperTick,
    78 lowerOutsideAcc: lowerOutsideAcc,
    79 upperOutsideAcc: upperOutsideAcc,
    80 tier: tier,
    81 tierRatio: tierRatio,
    82 tierCount: tierCount,
    83 unstakingFee: unstakingFee,
    84 pendingIncentiveIds: pending,
    85 }
    86}
    87
    88// Deposit returns the deposit snapshot captured when this position was unstaked.
    89//
    90// Returns:
    91// - deposit: Stored deposit state, including its owner, pool, liquidity, ticks, warmups, and collected reward fields.
    92func (u *UnstakedPosition) Deposit() *Deposit { return u.deposit }
    93
    94// ExitTime returns the timestamp at which the position stopped accruing rewards.
    95//
    96// Returns:
    97// - exitTime: Unix timestamp pinned as the end of this position's reward-accrual window.
    98func (u *UnstakedPosition) ExitTime() int64 { return u.exitTime }
    99
    100// ExitTick returns the pool tick observed at ExitTime.
    101//
    102// Returns:
    103// - exitTick: Tick value used to determine the position's in-range status at the exit checkpoint.
    104func (u *UnstakedPosition) ExitTick() int32 { return u.exitTick }
    105
    106// LowerTick returns the position's lower boundary tick snapshot.
    107//
    108// Returns:
    109// - lowerTick: Stored lower boundary tick used when calculating rewards for this exit checkpoint.
    110func (u *UnstakedPosition) LowerTick() *Tick { return u.lowerTick }
    111
    112// UpperTick returns the position's upper boundary tick snapshot.
    113//
    114// Returns:
    115// - upperTick: Stored upper boundary tick used when calculating rewards for this exit checkpoint.
    116func (u *UnstakedPosition) UpperTick() *Tick { return u.upperTick }
    117
    118// LowerOutsideAcc returns the lower boundary tick's outside accumulation at ExitTime.
    119//
    120// Returns:
    121// - lowerOutsideAcc: Decimal-encoded reward-ratio accumulation outside the lower boundary at exit.
    122func (u *UnstakedPosition) LowerOutsideAcc() string { return u.lowerOutsideAcc }
    123
    124// UpperOutsideAcc returns the upper boundary tick's outside accumulation at ExitTime.
    125//
    126// Returns:
    127// - upperOutsideAcc: Decimal-encoded reward-ratio accumulation outside the upper boundary at exit.
    128func (u *UnstakedPosition) UpperOutsideAcc() string { return u.upperOutsideAcc }
    129
    130// Tier returns the pool's emission tier at ExitTime, or 0 when it was not tiered.
    131//
    132// Returns:
    133// - tier: Tier identifier pinned at exit; zero means no emission tier applied.
    134func (u *UnstakedPosition) Tier() uint64 { return u.tier }
    135
    136// TierRatio returns the tier's emission ratio at ExitTime.
    137//
    138// Returns:
    139// - tierRatio: Stored scaled reward-share ratio for the pinned tier at exit.
    140func (u *UnstakedPosition) TierRatio() uint64 { return u.tierRatio }
    141
    142// TierCount returns how many pools shared the tier at ExitTime.
    143//
    144// Returns:
    145// - tierCount: Number of pools in the pinned tier when the position exited.
    146func (u *UnstakedPosition) TierCount() uint64 { return u.tierCount }
    147
    148// UnstakingFee returns the staking-reward fee rate in force at ExitTime.
    149//
    150// Returns:
    151// - unstakingFee: Fee rate pinned for this exit in basis points (0-1,000; 100 = 1%).
    152func (u *UnstakedPosition) UnstakingFee() uint64 { return u.unstakingFee }
    153
    154// EmissionCollected reports whether the emission reward has been collected.
    155//
    156// Returns:
    157// - collected: True after MarkEmissionCollected has been called; false while the internal reward remains pending.
    158func (u *UnstakedPosition) EmissionCollected() bool { return u.emissionCollected }
    159
    160// MarkEmissionCollected records that the emission reward has been collected.
    161func (u *UnstakedPosition) MarkEmissionCollected() { u.emissionCollected = true }
    162
    163// HasPendingIncentiveId reports whether the incentive is still to be collected.
    164//
    165// Parameters:
    166// - incentiveId: External incentive identifier to look up in this checkpoint's pending set.
    167//
    168// Returns:
    169// - pending: True when incentiveId is currently pending; false when it is absent or the pending set is nil.
    170func (u *UnstakedPosition) HasPendingIncentiveId(incentiveId string) bool {
    171 if u.pendingIncentiveIds == nil {
    172 return false
    173 }
    174
    175 return u.pendingIncentiveIds[incentiveId]
    176}
    177
    178// PendingIncentiveIdList returns the incentives still to be collected.
    179//
    180// Returns:
    181// - incentiveIds: IDs currently present in the pending set; iteration order is unspecified.
    182func (u *UnstakedPosition) PendingIncentiveIdList() []string {
    183 incentiveIds := make([]string, 0, len(u.pendingIncentiveIds))
    184 for incentiveId := range u.pendingIncentiveIds {
    185 incentiveIds = append(incentiveIds, incentiveId)
    186 }
    187
    188 return incentiveIds
    189}
    190
    191// PendingIncentiveCount returns how many incentives are still to be collected.
    192//
    193// Returns:
    194// - count: Number of external incentive IDs currently pending in the checkpoint.
    195func (u *UnstakedPosition) PendingIncentiveCount() int {
    196 return len(u.pendingIncentiveIds)
    197}
    198
    199// HasPendingIncentives reports whether any incentive is still to be collected.
    200//
    201// Returns:
    202// - pending: True when at least one external incentive ID remains pending; false otherwise.
    203func (u *UnstakedPosition) HasPendingIncentives() bool {
    204 return len(u.pendingIncentiveIds) > 0
    205}
    206
    207// MarkIncentiveCollected records that the incentive has been collected.
    208//
    209// Parameters:
    210// - incentiveId: External incentive identifier to remove from the pending set.
    211func (u *UnstakedPosition) MarkIncentiveCollected(incentiveId string) {
    212 if u.pendingIncentiveIds == nil {
    213 return
    214 }
    215
    216 delete(u.pendingIncentiveIds, incentiveId)
    217}
    218
    219// FullyCollected reports whether every reward source has been collected.
    220//
    221// Returns:
    222// - collected: True only when the internal emission flag is set and no external incentive IDs remain pending.
    223func (u *UnstakedPosition) FullyCollected() bool {
    224 return u.emissionCollected && !u.HasPendingIncentives()
    225}
    226

    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.