Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

staker/v1 package

Overview

package v1 manages GNS token staking and delegation functionality. It handles delegation of voting power, distribution of protocol rewards, and implements a lockup period (default: 7-days) for unstaking operations (xGNS burned on collect).

Function

NewDelegationWithdraw

func NewDelegationWithdraw( delegationID, unDelegateAmount, createdHeight, createdAt, unDelegationLockupPeriod int64, ) staker.DelegationWithdraw

NewDelegationWithdraw creates a new delegation withdrawal with lockup period. This is a convenience wrapper around staker.NewDelegationWithdraw.

Parameters:

  • delegationID: unique identifier of the associated delegation
  • unDelegateAmount: amount being withdrawn
  • createdHeight: height when the withdrawal was created
  • createdAt: timestamp when the withdrawal was created
  • unDelegationLockupPeriod: duration of the lockup period in seconds

Returns:

  • *staker.DelegationWithdraw: new withdrawal instance with lockup

Params

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/gnoswap/gov/staker/v1.NewDelegationWithdraw(,,,,)"

Result