Skip to content Search Apps Documentation Source Content Run Reset Eval Playground 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.

v1 source realm

Package erratabank records corrections, finder credit and book reward escrow.

Overview

Package erratabank records corrections, finder credit and book reward escrow.

Constants 1

Functions 19

func Accept

crossing Action
1func Accept(cur realm, erratumID int, note string)
source

Accept credits the finder and queues the reward for settlement from the book funds.

func AcceptedEntries

Action
1func AcceptedEntries(bookID int) []errata.Entry
source

AcceptedEntries returns the first 50 accepted reports in submission order.

func AcceptedEntriesPage

Action
1func AcceptedEntriesPage(bookID, offset, limit int) []errata.Entry
source

AcceptedEntriesPage is the integration API for rendering accepted reports. Limits are capped at 50 entries per page.

func CreateBook

crossing Action
1func CreateBook(cur realm, title, edition, link string, rewardPerErratum int64) int
source

CreateBook registers an open book and optionally credits inbound reward escrow.

func FundBook

crossing Action
1func FundBook(cur realm, bookID int)
source

FundBook records an owner deposit or a locked sponsor deposit and services the oldest fully funded reward first. The owner can fund existing debts after closing.

func MarkDuplicate

crossing Action
1func MarkDuplicate(cur realm, erratumID, originalID int)
source

MarkDuplicate links a pending report to an earlier pending or accepted report in the same book.

func RefundSponsor

crossing Action
1func RefundSponsor(cur realm, bookID int)
source

RefundSponsor returns the caller's remaining sponsor deposit on a closed book after all accepted rewards have settled.

func Reject

crossing Action
1func Reject(cur realm, erratumID int, note string)
source

Reject closes a pending submission without finder credit.

func Render

1func Render(path string) string
source

Render is the public Markdown entry point for gnoweb.

func SetBookOpen

crossing Action
1func SetBookOpen(cur realm, bookID int, open bool)
source

SetBookOpen controls submissions and acceptance. Closing opens sponsor refunds after debts settle.

func SettleOwed

crossing Action
1func SettleOwed(cur realm, bookID int)
source

SettleOwed continues payouts when a previous call reached its work limit.

func SponsorBalance

Action
1func SponsorBalance(bookID int, sponsor address) int64
source

SponsorBalance returns the sponsor's remaining deposit for a book.

func Submit

crossing Action
1func Submit(cur realm, bookID int, location, text string) int
source

Submit records a report. Reports are public and permanent on-chain.

func Withdraw

crossing Action
1func Withdraw(cur realm, bookID int, amount int64)
source

Withdraw returns only the owner's deposits in excess of outstanding rewards.

func ListErrata

Action
1func ListErrata(bookID int, status string, offset, limit int) []Erratum
source

ListErrata returns reports in submission order. An empty status selects all reports.

Types 3

type Book

struct
 1type Book struct {
 2	ID               int
 3	Owner            address
 4	Title            string
 5	Edition          string
 6	Link             string
 7	RewardPerErratum int64
 8	OwnerFunds       int64
 9	SponsorFunds     int64
10	Owed             int64
11	Open             bool
12	CreatedAt        int64
13}
source

type Erratum

struct
 1type Erratum struct {
 2	ID          int
 3	BookID      int
 4	Finder      address
 5	Location    string
 6	Text        string
 7	Status      string
 8	DuplicateOf int
 9	SubmittedAt int64
10	ReviewedAt  int64
11	Paid        int64
12	Owed        int64
13	Note        string
14}
source

type FinderSummary

struct
1type FinderSummary struct {
2	Credits       int
3	UnpaidCredits int
4	Paid          int64
5	Owed          int64
6}
source

Dependencies

Source Files 8