campaigns
v0.Tree// campaignId → compact JSON string
- OID
- 053552…723e:4
campaigns details
advertiserBal
v0.Tree// g1addr → ugnot balance as string
- OID
- 053552…723e:6
advertiserBal details
adViews
v0.Tree// campaignId+":"+g1addr+":"+dayStr → "1" (per-day dedup)
- OID
- 053552…723e:8
adViews details
referrals
v0.Tree// advertiserAddr → referrerAddr
- OID
- 053552…723e:10
referrals details
refEarnings
v0.Tree// referrerAddr → ugnot earned as string
- OID
- 053552…723e:12
refEarnings details
refPending
v0.Tree// referrerAddr → ugnot pending payout as string
- OID
- 053552…723e:14
refPending details
tasks
v0.Tree// taskId → compact JSON string
- OID
- 053552…723e:16
tasks details
taskClaims
v0.Tree// taskId+":"+playerAddr → "pending:proofUrl"|"approved"|"rejected"
- OID
- 053552…723e:18
taskClaims details
pendingReview
v0.Tree// campaignId → "1"
- OID
- 053552…723e:20
pendingReview details
admin
.uverse.addressValue
<gnolang.StringValue>
paused
boolValue
false
init.11
func()- OID
- 053552…723e:23
init.11 details
isAdmin
func() bool- OID
- 053552…723e:25
isAdmin details
requireAdmin
func()- OID
- 053552…723e:26
requireAdmin details
requireNotPaused
func()- OID
- 053552…723e:27
requireNotPaused details
SetPaused
func(p bool)- OID
- 053552…723e:28
SetPaused details
DepositBid
func(ugnotAmount string)DepositBid credits the caller's advertiser balance with the declared ugnot amount. The caller must attach matching coins to the MsgCall (the VM holds them in the realm's address). The amount is passed explicitly so the realm can credit it without importing chain/banker. Security: the treasury server MUST verify the on-chain balance before approving any campaign spend — it should call AdvertiserBalance() to cross-check the declared amount matches what was actually deposited.
- OID
- 053552…723e:29
DepositBid details
SubmitCampaign
func(campaignJson string) stringSubmitCampaign stores a campaign JSON and queues it for admin review. Returns the generated campaignId. Status is forced to "pending\_review" regardless of what the client sends.
- OID
- 053552…723e:30
SubmitCampaign details
ReviewCampaign
func(campaignId string, decision string)ReviewCampaign approves or rejects a campaign. Approved campaigns transition to "active" and can receive views.
- OID
- 053552…723e:31
ReviewCampaign details
RecordView
func(campaignId string)RecordView bills the advertiser one bid\_per\_view for a player watching an ad. Deduplicated per (campaignId, callerAddr, UTC day). Splits 50% of the bid to the referrer if one is registered for the advertiser.
- OID
- 053552…723e:32
RecordView details
RegisterReferral
func(referrerAddr string)RegisterReferral permanently links the calling advertiser to a referrer. Each advertiser may register exactly one referrer; cannot be changed.
- OID
- 053552…723e:33
RegisterReferral details
ClaimRefEarnings
func()ClaimRefEarnings moves the caller's accumulated referral earnings into a pending payout queue. The treasury server reads RefPendingClaim(), sends GNOT from the treasury wallet, then calls ClearRefClaim() to zero it.
- OID
- 053552…723e:34
ClaimRefEarnings details
ClearRefClaim
func(referrerAddr string)ClearRefClaim is called by the admin/treasury after disbursing GNOT to a referrer. Zeroes the pending payout entry.
- OID
- 053552…723e:35
ClearRefClaim details
SubmitTaskDef
func(taskJson string) stringSubmitTaskDef creates a new paid social task. Returns the taskId.
- OID
- 053552…723e:36
SubmitTaskDef details
SubmitTask
func(taskId string, proofUrl string)SubmitTask records a player's proof-of-completion claim on a paid task.
- OID
- 053552…723e:37
SubmitTask details
ApproveTask
func(taskId string, claimerAddr string)ApproveTask marks a task claim as approved. Only the task's advertiser or the admin may approve. Coin reward is handled server-side via the minter.
- OID
- 053552…723e:38
ApproveTask details
GetCampaign
func(campaignId string) stringGetCampaign returns the JSON string for a single campaign, or "null".
- OID
- 053552…723e:39
GetCampaign details
ListCampaigns
func(advertiserAddr string) stringListCampaigns returns a JSON array of campaigns submitted by advertiserAddr.
- OID
- 053552…723e:40
ListCampaigns details
SelectAd
func(viewerLevel int) stringSelectAd returns the JSON of the winning campaign for the given viewer level, chosen by weighted auction (higher bid\_per\_view = proportionally more weight). Returns "null" if no eligible campaign exists. NOTE: uses time.Now().UnixNano() % totalWeight as deterministic pseudo-random. Not cryptographic — sufficient for ad placement.
- OID
- 053552…723e:41
SelectAd details
AdvertiserBalance
func(addr string) stringAdvertiserBalance returns the ugnot balance for an advertiser address.
- OID
- 053552…723e:42
AdvertiserBalance details
PendingReviews
func() stringPendingReviews returns a JSON array of campaigns awaiting admin review.
- OID
- 053552…723e:43
PendingReviews details
GetTask
func(taskId string) stringGetTask returns the JSON for a single task, or "null".
- OID
- 053552…723e:44
GetTask details
ListTasks
func(advertiserAddr string) stringListTasks returns a JSON array of tasks submitted by advertiserAddr.
- OID
- 053552…723e:45
ListTasks details
RefEarnings
func(addr string) stringRefEarnings returns the claimable referral earnings for an address.
- OID
- 053552…723e:46
RefEarnings details
RefPendingClaim
func(addr string) stringRefPendingClaim returns the pending payout amount for a referrer address. The treasury server calls this before sending GNOT.
- OID
- 053552…723e:47
RefPendingClaim details
TotalViews
func(campaignId string) stringTotalViews returns the total recorded view count for a campaign.
- OID
- 053552…723e:48
TotalViews details
GetTaskClaim
func(taskId string, claimerAddr string) stringGetTaskClaim returns the claim status string for a taskId+claimerAddr pair.
- OID
- 053552…723e:49
GetTaskClaim details
Render
func(string) string- OID
- 053552…723e:50
Render details
extractField
func(json string, field string) stringextractField pulls the value of a simple string or numeric JSON field. Returns "" if the field is absent.
- OID
- 053552…723e:51
extractField details
setStatus
func(json string, status string) stringsetStatus replaces or appends the "status" field in a JSON object.
- OID
- 053552…723e:52
setStatus details
injectField
func(json string, field string, value string) stringinjectField sets a string field in a JSON object, replacing an existing value or appending before the closing brace.
- OID
- 053552…723e:53