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

memba_arcade_leaderboard_v1 package

Overview

Package memba_arcade_leaderboard_v1 is the funds-free, verified-score ledger for the Memba arcade (BARRICADE, Space Invaders, and future games — one realm, boards keyed per game slug). Nothing here trusts a client number: an authorized ATTESTER (the backend verifier's key) re-simulates a submitted input log and attests only the reproduced result. The chain stores the attested result plus a commitment to the log (its sha256) — the log itself stays off-chain; "verified, never trustless" is the public contract.

SAFETY: there is NO banker, NO transfer, and NO OriginSend anywhere — the fund-drain risk class does not apply. The only trust boundary is who may attest (owner ∪ the attester allowlist); every write emits an event. Two buckets never mix: the competitive DAILY BOARD (one best entry per address per game per day, shared seed) and personal TRAINING RECEIPTS (practice runs — a verified flex, never ranked).

The game slug is shape-validated only — there is deliberately NO on-chain game registry: the realm is funds-free, so the worst a typo'd slug can do is fragment a board, and the attester (not the player) authors the slug.

Function

AttestScore

func AttestScore(cur realm, game string, addr address, day, seed string, score, simVersion int64, stateHash, logHash, stats string)

AttestScore writes (or improves) an address's entry on a game's competitive board for a day. Attester-only. The verifier batches a day's results into one multi-msg tx at day close, plus spam-capped singles for the "certify now" flow. Re-attesting the same game/address/day only ever RAISES the score (Second Wind). A log hash already attested for that game-day for a DIFFERENT address is rejected — on a shared daily seed a valid input log is portable, so first-submitter wins (replay-theft defense). `stats` is the attester-authored per-game JSON blob (waves, wins, levels, …) — never ranked, only echoed by reads.

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/samcrew/memba_arcade_leaderboard_v1" -func "AttestScore" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/samcrew/memba_arcade_leaderboard_v1" -func "AttestScore" -args $'' -args $'' -args $'' -args $'' -args $'' -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 "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx