Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions 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
Ask AI Claude ChatGPT

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 "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/gov/staker.NewDelegation(,,,,,)"

Result