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.

latefees state

Back to all declarations

Denom

untyped string

Denom is the asset the invoices this realm prices are denominated in, and the unit a penalty is expressed in. This realm never holds it.

Value

"ugnot"

InvoicesPath

untyped string

InvoicesPath pins the realm this one reads, by value, so a reader of a published assessment can see which invoices it priced.

Value

"/r/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/invoices"

RenderLimit

untyped bigint

RenderLimit bounds every rendered list — an unbounded Render was YELLOW in three prior audits.

Value

(20 <untyped> bigint)

MaxAssessmentsPerIssuer

untyped bigint

MaxAssessmentsPerIssuer bounds one creditor's stored assessment records, so one address cannot grow this realm's state without bound. It counts STORED records, the invoices-realm discipline.

Value

(256 <untyped> bigint)

assessment

type

Value

latefees.assessment

self

.uverse.address

// this realm's address, captured at deploy

Value

<gnolang.StringValue>

nextSeq

int64

Value

1

schedules

*v0.Tree

// issuer.String() -> tiers.Schedule (by value)

Open
OID
0e4779…521d:6
schedules details

Inspect pointer

issuerNum

*v0.Tree

// issuer.String() -> \*int64, stored assessments

Open
OID
0e4779…521d:12
issuerNum details

Inspect pointer

SetSchedule

func(edges string, rates string) int

SetSchedule declares or replaces the caller's late-fee schedule: a graduated accrual over OVERDUE BLOCKS, built from comma-separated int64 lists where len(rates) == len(edges)+1 and each rate is a ugnot accrual per RateScale blocks (0..10000). Edges are block counts — e.g. "216000,648000" is roughly ten and thirty days at ~4s blocks. A single rate with no edges is a flat accrual. Replacing a schedule does not touch already-frozen assessments, which snapshot the schedule that priced them.

Open
OID
0e4779…521d:16
SetSchedule details

Inspect func

Assess

func(invoiceID int64) int64

Assess freezes a late-fee penalty on one of the caller's own overdue invoices and returns its sequence number. The caller must be the invoice's issuer (the creditor), must have declared a schedule, and the invoice must be overdue right now. The invoice's facts and the current schedule are snapshotted, so the assessment is a stable claim even as the invoice keeps accruing or is later paid.

Open
OID
0e4779…521d:17
Assess details

Inspect func

PenaltyNow

func(issuer .uverse.address, invoiceID int64) int64

