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 package

Function

NewDelegation

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

NewDelegation creates a delegation record with no undelegated or collected amount.

Parameters:

  • id: unique identifier assigned to this delegation record.
  • delegateFrom: address whose tokens are delegated.
  • delegateTo: address receiving the delegated voting power.
  • delegateAmount: initial delegated token amount in the smallest token unit.
  • createdHeight: block height at which the delegation was created.
  • createdAt: Unix timestamp at which the delegation was created.

Returns:

  • *Delegation: initialized delegation with empty withdrawal history.

Params

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/gov/staker.NewDelegation(,,,,,)"

Result