Search Apps Documentation Source Content File Folder Download Copy Actions Download

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).

Functions

NewDelegation

func NewDelegation( id int64, delegateFrom, delegateTo address, delegateAmount, createdHeight, createdAt int64, ) *staker.Delegation

NewDelegation creates a new delegation. This is a convenience wrapper around staker.NewDelegation. Parameters: - id: delegation ID - delegateFrom: delegator's address - delegateTo: delegatee's address - delegateAmount: amount to delegate - createdHeight: creation block height - createdAt: creation timestamp Returns: - \*staker.Delegation: new delegation instance

Params

Command

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

Result

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.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/staker/v1.NewDelegationWithdraw(,,,,)"

Result

NewDelegationWithdrawWithoutLockup

func NewDelegationWithdrawWithoutLockup( delegationID, unDelegateAmount, createdHeight, createdAt int64, ) *staker.DelegationWithdraw

NewDelegationWithdrawWithoutLockup creates a new delegation withdrawal that is immediately collectable. This is a convenience wrapper around staker.NewDelegationWithdrawWithoutLockup. 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 Returns: - \*staker.DelegationWithdraw: new withdrawal instance that is immediately collected

Params

Command

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

Result

NewGovStakerV1

func NewGovStakerV1(store staker.IGovStakerStore) staker.IGovStaker

Param

Command

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

Result

NewDelegationManagerResolver

func NewDelegationManagerResolver(delegationManager *staker.DelegationManager) *DelegationManagerResolver

Param

Command

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

Result

NewDelegationResolver

func NewDelegationResolver(delegation *staker.Delegation) *DelegationResolver

Param

Command

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

Result

NewDelegationWithdrawResolver

func NewDelegationWithdrawResolver(withdraw *staker.DelegationWithdraw) *DelegationWithdrawResolver

Param

Command

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

Result

NewEmissionRewardManagerResolver

func NewEmissionRewardManagerResolver(emissionRewardManager *staker.EmissionRewardManager) *EmissionRewardManagerResolver

Param

Command

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

Result

NewEmissionRewardStateResolver

func NewEmissionRewardStateResolver(emissionRewardState *staker.EmissionRewardState) *EmissionRewardStateResolver

Param

Command

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

Result

NewLaunchpadProjectDepositsResolver

func NewLaunchpadProjectDepositsResolver(launchpadProjectDeposits *staker.LaunchpadProjectDeposits) *LaunchpadProjectDepositsResolver

Param

Command

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

Result

NewProtocolFeeRewardManagerResolver

func NewProtocolFeeRewardManagerResolver(manager *staker.ProtocolFeeRewardManager) *ProtocolFeeRewardManagerResolver

Param

Command

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

Result

NewProtocolFeeRewardStateResolver

func NewProtocolFeeRewardStateResolver(protocolFeeRewardState *staker.ProtocolFeeRewardState) *ProtocolFeeRewardStateResolver

Param

Command

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

Result