PoolAccessor
typeValue
staker.PoolAccessor
poolAccessor
typeValue
staker.poolAccessor
newPoolAccessor
func() staker.PoolAccessor- OID
- 0742c3…b8af:3
newPoolAccessor details
EmissionAccessor
typeValue
staker.EmissionAccessor
emissionAccessor
typeValue
staker.emissionAccessor
newEmissionAccessor
func() staker.EmissionAccessor- OID
- 0742c3…b8af:5
newEmissionAccessor details
NFTAccessor
typeValue
staker.NFTAccessor
gnftAccessor
typeValue
staker.gnftAccessor
newNFTAccessor
func() staker.NFTAccessor- OID
- 0742c3…b8af:6
newNFTAccessor details
Counter
typeValue
staker.Counter
NewCounter
func() *staker.Counter- OID
- 0742c3…b8af:7
NewCounter details
Deposit
typeValue
staker.Deposit
NewDeposit
func(owner .uverse.address, targetPoolPath string, liquidity *uint256.Uint, currentTime int64, tickLower int32, tickUpper int32, warmups []staker.Warmup) *staker.Deposit- OID
- 0742c3…b8af:9
NewDeposit details
Warmup
typeValue
staker.Warmup
NewWarmup
func(timeDuration int64, nextWarmupTime int64, warmupRatio uint64) staker.Warmup- OID
- 0742c3…b8af:11
NewWarmup details
DefaultWarmupTemplate
func() []staker.Warmup- OID
- 0742c3…b8af:12
DefaultWarmupTemplate details
GNS_PATH
stringValue
"gno.land/r/gnoswap/gns.GNS"
WUGNOT_PATH
stringValue
"gno.land/r/gnoland/wugnot.wugnot"
DefaultAllowedTokens
func() []string- OID
- 0742c3…b8af:13
DefaultAllowedTokens details
GetPool
func(poolPath string) *staker.PoolGetPool returns a copy of the pool for the given path.
- OID
- 0742c3…b8af:14
GetPool details
GetIncentive
func(poolPath string, incentiveId string) *staker.ExternalIncentiveGetIncentive returns a copy of the incentive for the given pool and ID.
- OID
- 0742c3…b8af:16
GetIncentive details
GetDeposit
func(lpTokenId uint64) *staker.DepositGetDeposit returns a copy of the deposit for the given position ID.
- OID
- 0742c3…b8af:17
GetDeposit details
CollectableEmissionReward
func(positionId uint64) int64CollectableEmissionReward returns the claimable internal reward amount.
- OID
- 0742c3…b8af:18
CollectableEmissionReward details
CollectableExternalIncentiveReward
func(positionId uint64, incentiveId string) int64CollectableExternalIncentiveReward returns the claimable external reward amount.
- OID
- 0742c3…b8af:19
CollectableExternalIncentiveReward details
GetCreatedHeightOfIncentive
func(poolPath string, incentiveId string) int64GetCreatedHeightOfIncentive returns the block height when an incentive was created.
- OID
- 0742c3…b8af:20
GetCreatedHeightOfIncentive details
GetIncentiveCreatedTimestamp
func(poolPath string, incentiveId string) int64GetIncentiveCreatedTimestamp returns the creation timestamp of an incentive.
- OID
- 0742c3…b8af:21
GetIncentiveCreatedTimestamp details
GetIncentiveTotalRewardAmount
func(poolPath string, incentiveId string) int64GetIncentiveTotalRewardAmount returns the total reward amount of an incentive.
- OID
- 0742c3…b8af:22
GetIncentiveTotalRewardAmount details
GetIncentiveDistributedRewardAmount
func(poolPath string, incentiveId string) int64GetIncentiveDistributedRewardAmount returns the distributed reward amount of an incentive.
- OID
- 0742c3…b8af:23
GetIncentiveDistributedRewardAmount details
GetIncentiveRemainingRewardAmount
func(poolPath string, incentiveId string) int64GetIncentiveRemainingRewardAmount returns the remaining reward amount of an incentive.
- OID
- 0742c3…b8af:24
GetIncentiveRemainingRewardAmount details
GetIncentiveAccumulatedPenaltyAmount
func(poolPath string, incentiveId string) int64GetIncentiveAccumulatedPenaltyAmount returns the accumulated warmup penalty amount of an incentive.
- OID
- 0742c3…b8af:25
GetIncentiveAccumulatedPenaltyAmount details
GetIncentiveDepositGnsAmount
func(poolPath string, incentiveId string) int64GetIncentiveDepositGnsAmount returns the deposited GNS amount of an incentive.
- OID
- 0742c3…b8af:26
GetIncentiveDepositGnsAmount details
GetIncentiveRefunded
func(poolPath string, incentiveId string) boolGetIncentiveRefunded returns whether an incentive has been refunded.
- OID
- 0742c3…b8af:27
GetIncentiveRefunded details
IsIncentiveActive
func(poolPath string, incentiveId string) boolIsIncentiveActive returns whether an incentive is active.
- OID
- 0742c3…b8af:28
IsIncentiveActive details
GetDepositExternalRewardLastCollectTimestamp
func(lpTokenId uint64, incentiveId string) int64GetDepositExternalRewardLastCollectTimestamp returns the last external reward collection time for a position.
- OID
- 0742c3…b8af:29
GetDepositExternalRewardLastCollectTimestamp details
GetDepositGnsAmount
func() int64GetDepositGnsAmount returns the required GNS deposit amount for staking.
- OID
- 0742c3…b8af:30
GetDepositGnsAmount details
GetDepositInternalRewardLastCollectTimestamp
func(lpTokenId uint64) int64GetDepositInternalRewardLastCollectTimestamp returns the last internal reward collection time for a position.
- OID
- 0742c3…b8af:31
GetDepositInternalRewardLastCollectTimestamp details
GetDepositCollectedInternalReward
func(lpTokenId uint64) int64GetDepositCollectedInternalReward returns the collected internal reward amount of a position.
- OID
- 0742c3…b8af:32
GetDepositCollectedInternalReward details
GetDepositCollectedExternalReward
func(lpTokenId uint64, incentiveId string) int64GetDepositCollectedExternalReward returns the collected external reward amount of a position.
- OID
- 0742c3…b8af:33
GetDepositCollectedExternalReward details
GetDepositLiquidity
func(lpTokenId uint64) *uint256.UintGetDepositLiquidity returns the liquidity amount of a staked position.
- OID
- 0742c3…b8af:34
GetDepositLiquidity details
GetDepositLiquidityAsString
func(lpTokenId uint64) stringGetDepositLiquidityAsString returns the liquidity amount of a staked position as string.
- OID
- 0742c3…b8af:35
GetDepositLiquidityAsString details
GetDepositOwner
func(lpTokenId uint64) .uverse.address- OID
- 0742c3…b8af:36
GetDepositOwner details
GetDepositStakeTime
func(lpTokenId uint64) int64GetDepositStakeTime returns the staking duration of a position.
- OID
- 0742c3…b8af:37
GetDepositStakeTime details
GetDepositTargetPoolPath
func(lpTokenId uint64) stringGetDepositTargetPoolPath returns the pool path of a staked position.
- OID
- 0742c3…b8af:38
GetDepositTargetPoolPath details
GetDepositTickLower
func(lpTokenId uint64) int32GetDepositTickLower returns the lower tick of a staked position.
- OID
- 0742c3…b8af:39
GetDepositTickLower details
GetDepositTickUpper
func(lpTokenId uint64) int32GetDepositTickUpper returns the upper tick of a staked position.
- OID
- 0742c3…b8af:40
GetDepositTickUpper details
GetDepositWarmUp
func(lpTokenId uint64) []staker.WarmupGetDepositWarmUp returns the warmup records of a staked position.
- OID
- 0742c3…b8af:41
GetDepositWarmUp details
GetDepositExternalIncentiveIdList
func(lpTokenId uint64) []stringGetDepositExternalIncentiveIdList returns external incentive IDs for a deposit.
- OID
- 0742c3…b8af:42
GetDepositExternalIncentiveIdList details
GetExternalIncentiveByPoolPath
func(poolPath string) []staker.ExternalIncentiveGetExternalIncentiveByPoolPath returns all external incentives for a pool.
- OID
- 0742c3…b8af:43
GetExternalIncentiveByPoolPath details
GetIncentiveEndTimestamp
func(poolPath string, incentiveId string) int64GetIncentiveEndTimestamp returns the end timestamp of an incentive.
- OID
- 0742c3…b8af:44
GetIncentiveEndTimestamp details
GetIncentiveCreator
func(poolPath string, incentiveId string) .uverse.address- OID
- 0742c3…b8af:45
GetIncentiveCreator details
GetIncentiveRewardAmount
func(poolPath string, incentiveId string) *uint256.UintGetIncentiveRewardAmount returns the total reward amount of an incentive.
- OID
- 0742c3…b8af:46
GetIncentiveRewardAmount details
GetIncentiveRewardAmountAsString
func(poolPath string, incentiveId string) stringGetIncentiveRewardAmountAsString returns the total reward amount of an incentive as string.
- OID
- 0742c3…b8af:47
GetIncentiveRewardAmountAsString details
GetIncentiveRewardPerSecondX128
func(poolPath string, incentiveId string) *uint256.UintGetIncentiveRewardPerSecondX128 returns the reward rate per second of an incentive, expressed as a Q128 fixed-point number (i.e. actual rate = value / 2^128). Callers needing an integer rate can right-shift the result by 128.
- OID
- 0742c3…b8af:48
GetIncentiveRewardPerSecondX128 details
GetIncentiveRewardToken
func(poolPath string, incentiveId string) stringGetIncentiveRewardToken returns the reward token of an incentive.
- OID
- 0742c3…b8af:49
GetIncentiveRewardToken details
GetIncentiveStartTimestamp
func(poolPath string, incentiveId string) int64GetIncentiveStartTimestamp returns the start timestamp of an incentive.
- OID
- 0742c3…b8af:50
GetIncentiveStartTimestamp details
GetMinimumRewardAmount
func() int64GetMinimumRewardAmount returns the minimum reward amount to distribute.
- OID
- 0742c3…b8af:51
GetMinimumRewardAmount details
GetMinimumRewardAmountForToken
func(tokenPath string) int64GetMinimumRewardAmountForToken returns the minimum reward amount for a specific token.
- OID
- 0742c3…b8af:52
GetMinimumRewardAmountForToken details
GetPoolIncentiveIdList
func(poolPath string) []stringGetPoolIncentiveIdList returns all incentive IDs for a pool.
- OID
- 0742c3…b8af:53
GetPoolIncentiveIdList details
GetPoolStakedLiquidity
func(poolPath string) stringGetPoolStakedLiquidity returns the current total staked liquidity of a pool.
- OID
- 0742c3…b8af:54
GetPoolStakedLiquidity details
GetPoolsByTier
func(tier uint64) []stringGetPoolsByTier returns the pool list for a tier.
- OID
- 0742c3…b8af:55
GetPoolsByTier details
GetPoolReward
func(tier uint64) int64GetPoolReward returns the reward amount for a tier.
- OID
- 0742c3…b8af:56
GetPoolReward details
GetPoolTier
func(poolPath string) uint64GetPoolTier returns the tier of a pool.
- OID
- 0742c3…b8af:57
GetPoolTier details
GetPoolTierCount
func(tier uint64) uint64GetPoolTierCount returns the number of pools in a tier.
- OID
- 0742c3…b8af:58
GetPoolTierCount details
GetPoolTierRatio
func(poolPath string) uint64GetPoolTierRatio returns the reward ratio of a pool.
- OID
- 0742c3…b8af:59
GetPoolTierRatio details
GetSpecificTokenMinimumRewardAmount
func(tokenPath string) (int64, bool)GetSpecificTokenMinimumRewardAmount returns the minimum reward amount for a specific token.
- OID
- 0742c3…b8af:60
GetSpecificTokenMinimumRewardAmount details
GetTargetPoolPathByIncentiveId
func(poolPath string, incentiveId string) stringGetTargetPoolPathByIncentiveId returns the pool path for an incentive ID.
- OID
- 0742c3…b8af:61
GetTargetPoolPathByIncentiveId details
GetUnstakingFee
func() uint64GetUnstakingFee returns the unstaking fee percentage.
- OID
- 0742c3…b8af:62
GetUnstakingFee details
IsStaked
func(positionId uint64) boolIsStaked returns whether a position is staked.
- OID
- 0742c3…b8af:63
IsStaked details
GetTotalEmissionSent
func() int64GetTotalEmissionSent returns the total GNS emission sent.
- OID
- 0742c3…b8af:64
GetTotalEmissionSent details
GetAllowedTokens
func() []stringGetAllowedTokens returns the allowed external incentive tokens.
- OID
- 0742c3…b8af:65
GetAllowedTokens details
GetWarmupTemplate
func() []staker.WarmupGetWarmupTemplate returns the current warmup template.
- OID
- 0742c3…b8af:66
GetWarmupTemplate details
GetPoolRewardCacheCount
func(poolPath string) uint64GetPoolRewardCacheCount returns the number of reward cache entries for a pool.
- OID
- 0742c3…b8af:67
GetPoolRewardCacheCount details
GetPoolRewardCacheIDs
func(poolPath string, offset int, count int) []int64GetPoolRewardCacheIDs returns a paginated list of reward cache timestamps for a pool.
- OID
- 0742c3…b8af:68
GetPoolRewardCacheIDs details
GetPoolRewardCache
func(poolPath string, timestamp uint64) int64GetPoolRewardCache returns the reward cache value at a specific timestamp for a pool.
- OID
- 0742c3…b8af:69
GetPoolRewardCache details
GetPoolIncentiveCount
func(poolPath string) uint64GetPoolIncentiveCount returns the number of incentives for a pool.
- OID
- 0742c3…b8af:70
GetPoolIncentiveCount details
GetPoolIncentiveIDs
func(poolPath string, offset int, count int) []stringGetPoolIncentiveIDs returns a paginated list of incentive IDs for a pool.
- OID
- 0742c3…b8af:71
GetPoolIncentiveIDs details
GetPoolGlobalRewardRatioAccumulationCount
func(poolPath string) uint64GetPoolGlobalRewardRatioAccumulationCount returns the number of global reward ratio accumulation entries for a pool.
- OID
- 0742c3…b8af:72
GetPoolGlobalRewardRatioAccumulationCount details
GetPoolGlobalRewardRatioAccumulationIDs
func(poolPath string, offset int, count int) []uint64GetPoolGlobalRewardRatioAccumulationIDs returns a paginated list of timestamps for global reward ratio accumulation entries.
- OID
- 0742c3…b8af:73
GetPoolGlobalRewardRatioAccumulationIDs details
GetPoolGlobalRewardRatioAccumulation
func(poolPath string, timestamp uint64) stringGetPoolGlobalRewardRatioAccumulation returns the global reward ratio accumulation at a specific timestamp for a pool.
- OID
- 0742c3…b8af:74
GetPoolGlobalRewardRatioAccumulation details
GetPoolHistoricalTickCount
func(poolPath string) uint64GetPoolHistoricalTickCount returns the number of historical tick entries for a pool.
- OID
- 0742c3…b8af:75
GetPoolHistoricalTickCount details
GetPoolHistoricalTickIDs
func(poolPath string, offset int, count int) []int32GetPoolHistoricalTickIDs returns a paginated list of historical tick values for a pool.
- OID
- 0742c3…b8af:76
GetPoolHistoricalTickIDs details
GetPoolHistoricalTick
func(poolPath string, tick uint64) int32GetPoolHistoricalTick returns the historical tick at a specific timestamp for a pool.
- OID
- 0742c3…b8af:77
GetPoolHistoricalTick details
cloneStringSlice
func(src []string) []string- OID
- 0742c3…b8af:78
cloneStringSlice details
cloneUint64Slice
func(src []uint64) []uint64- OID
- 0742c3…b8af:80
cloneUint64Slice details
cloneInt64Slice
func(src []int64) []int64- OID
- 0742c3…b8af:81
cloneInt64Slice details
cloneInt32Slice
func(src []int32) []int32- OID
- 0742c3…b8af:82
cloneInt32Slice details
cloneStringInt64Map
func(src map[string]int64) map[string]int64- OID
- 0742c3…b8af:83
cloneStringInt64Map details
cloneStringBoolMap
func(src map[string]bool) map[string]bool- OID
- 0742c3…b8af:84
cloneStringBoolMap details
cloneExternalIncentives
func(src []staker.ExternalIncentive) []staker.ExternalIncentive- OID
- 0742c3…b8af:85
cloneExternalIncentives details
cloneWarmups
func(warmups []staker.Warmup) []staker.Warmup- OID
- 0742c3…b8af:86
cloneWarmups details
AllTierCount
untyped bigint// 0, 1, 2, 3
Value
(4 <untyped> bigint)
Pool
typePool is a struct for storing an incentivized pool information Each pool stores Incentives and Ticks associated with it. Fields: - poolPath: The path of the pool. - currentStakedLiquidity: The current total staked liquidity of the in-range positions for the pool. Updated when tick cross happens or stake/unstake happens. Used to calculate the global reward ratio accumulation or decide whether to enter/exit unclaimable period. - lastUnclaimableTime: The time at which the unclaimable period started. Set to 0 when the pool is not in an unclaimable period. - unclaimableAcc: The accumulated undisributed unclaimable reward. Reset to 0 when processUnclaimableReward is called and sent to community pool. - rewardCache: The cached per-second reward emitted for this pool. Stores new entry only when the reward is changed. PoolTier.cacheReward() updates this. \- incentives: The external incentives associated with the pool. \- ticks: The Ticks associated with the pool. - globalRewardRatioAccumulation: Global ratio of Time / TotalStake accumulation(since the pool creation) Stores new entry only when tick cross or stake/unstake happens. It is used to calculate the reward for a staked position at certain time. - historicalTick: The historical tick for the pool at a given time. It does not reflect the exact tick at the timestamp, but it provides correct ordering for the staked position's ticks. Therefore, you should not compare it for equality, only for ordering. Set when tick cross happens or a new position is created.
Value
staker.Pool
NewPool
func(poolPath string, currentTime int64) *staker.PoolNewPool creates a new pool with the given poolPath and currentHeight.
- OID
- 0742c3…b8af:87
NewPool details
Incentives
typeIncentives represents a collection of external incentives for a specific pool. Fields: - incentives: BPTree storing ExternalIncentive objects indexed by incentiveId The incentiveId serves as the key to efficiently lookup incentive details - targetPoolPath: String identifier for the pool this incentive collection belongs to Used to associate incentives with their corresponding liquidity pool - unclaimablePeriods: Tree storing periods when rewards cannot be claimed Maps start timestamp (key) to end timestamp (value) An end timestamp of 0 indicates an ongoing unclaimable period Used to track intervals when staking rewards are not claimable
Value
staker.Incentives
NewIncentives
func(targetPoolPath string) *staker.Incentives- OID
- 0742c3…b8af:89
NewIncentives details
ExternalIncentive
typeValue
staker.ExternalIncentive
NewExternalIncentive
func(incentiveId string, targetPoolPath string, rewardToken string, rewardAmount int64, startTimestamp int64, endTimestamp int64, creator .uverse.address, depositGnsAmount int64, createdHeight int64, currentTime int64) *staker.ExternalIncentiveNewExternalIncentive creates a new external incentive
- OID
- 0742c3…b8af:90
NewExternalIncentive details
Ticks
typeTick mapping for each pool
Value
staker.Ticks
NewTicks
func() staker.Ticks- OID
- 0742c3…b8af:91
NewTicks details
Tick
typeTick represents the state of a specific tick in a pool. Fields: - id (int32): The ID of the tick. - stakedLiquidityGross (\*u256.Uint): Total gross staked liquidity at this tick. - stakedLiquidityDelta (\*i256.Int): Net change in staked liquidity at this tick. - outsideAccumulation (\*UintTree): RewardRatioAccumulation outside the tick.
Value
staker.Tick
NewTick
func(tickId int32) *staker.Tick- OID
- 0742c3…b8af:92
NewTick details
TierRatio
type100%, 0%, 0% if no tier2 and tier3 80%, 0%, 20% if no tier2 70%, 30%, 0% if no tier3 50%, 30%, 20% if has tier2 and tier3
Value
staker.TierRatio
NewTierRatio
func(tier1 uint64, tier2 uint64, tier3 uint64) staker.TierRatio- OID
- 0742c3…b8af:93
NewTierRatio details
SwapBatchProcessor
typeSwapBatchProcessor processes tick crosses in batch for a swap This processor accumulates all tick crosses that occur during a single swap and processes them together at the end, reducing redundant calculations and state updates that would occur with individual tick processing
Value
staker.SwapBatchProcessor
NewSwapBatchProcessor
func(poolPath string, pool *staker.Pool, timestamp int64) *staker.SwapBatchProcessor- OID
- 0742c3…b8af:94
NewSwapBatchProcessor details
SwapTickCross
typeSwapTickCross stores information about a tick cross during a swap This struct is used to accumulate tick cross events during a single swap transaction for batch processing to optimize gas usage and computational efficiency
Value
staker.SwapTickCross
NewSwapTickCross
func(tickID int32, zeroForOne bool, delta *int256.Int) *staker.SwapTickCross- OID
- 0742c3…b8af:95
NewSwapTickCross details
StakeToken
func(positionId uint64, referrer string) stringStakeToken stakes a position NFT to earn rewards. Parameters: - positionId: ID of the position to stake - referrer: referrer address for reward tracking Returns: - string: deposit ID
- OID
- 0742c3…b8af:96
StakeToken details
UnStakeToken
func(positionId uint64) stringUnStakeToken unstakes a position NFT and collects rewards. Parameters: - positionId: ID of the position to unstake Returns: - string: collected reward details
- OID
- 0742c3…b8af:98
UnStakeToken details
CollectReward
func(positionId uint64) (string, string, map[string]int64, map[string]int64)CollectReward collects accumulated rewards from a staked position. Parameters: - positionId: ID of the staked position Returns: - string: pool path - string: staking details - map\[string]int64: internal rewards - map\[string]int64: external rewards
- OID
- 0742c3…b8af:99
CollectReward details
SetPoolTier
func(poolPath string, tier uint64)SetPoolTier sets the reward tier for a pool.
- OID
- 0742c3…b8af:100
SetPoolTier details
ChangePoolTier
func(poolPath string, tier uint64)ChangePoolTier changes the reward tier of a pool.
- OID
- 0742c3…b8af:101
ChangePoolTier details
RemovePoolTier
func(poolPath string)RemovePoolTier removes a pool from the tier system.
- OID
- 0742c3…b8af:102
RemovePoolTier details
CreateExternalIncentive
func(targetPoolPath string, rewardToken string, rewardAmount int64, startTimestamp int64, endTimestamp int64)CreateExternalIncentive creates an external reward incentive for a pool. Parameters: - targetPoolPath: pool to incentivize - rewardToken: token to use as reward - rewardAmount: total reward amount - startTimestamp: incentive start time - endTimestamp: incentive end time
- OID
- 0742c3…b8af:103
CreateExternalIncentive details
EndExternalIncentive
func(targetPoolPath string, incentiveId string, refundAddress .uverse.address)EndExternalIncentive terminates an external incentive early.
- OID
- 0742c3…b8af:104
EndExternalIncentive details
CollectExternalIncentivePenalty
func(targetPoolPath string, incentiveId string, refundAddress .uverse.address) int64CollectExternalIncentivePenalty collects accumulated warmup penalties for an ended incentive.
- OID
- 0742c3…b8af:105
CollectExternalIncentivePenalty details
AddToken
func(tokenPath string)AddToken adds a token to the reward token whitelist.
- OID
- 0742c3…b8af:106
AddToken details
RemoveToken
func(tokenPath string)RemoveToken removes a token from the reward token whitelist.
- OID
- 0742c3…b8af:107
RemoveToken details
SetWarmUp
func(pct int64, timeDuration int64)SetWarmUp sets the warm-up period parameters for staking.
- OID
- 0742c3…b8af:108
SetWarmUp details
SetDepositGnsAmount
func(amount int64)SetDepositGnsAmount sets the deposit GNS amount
- OID
- 0742c3…b8af:109
SetDepositGnsAmount details
SetMinimumRewardAmount
func(amount int64)SetMinimumRewardAmount sets the minimum reward amount to distribute.
- OID
- 0742c3…b8af:110
SetMinimumRewardAmount details
SetTokenMinimumRewardAmount
func(paramsStr string)SetTokenMinimumRewardAmount sets minimum reward amounts per token.
- OID
- 0742c3…b8af:111
SetTokenMinimumRewardAmount details
SetUnStakingFee
func(fee uint64)SetUnStakingFee sets the unstaking fee percentage.
- OID
- 0742c3…b8af:112
SetUnStakingFee details
ErrSpoofedRealm
untyped stringValue
"rlm does not match the current crossing frame"
kvStore
*store.kvStore- OID
- 0742c3…b8af:141
kvStore details
versionManager
*version_manager.versionManager- OID
- 0742c3…b8af:145
versionManager details
implementation
*v1.stakerV1- OID
- 02d577…ffec:94
implementation details
init.127
func()- OID
- 0742c3…b8af:116
init.127 details
initRegisterWritableContract
func()- OID
- 0742c3…b8af:118
initRegisterWritableContract details
initializeDomainStore
func(int, rlm .uverse.realm, kvStore store.KVStore) interface{...}- OID
- 0742c3…b8af:119
initializeDomainStore details
getImplementation
func() staker.IStaker- OID
- 0742c3…b8af:120
getImplementation details
updateImplementation
func() .uverse.error- OID
- 0742c3…b8af:121
updateImplementation details
StoreKey
typeValue
staker.StoreKey
StoreKeyDepositGnsAmount
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyMinimumRewardAmount
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyDeposits
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyExternalIncentives
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyTotalEmissionSent
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyAllowedTokens
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyIncentiveCounter
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyTokenSpecificMinimumRewards
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyUnstakingFee
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyPendingProtocolFees
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyPools
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyPoolTierMemberships
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyPoolTierRatio
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyPoolTierCounts
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyPoolTierLastRewardCacheTimestamp
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyPoolTierCurrentEmission
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyPoolTierGetEmission
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyPoolTierGetHalvingBlocksInRange
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyWarmupTemplate
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyCurrentSwapBatch
staker.StoreKeyValue
<gnolang.StringValue>
StoreKeyExternalIncentivesByCreationTime
staker.StoreKeyValue
<gnolang.StringValue>
stakerStore
typeValue
staker.stakerStore
NewStakerStore
func(kvStore store.KVStore) staker.IStakerStoreNewStakerStore creates a new staker store instance with the provided KV store. This function is used by the upgrade system to create storage instances for each implementation.
- OID
- 0742c3…b8af:122
NewStakerStore details
makeIncentiveID
func(creator .uverse.address, timestamp int64, index int64) string- OID
- 0742c3…b8af:124
makeIncentiveID details
contains
func(items []string, item string) bool- OID
- 0742c3…b8af:125
contains details
UintTree
typeUintTree is a wrapper around a B+ tree for storing block timestamps as strings. Since block timestamps are defined as int64, we take int64 and convert it to uint64 for the tree. Methods: - Get: Retrieves a value associated with a uint64 key. - Set: Stores a value with a uint64 key. - Has: Checks if a uint64 key exists in the tree. - Remove: Removes a uint64 key and its associated value. - Iterate: Iterates over keys and values in a range. - ReverseIterate: Iterates in reverse order over keys and values in a range.
Value
staker.UintTree
NewBPTreeN
func(fanout int) *v0.BPTreeNewBPTreeN allocates a raw BP-tree under /r/gnoswap/staker's realm context (the realm that declares Pool/Deposit/ExternalIncentive). The tree's PkgID is therefore /r/gnoswap/staker, matching the domain values it stores, so tree.Set leaf-slot writes clear the readonly-taint gate regardless of which realm (staker/v1, mock) calls Set (borrow rule #2 borrows m.Realm to the tree's owning realm). Implementations and mocks must allocate trees that hold /r/gnoswap/staker-declared values through here rather than calling bptree.NewBPTreeN directly in their own realm.
- OID
- 0742c3…b8af:126
NewBPTreeN details
NewUintTree
func() *staker.UintTreeNewUintTree creates a new UintTree instance with default fanout 64.
- OID
- 0742c3…b8af:128
NewUintTree details
NewUintTreeN
func(fanout int) *staker.UintTreeNewUintTreeN creates a new UintTree instance with the specified fanout.
- OID
- 0742c3…b8af:129
NewUintTreeN details
EncodeUint
func(num uint64) stringEncodeUint converts a uint64 number into a zero-padded 20-character string. Parameters: - num (uint64): The number to encode. Returns: - string: A zero-padded string representation of the number. Example: Input: 12345 Output: "00000000000000012345"
- OID
- 0742c3…b8af:130
EncodeUint details
EncodeInt64
func(num int64) string- OID
- 0742c3…b8af:131
EncodeInt64 details
DecodeUint
func(s string) uint64DecodeUint converts a zero-padded string back into a uint64 number. Parameters: - s (string): The zero-padded string. Returns: - uint64: The decoded number. Panics: - If the string cannot be parsed into a uint64. Example: Input: "00000000000000012345" Output: 12345
- OID
- 0742c3…b8af:132
DecodeUint details
DecodeInt64
func(s string) int64- OID
- 0742c3…b8af:133
DecodeInt64 details
EncodeInt
func(num int32) stringEncodeInt takes an int32 and returns a zero-padded decimal string with up to 10 digits for the absolute value. If the number is negative, the '-' sign comes first, followed by zeros, then digits.
- OID
- 0742c3…b8af:134
EncodeInt details
IStaker
typeValue
staker.IStaker
IStakerManager
typeValue
staker.IStakerManager
IStakerGetter
typeValue
staker.IStakerGetter
IStakerStore
typeValue
staker.IStakerStore
RegisterInitializer
func(initializer func(...))RegisterInitializer registers a new staker implementation version. This function is called by each version (v1, v2, etc.) during initialization to register their implementation with the proxy system. The initializer function creates a new instance of the implementation using the provided stakerStore interface. Security: Only contracts within the domain path can register initializers. Each package path can only register once to prevent duplicate registrations.
- OID
- 0742c3…b8af:135
RegisterInitializer details
UpgradeImpl
func(packagePath string)UpgradeImpl switches the active staker implementation to a different version. This function allows seamless upgrades from one version to another without data migration or downtime. Security: Only admin or governance can perform upgrades. The new implementation must have been previously registered via RegisterInitializer.
- OID
- 0742c3…b8af:137
UpgradeImpl details
GetImplementationPackagePath
func() stringGetImplementationPackagePath returns the package path of the currently active implementation.
- OID
- 0742c3…b8af:138