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

bounty_panel state

Back to all declarations

RealmPath

untyped string

RealmPath is this realm's own path, used to build Render links.

Value

"/r/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/bounty_panel"

Denom

untyped string

Denom is the only asset this realm accepts.

Value

"ugnot"

MaxFeeBps

int64

MaxFeeBps is the hard protocol-fee cap: 1000 bps = 10%.

Value

1000

StatusOpen

untyped string

Bounty status values.

Value

"open"

StatusAwarded

untyped string

Bounty status values.

Value

"awarded"

StatusCancelled

untyped string

Bounty status values.

Value

"cancelled"

StatusExpired

untyped string

Bounty status values.

Value

"expired"

MaxTitleLen

untyped bigint

Input bounds.

Value

(80 <untyped> bigint)

MaxDescLen

untyped bigint

Input bounds.

Value

(2000 <untyped> bigint)

MaxURILen

untyped bigint

Input bounds.

Value

(500 <untyped> bigint)

MaxPanelSize

int64

Input bounds.

Value

16

MaxSubmissions

int64

Input bounds.

Value

500

MinDurationBlocks

int64

Input bounds.

Value

1

MaxDurationBlocks

int64

Input bounds.

Value

10000000

ExpiryGraceBlocks

int64

Input bounds.

Value

100

MaxRenderRows

untyped bigint

Input bounds.

Value

(20 <untyped> bigint)

submission

type

Value

bounty_panel.submission

bounty

type

Value

bounty_panel.bounty

admin

.uverse.address

// may set fee, fee recipient, successor admin

Value

<gnolang.StringValue>

feeRecipient

.uverse.address

// may withdraw fees and sweep surplus

Value

<gnolang.StringValue>

feeBps

int64

// fee snapshotted into NEW bounties

Value

250

self

.uverse.address

// this realm's address, captured at deploy

Value

<gnolang.StringValue>

nextID

int64

Value

3

openTotal

int64

// == Σ amount over bounties with status Open

Value

0

rejectStraySend

func()

rejectStraySend aborts when coins are attached to a non-payable call. This realm does hold funds, so a stray send would not be lost outright — it would become sweepable surplus belonging to the fee recipient, silently converting a user's coins into protocol revenue. Aborting reverts the transfer to the sender instead. Guarded on IsUserCall, not IsUser, because a MsgRun ephemeral can consume the OriginSend envelope before forwarding control. SCOPE, precisely: the guard reads the ORIGINATING transaction's envelope, so it only inspects direct EOA calls. For a realm-routed call the -send envelope is delivered to the INTERMEDIARY realm's address, so there is nothing at this realm to reject and the guard deliberately fails open. That is not a hole: an intermediary that separately sends coins to this realm's address is making an ordinary transfer, which no guard in any entrypoint could intercept, and which lands as surplus recoverable through SweepDenom. Coins can only become ESCROW through CreateBounty.

Open
OID
07af8e…4ca2:19
rejectStraySend details

Inspect func

CreateBounty

func(title string, description string, panelCSV string, threshold int64, submitBlocks int64, resolveBlocks int64, maxFeeBps int64) int64

CreateBounty escrows the attached GNOT as a new open bounty and returns its id. Only direct EOA calls with -send are accepted. panelCSV is a comma-separated list of resolver addresses; threshold is how many of them must name the same submission for it to win. Submissions are accepted for submitBlocks from now, after which the panel has resolveBlocks to decide. The current protocol fee is snapshotted into the bounty and must not exceed maxFeeBps, the ceiling the caller signed for; pass MaxFeeBps to accept any legal fee.

Open
OID
07af8e…4ca2:20
CreateBounty details

Inspect func

Submit

func(id int64, uri string)

Submit records (or replaces) the caller's submission to an open bounty before its submission deadline. One submission per address per bounty — re-submitting replaces the caller's own reference only. The funder and every panel member are barred, so no resolver can vote for their own work.

Open
OID
07af8e…4ca2:21
Submit details

Inspect func

Vote

func(id int64, candidate .uverse.address)

Vote casts (or changes) the calling resolver's vote for one of the bounty's submissions. Only panel members may vote, and only after the submission window has closed and before the resolution deadline. A resolver holds exactly one live vote, changeable until the threshold is reached. The vote that brings a submission to the threshold awards the bounty in the same transaction: the escrow leaves the open pool and is credited to the winner's claimable balance at the fee snapshotted at creation. Terminal.

