For the complete documentation index, see llms.txt. This page is also available as Markdown.

staker_delegate.gno

CollectUndelegatedGns

func CollectUndelegatedGns(
	cur realm
) int64

CollectUndelegatedGns collects the amount of the undelegated GNS.

Halt check: reverts while the Withdraw halt scope is active.

Parameters

Name
Type
Description

cur

realm

Current realm context; callers use cross(cur) when crossing into this realm.

Return Values

Name
Type
Description

amount

int64

GNS amount released to the caller after eligible undelegation withdrawals are collected

source

Delegate

Delegate delegates GNS to a delegate.

Halt check: reverts while the GovStaker halt scope is active.

Parameters

Name
Type
Description

cur

realm

Current realm context; callers use cross(cur) when crossing into this realm.

to

address

delegatee address that receives voting power

amount

int64

positive GNS amount to delegate and convert to xGNS voting power

referrer

string

optional referral identifier to register for reward tracking

Return Values

Name
Type
Description

delegatedAmount

int64

The amount of GNS delegated and mirrored as xGNS.

source

Redelegate

Redelegate redelegates xGNS from the existing delegate to another.

Halt check: reverts while the GovStaker halt scope is active.

Parameters

Name
Type
Description

cur

realm

Current realm context; callers use cross(cur) when crossing into this realm.

delegatee

address

current delegatee address whose voting power is reduced

newDelegatee

address

destination address that receives the redelegated voting power

amount

int64

positive xGNS amount to move without a user-facing lockup

Return Values

Name
Type
Description

redelegatedAmount

int64

The amount moved from the current delegatee to the new delegatee.

source

Undelegate

Undelegate undelegates xGNS from the existing delegate.

Halt check: reverts while the Withdraw halt scope is active.

Parameters

Name
Type
Description

cur

realm

Current realm context; callers use cross(cur) when crossing into this realm.

from

address

delegatee address from which the caller removes delegation

amount

int64

positive xGNS amount to move into undelegation lockup

Return Values

Name
Type
Description

amount

int64

The amount of GNS moved into undelegation lockup.

source

Last updated