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.

hlbubble source realm

Package hlbubble is the BUBBLE lock: the bridge's BUBBLE route on gno.land (bridge/PLAN.md §5.2–§5.5), the same shape...

Overview

Package hlbubble is the BUBBLE lock: the bridge's BUBBLE route on gno.land (bridge/PLAN.md §5.2–§5.5), the same shape as r/hlgnot over the BUBBLE token (gno.land/r/…/bubble) instead of coins.

Out. TransferRemote takes amount + fee of the caller's BUBBLE through the token's allowance (the caller approves this realm first), keeps the amount in the lock, pays the fee to r/hlfees, and sends a token message through r/hlmailbox to the synthetic BUBBLE program on Solana, which mints as much there.

In. A burn on Solana comes back as a token message: Process takes it from the mailbox, checks it came from the enrolled router, and writes a claim in the recipient's queue; Claim pays claims in turns under the meters — a tenth of the lock a day (never below the floor), a quarter of that for any one recipient, the fee first. The old 1,000,000 BUBBLE day cap and the admin's pause are gone: the meter and the guardians' flags replace them.

Who may change what. Nobody but the governor through the builders until it yields on r/hlmailbox, and GovDAO after (M1k); the guardians and watch keys can only pause, through r/hlmailbox. Every launch value is compiled in below; nothing moves until the Launch decision executes. The state machine is gno.land/p/…/hlroute/v0; this realm holds the BUBBLE and makes the calls.

Functions 33

func Balance

Action
1func Balance() int64
source

Balance is the BUBBLE this realm holds; it is the lock unless someone sent BUBBLE here outside a transfer.

func Claim

crossing Action
1func Claim(cur realm, n int) int
source

Claim pays up to n claims (n ≤ 20) taking recipients in turns under the meters, the fee as each claim's first installment. Anyone may call it; the relayers do. It returns how many claims it paid something on.

func Counters

Action
1func Counters() (sentTotal, paidTotal, owed, voided, lost int64)
source

Counters is the identity's five counters (§5.9): sentTotal, paidTotal, owed, voided, lost.

func Domain

Action
1func Domain() uint32
source

Domain is the Solana domain this route sends to and takes from.

func Execute

crossing Action
1func Execute(cur realm, id int64)
source

Execute applies a queued decision whose 7 days have passed. Anyone may call it. A sweep payment moves BUBBLE out of the lock, so under a standing payouts flag it waits for the unpause like a claim (§5.9). A refund is never Execute's (AT2): the state refuses the kind, and GovDAO applies it by NewApplyRefundRequest.

func Govern

crossing Action
1func Govern(cur realm, r Request)
source

Govern is the governor's way in before the yield (M1k): the same closure GovDAO's proxy runs after it, called non-crossing in this frame so it reads the governor from cur.Previous(); refused for anyone else and for everyone once the governor yielded on r/hlmailbox (or when none was compiled); see hlgnot's.

func Locked

Action
1func Locked() int64
source

Locked is the lock: what backs synthetic BUBBLE on Solana, by the counters (sent − paid).

func Migrated

Action
1func Migrated() string
source

Migrated is the successor's pkgpath once a migration applied, "" before.

func Process

crossing Action
1func Process(cur realm, metadata, message string)
source

Process takes a token message from Solana and credits a claim to its recipient. Anyone may call it with the verifier's metadata and the message, both in hex. A refused message stays undelivered. A realm registered as a successor credits nothing — its own messages included (R32) — before the last page of its predecessor's migration is in (AQ1); a migrated realm refuses before the mailbox is asked (see hlgnot's).

func Pull

crossing Action
1func Pull(cur realm, page int) *hlroute.Snapshot
source

Pull is the successor's: once a migrate decision names it, the realm at that pkgpath calls Pull from its own code, page by page from 0, and receives the lock (transferred to its address, with page 0) and the records to import, up to 500 a page (the snapshot's More says whether a page follows); a page pulled already hands over nothing. Page 0 moves the lock, so under a standing payouts flag it waits for the unpause like a sweep payment (R27, R16); the flag follows the claims to the successor (hlmailbox.AddRoute).

func Render

1func Render(path string) string
source

Render: "" the route's page; "decisions"; "json"; "decisions.json"; "claim/<id>"; "send/<id>"; "claims/<from>", "sweeps/<from>" and "refunds/<from>", up to 100 entries a page (hlgnot's Render says more).

func TransferRemote

crossing Action
1func TransferRemote(cur realm, destination uint32, recipient string, amount int64) string
source

TransferRemote sends amount of the caller's BUBBLE to recipient on destination (a Solana address in base58, or 32 bytes in hex) and returns the message id in hex. First, on the bubble realm, the caller approves THIS realm (bubble.Approve, spender Address()) for at least amount + fee: the amount is locked here, the fee goes to r/hlfees. The amount is between the minimum and the per-message maximum.

func NewApplyRefundRequest

crossing Action
1func NewApplyRefundRequest(cur realm, id int64) Request
source

NewApplyRefundRequest applies a queued refund decision whose 7 days have passed, at once (AT2): GovDAO's own act after hlwatch's check that the token's router on Solana is this realm; under a standing payouts flag it waits like a claim; see hlgnot's.

func NewMigrateRequest

crossing Action
1func NewMigrateRequest(cur realm, to string) Request
source

NewMigrateRequest: a successor that announced itself to the mailbox for the BUBBLE route (R25, AQ5) and is no route already (R31), after 7 days; a realm that succeeds another migrates on only once its own import has ended (R31); see hlgnot's.

func NewRefundRequest

crossing Action
1func NewRefundRequest(cur realm, ids string) Request
source

NewRefundRequest queues a refund of imported sends by id, 7 days, once kind 6 has enrolled this realm on Solana for 14 days (AR1, R37); applied then by NewApplyRefundRequest, never by Execute (AT2); see hlgnot's.

func NewSweepRequest

crossing Action
1func NewSweepRequest(cur realm, ids string, to address) Request
source

NewSweepRequest pays sweep entries, named by message id, to an address after 7 days — their sum, at most the lock — and drops them (R19): see hlgnot's.

func NewVoidRequest

crossing Action
1func NewVoidRequest(cur realm, ids string, forged bool, unpauseFns, removeSeats string) Request
source

NewVoidRequest voids credits by message id (a claim, or a sweep entry as forged) or by a range of credits ("heights:<from>-<to>" or "since:<from>", closed at the height the proposal is made, at most 1,000 credits), as withheld or forged, with the unpause option (the seats' holders recorded; a seat whose occupant changed by execution is skipped): see hlgnot's.

func NewWriteOffRequest

crossing Action
1func NewWriteOffRequest(cur realm, ids string) Request
source

NewWriteOffRequest books refunded sends delivered on Solana after their refund as lost, after 7 days (AR1); see hlgnot's.

Types 1

type Request

struct
1type Request struct {
2	proposal dao.ProposalRequest
3	text     string
4	decide   func(cur realm) error
5}
source

Request is what a builder returns (M1k): the proposal GovDAO's proxy executes after the yield (Proposal), and the same decision the governor runs directly before it (Govern); see hlgnot's.

Methods on Request

func Description

method on Request
1func (r Request) Description() string
source

Description is the proposal's: the parameters as the builder wrote them.

func Proposal

method on Request
1func (r Request) Proposal() dao.ProposalRequest
source

Proposal is the request as a GovDAO proposal: `dao.MustCreateProposal(cross(cur), req.Proposal())`.

Dependencies

Source Files 2