Open
OID
07af8e…4ca2:22
Vote details

Inspect func

award

func(b *bounty_panel.bounty, winner .uverse.address, votes int64)

award moves an Open bounty's escrow into the winner's claimable balance at the snapshotted fee and finalizes the status. The caller has already verified authorization, status and the threshold.

Open
OID
07af8e…4ca2:23
award details

Inspect func

CancelBounty

func(id int64)

CancelBounty closes an open bounty and refunds its escrow to the funder, fee-free. Only the funder may cancel, and ONLY while no contributor has submitted: once work exists, the funder cannot unilaterally reclaim the escrow. Terminal.

Open
OID
07af8e…4ca2:24
CancelBounty details

Inspect func

ExpireBounty

func(id int64)

ExpireBounty closes an open bounty whose resolution deadline passed more than ExpiryGraceBlocks ago, refunding the funder fee-free. ANYONE may call it — this is the permissionless valve that guarantees escrow can never be trapped by an inactive or deadlocked panel. Terminal.

Open
OID
07af8e…4ca2:25
ExpireBounty details

Inspect func

refundOpen

func(b *bounty_panel.bounty, terminal string)

refundOpen moves an Open bounty's escrow into the funder's claimable balance fee-free and finalizes the status. Callers have already verified authorization and status.

Open
OID
07af8e…4ca2:26
refundOpen details

Inspect func

Claim

func(amount int64)

Claim sends amount ugnot of the caller's claimable balance (winnings and refunds) back to the caller.

Open
OID
07af8e…4ca2:27
Claim details

Inspect func

ClaimAll

func()

ClaimAll sends the caller's entire claimable balance back to the caller. Fails if there is nothing to claim.

Open
OID
07af8e…4ca2:28
ClaimAll details

Inspect func

WithdrawFees

func()

WithdrawFees sends the accrued fee pot to the fee recipient. Only the fee recipient may call it.

Open
OID
07af8e…4ca2:29
WithdrawFees details

Inspect func

SweepDenom

func(denom string)

SweepDenom sends the surplus of a single denomination to the fee recipient. For ugnot only the excess over Liabilities() moves; other denoms move wholly. Only the fee recipient may call it.

Open
OID
07af8e…4ca2:30
SweepDenom details

Inspect func

SetFeeBps

func(bps int64)

SetFeeBps sets the protocol fee snapshotted into FUTURE bounties at creation. Existing bounties keep the fee they were created under. Admin only; bounded by \[0, MaxFeeBps].

Open
OID
07af8e…4ca2:31
SetFeeBps details

Inspect func

SetFeeRecipient

func(next .uverse.address)

SetFeeRecipient re-points the fee/surplus role, including the pot accrued so far. Admin only; zero address rejected.

Open
OID
07af8e…4ca2:32
SetFeeRecipient details

Inspect func

TransferAdmin

func(next .uverse.address)

TransferAdmin hands the admin role to next. Admin only; zero address rejected. One-step (documented trade-off, matching the siblings).

Open
OID
07af8e…4ca2:33
TransferAdmin details

Inspect func

BountyInfo

func(id int64) (funder .uverse.address, title string, amount int64, feeBps int64, submitDeadline int64, resolveDeadline int64, status string, winner .uverse.address, numSubmissions int64, panelSize int64, threshold int64)

BountyInfo returns a bounty's scalar fields by value.

Open
OID
07af8e…4ca2:34
BountyInfo details

Inspect func

Description

func(id int64) string

Description returns a bounty's raw description text.

Open
OID
07af8e…4ca2:35
Description details

Inspect func

SubmissionOf

func(id int64, addr .uverse.address) (uri string, height int64, votes int64, ok bool)

SubmissionOf returns addr's content reference, submission height and current vote count for a bounty, with ok reporting whether a submission exists.

Open
OID
07af8e…4ca2:36
SubmissionOf details

Inspect func

IsPanelMember

func(id int64, addr .uverse.address) bool

IsPanelMember reports whether addr may vote on a bounty.

Open
OID
07af8e…4ca2:37
IsPanelMember details

