getter.gno

ExistsDelegation

func ExistsDelegation(
	delegationID int64
) bool

ExistsDelegation checks if a delegation exists.

Parameters

Name
Type
Description

delegationID

int64

ID of the delegation

Return Values

Name
Type
Description

exists

bool

true if delegation exists


GetClaimableRewardByAddress

GetClaimableRewardByAddress returns claimable rewards for an address.

Parameters

Name
Type
Description

addr

address

user address

Return Values

Name
Type
Description

emissionReward

int64

emission reward amount

protocolFeeRewards

map[string]int64

protocol fee rewards by token path

err

error

error if retrieval fails


GetClaimableRewardByLaunchpad

GetClaimableRewardByLaunchpad returns claimable launchpad rewards for an address.

Parameters

Name
Type
Description

addr

address

user address

Return Values

Name
Type
Description

emissionReward

int64

emission reward amount

protocolFeeRewards

map[string]int64

protocol fee rewards by token path

err

error

error if retrieval fails


GetClaimableRewardByRewardID

GetClaimableRewardByRewardID returns claimable reward details by reward ID.

Parameters

Name
Type
Description

rewardID

string

ID of the reward

Return Values

Name
Type
Description

emissionReward

int64

emission reward amount

protocolFeeRewards

map[string]int64

protocol fee rewards by token path

err

error

error if retrieval fails


GetCollectableWithdrawAmount

GetCollectableWithdrawAmount returns the collectable withdraw amount for a specific delegation.

Parameters

Name
Type
Description

delegationID

int64

ID of the delegation

Return Values

Name
Type
Description

amount

int64

collectable withdraw amount


GetDelegationCount

GetDelegationCount returns the total number of delegations.

Return Values

Name
Type
Description

count

int

total number of delegations


GetDelegationIDs

GetDelegationIDs returns a paginated list of delegation IDs.

Parameters

Name
Type
Description

offset

int

starting index

count

int

number of IDs to return

Return Values

Name
Type
Description

delegationIds

[]int64

list of delegation IDs


GetDelegationWithdrawCount

GetDelegationWithdrawCount returns the total number of delegation withdraws for a specific delegation.

Parameters

Name
Type
Description

delegationID

int64

ID of the delegation

Return Values

Name
Type
Description

count

int

number of withdraws


GetDelegatorDelegateeAddresses

GetDelegatorDelegateeAddresses returns a paginated list of delegatee addresses for a specific delegator.

Parameters

Name
Type
Description

delegator

address

delegator address

offset

int

starting index

count

int

number of addresses to return

Return Values

Name
Type
Description

addresses

[]address

list of delegatee addresses


GetDelegatorDelegateeCount

GetDelegatorDelegateeCount returns the number of delegatees for a specific delegator.

Parameters

Name
Type
Description

delegator

address

delegator address

Return Values

Name
Type
Description

count

int

number of delegatees


GetEmissionAccumulatedTimestamp

GetEmissionAccumulatedTimestamp returns the accumulated timestamp for emission rewards.

Return Values

Name
Type
Description

timestamp

int64

accumulated timestamp


GetEmissionAccumulatedX128PerStake

GetEmissionAccumulatedX128PerStake returns the accumulated emission per stake (Q128).

Return Values

Name
Type
Description

accumulatedEmission

*u256.Uint

accumulated emission per stake


GetEmissionDistributedAmount

GetEmissionDistributedAmount returns the total distributed emission amount.

Return Values

Name
Type
Description

amount

int64

total distributed emission amount


GetEmissionRewardBalance

GetEmissionRewardBalance returns the current emission reward balance.

Return Values

Name
Type
Description

balance

int64

current emission reward balance


GetLaunchpadProjectDeposit

GetLaunchpadProjectDeposit returns the deposit amount for a launchpad project.

Parameters

Name
Type
Description

projectAddr

string

project address

Return Values

Name
Type
Description

amount

int64

deposit amount

exists

bool

true if project exists


GetLockedAmount

GetLockedAmount returns the total locked GNS amount.

Return Values

Name
Type
Description

amount

int64

total locked GNS amount


GetProtocolFeeAccumulatedTimestamp

GetProtocolFeeAccumulatedTimestamp returns the accumulated timestamp for protocol fee rewards.

Return Values

Name
Type
Description

timestamp

int64

accumulated timestamp


GetProtocolFeeAccumulatedX128PerStake

GetProtocolFeeAccumulatedX128PerStake returns the accumulated protocol fee per stake (Q128) for a token path.

Parameters

Name
Type
Description

tokenPath

string

path of the token

Return Values

Name
Type
Description

accumulatedFee

*u256.Uint

accumulated protocol fee per stake


GetProtocolFeeAmount

GetProtocolFeeAmount returns the protocol fee amounts for a token path.

Parameters

Name
Type
Description

tokenPath

string

path of the token

Return Values

Name
Type
Description

amount

int64

protocol fee amount


GetTotalDelegated

GetTotalDelegated returns the total amount of GNS delegated.

Return Values

Name
Type
Description

amount

int64

total delegated GNS amount


GetTotalDelegationAmountAtSnapshot

GetTotalDelegationAmountAtSnapshot returns the total delegation amount at a specific snapshot time.

Parameters

Name
Type
Description

snapshotTime

int64

snapshot timestamp

Return Values

Name
Type
Description

amount

int64

total delegation amount

exists

bool

true if snapshot exists


GetTotalLockedAmount

GetTotalLockedAmount returns the total amount of GNS locked in undelegation.

Return Values

Name
Type
Description

amount

int64

total locked GNS amount


GetTotalxGnsSupply

GetTotalxGnsSupply returns the total supply of xGNS tokens.

Return Values

Name
Type
Description

supply

int64

total xGNS token supply


GetUnDelegationLockupPeriod

GetUnDelegationLockupPeriod returns the undelegation lockup period in seconds.

Return Values

Name
Type
Description

period

int64

lockup period in seconds


GetUserDelegationAmountAtSnapshot

GetUserDelegationAmountAtSnapshot returns the user delegation amount at a specific snapshot time.

Parameters

Name
Type
Description

userAddr

address

user address

snapshotTime

int64

snapshot timestamp

Return Values

Name
Type
Description

amount

int64

user delegation amount

exists

bool

true if snapshot exists


GetUserDelegationCount

GetUserDelegationCount returns the number of delegations for a specific delegator-delegatee pair.

Parameters

Name
Type
Description

delegator

address

delegator address

delegatee

address

delegatee address

Return Values

Name
Type
Description

count

int

number of delegations


GetUserDelegationIDs

GetUserDelegationIDs returns a list of delegation IDs for a specific delegator-delegatee pair.

Parameters

Name
Type
Description

delegator

address

delegator address

delegatee

address

delegatee address

Return Values

Name
Type
Description

delegationIds

[]int64

list of delegation IDs


HasDelegationSnapshotsKey

HasDelegationSnapshotsKey returns true if delegation history exists.

Return Values

Name
Type
Description

exists

bool

true if delegation history exists

Last updated