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.

deposits state

Back to all declarations

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%. The fee applies only to the portion AWARDED to the holder, never to a refund.

Value

1000

DepositOpen

untyped string

// created; the depositor has not funded

Value

"open"

DepositFunded

untyped string

// funded; the term is running or the claim window is open

Value

"funded"

DepositClaimed

untyped string

// the holder filed a claim; the depositor may accept or dispute

Value

"claimed"

DepositDisputed

untyped string

// the depositor disputed; the arbiter decides

Value

"disputed"

DepositSettled

untyped string

// split credited; both parties pull

Value

"settled"

DepositCancelled

untyped string

// never funded; nothing moved

Value

"cancelled"

MinDeposit

int64

Input bounds.

Value

10000

MaxDeposit

int64

// 1,000,000 GNOT

Value

1000000000000

MinClaim

int64

Input bounds.

Value

1000

MinTerm

int64

Input bounds.

Value

10

MaxTerm

int64

Input bounds.

Value

7500000

MinWindow

int64

Input bounds.

Value

10

MaxWindow

int64

Input bounds.

Value

7500000

FundWindow

int64

Input bounds.

Value

1000000

MaxMemoLen

untyped bigint

Input bounds.

Value

(200 <untyped> bigint)

MaxReasonLen

untyped bigint

Input bounds.

Value

(200 <untyped> bigint)

MaxAgreementsPerHolder

untyped bigint

Input bounds.

Value

(50 <untyped> bigint)

RenderLimit

untyped bigint

Input bounds.

Value

(20 <untyped> bigint)

agreement

type

Value

deposits.agreement

admin

.uverse.address

Value

<gnolang.StringValue>

pendingAdmin

.uverse.address

Value

<zero>

feeRecipient

.uverse.address

Value

<gnolang.StringValue>

feeBps

int64

// snapshotted into NEW agreements

Value

250

self

.uverse.address

Value

<gnolang.StringValue>

nextID

int64

Value

1

locked

int64

// Σ amounts of funded/claimed agreements (destination not yet decided by a party)

Value

0

contested

int64

// Σ amounts of DISPUTED agreements (an arbiter is deciding)

Value

0

agreements

*v0.Tree

// padID(id) -> \*agreement

Open
OID
0acb4c…4f9f:12
agreements details

Inspect pointer

holderNum

*v0.Tree

// holder.String() -> \*int64, stored agreements

Open
OID
0acb4c…4f9f:15
holderNum details

Inspect pointer

OpenAgreement

func(depositor .uverse.address, amount int64, forfeitCeiling int64, termBlocks int64, claimWindow int64, disputeWindow int64, arbiter .uverse.address, memo string) int64

