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

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 "https://rpc.gno.land" -data "gno.land/r/gnoswap/launchpad.NewRewardState(,,,,)"

Result

Gno Expression Evaluator

Evaluate any read-only Gno expression against gno.land/r/gnoswap/launchpad, for example a function call with arguments.