Counter
typeValue
staker.Counter
NewCounter
func() *staker.Counter- 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 new delegation
- OID
- 083f77…1fdf:5
NewDelegation details
NewDelegationTree
func() *v0.BPTree- OID
- 083f77…1fdf:7
NewDelegationTree details
NewUserDelegationTree
func() *v0.BPTree- 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.
- 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 will be collectable after the lockup period expires. Parameters: - delegationID: unique identifier of the associated delegation - unDelegateAmount: amount being withdrawn - createdAt: timestamp when the withdrawal was created - unDelegationLockupPeriod: duration of the lockup period in seconds Returns: - \*DelegationWithdraw: new withdrawal instance with lockup
- OID
- 083f77…1fdf:11
NewDelegationWithdraw details
NewDelegationWithdrawWithoutLockup
func(delegationID int64, unDelegateAmount int64, createdHeight int64, createdAt int64) staker.DelegationWithdrawNewDelegationWithdrawWithoutLockup creates a new delegation withdrawal that is immediately collectable. This is used for special cases like redelegation where no lockup period is required. Parameters: - delegationID: unique identifier of the associated delegation - unDelegateAmount: amount being withdrawn - createdAt: timestamp when the withdrawal was created Returns: - \*DelegationWithdraw: new withdrawal instance that is immediately collected
- 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 a new instance of EmissionRewardManager. This factory function initializes all tracking structures for emission reward management. NewEmissionRewardManager creates new emission reward manager instance.
- 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 *uint256.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
cloneAddressSlice
func(src [].uverse.address) [].uverse.address- OID
- 083f77…1fdf:20
cloneAddressSlice details
cloneStringInt64Map
func(src map[string]int64) map[string]int64- OID
- 083f77…1fdf:21
cloneStringInt64Map details
cloneDelegationWithdraws
func(src []staker.DelegationWithdraw) []staker.DelegationWithdraw- OID
- 083f77…1fdf:22
cloneDelegationWithdraws details
GetTotalxGnsSupply
func() int64GetTotalxGnsSupply returns the total supply of xGNS tokens.
- OID
- 083f77…1fdf:23
GetTotalxGnsSupply details
GetTotalDelegated
func() int64GetTotalDelegated returns the total amount of GNS delegated.
- OID
- 083f77…1fdf:25
GetTotalDelegated details
GetTotalLockedAmount
func() int64GetTotalLockedAmount returns the total amount of GNS locked in undelegation.
- OID
- 083f77…1fdf:26
GetTotalLockedAmount details
GetUnDelegationLockupPeriod
func() int64GetUnDelegationLockupPeriod returns the undelegation lockup period in seconds.
- OID
- 083f77…1fdf:27
GetUnDelegationLockupPeriod details
GetDelegationCount
func() intGetDelegationCount returns the total number of delegations.
- OID
- 083f77…1fdf:28
GetDelegationCount details
GetDelegationIDs
func(offset int, count int) []int64GetDelegationIDs returns all delegation IDs for a specific delegator-delegatee pair.
- OID
- 083f77…1fdf:29
GetDelegationIDs details
ExistsDelegation
func(delegationID int64) boolExistsDelegation checks if a delegation exists.
- OID
- 083f77…1fdf:30
ExistsDelegation details
GetDelegation
func(delegationID int64) (*staker.Delegation, .uverse.error)GetDelegation returns the delegation for the given ID.
- OID
- 083f77…1fdf:31
GetDelegation details
GetDelegatorDelegateeCount
func(delegator .uverse.address) intGetDelegatorDelegateeCount returns the number of delegatees for a specific delegator.
- OID
- 083f77…1fdf:32
GetDelegatorDelegateeCount details
GetDelegatorDelegateeAddresses
func(delegator .uverse.address, offset int, count int) [].uverse.address- OID
- 083f77…1fdf:33
GetDelegatorDelegateeAddresses details
GetUserDelegationCount
func(delegator .uverse.address, delegatee .uverse.address) intGetUserDelegationCount returns the number of delegations for a specific delegator-delegatee pair.
- OID
- 083f77…1fdf:34
GetUserDelegationCount details
GetUserDelegationIDs
func(delegator .uverse.address, delegatee .uverse.address) []int64GetUserDelegationIDs returns a list of delegation IDs for a specific delegator-delegatee pair.
- OID
- 083f77…1fdf:35
GetUserDelegationIDs details
HasDelegationSnapshotsKey
func() boolHasDelegationSnapshotsKey returns true if delegation history exists.
- OID
- 083f77…1fdf:36
HasDelegationSnapshotsKey details
GetTotalDelegationAmountAtSnapshot
func(snapshotTime int64) (int64, bool)GetTotalDelegationAmountAtSnapshot returns the total delegation amount at a specific snapshot time.
- OID
- 083f77…1fdf:37
GetTotalDelegationAmountAtSnapshot details
GetUserDelegationAmountAtSnapshot
func(userAddr .uverse.address, snapshotTime int64) (int64, bool)GetUserDelegationAmountAtSnapshot returns the user delegation amount at a specific snapshot time.
- OID
- 083f77…1fdf:38
GetUserDelegationAmountAtSnapshot details
GetClaimableRewardByAddress
func(addr .uverse.address) (int64, map[string]int64, .uverse.error)GetClaimableRewardByAddress returns claimable rewards for an address. Returns: - int64: emission reward amount - map\[string]int64: protocol fee rewards by token path
- OID
- 083f77…1fdf:39
GetClaimableRewardByAddress details
GetClaimableRewardByLaunchpad
func(addr .uverse.address) (int64, map[string]int64, .uverse.error)GetClaimableRewardByLaunchpad returns claimable launchpad rewards for an address. Returns: - int64: emission reward amount - map\[string]int64: protocol fee rewards by token path
- OID
- 083f77…1fdf:40
GetClaimableRewardByLaunchpad details
GetClaimableRewardByRewardID
func(rewardID string) (int64, map[string]int64, .uverse.error)GetClaimableRewardByRewardID returns claimable reward details by reward ID. Returns: - int64: emission reward amount - map\[string]int64: protocol fee rewards by token path
- OID
- 083f77…1fdf:41
GetClaimableRewardByRewardID details
GetLaunchpadProjectDeposit
func(projectAddr string) (int64, bool)GetLaunchpadProjectDeposit returns the deposit amount for a launchpad project.
- OID
- 083f77…1fdf:42
GetLaunchpadProjectDeposit details
GetDelegationWithdrawCount
func(delegationID int64) intGetDelegationWithdrawCount returns the total number of delegation withdraws for a specific delegation.
- OID
- 083f77…1fdf:43
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.
- OID
- 083f77…1fdf:44
GetDelegationWithdraws details
GetCollectableWithdrawAmount
func(delegationID int64) int64GetCollectableWithdrawAmount returns the collectable withdraw amount for a specific delegation.
- OID
- 083f77…1fdf:45
GetCollectableWithdrawAmount details
GetProtocolFeeAccumulatedX128PerStake
func(tokenPath string) *uint256.UintGetProtocolFeeAccumulatedX128PerStake returns the accumulated protocol fee per stake (Q128) for a token path.
- OID
- 083f77…1fdf:46
GetProtocolFeeAccumulatedX128PerStake details
GetProtocolFeeAmount
func(tokenPath string) int64GetProtocolFeeAmount returns the protocol fee amount for a specific token
- OID
- 083f77…1fdf:47
GetProtocolFeeAmount details
GetProtocolFeeAccumulatedTimestamp
func() int64GetProtocolFeeAccumulatedTimestamp returns the accumulated timestamp for protocol fee rewards.
- OID
- 083f77…1fdf:48
GetProtocolFeeAccumulatedTimestamp details
GetEmissionAccumulatedX128PerStake
func() *uint256.UintGetEmissionAccumulatedX128PerStake returns the accumulated emission per stake (Q128).
- OID
- 083f77…1fdf:49
GetEmissionAccumulatedX128PerStake details
GetEmissionDistributedAmount
func() int64GetEmissionDistributedAmount returns the total distributed emission amount.
- OID
- 083f77…1fdf:50
GetEmissionDistributedAmount details
GetEmissionAccumulatedTimestamp
func() int64GetEmissionAccumulatedTimestamp returns the accumulated timestamp for emission rewards.
- OID
- 083f77…1fdf:51
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 a new instance of LaunchpadProjectDeposits.
- OID
- 083f77…1fdf:52
NewLaunchpadProjectDeposits details
ProtocolFeeRewardManager
typeProtocolFeeRewardManager manages the distribution of protocol fee rewards to stakers. Unlike emission rewards, protocol fees can come from multiple tokens, requiring separate tracking and distribution mechanisms for each token type.
Value
staker.ProtocolFeeRewardManager
NewProtocolFeeRewardManager
func() *staker.ProtocolFeeRewardManagerNewProtocolFeeRewardManager creates a new instance of ProtocolFeeRewardManager. This factory function initializes all tracking structures for multi-token protocol fee reward management. Returns: - \*ProtocolFeeRewardManager: new protocol fee reward manager instance
- OID
- 083f77…1fdf:54
NewProtocolFeeRewardManager details
ProtocolFeeRewardState
typeProtocolFeeRewardState tracks protocol fee reward information for an individual staker across multiple tokens. Unlike emission rewards which are single-token, protocol fees can come from various trading pairs, requiring separate tracking and calculation for each token type.
Value
staker.ProtocolFeeRewardState
NewProtocolFeeRewardState
func(accumulatedProtocolFeeX128PerStake map[string]*uint256.Uint) *staker.ProtocolFeeRewardStateNewProtocolFeeRewardState creates a new protocol fee reward state for a staker. This factory function initializes the state with the current system reward debt for all tokens.
- OID
- 083f77…1fdf:56
NewProtocolFeeRewardState details
Delegate
func(to .uverse.address, amount int64, referrer string) int64Delegate stakes GNS tokens to a delegatee address. Parameters: - to: address to delegate to - amount: amount of GNS to delegate - referrer: referrer address for reward tracking Returns: - int64: delegation ID
- OID
- 083f77…1fdf:58
Delegate details
Undelegate
func(from .uverse.address, amount int64) int64Undelegate initiates the undelegation process for staked GNS. Parameters: - from: delegatee address to undelegate from - amount: amount of GNS to undelegate Returns: - int64: undelegation result code
- OID
- 083f77…1fdf:60
Undelegate details
Redelegate
func(delegatee .uverse.address, newDelegatee .uverse.address, amount int64) int64Redelegate moves delegation from one delegatee to another. Parameters: - delegatee: current delegatee address - newDelegatee: new delegatee address - amount: amount to redelegate Returns: - int64: redelegation result code
- OID
- 083f77…1fdf:61
Redelegate details
CollectUndelegatedGns
func() int64CollectUndelegatedGns collects GNS tokens after the undelegation lockup period. Returns: - int64: amount of GNS collected
- OID
- 083f77…1fdf:62
CollectUndelegatedGns details
CollectReward
func()CollectReward claims accumulated staking rewards.
- OID
- 083f77…1fdf:63
CollectReward details
CollectEmissionReward
func()CollectEmissionReward claims accumulated GNS emission rewards.
- OID
- 083f77…1fdf:64
CollectEmissionReward details
CollectProtocolFeeReward
func(tokenPath string)CollectProtocolFeeReward claims accumulated protocol fee rewards for the provided token path.
- OID
- 083f77…1fdf:65
CollectProtocolFeeReward details
CollectRewardFromLaunchPad
func(to .uverse.address)CollectRewardFromLaunchPad claims rewards from launchpad projects. Parameters: - to: address to collect rewards for
- OID
- 083f77…1fdf:66
CollectRewardFromLaunchPad details
CollectEmissionRewardFromLaunchPad
func(to .uverse.address)CollectEmissionRewardFromLaunchPad claims accumulated launchpad emission rewards. Parameters: - to: address to collect rewards for
- OID
- 083f77…1fdf:67
CollectEmissionRewardFromLaunchPad details
CollectProtocolFeeRewardFromLaunchPad
func(to .uverse.address, tokenPath string)CollectProtocolFeeRewardFromLaunchPad claims accumulated launchpad protocol fee rewards for the provided token path. Parameters: - to: address to collect rewards for - tokenPath: token path to collect
- OID
- 083f77…1fdf:68
CollectProtocolFeeRewardFromLaunchPad details
SetAmountByProjectWallet
func(addr .uverse.address, amount int64, add bool)SetAmountByProjectWallet sets reward amount for a project wallet. Only callable by launchpad contract. Parameters: - addr: project wallet address - amount: reward amount - add: true to add, false to subtract
- OID
- 083f77…1fdf:69
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: - threshold: timestamp threshold for cleanup - target: user address whose delegation history to clean
- OID
- 083f77…1fdf:70
CleanStakerDelegationSnapshotByAdmin details
SetUnDelegationLockupPeriodByAdmin
func(period int64)SetUnDelegationLockupPeriodByAdmin sets the undelegation lockup period. Only callable by admin. Parameters: - period: lockup period in seconds
- OID
- 083f77…1fdf:71
SetUnDelegationLockupPeriodByAdmin details
currentAddress
.uverse.addressValue
<gnolang.StringValue>
domainPath
stringValue
"gno.land/r/gnoswap/gov/staker"
kvStore
*store.kvStore- OID
- 083f77…1fdf:98
kvStore details
versionManager
*version_manager.versionManager- OID
- 083f77…1fdf:102
versionManager details
implementation
*v1.govStakerV1- OID
- 0b7b23…e234:58
implementation details
init.76
func()- OID
- 083f77…1fdf:77
init.76 details
initializeDomainStore
func(int, rlm .uverse.realm, kvStore store.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 store.KVStore) staker.IGovStakerStoreNewGovStakerStore creates a new governance staker store instance
- OID
- 083f77…1fdf:82
NewGovStakerStore details
UintTree
typeUintTree is a wrapper around a BPTree 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
NewUintTree
func() *staker.UintTreeNewUintTree creates a new UintTree instance.
- OID
- 083f77…1fdf:84
NewUintTree 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
- 083f77…1fdf:86
EncodeUint details
EncodeInt64
func(num int64) string- OID
- 083f77…1fdf:87
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
- 083f77…1fdf:88
DecodeUint details
DecodeInt64
func(s string) int64- OID
- 083f77…1fdf:89
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. This function is called by each implementation version during init. The initializer function creates a new instance of the implementation using the provided IGovStakerStore. It receives a realm value that resolves to the gov/staker proxy realm — the only address with write permission on the shared KV store — so any per-version store bootstrapping performed inside the initializer passes the proxy's authorization check.
- OID
- 083f77…1fdf:90
RegisterInitializer details
UpgradeImpl
func(packagePath string)UpgradeImpl upgrades the implementation to a new version Only admin or governance can call this function
- OID
- 083f77…1fdf:92
UpgradeImpl details
GetImplementationPackagePath
func() stringGetImplementationPackagePath returns the package path of the currently active implementation.
- OID
- 083f77…1fdf:93