campaigns source realm
Package campaigns is Guildhall's escrow for many-hands tasks: a fixed reward per claim, a fixed number of slots, and ...
Package campaigns is Guildhall's escrow for many-hands tasks: a fixed reward per claim, a fixed number of slots, and one reviewer approval per claim. "10 GNOT each to the first 100 people who write about X" is one campaign holding 1000 GNOT.
Each approved claim pays the claimant and writes a reputation record to gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/reputation at ClaimShareBps of a normal record's weight, vouched for by the reviewer who approved it. Small, repeatable tasks therefore count for something without outweighing reviewed bounty work.
The rules live in gno.land/p/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/campaign. This realm holds the funds, authenticates callers, moves coins, and renders the campaigns.
1
13
func ApproveClaim
crossing ActionApproveClaim pays a pending claim. Any reviewer of the campaign.
func Claim
crossing ActionClaim 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.
func Close
crossing ActionClose 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.
func Count
ActionCount is the number of campaigns ever posted.
func CountByStatus
ActionCountByStatus counts campaigns in a status ("open" or "closed").
func Escrowed
ActionEscrowed is the amount of denom (a native denom or a grc20reg key) held.
func IsPaused
ActionIsPaused reports whether new campaigns are paused.
func PostCampaign
crossing Action1func PostCampaign(cur realm, title, description, link, tags, reviewers string, reward int64, slots, deadlineDays int) uint64PostCampaign 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).
func PostCampaignGRC20
crossing Action1func PostCampaignGRC20(cur realm, tokenKey, title, description, link, tags, reviewers string, reward int64, slots, deadlineDays int) uint64PostCampaignGRC20 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.
func RejectClaim
crossing ActionRejectClaim turns down a pending claim and frees its slot. Any reviewer of the campaign.
func Render
func SetPaused
crossing ActionSetPaused stops or resumes new campaigns. Existing campaigns, claims and payouts are never paused. Council only.
func TransferCouncil
crossing ActionTransferCouncil hands the council seat to another address. Council only.