OpenAgreement offers a deposit agreement. The caller becomes the holder and names the \`depositor\`, the exact \`amount\` they must attach, the \`termBlocks\` the deposit is held for, the \`claimWindow\` the holder has to file a claim after the term ends, the \`disputeWindow\` the depositor has to dispute one (and the arbiter then has to rule), and the \`forfeitCeiling\` — the most the holder may ever claim, in \[MinClaim, amount]. \`arbiter\` may be the zero address, in which case a claim cannot be disputed; it may not be either party. Nothing is held until the depositor Funds, which is how they consent to all of it. The current protocol fee is snapshotted in. Returns the id.

Open
OID
0acb4c…4f9f:24
OpenAgreement details

Inspect func

FileClaim

func(id int64, amount int64, reason string)

FileClaim claims \`amount\` of the deposit against the ceiling. Holder only, only once, only after the term has ended and before the claim window closes. \`amount\` must be in \[MinClaim, forfeitCeiling]. The depositor may then accept it, dispute it to the arbiter, or let it stand.

Open
OID
0acb4c…4f9f:25
FileClaim details

Inspect func

Release

func(id int64)

Release returns the whole deposit to the depositor early. Holder only, while the agreement is funded and unclaimed. It is the holder waiving the claim they have not yet filed — the one route to settlement that needs no clock.

Open
OID
0acb4c…4f9f:26
Release details

Inspect func

Fund

func(id int64)

Fund attaches the exact deposit and starts the term. The named depositor only; the attached amount must equal the agreement's amount exactly, and the fund deadline must not have passed. Funding IS the depositor's consent to the ceiling, the windows and the arbiter, all of which were readable beforehand.

Open
OID
0acb4c…4f9f:27
Fund details

Inspect func

AcceptClaim

func(id int64)

AcceptClaim settles at the claimed amount. Depositor only, while a claim stands. Accepting early is allowed — the dispute window is a deadline for disputing, not a waiting period.

Open
OID
0acb4c…4f9f:28
AcceptClaim details

Inspect func

Dispute

func(id int64, reason string)

Dispute sends a standing claim to the arbiter. Depositor only, before the dispute deadline, and only if an arbiter was named — with no arbiter there is nobody to decide, and the depositor saw that before funding. The deposit moves from \`locked\` into \`contested\`; no coins move.

Open
OID
0acb4c…4f9f:29
Dispute details

Inspect func

ResolveDispute

func(id int64, awardToHolder int64)

ResolveDispute rules on a disputed claim. Arbiter only. \`awardToHolder\` is in \[0, the claimed amount] — the arbiter may reduce a claim or deny it outright but never award more than was claimed, which is itself capped by the ceiling the depositor consented to. No deadline is enforced here: a late ruling is better than a stranded deposit, and \`LapseDispute\` is the race that bounds it.

Open
OID
0acb4c…4f9f:30
ResolveDispute details

Inspect func

ReleaseUnclaimed

func(id int64)

ReleaseUnclaimed refunds the whole deposit because the holder never filed a claim before the window closed. Anyone may call it.

Open
OID
0acb4c…4f9f:31
ReleaseUnclaimed details

Inspect func

SettleUndisputed

func(id int64)

SettleUndisputed settles at the claimed amount because the depositor neither accepted nor disputed before the dispute window closed. Anyone may call it.

Open
OID
0acb4c…4f9f:32
SettleUndisputed details

Inspect func

LapseDispute

func(id int64)

LapseDispute refunds the whole deposit because the arbiter did not rule before their deadline. Anyone may call it. The award is 0, not the claim: an unsubstantiated claim fails. The holder chose the arbiter and bears the cost of that choice failing — which is also why a disappeared arbiter can never strand a deposit.

Open
OID
0acb4c…4f9f:33
LapseDispute details

Inspect func

CancelUnfunded

func(id int64)

CancelUnfunded abandons an agreement the depositor never funded. Either party may cancel at any time — refusing to fund is the depositor's right and withdrawing the offer is the holder's — and ANYONE may cancel once the fund deadline has passed, so a dead offer cannot hold a slot forever. No coins have ever been held, so nothing moves.

Open
OID
0acb4c…4f9f:34
CancelUnfunded details

Inspect func

Claim

func(amount int64)

Claim sends amount ugnot of the caller's claimable balance — refunds and awards from settled agreements — to the caller.

Open
OID
0acb4c…4f9f:35
Claim details

Inspect func

ClaimAll

func()

ClaimAll sends the caller's entire claimable balance to the caller.

Open
OID
0acb4c…4f9f:36
ClaimAll details

Inspect func

SetFeeRecipient

func(recipient .uverse.address)

SetFeeRecipient names the address that may withdraw the accrued fee pot. It deliberately does NOT enforce disjointness from agreement parties, in contrast to OpenAgreement, which refuses an arbiter equal to either party. The two rules are not comparable, and the asymmetry is the point: - The arbiter rule is per-agreement and checked at the moment the agreement is created, so it is an invariant of that agreement for life. - The fee recipient is one global over an unbounded, growing set of agreements. A check here could only test a snapshot, and the very next OpenAgreement could name the sitting recipient as holder or depositor. A guard that any later transaction can walk through is worse than no guard: it reads as an invariant and is not one. Nothing is at stake in the overlap, which is why the honest answer is a documented omission rather than a decorative check. The fee is derived only from the holder's award inside ledger.MustDeposit, never from the refund, so a recipient who is also a holder collects the same coins by two routes instead of more coins. Solvency is unaffected in either direction: feeledger accounts user credit and the fee pot as separate buckets, both are inside ledger.Liabilities(), and SweepDenom's reserve is locked + contested + ledger.Liabilities() — so an overlapping recipient cannot make the swept surplus overstate what the realm is free to release.

Open
OID
0acb4c…4f9f:38
SetFeeRecipient details

Inspect func

SweepDenom

func(denom string)

SweepDenom recovers out-of-band coins to the fee recipient. For the ledger denom the reserve is locked + contested + Liabilities() — held deposits, contested deposits, claimable refunds, awards and the fee pot are all structurally unreachable.

Open
OID
0acb4c…4f9f:40
SweepDenom details

Inspect func

TransferAdmin

func(successor .uverse.address)
Open
OID
0acb4c…4f9f:41
TransferAdmin details

Inspect func

AgreementInfo

func(id int64) (holder .uverse.address, depositor .uverse.address, arbiter .uverse.address, amount int64, forfeitCeiling int64, feeBps int64, termEnd int64, claimDeadline int64, disputeDeadline int64, arbiterDeadline int64, claimAmount int64, award int64, status string)
Open
OID
0acb4c…4f9f:43
AgreementInfo details

Inspect func

ClaimReason

func(id int64) string
Open
OID
0acb4c…4f9f:45
ClaimReason details

Inspect func

DisputeReason

func(id int64) string
Open
OID
0acb4c…4f9f:46
DisputeReason details

Inspect func

Holder

func(id int64) .uverse.address
Open
OID
0acb4c…4f9f:47
Holder details

Inspect func

Depositor

func(id int64) .uverse.address
Open
OID
0acb4c…4f9f:48
Depositor details

Inspect func

Arbiter

func(id int64) .uverse.address
Open
OID
0acb4c…4f9f:49
Arbiter details

Inspect func

ForfeitCeiling

func(id int64) int64
Open
OID
0acb4c…4f9f:51
ForfeitCeiling details

Inspect func

ClaimAmount

func(id int64) int64
Open
OID
0acb4c…4f9f:54
ClaimAmount details

Inspect func

ClaimDeadline

func(id int64) int64
Open
OID
0acb4c…4f9f:57
ClaimDeadline details

Inspect func

FundDeadline

func(id int64) int64
Open
OID
0acb4c…4f9f:58
FundDeadline details

Inspect func

DisputeDeadlineOf

func(id int64) int64

DisputeDeadlineOf is the last height at which the depositor may Dispute a standing claim; ArbiterDeadlineOf is the last height at which the arbiter's ruling pre-empts LapseDispute. Both are 0 until the relevant stage is live.

Open
OID
0acb4c…4f9f:59
DisputeDeadlineOf details

Inspect func

ArbiterDeadlineOf

func(id int64) int64
Open
OID
0acb4c…4f9f:60
ArbiterDeadlineOf details

Inspect func

CreatedHeight

func(id int64) int64
Open
OID
0acb4c…4f9f:61
CreatedHeight details

Inspect func

FundedHeight

func(id int64) int64
Open
OID
0acb4c…4f9f:62
FundedHeight details

Inspect func

SettledHeight

func(id int64) int64
Open
OID
0acb4c…4f9f:63
SettledHeight details

Inspect func

Refund

func(id int64) int64

Refund is the amount the depositor gets back, known only once settled.

Open
OID
0acb4c…4f9f:64
Refund details

Inspect func

MaxClaimable

func(id int64) int64

MaxClaimable is the most the holder could still take out of this agreement. It is the ceiling while the deposit is funded, the filed claim once one stands, and 0 once the agreement is terminal.

Open
OID
0acb4c…4f9f:65
MaxClaimable details

Inspect func

IsClaimable

func(id int64) bool

IsClaimable reports whether FileClaim would be accepted at this height.

Open
OID
0acb4c…4f9f:67
IsClaimable details

Inspect func

IsDisputable

func(id int64) bool

IsDisputable reports whether Dispute would be accepted at this height.

Open
OID
0acb4c…4f9f:68
IsDisputable details

Inspect func

PendingValve

func(id int64) string

PendingValve names the permissionless call this agreement is ready for, or "" when none is. It is the one view a keeper needs.

Open
OID
0acb4c…4f9f:69
PendingValve details

Inspect func

HasAgreement

func(id int64) bool
Open
OID
0acb4c…4f9f:70
HasAgreement details

Inspect func

AgreementsOf

func(holder .uverse.address) int64
Open
OID
0acb4c…4f9f:71
AgreementsOf details

Inspect func

PendingAdmin

func() .uverse.address
Open
OID
0acb4c…4f9f:73
PendingAdmin details

Inspect func

FeeRecipient

func() .uverse.address
Open
OID
0acb4c…4f9f:74
FeeRecipient details

Inspect func

ClaimableOf

func(a .uverse.address) int64
Open
OID
0acb4c…4f9f:77
ClaimableOf details

Inspect func

settle

func(d *deposits.agreement, award int64, fromContested bool) (credited int64, fee int64)

settle credits the split and moves the deposit out of its custody bucket. The caller has already established the route's authority and timing; \`award\` is in \[0, amount] and \`fromContested\` says which bucket the deposit sits in. Conservation, in delta form: Held is unchanged; locked OR contested falls by amount; Liabilities rises by award + (amount-award) == amount. So Held == locked + contested + Liabilities is preserved exactly. The fee is charged ONLY on the award. The refund is deposited at fee 0, so a fully-refunded deposit returns to the depositor in full.

Open
OID
0acb4c…4f9f:85
settle details

Inspect func

mustAgreement

func(id int64) *deposits.agreement
Open
OID
0acb4c…4f9f:86
mustAgreement details

Inspect func

counter

func(tree *v0.Tree, a .uverse.address) *int64
Open
OID
0acb4c…4f9f:88
counter details

Inspect func

addChecked

func(a int64, b int64) (int64, bool)
Open
OID
0acb4c…4f9f:89
addChecked details

Inspect func

addrStr

func(a .uverse.address) string
Open
OID
0acb4c…4f9f:92
addrStr details

Inspect func

hasPrefix

func(s string, p string) bool
Open
OID
0acb4c…4f9f:93
hasPrefix details

Inspect func

renderAgreement

func(idStr string) string
Open
OID
0acb4c…4f9f:96
renderAgreement details

Inspect func
Denom : untyped string ="ugnot"
MaxFeeBps : int64 =1000
DepositOpen : untyped string ="open"
DepositFunded : untyped string ="funded"
DepositClaimed : untyped string ="claimed"
DepositDisputed : untyped string ="disputed"
DepositSettled : untyped string ="settled"
DepositCancelled : untyped string ="cancelled"
MinDeposit : int64 =10000
MaxDeposit : int64 =1000000000000
MinClaim : int64 =1000
MinTerm : int64 =10
MaxTerm : int64 =7500000
MinWindow : int64 =10
MaxWindow : int64 =7500000
FundWindow : int64 =1000000
MaxMemoLen : untyped bigint =(200 <untyped> bigint)
MaxReasonLen : untyped bigint =(200 <untyped> bigint)
MaxAgreementsPerHolder : untyped bigint =(50 <untyped> bigint)
RenderLimit : untyped bigint =(20 <untyped> bigint)
agreement : type =deposits.agreement
admin : .uverse.address =<gnolang.StringValue>
pendingAdmin : .uverse.address =<zero>
feeRecipient : .uverse.address =<gnolang.StringValue>
feeBps : int64 =250
self : .uverse.address =<gnolang.StringValue>
nextID : int64 =1
locked : int64 =0
contested : int64 =0
agreements : *v0.Tree Inspect
holderNum : *v0.Tree Inspect
ledger : *feeledger.Ledger Inspect
init.32 : func() Inspect
OpenAgreement : func(depositor .uverse.address, amount int64, forfeitCeiling int64, termBlocks int64, claimWindow int64, disputeWindow int64, arbiter .uverse.address, memo string) int64 Inspect
FileClaim : func(id int64, amount int64, reason string) Inspect
Release : func(id int64) Inspect
Fund : func(id int64) Inspect
AcceptClaim : func(id int64) Inspect
Dispute : func(id int64, reason string) Inspect
ResolveDispute : func(id int64, awardToHolder int64) Inspect
ReleaseUnclaimed : func(id int64) Inspect
SettleUndisputed : func(id int64) Inspect
LapseDispute : func(id int64) Inspect
CancelUnfunded : func(id int64) Inspect
Claim : func(amount int64) Inspect
ClaimAll : func() Inspect
SetFeeBps : func(bps int64) Inspect
SetFeeRecipient : func(recipient .uverse.address) Inspect
WithdrawFees : func() Inspect
SweepDenom : func(denom string) Inspect
TransferAdmin : func(successor .uverse.address) Inspect
AcceptAdmin : func() Inspect
AgreementInfo : func(id int64) (holder .uverse.address, depositor .uverse.address, arbiter .uverse.address, amount int64, forfeitCeiling int64, feeBps int64, termEnd int64, claimDeadline int64, disputeDeadline int64, arbiterDeadline int64, claimAmount int64, award int64, status string) Inspect
Memo : func(id int64) string Inspect
ClaimReason : func(id int64) string Inspect
DisputeReason : func(id int64) string Inspect
Holder : func(id int64) .uverse.address Inspect
Depositor : func(id int64) .uverse.address Inspect
Arbiter : func(id int64) .uverse.address Inspect
Amount : func(id int64) int64 Inspect
ForfeitCeiling : func(id int64) int64 Inspect
FeeBpsOf : func(id int64) int64 Inspect
Status : func(id int64) string Inspect
ClaimAmount : func(id int64) int64 Inspect
Award : func(id int64) int64 Inspect
TermEnd : func(id int64) int64 Inspect
ClaimDeadline : func(id int64) int64 Inspect
FundDeadline : func(id int64) int64 Inspect
DisputeDeadlineOf : func(id int64) int64 Inspect
ArbiterDeadlineOf : func(id int64) int64 Inspect
CreatedHeight : func(id int64) int64 Inspect
FundedHeight : func(id int64) int64 Inspect
SettledHeight : func(id int64) int64 Inspect
Refund : func(id int64) int64 Inspect
MaxClaimable : func(id int64) int64 Inspect
IsSettled : func(id int64) bool Inspect
IsClaimable : func(id int64) bool Inspect
IsDisputable : func(id int64) bool Inspect
PendingValve : func(id int64) string Inspect
HasAgreement : func(id int64) bool Inspect
AgreementsOf : func(holder .uverse.address) int64 Inspect
Admin : func() .uverse.address Inspect
PendingAdmin : func() .uverse.address Inspect
FeeRecipient : func() .uverse.address Inspect
FeeBps : func() int64 Inspect
NumAgreements : func() int64 Inspect
ClaimableOf : func(a .uverse.address) int64 Inspect
FeesAccrued : func() int64 Inspect
Liabilities : func() int64 Inspect
Locked : func() int64 Inspect
Contested : func() int64 Inspect
Held : func() int64 Inspect
Address : func() .uverse.address Inspect
Height : func() int64 Inspect
settle : func(d *deposits.agreement, award int64, fromContested bool) (credited int64, fee int64) Inspect
mustAgreement : func(id int64) *deposits.agreement Inspect
assertNoSend : func() Inspect
counter : func(tree *v0.Tree, a .uverse.address) *int64 Inspect
addChecked : func(a int64, b int64) (int64, bool) Inspect
padID : func(id int64) string Inspect
itoa : func(n int64) string Inspect
addrStr : func(a .uverse.address) string Inspect
hasPrefix : func(s string, p string) bool Inspect
Render : func(path string) string Inspect
renderHome : func() string Inspect
renderAgreement : func(idStr string) string Inspect