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

NewProtocolFeeTokenRewardState

func NewProtocolFeeTokenRewardState(eventCursor int64, segmentStakedAmount int64, segmentStartX128 *u256.Uint) *ProtocolFeeTokenRewardState

NewProtocolFeeTokenRewardState creates the settlement state of a token whose open segment starts at the given cursor, stake and accumulator value.

Parameters:

  • eventCursor: number of stake events already folded into this token state
  • segmentStakedAmount: stake amount in force during the open segment
  • segmentStartX128: accumulated fee-per-stake value at the open segment start, scaled by 2^128

Returns:

  • *ProtocolFeeTokenRewardState: token settlement state with zero closed-segment earnings and claimed reward

Params

Command

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

Result