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 delegation and xGNS accounting. It maintains timestamped delegation history, distributes GNS emission and protocol-fee rewards, and enforces a configurable undelegation lockup (7 days by default; xGNS is burned when undelegated GNS is collected).

Function

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 "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/gov/staker/v1.NewDelegation(,,,,,)"

Result