Inspect func

Panel

func(id int64) string

Panel returns a bounty's resolver addresses as a comma-separated list, in sorted order.

Open
OID
07af8e…4ca2:38
Panel details

Inspect func

VoteOf

func(id int64, resolver .uverse.address) (candidate string, ok bool)

VoteOf returns the submission a resolver currently votes for, with ok reporting whether that resolver has voted at all.

Open
OID
07af8e…4ca2:39
VoteOf details

Inspect func

VotesCast

func(id int64) int64

VotesCast returns how many resolvers currently hold a live vote.

Open
OID
07af8e…4ca2:40
VotesCast details

Inspect func

FeeRecipient

func() .uverse.address
Open
OID
07af8e…4ca2:42
FeeRecipient details

Inspect func

FeeBps

func() int64

FeeBps returns the fee that will be snapshotted into newly created bounties (existing bounties keep their own snapshot).

Open
OID
07af8e…4ca2:43
FeeBps details

Inspect func

FeeOn

func(amount int64) (fee int64, credited int64)

FeeOn previews the fee and net payout for a bounty of amount at the CURRENT FeeBps.

Open
OID
07af8e…4ca2:44
FeeOn details

Inspect func

NumBounties

func() int64

NumBounties returns how many bounties have ever been created.

Open
OID
07af8e…4ca2:45
NumBounties details

Inspect func

OpenTotal

func() int64

OpenTotal returns the escrow held by open bounties (the B term).

Open
OID
07af8e…4ca2:46
OpenTotal details

Inspect func

BalanceOf

func(addr .uverse.address) int64

BalanceOf returns addr's claimable balance (winnings + refunds).

Open
OID
07af8e…4ca2:47
BalanceOf details

Inspect func

UsersTotal

func() int64

UsersTotal returns the sum of all claimable balances (the U term).

Open
OID
07af8e…4ca2:48
UsersTotal details

Inspect func

FeesAccrued

func() int64

FeesAccrued returns the fee pot (the F term).

Open
OID
07af8e…4ca2:49
FeesAccrued details

Inspect func

Liabilities

func() int64

Liabilities returns everything this realm owes: openTotal + UsersTotal + FeesAccrued.

Open
OID
07af8e…4ca2:50
Liabilities details

Inspect func

Held

func() int64

Held returns the ugnot actually held at the realm address (H).

Open
OID
07af8e…4ca2:51
Held details

Inspect func

Surplus

func() int64

Surplus returns Held() - Liabilities() (the S term).

Open
OID
07af8e…4ca2:52
Surplus details

Inspect func

Height

func() int64

Height returns the current chain height (deadline arithmetic aid).

Open
OID
07af8e…4ca2:54
Height details

Inspect func

Render

func(path string) string

Render shows the board at "" and a bounty detail at "\<id>". Free text (titles are charset-restricted; descriptions and URIs are not) passes through the ecosystem sanitizer before hitting markdown.

Open
OID
07af8e…4ca2:55
Render details

Inspect func

renderBounty

func(path string) string
Open
OID
07af8e…4ca2:56
renderBounty details

Inspect func

assertAdmin

func(caller .uverse.address)
Open
OID
07af8e…4ca2:57
assertAdmin details

Inspect func

mustGetBounty

func(id int64) *bounty_panel.bounty
Open
OID
07af8e…4ca2:58
mustGetBounty details

Inspect func

assertDuration

func(name string, blocks int64)
Open
OID
07af8e…4ca2:59
assertDuration details

Inspect func

parsePanel

func(csv string) (*v0.Tree, int64)

parsePanel turns a comma-separated resolver list into a membership tree. Every entry must be a valid, non-empty, non-duplicate bech32 address. Validity is checked here rather than trusted: a mistyped resolver address would silently shrink the effective panel and could make the threshold permanently unreachable, which is a fund-trapping shape even with the expiry valve in place.

Open
OID
07af8e…4ca2:60
parsePanel details

Inspect func

assertValidTitle

func(title string)

assertValidTitle bounds length and restricts the charset so titles are list-safe in Render without escaping.

Open
OID
07af8e…4ca2:61
assertValidTitle details

Inspect func

padID

func(id int64) string

padID renders an id as a fixed-width key so avl iteration order is numeric order.

