Skip to content Search Apps Documentation Source Content 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.

campaigns state

Back to all declarations

apiMaxLimit

untyped bigint

Value

(50 <untyped> bigint)

apiMaxScan

untyped bigint

Value

(2000 <untyped> bigint)

renderAPI

func(route string, q url.Values) string

renderAPI serves JSON for the web app, under Render("api/..."): api/stats counts, escrow totals, council, paused api/campaigns?status=&tag=&page=&limit= newest first; status "all" or empty for every campaign api/campaign/<id> one campaign api/campaign/<id>/claims?status=&page=&limit= its claims, newest first api/campaign/<id>/claimant/<address> {"claim": an address's latest claim, or null} api/user/<address>?page=&limit= campaigns an address is involved in, with roles and their claim

Open
OID
047232…fbcd:3
renderAPI details

Inspect func

apiClaims

func(c *v0.Campaign, q url.Values) string
Open
OID
047232…fbcd:6
apiClaims details

Inspect func

apiUser

func(addr .uverse.address, q url.Values) string
Open
OID
047232…fbcd:7
apiUser details

Inspect func

campaignJSON

func(c *v0.Campaign, full bool) string
Open
OID
047232…fbcd:8
campaignJSON details

Inspect func

claimJSON

func(cl *v0.Claim) string
Open
OID
047232…fbcd:9
claimJSON details

Inspect func

denomFields

func(denom string, isGRC20 bool) []string

denomFields describes how to display amounts of denom.

Open
OID
047232…fbcd:10
denomFields details

Inspect func

apiError

func(msg string) string
Open
OID
047232…fbcd:12
apiError details

Inspect func

ClaimShareBps

untyped bigint

Value

(500 <untyped> bigint)

maxDeadlineDays

untyped bigint

Value

(365 <untyped> bigint)

campaigns

v0.Tree

// padded id -> \*campaign.Campaign

Open
OID
047232…fbcd:14
campaigns details

Inspect ref

lastID

uint64

Value

0

byUser

v0.Tree

// address -> \*avl.Tree(padded id -> struct{})

Open
OID
047232…fbcd:17
byUser details

Inspect ref

statusCount

map[v0.Status]int
Open
OID
047232…fbcd:19
statusCount details

Inspect map

escrowed

v0.Tree

// denom key -> int64 currently held

Open
OID
047232…fbcd:21
escrowed details

Inspect ref

paused

bool

Value

false

InitialCouncil

.uverse.address

Value

<gnolang.StringValue>

PostCampaign

func(title string, description string, link string, tags string, reviewers string, reward int64, slots int, deadlineDays int) uint64

PostCampaign posts a campaign funded with the native coins sent along with the call, which must equal reward × slots. reviewers is a comma-separated address list (empty means the poster reviews alone); any one of them can approve a claim. deadlineDays closes the campaign to new claims after that many days (0: no deadline).

Open
OID
047232…fbcd:26
PostCampaign details

Inspect func

PostCampaignGRC20

func(tokenKey string, title string, description string, link string, tags string, reviewers string, reward int64, slots int, deadlineDays int) uint64

PostCampaignGRC20 posts a campaign funded with a registered GRC20 token. The caller must first approve this realm's address for reward × slots on the token; this call pulls the funds into escrow.

Open
OID
047232…fbcd:27
PostCampaignGRC20 details

Inspect func

newCampaign

func(denom string, isGRC20 bool, title string, description string, link string, tags string, reviewers string, reward int64, slots int, deadlineDays int) *v0.Campaign
Open
OID
047232…fbcd:28
newCampaign details

Inspect func

Claim

func(id uint64, proof string) int

Claim asks to be paid for doing the task once. proof is a link to the work (the post, the PR, the page). It reserves a slot until a reviewer decides. Returns the claim number.

Open
OID
047232…fbcd:30
Claim details

Inspect func

ApproveClaim

func(id uint64, claim int)

ApproveClaim pays a pending claim. Any reviewer of the campaign.

Open
OID
047232…fbcd:31
ApproveClaim details

Inspect func

RejectClaim

func(id uint64, claim int, reason string)

RejectClaim turns down a pending claim and frees its slot. Any reviewer of the campaign.

Open
OID
047232…fbcd:32
RejectClaim details

Inspect func

Close

func(id uint64)

Close stops new claims and refunds the free slots to the poster. The poster can close at any time; anyone can close after the deadline. Pending claims can still be approved or rejected afterwards.

Open
OID
047232…fbcd:33
Close details

Inspect func

TransferCouncil

func(newCouncil .uverse.address)

TransferCouncil hands the council seat to another address. Council only.

Open
OID
047232…fbcd:35
TransferCouncil details

Inspect func

SetPaused

func(p bool)

SetPaused stops or resumes new campaigns. Existing campaigns, claims and payouts are never paused. Council only.

Open
OID
047232…fbcd:36
SetPaused details

Inspect func

Count

func() int

Count is the number of campaigns ever posted.

Open
OID
047232…fbcd:37
Count details

Inspect func

CountByStatus

func(status string) int

CountByStatus counts campaigns in a status ("open" or "closed").

Open
OID
047232…fbcd:38
CountByStatus details

Inspect func

Escrowed

func(denom string) int64

Escrowed is the amount of denom (a native denom or a grc20reg key) held.

Open
OID
047232…fbcd:39
Escrowed details

Inspect func

IsPaused

func() bool

IsPaused reports whether new campaigns are paused.

Open
OID
047232…fbcd:40
IsPaused details

Inspect func

settle

func(int, rlm .uverse.realm, c *v0.Campaign, payouts []v0.Payout, reviewer .uverse.address)
Open
OID
047232…fbcd:41
settle details

Inspect func

transfer

func(int, rlm .uverse.realm, c *v0.Campaign, to .uverse.address, amount int64)
Open
OID
047232…fbcd:42
transfer details

Inspect func

mustGet

func(id uint64) *v0.Campaign
Open
OID
047232…fbcd:43
mustGet details

Inspect func

getCampaign

func(id uint64) *v0.Campaign
Open
OID
047232…fbcd:44
getCampaign details

Inspect func

moved

func(c *v0.Campaign, before v0.Status)
Open
OID
047232…fbcd:45
moved details

Inspect func

addEscrow

func(c *v0.Campaign, delta int64)
Open
OID
047232…fbcd:46
addEscrow details

Inspect func

index

func(addr .uverse.address, id uint64)
Open
OID
047232…fbcd:47
index details

Inspect func

emit

func(event string, c *v0.Campaign, kv []string)
Open
OID
047232…fbcd:50
emit details

Inspect func

realmPath

untyped string

Value

"gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/campaigns"

realmURL

untyped string

Value

"/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/campaigns"

repURL

untyped string

Value

"/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/reputation"

pageSize

untyped bigint

Value

(20 <untyped> bigint)

Render

func(path string) string

Render serves the campaigns: "" every campaign (?status=open|closed|all, ?tag=x, ?page=N) <id> a campaign and its claims (?claims=pending|approved|rejected|all, ?page=N) u/<address> campaigns an address posted, reviews or claimed post how to post a campaign

Open
OID
047232…fbcd:53
Render details

Inspect func

renderBoard

func(q url.Values) string
Open
OID
047232…fbcd:55
renderBoard details

Inspect func

scan

func(status string, tag string, skip int, limit int) (list []*v0.Campaign, more bool)

scan lists campaigns newest first, filtered by status ("", "all" or a status name) and tag.

Open
OID
047232…fbcd:56
scan details

Inspect func

renderCampaign

func(id uint64, q url.Values) string
Open
OID
047232…fbcd:57
renderCampaign details

Inspect func

renderActions

func(c *v0.Campaign) string

renderActions lists the transactions anyone might want to send, as gnoweb transaction links. The chain enforces who may call them.

Open
OID
047232…fbcd:58
renderActions details

Inspect func

renderUser

func(addr .uverse.address, page int) string
Open
OID
047232…fbcd:59
renderUser details

Inspect func

claimStatus

func(cl *v0.Claim) string
Open
OID
047232…fbcd:61
claimStatus details

Inspect func

roles

func(c *v0.Campaign, addr .uverse.address) []string
Open
OID
047232…fbcd:62
roles details

Inspect func

hasTag

func(c *v0.Campaign, tag string) bool
Open
OID
047232…fbcd:63
hasTag details

Inspect func

tagSuffix

func(c *v0.Campaign) string
Open
OID
047232…fbcd:64
tagSuffix details

Inspect func

person

func(addr .uverse.address) string
Open
OID
047232…fbcd:65
person details

Inspect func

linkOrText

func(s string) string
Open
OID
047232…fbcd:66
linkOrText details

Inspect func

formatAmount

func(c *v0.Campaign, amount int64) string
Open
OID
047232…fbcd:67
formatAmount details

Inspect func

symbolOf

func(denom string, isGRC20 bool) (string, int)
Open
OID
047232…fbcd:68
symbolOf details

Inspect func

escrowSummary

func() string
Open
OID
047232…fbcd:69
escrowSummary details

Inspect func

decimal

func(amount int64, decimals int) string
Open
OID
047232…fbcd:70
decimal details

Inspect func

splitQuery

func(path string) (string, url.Values)
Open
OID
047232…fbcd:74
splitQuery details

Inspect func
apiMaxLimit : untyped bigint =(50 <untyped> bigint)
apiMaxScan : untyped bigint =(2000 <untyped> bigint)
renderAPI : func(route string, q url.Values) string Inspect
apiStats : func() string Inspect
apiClaims : func(c *v0.Campaign, q url.Values) string Inspect
apiUser : func(addr .uverse.address, q url.Values) string Inspect
campaignJSON : func(c *v0.Campaign, full bool) string Inspect
claimJSON : func(cl *v0.Claim) string Inspect
denomFields : func(denom string, isGRC20 bool) []string Inspect
limitOf : func(q url.Values) int Inspect
apiError : func(msg string) string Inspect
ClaimShareBps : untyped bigint =(500 <untyped> bigint)
maxDeadlineDays : untyped bigint =(365 <untyped> bigint)
campaigns : v0.Tree Inspect
lastID : uint64 =0
byUser : v0.Tree Inspect
statusCount : map[v0.Status]int Inspect
escrowed : v0.Tree Inspect
council : *v0.Ownable Inspect
paused : bool =false
InitialCouncil : .uverse.address =<gnolang.StringValue>
init.21 : func() Inspect
PostCampaign : func(title string, description string, link string, tags string, reviewers string, reward int64, slots int, deadlineDays int) uint64 Inspect
PostCampaignGRC20 : func(tokenKey string, title string, description string, link string, tags string, reviewers string, reward int64, slots int, deadlineDays int) uint64 Inspect
newCampaign : func(denom string, isGRC20 bool, title string, description string, link string, tags string, reviewers string, reward int64, slots int, deadlineDays int) *v0.Campaign Inspect
store : func(c *v0.Campaign) uint64 Inspect
Claim : func(id uint64, proof string) int Inspect
ApproveClaim : func(id uint64, claim int) Inspect
RejectClaim : func(id uint64, claim int, reason string) Inspect
Close : func(id uint64) Inspect
Council : func() .uverse.address Inspect
TransferCouncil : func(newCouncil .uverse.address) Inspect
SetPaused : func(p bool) Inspect
Count : func() int Inspect
CountByStatus : func(status string) int Inspect
Escrowed : func(denom string) int64 Inspect
IsPaused : func() bool Inspect
settle : func(int, rlm .uverse.realm, c *v0.Campaign, payouts []v0.Payout, reviewer .uverse.address) Inspect
transfer : func(int, rlm .uverse.realm, c *v0.Campaign, to .uverse.address, amount int64) Inspect
mustGet : func(id uint64) *v0.Campaign Inspect
getCampaign : func(id uint64) *v0.Campaign Inspect
moved : func(c *v0.Campaign, before v0.Status) Inspect
addEscrow : func(c *v0.Campaign, delta int64) Inspect
index : func(addr .uverse.address, id uint64) Inspect
assertNotPaused : func() Inspect
check : func(err .uverse.error) Inspect
emit : func(event string, c *v0.Campaign, kv []string) Inspect
idKey : func(id uint64) string Inspect
clip : func(s string, n int) string Inspect
realmPath : untyped string ="gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/campaigns"
realmURL : untyped string ="/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/campaigns"
repURL : untyped string ="/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/reputation"
pageSize : untyped bigint =(20 <untyped> bigint)
Render : func(path string) string Inspect
renderBoard : func(q url.Values) string Inspect
scan : func(status string, tag string, skip int, limit int) (list []*v0.Campaign, more bool) Inspect
renderCampaign : func(id uint64, q url.Values) string Inspect
renderActions : func(c *v0.Campaign) string Inspect
renderUser : func(addr .uverse.address, page int) string Inspect
renderPost : func() string Inspect
claimStatus : func(cl *v0.Claim) string Inspect
roles : func(c *v0.Campaign, addr .uverse.address) []string Inspect
hasTag : func(c *v0.Campaign, tag string) bool Inspect
tagSuffix : func(c *v0.Campaign) string Inspect
person : func(addr .uverse.address) string Inspect
linkOrText : func(s string) string Inspect
formatAmount : func(c *v0.Campaign, amount int64) string Inspect
symbolOf : func(denom string, isGRC20 bool) (string, int) Inspect
escrowSummary : func() string Inspect
decimal : func(amount int64, decimals int) string Inspect
bps : func(v int64) string Inspect
idStr : func(c *v0.Campaign) string Inspect
splitQuery : func(path string) (string, url.Values) Inspect
pageOf : func(q url.Values) int Inspect
notFound : func() string Inspect