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

launchpad package

Function

NewRewardState

func NewRewardState( accumulatedRewardPerDepositX128 *u256.Uint, depositAmount, distributeStartTime, distributeEndTime int64, claimableTime int64, ) *RewardState

NewRewardState creates a reward state initialized from a reward-per-deposit index.

Parameters:

  • accumulatedRewardPerDepositX128: current accumulated reward-per-deposit index in Q128 fixed-point units; it becomes this deposit's initial price debt.
  • depositAmount: GNS amount staked by the deposit, in base units.
  • distributeStartTime: Unix timestamp in seconds when this deposit begins accruing rewards.
  • distributeEndTime: Unix timestamp in seconds when this deposit stops accruing rewards.
  • claimableTime: Unix timestamp in seconds after which the accrued reward can be claimed.

Returns:

  • rewardState: newly allocated state with claimed and legacy accumulation fields initialized to zero.

Params

Command

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

Result