Counter
typeValue
staker.Counter
NewCounter
func() *staker.CounterNewCounter creates a counter initialized before the first allocated identifier. Returns: - \*Counter: counter whose current identifier is zero.
- OID
- 083f77…1fdf:3
NewCounter details
DelegationType
typeDelegationType represents the type of delegation operation
Value
staker.DelegationType
DelegateType
staker.DelegationTypeValue
<gnolang.StringValue>
UnDelegateType
staker.DelegationTypeValue
<gnolang.StringValue>
Delegation
typeDelegation represents a delegation between two addresses
Value
staker.Delegation
NewDelegation
func(id int64, delegateFrom .uverse.address, delegateTo .uverse.address, delegateAmount int64, createdHeight int64, createdAt int64) *staker.DelegationNewDelegation creates a delegation record with no undelegated or collected amount. Parameters: - id: unique identifier assigned to this delegation record. - delegateFrom: address whose tokens are delegated. - delegateTo: address receiving the delegated voting power. - delegateAmount: initial delegated token amount in the smallest token unit. - createdHeight: block height at which the delegation was created. - createdAt: Unix timestamp at which the delegation was created. Returns: - \*Delegation: initialized delegation with empty withdrawal history.
- OID
- 083f77…1fdf:5
NewDelegation details
NewDelegationTree
func() *v0.BPTreeNewDelegationTree creates an empty tree for delegatee-to-delegation-ID mappings. Returns: - \*bptree.BPTree: empty tree configured for delegation lookup entries.
- OID
- 083f77…1fdf:7
NewDelegationTree details
NewUserDelegationTree
func() *v0.BPTreeNewUserDelegationTree creates an empty tree for user delegation mappings. Returns: - \*bptree.BPTree: empty tree configured for user delegation entries.
- OID
- 083f77…1fdf:8
NewUserDelegationTree details
DelegationManager
typeDelegationManager manages the mapping between users and their delegation IDs. It provides efficient lookup and management of user delegations organized by delegator and delegatee addresses.
Value
staker.DelegationManager
NewDelegationManager
func() *staker.DelegationManagerNewDelegationManager creates a new instance of DelegationManager. This factory function initializes the BPTree structure for tracking user delegations. Returns: - \*DelegationManager: manager ready to track delegator/delegatee ID lists.
- OID
- 083f77…1fdf:9
NewDelegationManager details
DelegationWithdraw
typeDelegationWithdraw represents a pending withdrawal from a delegation. This struct tracks undelegated amounts that are subject to lockup periods and manages the collection process once the lockup period expires.
Value
staker.DelegationWithdraw
NewDelegationWithdraw
func(delegationID int64, unDelegateAmount int64, createdHeight int64, createdAt int64, unDelegationLockupPeriod int64) staker.DelegationWithdrawNewDelegationWithdraw creates a new delegation withdrawal with lockup period. The withdrawal becomes collectable after the lockup period expires. Parameters: - delegationID: Unique identifier of the associated delegation. - unDelegateAmount: Amount being withdrawn. - createdHeight: Block height at which the undelegation was created. - createdAt: Unix timestamp at which the withdrawal was created. - unDelegationLockupPeriod: Lockup duration in seconds. Returns: - DelegationWithdraw: new withdrawal instance with its collectable time set after the lockup.
- OID
- 083f77…1fdf:11
NewDelegationWithdraw details
NewDelegationWithdrawWithoutLockup
func(delegationID int64, unDelegateAmount int64, createdHeight int64, createdAt int64) staker.DelegationWithdrawNewDelegationWithdrawWithoutLockup creates a withdrawal that is immediately collectable. This is used for special cases such as redelegation where no lockup is required. Parameters: - delegationID: Unique identifier of the associated delegation. - unDelegateAmount: Amount being withdrawn. - createdHeight: Block height at which the undelegation was created. - createdAt: Unix timestamp at which the withdrawal was created. Returns: - DelegationWithdraw: new withdrawal instance marked collected with collectable time equal to createdAt.
- OID
- 083f77…1fdf:13
NewDelegationWithdrawWithoutLockup details
errFailedToCastRewardState
untyped stringValue
"failed to cast rewardStates's element to *EmissionRewardState: %T"
EmissionRewardManager
typeEmissionRewardManager manages the distribution of emission rewards to stakers.
Value
staker.EmissionRewardManager
NewEmissionRewardManager
func() *staker.EmissionRewardManagerNewEmissionRewardManager creates and initializes an EmissionRewardManager with empty reward states and zero accounting totals. Returns: - \*EmissionRewardManager: initialized manager with empty reward states, zero totals, and a zero Q128 accumulator.
- OID
- 083f77…1fdf:14
NewEmissionRewardManager details
EmissionRewardState
typeEmissionRewardState tracks emission reward information for an individual staker. This struct maintains reward debt, accumulated rewards, and claiming history to ensure accurate reward calculations and prevent double-claiming.
Value
staker.EmissionRewardState
NewEmissionRewardState
func(accumulatedRewardX128PerStake *v1.Uint) *staker.EmissionRewardStateNewEmissionRewardState creates a new emission reward state for a staker. This factory function initializes the state with the current system reward debt. Parameters: - accumulatedRewardX128PerStake: current system-wide accumulated reward per stake Returns: - \*EmissionRewardState: new emission reward state instance
- OID
- 083f77…1fdf:16
NewEmissionRewardState details
ErrSpoofedRealm
untyped stringErrSpoofedRealm is returned by store Set\* methods when the supplied realm token does not match the current crossing frame (rlm.IsCurrent() is false), rejecting spoofed or stale realm tokens before any write is performed.
Value
"rlm does not match the current crossing frame"
cloneInt64Slice
func(src []int64) []int64- OID
- 083f77…1fdf:18
cloneInt64Slice details
cloneStringInt64Map
func(src map[string]int64) map[string]int64- OID
- 083f77…1fdf:20
cloneStringInt64Map details
cloneDelegationWithdraws
func(src []staker.DelegationWithdraw) []staker.DelegationWithdraw- OID
- 083f77…1fdf:21
cloneDelegationWithdraws details
GetTotalxGnsSupply
func() int64GetTotalxGnsSupply returns total xGNS supply, including launchpad-held xGNS. Returns: - int64: total xGNS supply, including xGNS held by launchpad projects.
- OID
- 083f77…1fdf:22
GetTotalxGnsSupply details
GetTotalDelegated
func() int64GetTotalDelegated returns the total amount of GNS delegated. Returns: - int64: total GNS amount delegated across all delegators.
- OID
- 083f77…1fdf:24
GetTotalDelegated details
GetTotalLockedAmount
func() int64GetTotalLockedAmount returns the total amount locked in undelegation withdrawals. Returns: - int64: aggregate locked amount; panics if the stored value is unavailable or not int64.
- OID
- 083f77…1fdf:25
GetTotalLockedAmount details
GetUnDelegationLockupPeriod
func() int64GetUnDelegationLockupPeriod returns the configured undelegation lockup period in seconds. Returns: - int64: lockup duration in seconds; panics if the stored value is unavailable or not int64.
- OID
- 083f77…1fdf:26
GetUnDelegationLockupPeriod details
GetDelegations
func() *v0.ReadOnlyTreeGetDelegations returns a read-only view of every delegation, keyed by the decimal string form of the delegation ID. Callers paginate it themselves through IterateByOffset. Reading an entry yields a clone, so the view cannot mutate realm state. Returns: - \*rotree.ReadOnlyTree: read-only delegation view keyed by decimal delegation ID; entry reads return clones.
- OID
- 083f77…1fdf:27
GetDelegations details
ExistsDelegation
func(delegationID int64) boolExistsDelegation checks if a delegation exists. Parameters: - delegationID: Numeric identifier of the delegation to look up. Returns: - bool: true when a delegation with delegationID exists, false otherwise.
- OID
- 083f77…1fdf:28
ExistsDelegation details
GetDelegatorDelegations
func(delegator .uverse.address) *v0.ReadOnlyTreeGetDelegatorDelegations returns the delegatee tree for one delegator. Parameters: - delegator: delegator address string used as the root-tree key. Returns: - \*bptree.BPTree: delegatee-to-delegation-ID tree when present and correctly typed. - bool: true when the delegator entry exists with the expected tree type.
- OID
- 083f77…1fdf:29
GetDelegatorDelegations details
GetUserDelegationIDs
func(delegator .uverse.address, delegatee .uverse.address) []int64GetUserDelegationIDs returns a list of delegation IDs for a specific delegator-delegatee pair. Parameters: - delegator: Address that supplied the delegation. - delegatee: Address receiving that delegation. Returns: - \[]int64: delegation IDs for the delegator-delegatee pair; the returned slice is independent of realm state.
- OID
- 083f77…1fdf:30
GetUserDelegationIDs details
HasDelegationSnapshotsKey
func() boolHasDelegationSnapshotsKey returns true if delegation history exists. Returns: - bool: true when delegation history has been initialized in storage.
- OID
- 083f77…1fdf:31
HasDelegationSnapshotsKey details
GetTotalDelegationAmountAtSnapshot
func(snapshotTime int64) (int64, bool)GetTotalDelegationAmountAtSnapshot returns total delegation at a Unix timestamp, using the latest history entry at or before that timestamp. The lookup is timestamp-based rather than a block-height snapshot. Parameters: - snapshotTime: Unix timestamp at or before which to select the latest aggregate delegation history entry. Returns: - int64: aggregate delegated amount recorded at or before snapshotTime. - bool: true when a qualifying history entry exists; false when no entry is available.
- OID
- 083f77…1fdf:32
GetTotalDelegationAmountAtSnapshot details
GetUserDelegationAmountAtSnapshot
func(userAddr .uverse.address, snapshotTime int64) (int64, bool)GetUserDelegationAmountAtSnapshot returns one user's delegation at a Unix timestamp, using that user's latest history entry at or before the timestamp. The bool is false when no qualifying history entry exists. Parameters: - userAddr: Delegator address whose historical delegation is queried. - snapshotTime: Unix timestamp at or before which to select the user's latest history entry. Returns: - int64: user's delegated amount recorded at or before snapshotTime. - bool: true when a qualifying user-history entry exists; false otherwise.
- OID
- 083f77…1fdf:33
GetUserDelegationAmountAtSnapshot details
GetClaimableRewardByAddress
func(addr .uverse.address) (int64, map[string]int64, .uverse.error)GetClaimableRewardByAddress returns claimable rewards for an address. Parameters: - addr: Address whose emission and protocol-fee rewards are queried. Returns: - int64: emission reward amount available to addr. - map\[string]int64: protocol-fee reward amounts keyed by token path. - error: nil on success; non-nil when reward state cannot be resolved for addr.
- OID
- 083f77…1fdf:34
GetClaimableRewardByAddress details
GetClaimableRewardByLaunchpad
func(addr .uverse.address) (int64, map[string]int64, .uverse.error)GetClaimableRewardByLaunchpad returns claimable launchpad rewards for an address. Parameters: - addr: Address whose launchpad and protocol-fee rewards are queried. Returns: - int64: emission reward amount available to addr. - map\[string]int64: protocol-fee reward amounts keyed by token path. - error: nil on success; non-nil when reward state cannot be resolved for addr.
- OID
- 083f77…1fdf:35
GetClaimableRewardByLaunchpad details
GetClaimableRewardByRewardID
func(rewardID string) (int64, map[string]int64, .uverse.error)GetClaimableRewardByRewardID returns claimable reward details by reward ID. Parameters: - rewardID: Reward-state identifier whose claimable rewards are queried. Returns: - int64: emission reward amount associated with rewardID. - map\[string]int64: protocol-fee reward amounts keyed by token path. - error: nil on success; non-nil when rewardID cannot be resolved.
- OID
- 083f77…1fdf:36
GetClaimableRewardByRewardID details
GetLaunchpadProjectDeposit
func(projectAddr string) (int64, bool)GetLaunchpadProjectDeposit returns the deposit amount for a launchpad project. Parameters: - projectAddr: Launchpad project address whose deposited amount is queried. Returns: - int64: recorded launchpad project deposit amount. - bool: true when a deposit record exists for projectAddr; false otherwise.
- OID
- 083f77…1fdf:37
GetLaunchpadProjectDeposit details
GetDelegationWithdrawCount
func(delegationID int64) intGetDelegationWithdrawCount returns the total number of delegation withdraws for a specific delegation. Parameters: - delegationID: Identifier of the delegation whose withdrawals are counted. Returns: - int: number of withdrawal records associated with delegationID.
- OID
- 083f77…1fdf:38
GetDelegationWithdrawCount details
GetDelegationWithdraws
func(delegationID int64, offset int, count int) ([]staker.DelegationWithdraw, .uverse.error)GetDelegationWithdraws returns a paginated list of delegation withdraws for a specific delegation. Parameters: - delegationID: Identifier of the delegation whose withdrawals are requested. - offset: Number of matching withdrawal records to skip before collecting results. - count: Maximum number of withdrawal records to return. Returns: - \[]DelegationWithdraw: requested page of withdrawal records, copied before returning. - error: nil on success; non-nil when the requested delegation or page cannot be read.
- OID
- 083f77…1fdf:39
GetDelegationWithdraws details
GetCollectableWithdrawAmount
func(delegationID int64) int64GetCollectableWithdrawAmount returns the collectable withdraw amount for a specific delegation. Parameters: - delegationID: Identifier of the delegation whose collectable amount is queried. Returns: - int64: amount currently available to collect from delegationID.
- OID
- 083f77…1fdf:40
GetCollectableWithdrawAmount details
GetProtocolFeeAccumulatedX128PerStake
func(tokenPath string) *v1.UintGetProtocolFeeAccumulatedX128PerStake returns the accumulated protocol fee per stake (Q128) for a token path. Parameters: - tokenPath: Registered token path whose protocol-fee accumulator is queried. Returns: - \*u256.Uint: accumulated protocol-fee amount per unit stake in Q128 fixed-point form.
- OID
- 083f77…1fdf:41
GetProtocolFeeAccumulatedX128PerStake details
GetProtocolFeeAmount
func(tokenPath string) int64GetProtocolFeeAmount returns the total protocol fee amount folded into the accumulator. Returns: - int64: total fee amount folded for this token.
- OID
- 083f77…1fdf:42
GetProtocolFeeAmount details
GetProtocolFeeAccumulatedTimestamp
func() int64GetProtocolFeeAccumulatedTimestamp returns the accumulated timestamp for protocol fee rewards. Returns: - int64: Unix timestamp at which protocol-fee accumulation was last updated.
- OID
- 083f77…1fdf:43
GetProtocolFeeAccumulatedTimestamp details
GetEmissionAccumulatedX128PerStake
func() *v1.UintGetEmissionAccumulatedX128PerStake returns the accumulated emission per stake (Q128). Returns: - \*u256.Uint: accumulated emission reward per unit stake in Q128 fixed-point form.
- OID
- 083f77…1fdf:44
GetEmissionAccumulatedX128PerStake details
GetEmissionDistributedAmount
func() int64GetEmissionDistributedAmount returns the total distributed emission amount. Returns: - int64: total emission amount distributed to stakers.
- OID
- 083f77…1fdf:45
GetEmissionDistributedAmount details
GetEmissionAccumulatedTimestamp
func() int64GetEmissionAccumulatedTimestamp returns the accumulated timestamp for emission rewards. Returns: - int64: Unix timestamp at which emission accumulation was last updated.
- OID
- 083f77…1fdf:46
GetEmissionAccumulatedTimestamp details
LaunchpadProjectDeposits
typeLaunchpadProjectDeposits manages deposit amounts for launchpad projects. It tracks the total staked amount for each project identified by owner address.
Value
staker.LaunchpadProjectDeposits
NewLaunchpadProjectDeposits
func() *staker.LaunchpadProjectDepositsNewLaunchpadProjectDeposits creates an empty owner-to-deposit tree. Returns: - \*LaunchpadProjectDeposits: deposit manager initialized with an empty tree.
- OID
- 083f77…1fdf:47
NewLaunchpadProjectDeposits details
ProtocolFeeRewardManager
typeProtocolFeeRewardManager distributes protocol fees to stakers. Protocol fees arrive in many tokens, so the manager keeps one accumulator per token instead of a single one. A stake change never touches those accumulators: it advances the accrual epoch, records the total stake in force from that epoch, and appends one event for an ordinary add/remove. Redelegate performs a remove plus an add and therefore appends two events. The per-token work happens when a token is collected, so stake-change cost does not depend on how many tokens ever collected a fee.
Value
staker.ProtocolFeeRewardManager
NewProtocolFeeRewardManager
func() *staker.ProtocolFeeRewardManagerNewProtocolFeeRewardManager creates a new instance of ProtocolFeeRewardManager. Returns: - \*ProtocolFeeRewardManager: new protocol fee reward manager instance
- OID
- 083f77…1fdf:49
NewProtocolFeeRewardManager details
ProtocolFeeRewardState
typeProtocolFeeRewardState tracks the protocol fee rewards of one staker. Ordinary stake changes append one ProtocolFeeStakeEvent; Redelegate performs a remove plus an add and appends two events. Each token is settled on its own from those events, so the state keeps a per-token cursor into the event history rather than a reward debt for every token at once.
Value
staker.ProtocolFeeRewardState
ProtocolFeeStakeEvent
typeProtocolFeeStakeEvent is one stake change: from epoch on, stakedAmount was staked.
Value
staker.ProtocolFeeStakeEvent
ProtocolFeeTokenRewardState
typeProtocolFeeTokenRewardState is the settlement state of one token for one staker. Stake events up to eventCursor are folded into earnedX128. The open segment starts where the last folded event left the accumulator (segmentStartX128) with segmentStakedAmount staked.
Value
staker.ProtocolFeeTokenRewardState
NewProtocolFeeRewardState
func() *staker.ProtocolFeeRewardStateNewProtocolFeeRewardState creates an empty state for a staker with no stake. Returns: - \*ProtocolFeeRewardState: initialized reward state with empty event and token trees
- OID
- 083f77…1fdf:51
NewProtocolFeeRewardState details
NewProtocolFeeTokenRewardState
func(eventCursor int64, segmentStakedAmount int64, segmentStartX128 *v1.Uint) *staker.ProtocolFeeTokenRewardStateNewProtocolFeeTokenRewardState creates the settlement state of a token whose open segment starts at the given cursor, stake and accumulator value. Parameters: - eventCursor: number of stake events already folded into this token state - segmentStakedAmount: stake amount in force during the open segment - segmentStartX128: accumulated fee-per-stake value at the open segment start, scaled by 2^128 Returns: - \*ProtocolFeeTokenRewardState: token settlement state with zero closed-segment earnings and claimed reward
- OID
- 083f77…1fdf:53
NewProtocolFeeTokenRewardState details
ProtocolFeeTokenAccumulator
typeProtocolFeeTokenAccumulator tracks the accumulated protocol fee per stake of one token. Fees are folded in per accrual epoch, each against the total stake in force during that epoch. The value after folding each epoch is kept in history so that a staker's reward can be settled later against the accumulator as it stood at any epoch.
Value
staker.ProtocolFeeTokenAccumulator
NewProtocolFeeTokenAccumulator
func() *staker.ProtocolFeeTokenAccumulatorNewProtocolFeeTokenAccumulator creates an empty accumulator with no folded epochs or protocol fees recorded. Returns: - \*ProtocolFeeTokenAccumulator: accumulator initialized with zero values and empty epoch history.
- OID
- 083f77…1fdf:54
NewProtocolFeeTokenAccumulator details
Delegate
func(to .uverse.address, amount int64, referrer string) int64Delegate delegates GNS to a delegate. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - to: delegatee address that receives voting power - amount: positive GNS amount to delegate and convert to xGNS voting power - referrer: optional referral identifier to register for reward tracking Returns: - delegatedAmount: The amount of GNS delegated and mirrored as xGNS. Halt check: reverts while the GovStaker halt scope is active.
- OID
- 083f77…1fdf:56
Delegate details
Undelegate
func(from .uverse.address, amount int64) int64Undelegate undelegates xGNS from the existing delegate. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - from: delegatee address from which the caller removes delegation - amount: positive xGNS amount to move into undelegation lockup Returns: - amount: The amount of GNS moved into undelegation lockup. Halt check: reverts while the Withdraw halt scope is active.
- OID
- 083f77…1fdf:58
Undelegate details
Redelegate
func(delegatee .uverse.address, newDelegatee .uverse.address, amount int64) int64Redelegate redelegates xGNS from the existing delegate to another. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - delegatee: current delegatee address whose voting power is reduced - newDelegatee: destination address that receives the redelegated voting power - amount: positive xGNS amount to move without a user-facing lockup Returns: - redelegatedAmount: The amount moved from the current delegatee to the new delegatee. Halt check: reverts while the GovStaker halt scope is active.
- OID
- 083f77…1fdf:59
Redelegate details
CollectUndelegatedGns
func() int64CollectUndelegatedGns collects the amount of the undelegated GNS. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. Returns: - amount: GNS amount released to the caller after eligible undelegation withdrawals are collected Halt check: reverts while the Withdraw halt scope is active.
- OID
- 083f77…1fdf:60
CollectUndelegatedGns details
CollectReward
func()CollectReward claims the caller's GNS emission reward and all known protocol-fee token rewards. The all-token path folds and settles every known token. It is not a single-current-xGNS-balance formula. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. Halt check: reverts while the Withdraw halt scope is active.
- OID
- 083f77…1fdf:61
CollectReward details
CollectEmissionReward
func()CollectEmissionReward claims the caller's accumulated GNS emission reward. The call is subject to the withdrawal halt and transfers GNS when a reward is available. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. Halt check: reverts while the Withdraw halt scope is active.
- OID
- 083f77…1fdf:62
CollectEmissionReward details
CollectProtocolFeeReward
func(tokenPath string)CollectProtocolFeeReward claims accumulated protocol-fee rewards for one registered token path. Folding and settlement are bounded per call; any remaining buckets or stake events are collected by a later call. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - tokenPath: registered token path whose accumulated protocol-fee reward is claimed Halt check: reverts while the Withdraw halt scope is active.
- OID
- 083f77…1fdf:63
CollectProtocolFeeReward details
CollectRewardFromLaunchPad
func(to .uverse.address)CollectRewardFromLaunchPad claims both GNS emission and protocol-fee rewards for a registered launchpad project wallet. Only the launchpad contract may call this entry point. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - to: registered launchpad project wallet that receives both reward streams Halt check: reverts while the Withdraw halt scope is active.
- OID
- 083f77…1fdf:64
CollectRewardFromLaunchPad details
CollectEmissionRewardFromLaunchPad
func(to .uverse.address)CollectEmissionRewardFromLaunchPad claims only accumulated GNS emission rewards for a registered launchpad project wallet. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - to: registered launchpad project wallet whose emission reward is claimed Halt check: reverts while the Withdraw halt scope is active.
- OID
- 083f77…1fdf:65
CollectEmissionRewardFromLaunchPad details
CollectProtocolFeeRewardFromLaunchPad
func(to .uverse.address, tokenPath string)CollectProtocolFeeRewardFromLaunchPad claims one token path of accumulated protocol-fee rewards for a registered launchpad project wallet. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - to: registered launchpad project wallet whose protocol-fee reward is claimed - tokenPath: registered token path whose accumulated protocol-fee reward is claimed Halt check: reverts while the Withdraw halt scope is active.
- OID
- 083f77…1fdf:66
CollectProtocolFeeRewardFromLaunchPad details
SetAmountByProjectWallet
func(addr .uverse.address, amount int64, add bool)SetAmountByProjectWallet adjusts launchpad-backed stake and xGNS accounting for a project wallet. Only callable by launchpad contract. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - addr: registered project wallet whose launchpad-backed stake is adjusted - amount: stake amount delta passed to the launchpad reward accounting - add: true to add stake and mint xGNS; false to remove stake and burn xGNS Halt check: reverts while the GovStaker halt scope is active when add is true, or while the Withdraw halt scope is active when add is false.
- OID
- 083f77…1fdf:67
SetAmountByProjectWallet details
CleanStakerDelegationSnapshotByAdmin
func(threshold int64, target .uverse.address)CleanStakerDelegationSnapshotByAdmin removes old delegation snapshots for the total history and the user history of a single target address. Only callable by admin. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - threshold: Unix timestamp cutoff for removing eligible old delegation history - target: user address whose delegation history to clean Halt check: reverts while the GovStaker halt scope is active.
- OID
- 083f77…1fdf:68
CleanStakerDelegationSnapshotByAdmin details
SetUnDelegationLockupPeriodByAdmin
func(period int64)SetUnDelegationLockupPeriodByAdmin sets the undelegation lockup period. Only callable by admin. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - period: non-negative undelegation lockup duration in seconds Halt check: reverts while the GovStaker halt scope is active.
- OID
- 083f77…1fdf:69
SetUnDelegationLockupPeriodByAdmin details
Render
func(path string) stringRender delegates web rendering to the active implementation.
- OID
- 083f77…1fdf:70
Render details
currentAddress
.uverse.addressValue
<gnolang.StringValue>
domainPath
stringValue
"gno.land/r/gnoswap/gov/staker"
kvStore
*v1.kvStore- OID
- 083f77…1fdf:96
kvStore details
versionManager
*v1.versionManager- OID
- 083f77…1fdf:100
versionManager details
implementation
*v1.govStakerV1- OID
- 0b7b23…e234:68
implementation details
init.77
func()- OID
- 083f77…1fdf:77
init.77 details
initializeDomainStore
func(int, rlm .uverse.realm, kvStore v1.KVStore) interface{...}- OID
- 083f77…1fdf:79
initializeDomainStore details
getImplementation
func() staker.IGovStakergetImplementation returns the current active implementation
- OID
- 083f77…1fdf:80
getImplementation details
updateImplementation
func() .uverse.error- OID
- 083f77…1fdf:81
updateImplementation details
StoreKeyUnDelegationLockupPeriod
untyped stringStorage key constants
Value
"unDelegationLockupPeriod"
StoreKeyTotalDelegatedAmount
untyped stringStorage key constants
Value
"totalDelegatedAmount"
StoreKeyTotalLockedAmount
untyped stringStorage key constants
Value
"totalLockedAmount"
StoreKeyDelegationNextID
untyped stringStorage key constants
Value
"delegationNextID"
StoreKeyDelegations
untyped string// BPTree of delegations
Value
"delegations"
StoreKeyTotalDelegationHistory
untyped string// UintTree: timestamp -> int64 (cumulative total)
Value
"totalDelegationHistory"
StoreKeyUserDelegationHistory
untyped string// BPTree: address -> \*UintTree\[timestamp -> int64]
Value
"userDelegationHistory"
StoreKeyEmissionRewardManager
untyped stringStorage key constants
Value
"emissionRewardManager"
StoreKeyProtocolFeeRewardManager
untyped stringStorage key constants
Value
"protocolFeeRewardManager"
StoreKeyDelegationManager
untyped stringStorage key constants
Value
"delegationManager"
StoreKeyLaunchpadProjectDeposits
untyped stringStorage key constants
Value
"launchpadProjectDeposits"
govStakerStore
typegovStakerStore is the concrete implementation of IGovStakerStore
Value
staker.govStakerStore
NewGovStakerStore
func(kvStore v1.KVStore) staker.IGovStakerStoreNewGovStakerStore creates a new governance staker store instance backed by kvStore. Parameters: - kvStore: Key-value store used to persist governance staker state. Returns: - IGovStakerStore: store implementation that reads and writes the supplied KV store.
- OID
- 083f77…1fdf:82
NewGovStakerStore details
UintTree
typeUintTree is a wrapper around a BPTree for storing non-negative int64 keys as ordered strings. Depending on the caller, keys represent Unix timestamps, accrual epochs, or stake-event indexes. Since keys are int64 values, they are converted to uint64-compatible strings. Methods: - Get: Retrieves a value associated with a non-negative int64 key. - set: Stores a value with a non-negative int64 key. - Has: Checks if a non-negative int64 key exists in the tree. - remove: Removes a non-negative int64 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
NewUintTree
func() *staker.UintTreeNewUintTree creates a new UintTree instance. Returns: - \*UintTree: new tree backed by an empty ordered BPTree
- OID
- 083f77…1fdf:84
NewUintTree details
encodeInt64
func(num int64) string- OID
- 083f77…1fdf:86
encodeInt64 details
decodeInt64
func(s string) int64- OID
- 083f77…1fdf:87
decodeInt64 details
IGovStaker
typeMain interface that combines all sub-interfaces
Value
staker.IGovStaker
IGovStakerDelegation
typeDelegation operations interface Mutating methods take \`\_ int, rlm realm\` so the realm token is threaded from the proxy entry points down to the cross-realm token transfers and store writes performed inside each implementation. The \`\_ int\` sentinel surfaces at every call site as a literal \`0\`, making the realm threading visible to readers.
Value
staker.IGovStakerDelegation
IGovStakerReward
typeReward management interface
Value
staker.IGovStakerReward
IGovStakerGetter
typeGetter interface for read operations
Value
staker.IGovStakerGetter
IGovStakerAdmin
typeAdmin interface for administrative functions
Value
staker.IGovStakerAdmin
IGovStakerStore
typeIGovStakerStore mirrors the mutating-method realm-threading convention used by the public IGovStaker\* interfaces above. Setters take \`\_ int, rlm realm\` so KV-store writes execute under the proxy realm — the only address with write access to the shared store.
Value
staker.IGovStakerStore
RegisterInitializer
func(initializer func(...))RegisterInitializer registers an implementation initializer for this realm. Each implementation version calls it during initialization. The callback receives the current realm context and shared gov/staker store so it can construct the versioned implementation. Parameters: - cur: current realm context; callers use cross(cur) when crossing into this realm - initializer: callback invoked with discriminator 0, validated propagated realm context, and IGovStakerStore, returning the implementation
- OID
- 083f77…1fdf:88
RegisterInitializer details
UpgradeImpl
func(packagePath string)UpgradeImpl upgrades the active implementation to packagePath. Only admin or governance can call this function. Parameters: - cur: current realm context; callers use cross(cur) when crossing into this realm - packagePath: package path of the implementation version to activate
- OID
- 083f77…1fdf:90
UpgradeImpl details
GetImplementationPackagePath
func() stringGetImplementationPackagePath returns the package path of the currently active implementation. Returns: - packagePath: package path of the active implementation
- OID
- 083f77…1fdf:91