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

GetUserDelegationAmountAtSnapshot

func GetUserDelegationAmountAtSnapshot(userAddr address, snapshotTime int64) (int64, bool)

GetUserDelegationAmountAtSnapshot returns one user's delegation at a Unix timestamp, using that user's latest history entry at or before the timestamp. The bool is false when no qualifying history entry exists. Parameters:

  • userAddr: Delegator address whose historical delegation is queried.
  • snapshotTime: Unix timestamp at or before which to select the user's latest history entry.

Returns:

  • int64: user's delegated amount recorded at or before snapshotTime.
  • bool: true when a qualifying user-history entry exists; false otherwise.

Params

Command

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

Result