Open
OID
07af8e…4ca2:62
padID details

Inspect func

checkedAdd

func(a int64, b int64) (int64, bool)
Open
OID
07af8e…4ca2:64
checkedAdd details

Inspect func
RealmPath : untyped string ="/r/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/bounty_panel"
Denom : untyped string ="ugnot"
MaxFeeBps : int64 =1000
StatusOpen : untyped string ="open"
StatusAwarded : untyped string ="awarded"
StatusCancelled : untyped string ="cancelled"
StatusExpired : untyped string ="expired"
MaxTitleLen : untyped bigint =(80 <untyped> bigint)
MaxDescLen : untyped bigint =(2000 <untyped> bigint)
MaxURILen : untyped bigint =(500 <untyped> bigint)
MaxPanelSize : int64 =16
MaxSubmissions : int64 =500
MinDurationBlocks : int64 =1
MaxDurationBlocks : int64 =10000000
ExpiryGraceBlocks : int64 =100
MaxRenderRows : untyped bigint =(20 <untyped> bigint)
submission : type =bounty_panel.submission
bounty : type =bounty_panel.bounty
admin : .uverse.address =<gnolang.StringValue>
feeRecipient : .uverse.address =<gnolang.StringValue>
feeBps : int64 =250
self : .uverse.address =<gnolang.StringValue>
nextID : int64 =3
openTotal : int64 =0
bounties : *v0.Tree Inspect
ledger : *feeledger.Ledger Inspect
init.26 : func() Inspect
rejectStraySend : func() Inspect
CreateBounty : func(title string, description string, panelCSV string, threshold int64, submitBlocks int64, resolveBlocks int64, maxFeeBps int64) int64 Inspect
Submit : func(id int64, uri string) Inspect
Vote : func(id int64, candidate .uverse.address) Inspect
award : func(b *bounty_panel.bounty, winner .uverse.address, votes int64) Inspect
CancelBounty : func(id int64) Inspect
ExpireBounty : func(id int64) Inspect
refundOpen : func(b *bounty_panel.bounty, terminal string) Inspect
Claim : func(amount int64) Inspect
ClaimAll : func() Inspect
WithdrawFees : func() Inspect
SweepDenom : func(denom string) Inspect
SetFeeBps : func(bps int64) Inspect
SetFeeRecipient : func(next .uverse.address) Inspect
TransferAdmin : func(next .uverse.address) Inspect
BountyInfo : func(id int64) (funder .uverse.address, title string, amount int64, feeBps int64, submitDeadline int64, resolveDeadline int64, status string, winner .uverse.address, numSubmissions int64, panelSize int64, threshold int64) Inspect
Description : func(id int64) string Inspect
SubmissionOf : func(id int64, addr .uverse.address) (uri string, height int64, votes int64, ok bool) Inspect
IsPanelMember : func(id int64, addr .uverse.address) bool Inspect
Panel : func(id int64) string Inspect
VoteOf : func(id int64, resolver .uverse.address) (candidate string, ok bool) Inspect
VotesCast : func(id int64) int64 Inspect
Admin : func() .uverse.address Inspect
FeeRecipient : func() .uverse.address Inspect
FeeBps : func() int64 Inspect
FeeOn : func(amount int64) (fee int64, credited int64) Inspect
NumBounties : func() int64 Inspect
OpenTotal : func() int64 Inspect
BalanceOf : func(addr .uverse.address) int64 Inspect
UsersTotal : func() int64 Inspect
FeesAccrued : func() int64 Inspect
Liabilities : func() int64 Inspect
Held : func() int64 Inspect
Surplus : func() int64 Inspect
Address : func() .uverse.address Inspect
Height : func() int64 Inspect
Render : func(path string) string Inspect
renderBounty : func(path string) string Inspect
assertAdmin : func(caller .uverse.address) Inspect
mustGetBounty : func(id int64) *bounty_panel.bounty Inspect
assertDuration : func(name string, blocks int64) Inspect
parsePanel : func(csv string) (*v0.Tree, int64) Inspect
assertValidTitle : func(title string) Inspect
padID : func(id int64) string Inspect
itoa : func(n int64) string Inspect
checkedAdd : func(a int64, b int64) (int64, bool) Inspect