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

points source realm

Package points is a lightweight referral + points ledger for gnomemepad. Independent of pad — does not verify trade...

Overview

Package points is a lightweight referral + points ledger for gnomemepad. Independent of pad — does not verify trades on-chain (testnet growth layer).

Example
1SetReferrer(referrer) — once per user; both get bonus points
2CheckIn() — daily points (1 per CheckInInterval heights)
3GetPoints / GetReferrer / Leaderboard
4AwardPoints — admin only (manual campaigns)

Constants 1

Functions 12

func AwardPoints

crossing Action
1func AwardPoints(cur realm, to address, amount int64)
source

AwardPoints is admin-only (campaigns / corrections).

func CheckIn

crossing Action
1func CheckIn(cur realm) int64
source

CheckIn grants PointsCheckIn if enough heights passed since last check-in.

func Leaderboard

Action
1func Leaderboard(n int) string
source

Leaderboard returns up to n lines "addr|points" sorted by points desc.

func ParamsInfo

Action
1func ParamsInfo() string
source

ParamsInfo for UI: referrerBonus|refereeBonus|checkIn|interval

func SetReferrer

crossing Action
1func SetReferrer(cur realm, referrer address)
source

SetReferrer binds caller to a referrer once. Self-referral rejected.

Imports 5

Source Files 2