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

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

mequest source realm

This file is automatically generated and contains metadata about this package deployment. It serves as a marker that ...

Overview

This file is automatically generated and contains metadata about this package deployment. It serves as a marker that this package was deployed using Gno Studio (or Gno Playground) and may be used by tools for analytics, verification, and ecosystem features.

This file does not affect package execution and should not be modified.

Package mequest is MeQuest: quests that verify themselves.

Projects lock GNOT rewards in this realm when they create a quest. Coins can only leave through a verified claim, a split settle, or a refund of the unclaimed remainder to the funder after expiry. Winners get a soulbound rarity card (Common/Rare/Epic/Legendary).

Constants 2

const KindCheckin, KindEarly, KindInvites, KindProjects, KindCards, KindPosted, KindMyRealm, KindGrant

 1const (
 2	KindCheckin  = "checkin"  // check-in streak of at least Arg days (1 = first check-in)
 3	KindEarly    = "early"    // among the first Arg wallets to join MeQuest
 4	KindInvites  = "invites"  // at least Arg invited friends earned a card
 5	KindProjects = "projects" // cards from at least Arg different projects
 6	KindCards    = "cards"    // own at least Arg cards
 7	KindPosted   = "posted"   // funded at least Arg quests as a project
 8	KindMyRealm  = "myrealm"  // your own realm (gno.land/r/<your addr>/...) calls ProveRealm
 9	KindGrant    = "grant"    // given by the quest funder (e.g. season top 3)
10)
source

const Common, Rare, Epic, Legendary, KindManual, KindPush, KindHold, KindName, KindCard, PayFixed, PaySplit, DailyCap, Season, daySecs

 1const (
 2	Common    = 1
 3	Rare      = 2
 4	Epic      = 3
 5	Legendary = 4
 6
 7	KindManual = "manual" // project reviews a proof
 8	KindPush   = "push"   // partner realm calls Complete
 9	KindHold   = "hold"   // wallet holds at least Arg ugnot
10	KindName   = "name"   // wallet has a registered gno.land username
11	KindCard   = "card"   // wallet owns the card from quest Arg (quest chain)
12
13	PayFixed = "fixed" // style A: Reward per winner, paid on claim
14	PaySplit = "split" // style B: pool split equally after expiry
15
16	DailyCap = 10
17	Season   = "S1"
18	daySecs  = 86400
19)
source

Functions 24

func CanClaim

Action
1func CanClaim(wallet address, id int) string
source

CanClaim is a free read-only dry run of Claim: "ok" or the reason it would fail.

func CheckIn

crossing Action
1func CheckIn(cur realm) int
source

CheckIn records today's check-in and grows your streak.

func Claim

crossing Action
1func Claim(cur realm, id int)
source

Claim runs the quest's own check on the caller and pays if it passes.

func Complete

crossing Action
1func Complete(cur realm, id int, wallet address)
source

Complete is called by the partner realm named in a push quest.

func CreateQuest

crossing Action
1func CreateQuest(cur realm, title, desc, art string, rarity int, kind, arg, pay string, max int, days int) int
source

CreateQuest locks the sent ugnot as the quest pool. Send coins with the tx.

func Grant

crossing Action
1func Grant(cur realm, id int, wallet address)
source

Grant gives a grant-kind card. Quest funder only (e.g. Season Champion).

func ProveRealm

crossing Action
1func ProveRealm(cur realm, id int)
source

ProveRealm must be called by a realm deployed under the caller's own address: gno.land/r/<your g1 address>/anything. That path proves you built it.

func Refund

crossing Action
1func Refund(cur realm, id int)
source

Refund returns the unclaimed pool of an expired fixed quest to its funder.

func Review

crossing Action
1func Review(cur realm, id int, wallet address, ok bool)
source

Review approves or rejects a manual proof. Funder or admin only.

func Revoke

crossing Action
1func Revoke(cur realm, wallet address, id int)
source

Revoke removes a card from a cheater wallet.

func SetInviter

crossing Action
1func SetInviter(cur realm, friend address)
source

SetInviter links you to the friend who invited you. Once, before your first card.

func Settle

crossing Action
1func Settle(cur realm, id int)
source

Settle pays a split quest after expiry. Anyone can call it.

func StreakOf

Action
1func StreakOf(wallet address) int
source

StreakOf returns the live streak (0 if a day was missed).

func Submit

crossing Action
1func Submit(cur realm, id int, proof string)
source

Submit sends a proof (link or text) for a manual quest.

Types 2

type Card

struct
1type Card struct {
2	QuestID int
3	Title   string
4	Art     string
5	Rarity  int
6	Serial  int
7	Season  string
8	At      int64
9}
source

type Quest

struct
 1type Quest struct {
 2	ID      int
 3	Title   string
 4	Desc    string
 5	Art     string // card art key used by the website
 6	Funder  address
 7	Rarity  int
 8	Kind    string
 9	Arg     string // hold: min ugnot; push: partner pkg path
10	Pay     string
11	Reward  int64 // fixed: ugnot per winner
12	Pool    int64 // ugnot still locked for this quest
13	Funded  int64
14	Max     int
15	Expires int64
16	Settled bool
17	Winners []address
18	won     map[address]bool
19	pending map[address]string
20}
source

Dependencies

Source Files 5