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

pointsv2 package

Overview

Package pointsv2 is referral + check-in + trade/create points for gnomemepad.

Trade/create awards are pad-only: allowed pad packages call OnTrade / OnCreate after a successful user action. EOAs cannot self-award trade points.

Example
1SetReferrer / CheckIn / AwardPoints / Leaderboard — same as v1
2AllowPad / RevokePad — admin allowlist of pad package paths
3OnTrade / OnCreate — called by pad via cross(cur)
4ParamsInfo — extended for UI

Function

OnTrade

func OnTrade(cur realm, trader address, launchID string, side int64, volumeUgnot int64) int64

OnTrade awards points for a pad buy (side=0) or sell (side=1). volumeUgnot is the GNOT notional of the trade (sent in / received out). Returns points awarded (0 if capped).

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/pointsv2" -func "OnTrade" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "sapphire-1" -remote "https://rpc.sapphire.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.sapphire.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/pointsv2" -func "OnTrade" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "sapphire-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.sapphire.testnets.gno.land" call.tx