PenaltyNow is the penalty an issuer's invoice has accrued as of the current height, under the issuer's CURRENT schedule. It is 0 when the invoice is not overdue — including once it is paid or voided, because [r/invoices](/r/invoices) does not expose when a payment landed, so accrual is only computable while the invoice is still open and late. A frozen [Assess](#Assess) is how a claim survives the invoice being paid. Panics only if the issuer has no schedule or the invoice does not exist.

Open
OID
0e4779…521d:18
PenaltyNow details

Inspect func

QuotePenalty

func(issuer .uverse.address, overdueBlocks int64) int64

QuotePenalty prices a hypothetical overdue duration against an issuer's current schedule, without reading any invoice — the preview a creditor uses to tune a schedule. Panics if the issuer has no schedule or overdueBlocks is negative.

Open
OID
0e4779…521d:19
QuotePenalty details

Inspect func

HasSchedule

func(issuer .uverse.address) bool

HasSchedule reports whether an issuer has declared a late-fee schedule.

Open
OID
0e4779…521d:20
HasSchedule details

Inspect func

ScheduleOf

func(issuer .uverse.address) (edges []int64, rates []int64)

ScheduleOf returns an issuer's current schedule as its edge and rate slices, or two empty slices if none is declared.

Open
OID
0e4779…521d:21
ScheduleOf details

Inspect func

AssessmentInfo

func(seq int64) (issuer .uverse.address, payer .uverse.address, invoiceID int64, outstanding int64, overdueBy int64, penalty int64, assessedAt int64)
Open
OID
0e4779…521d:22
AssessmentInfo details

Inspect func

AssessmentSchedule

func(seq int64) (edges []int64, rates []int64)

AssessmentSchedule returns the schedule snapshot an assessment was priced under — the edges and rates frozen with it, which may differ from the issuer's current schedule.

Open
OID
0e4779…521d:23
AssessmentSchedule details

Inspect func

HasAssessment

func(seq int64) bool

HasAssessment reports whether a sequence number names a frozen assessment.

Open
OID
0e4779…521d:24
HasAssessment details

Inspect func

AssessmentsOf

func(issuer .uverse.address) int64

AssessmentsOf is the number of assessments an issuer has frozen.

Open
OID
0e4779…521d:25
AssessmentsOf details

Inspect func

NumAssessments

func() int64
Open
OID
0e4779…521d:26
NumAssessments details

Inspect func

charge

func(s tiers.Schedule, overdueBy int64) int64

charge prices an overdue duration against a schedule, surfacing tiers' own error as a panic rather than a silent zero. A zero or negative base prices to zero (tiers refuses a negative amount, so it is guarded here).

Open
OID
0e4779…521d:30
charge details

Inspect func

mustAssessment

func(seq int64) *latefees.assessment
Open
OID
0e4779…521d:31
mustAssessment details

Inspect func

assertNoSend

func()

assertNoSend refuses coins on every crossing entrypoint. This realm holds nothing, so every one of its writes is non-payable. Reads the ORIGIN envelope, so a transaction attaching coins anywhere is refused.

Open
OID
0e4779…521d:32
assertNoSend details

Inspect func

counter

func(tree *v0.Tree, a .uverse.address) *int64
Open
OID
0e4779…521d:33
counter details

Inspect func

parseInt64List

func(s string, max int, what string) []int64

parseInt64List parses a comma-separated int64 list, bounding the element count BEFORE materialising values so a long string dies on count, not memory (the r/receivables bounding argument). "" is the empty list.

Open
OID
0e4779…521d:34
parseInt64List details

Inspect func

trimSpaces

func(s string) string
Open
OID
0e4779…521d:35
trimSpaces details

Inspect func

Render

func(path string) string

Render shows the catalog at "", an assessment at "seq/\<n>", and an issuer's schedule at "issuer/\<addr>". Every user-supplied value rendered between table pipes is escaped with sanitize.TableCell; addresses carry no markdown metacharacter but are passed through InlineText for the same reason the sibling realms do.

Open
OID
0e4779…521d:38
Render details

Inspect func

renderAssessment

func(seqStr string) string
Open
OID
0e4779…521d:40
renderAssessment details

Inspect func

renderIssuer

func(addr string) string
Open
OID
0e4779…521d:41
renderIssuer details

Inspect func

renderSchedule

func(edges []int64, rates []int64) string
Open
OID
0e4779…521d:42
renderSchedule details

Inspect func

hasPrefix

func(s string, p string) bool
Open
OID
0e4779…521d:43
hasPrefix details

Inspect func
Denom : untyped string ="ugnot"
InvoicesPath : untyped string ="/r/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/invoices"
RenderLimit : untyped bigint =(20 <untyped> bigint)
MaxAssessmentsPerIssuer : untyped bigint =(256 <untyped> bigint)
assessment : type =latefees.assessment
self : .uverse.address =<gnolang.StringValue>
nextSeq : int64 =1
schedules : *v0.Tree Inspect
bySeq : *v0.Tree Inspect
issuerNum : *v0.Tree Inspect
init.10 : func() Inspect
SetSchedule : func(edges string, rates string) int Inspect
Assess : func(invoiceID int64) int64 Inspect
PenaltyNow : func(issuer .uverse.address, invoiceID int64) int64 Inspect
QuotePenalty : func(issuer .uverse.address, overdueBlocks int64) int64 Inspect
HasSchedule : func(issuer .uverse.address) bool Inspect
ScheduleOf : func(issuer .uverse.address) (edges []int64, rates []int64) Inspect
AssessmentInfo : func(seq int64) (issuer .uverse.address, payer .uverse.address, invoiceID int64, outstanding int64, overdueBy int64, penalty int64, assessedAt int64) Inspect
AssessmentSchedule : func(seq int64) (edges []int64, rates []int64) Inspect
HasAssessment : func(seq int64) bool Inspect
AssessmentsOf : func(issuer .uverse.address) int64 Inspect
NumAssessments : func() int64 Inspect
Invoices : func() string Inspect
Address : func() .uverse.address Inspect
Height : func() int64 Inspect
charge : func(s tiers.Schedule, overdueBy int64) int64 Inspect
mustAssessment : func(seq int64) *latefees.assessment Inspect
assertNoSend : func() Inspect
counter : func(tree *v0.Tree, a .uverse.address) *int64 Inspect
parseInt64List : func(s string, max int, what string) []int64 Inspect
trimSpaces : func(s string) string Inspect
padID : func(id int64) string Inspect
itoa : func(n int64) string Inspect
Render : func(path string) string Inspect
renderHome : func() string Inspect
renderAssessment : func(seqStr string) string Inspect
renderIssuer : func(addr string) string Inspect
renderSchedule : func(edges []int64, rates []int64) string Inspect
hasPrefix : func(s string, p string) bool Inspect