staker_delegate.gno
CollectUndelegatedGns
func CollectUndelegatedGns(
cur realm
) int64CollectUndelegatedGns collects the amount of the undelegated GNS.
Halt check: reverts while the Withdraw halt scope is active.
Parameters
cur
realm
Current realm context; callers use cross(cur) when crossing into this realm.
Return Values
amount
int64
GNS amount released to the caller after eligible undelegation withdrawals are collected
Delegate
Delegate delegates GNS to a delegate.
Halt check: reverts while the GovStaker halt scope is active.
Parameters
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
delegatedAmount
int64
The amount of GNS delegated and mirrored as xGNS.
Redelegate
Redelegate redelegates xGNS from the existing delegate to another.
Halt check: reverts while the GovStaker halt scope is active.
Parameters
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
redelegatedAmount
int64
The amount moved from the current delegatee to the new delegatee.
Undelegate
Undelegate undelegates xGNS from the existing delegate.
Halt check: reverts while the Withdraw halt scope is active.
Parameters
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
amount
int64
The amount of GNS moved into undelegation lockup.
Last updated