Denom
untyped stringDenom is the only asset this realm accepts.
Value
"ugnot"
MaxFeeBps
int64MaxFeeBps is the hard protocol-fee cap: 1000 bps = 10%.
Value
1000
StatusOpen
untyped stringBounty status values.
Value
"open"
StatusAwarded
untyped stringBounty status values.
Value
"awarded"
StatusCancelled
untyped stringBounty status values.
Value
"cancelled"
maxTitleLen
untyped bigintValue
(80 <untyped> bigint)
bounty
typeBounty is one bounty record. Fields are unexported; read access goes through BountyInfo so no interior pointers escape the realm.
Value
bounties.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// protocol fee snapshotted into new bounties
Value
0
self
.uverse.address// this realm's address, captured at deploy
Value
<gnolang.StringValue>
nextID
int64// next bounty id (first bounty gets id 1)
Value
2
openTotal
int64// == Σ amount over bounties with status Open
Value
0
bounties
*v0.Tree// padID(id) -> \*bounty
- OID
- 04dead…46fb:10
bounties details
ledger
*feeledger.Ledger- OID
- 04dead…46fb:13
ledger details
init.15
func()- OID
- 04dead…46fb:17
init.15 details
CreateBounty
func(title string) int64CreateBounty escrows the attached GNOT as a new open bounty and returns its id. Only direct EOA calls with -send are accepted (the receipt-guaranteed shape). The envelope must be exactly one positive ugnot coin. The caller becomes the bounty's funder.
- OID
- 04dead…46fb:19
CreateBounty details
Award
func(id int64, winner .uverse.address)Award closes an open bounty in favor of winner: the escrowed amount leaves the open pool and is credited to winner's claimable balance through the ledger, charging the fee snapshotted at creation. Only the bounty's funder may award it. Terminal: an awarded bounty can never change again.
- OID
- 04dead…46fb:20
Award details
Cancel
func(id int64)Cancel closes an open bounty and refunds its escrow to the funder's claimable balance, fee-free. Only the bounty's funder may cancel. Terminal: a cancelled bounty can never change again.
- OID
- 04dead…46fb:21
Cancel details
Claim
func(amount int64)Claim sends amount ugnot of the caller's claimable balance (won bounties and refunds) back to the caller.
- OID
- 04dead…46fb:22
Claim details
ClaimAll
func()ClaimAll sends the caller's entire claimable balance back to the caller. Fails if there is nothing to claim.
- OID
- 04dead…46fb:23
ClaimAll details
WithdrawFees
func()WithdrawFees sends the accrued fee pot to the fee recipient. Only the fee recipient may call it.
- OID
- 04dead…46fb:24
WithdrawFees details
SweepDenom
func(denom string)SweepDenom sends the surplus of a single denomination to the fee recipient (the bounded escape hatch validated on the vault realm). For ugnot only the excess over Liabilities() moves; other denoms move wholly. Only the fee recipient may call it.
- OID
- 04dead…46fb:25
SweepDenom details
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].
- OID
- 04dead…46fb:26
SetFeeBps details
SetFeeRecipient
func(next .uverse.address)SetFeeRecipient re-points the fee/surplus role, including the pot accrued so far. Admin only; zero address rejected.
- OID
- 04dead…46fb:27
SetFeeRecipient details
TransferAdmin
func(next .uverse.address)TransferAdmin hands the admin role to next. Admin only; zero address rejected. One-step (documented trade-off, as on the vault).
- OID
- 04dead…46fb:28
TransferAdmin details
BountyInfo
func(id int64) (funder .uverse.address, title string, amount int64, feeBps int64, status string, winner .uverse.address)BountyInfo returns a bounty's fields by value: funder, title, amount, snapshotted fee bps, status, winner (zero address unless awarded).
- OID
- 04dead…46fb:29
BountyInfo details
Admin
func() .uverse.address- OID
- 04dead…46fb:30
Admin details
FeeRecipient
func() .uverse.address- OID
- 04dead…46fb:31
FeeRecipient details
FeeBps
func() int64FeeBps returns the protocol fee that will be snapshotted into newly created bounties (existing bounties keep their own snapshot).
- OID
- 04dead…46fb:32
FeeBps details
NumBounties
func() int64NumBounties returns how many bounties have ever been created.
- OID
- 04dead…46fb:33
NumBounties details
OpenTotal
func() int64OpenTotal returns the escrow held by open bounties (the B term).
- OID
- 04dead…46fb:34
OpenTotal details
BalanceOf
func(addr .uverse.address) int64BalanceOf returns addr's claimable balance (won bounties + refunds).
- OID
- 04dead…46fb:35
BalanceOf details
UsersTotal
func() int64UsersTotal returns the sum of all claimable balances (the U term).
- OID
- 04dead…46fb:36
UsersTotal details
FeesAccrued
func() int64FeesAccrued returns the fee pot (the F term).
- OID
- 04dead…46fb:37
FeesAccrued details
Liabilities
func() int64Liabilities returns everything this realm owes: openTotal + UsersTotal + FeesAccrued.
- OID
- 04dead…46fb:38
Liabilities details
Held
func() int64Held returns the ugnot actually held at the realm address (the H term).
- OID
- 04dead…46fb:39
Held details
Surplus
func() int64Surplus returns Held() - Liabilities() (the S term; >= 0 unless a conservation bug exists).
- OID
- 04dead…46fb:40
Surplus details
Address
func() .uverse.address- OID
- 04dead…46fb:41
Address details
Render
func(string) stringRender shows configuration, totals, the composed conservation check, and the most recent bounties (bounded page, newest first).
- OID
- 04dead…46fb:42
Render details
assertAdmin
func(caller .uverse.address)- OID
- 04dead…46fb:43
assertAdmin details
mustGetBounty
func(id int64) *bounties.bounty- OID
- 04dead…46fb:44
mustGetBounty details
assertValidTitle
func(title string)assertValidTitle bounds length and restricts the charset so titles cannot inject markdown into Render output.
- OID
- 04dead…46fb:45
assertValidTitle details
padID
func(id int64) stringpadID renders an id as a fixed-width key so avl iteration order is numeric order.
- OID
- 04dead…46fb:46
padID details
send
func(to .uverse.address, amount int64)send moves amount ugnot from the realm to \`to\`. Callers must have debited the ledger first (checks-effects-interactions).
- OID
- 04dead…46fb:47
send details
itoa
func(n int64) string- OID
- 04dead…46fb:48
itoa details
checkedAdd
func(a int64, b int64) (int64, bool)- OID
- 04dead…46fb:49