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

staking/v0 package

Overview

Package staking is a simplified, accounting-only port of Synthetix StakingRewards to gno.land. Users stake a fungible amount; rewards accrue every block, proportional to each staker's share of the total staked, at a fixed rewardPerBlock. There is no real coin transfer — balances and rewards are plain uint64 accounting (a demonstration of the classic "reward-per-token" accumulator pattern).

Function

Earned

func Earned(addr address) uint64
Ask AI Claude ChatGPT

Earned reports the rewards currently owed to `addr` (accrued but unminted), projected to the current block without mutating any state.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/daily/staking/v0.Earned()"

Result

Gno Expression Evaluator

Evaluate any read-only Gno expression against gno.land/r/moul/x/daily/staking/v0, for example a function call with arguments.