Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

revshare state

Back to all declarations

Denom

untyped string

Denom is the only asset this realm accounts.

Value

"ugnot"

MaxMembers

untyped bigint

MaxMembers bounds the distribution loop; MaxWeight bounds a single weight. Together they cap totalWeight at 200,000, which makes the remainder step of the split ((A%W)\*w) provably overflow-free for any int64 coin amount — the conservation math cannot trap.

Value

(20 <untyped> bigint)

MaxWeight

int64

MaxMembers bounds the distribution loop; MaxWeight bounds a single weight. Together they cap totalWeight at 200,000, which makes the remainder step of the split ((A%W)\*w) provably overflow-free for any int64 coin amount — the conservation math cannot trap.

Value

10000

member

type

Value

revshare.member

admin

.uverse.address

// manages members, plans; stages a successor

Value

<gnolang.StringValue>

pendingAdmin

.uverse.address

// staged by TransferAdmin, completes via AcceptAdmin

Value

<zero>

sweeper

.uverse.address

// may sweep out-of-band surplus

Value

<gnolang.StringValue>

self

.uverse.address

// this realm's address, captured at deploy

Value

<gnolang.StringValue>

members

[]revshare.member (len=2)

// insertion-ordered; bounded by MaxMembers

Open
OID
0c2ed8…5996:51
members details (len=2)

+2 more Inspect slice

totalWeight

int64

Value

4

planIDs

[]int64 (len=2)

// plans created through this realm (ops/Render)

Open
OID
0c2ed8…5996:61
planIDs details (len=2)

+2 more Inspect slice

pulled

int64

// lifetime revenue pulled over boundary B2

Value

3003

AddMember

func(a .uverse.address, weight int64)

AddMember adds a weighted member. Weight changes never touch earned balances; they shape future pulls only.

Open
OID
0c2ed8…5996:18
AddMember details

Inspect func

SetWeight

func(a .uverse.address, weight int64)

SetWeight changes a member's weight for future distributions.

Open
OID
0c2ed8…5996:19
SetWeight details

Inspect func

RemoveMember

func(a .uverse.address)

RemoveMember removes a member from future distributions. The member's earned balance is untouched and stays claimable forever.

Open
OID
0c2ed8…5996:20
RemoveMember details

Inspect func

CreatePlan

func(title string, description string, price int64, periodBlocks int64, maxFeeBps int64) int64

CreatePlan creates a subscription plan THROUGH this realm, making the realm the plan's provider downstream. Admin only: the per-provider plan quota downstream is a griefable resource.

Open
OID
0c2ed8…5996:21
CreatePlan details

Inspect func

RetirePlan

func(planID int64)

RetirePlan retires one of this realm's plans downstream. Admin only.

Open
OID
0c2ed8…5996:22
RetirePlan details

Inspect func

Pull

func() int64

Pull claims this realm's entire accrued provider balance from the subscriptions realm and distributes it to the members by weight. Permissionless: pulling can only move the receivable into member balances at the fixed weights, so anyone may crank it. Refuses BEFORE the downstream call when no member could receive the funds.

Open
OID
0c2ed8…5996:23
Pull details

Inspect func

distribute

func(amount int64)

distribute splits amount by member weight. Shares are computed as (A/W)\*w + ((A%W)\*w)/W — floor(A\*w/W) without any multiplication that can overflow. The remainder (\< number of members) goes to the highest-weight member, lowest address on ties: deterministic, and it leaves the realm with no undistributed pool at rest.

Open
OID
0c2ed8…5996:24
distribute details

Inspect func

dustRecipient

func() .uverse.address
Open
OID
0c2ed8…5996:25
dustRecipient details

Inspect func

Claim

func(amount int64)

Claim sends amount ugnot of the caller's earned balance to the caller.

Open
OID
0c2ed8…5996:26
Claim details

Inspect func

ClaimAll

func()

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

Open
OID
0c2ed8…5996:27
ClaimAll details

Inspect func

SweepDenom

func(denom string)

SweepDenom recovers out-of-band coins to the sweeper. For the accounting denom the reserve is the full ledger liability — member balances are structurally unsweepable. Sweeper only.

Open
OID
0c2ed8…5996:28
SweepDenom details

Inspect func

TransferAdmin

func(successor .uverse.address)

TransferAdmin stages a two-step admin handover.

Open
OID
0c2ed8…5996:29
TransferAdmin details

Inspect func

AcceptAdmin

func()

AcceptAdmin completes the handover; only the staged successor may. The sweeper role moves with the admin.

Open
OID
0c2ed8…5996:30
AcceptAdmin details

Inspect func

PendingAdmin

func() .uverse.address
Open
OID
0c2ed8…5996:32
PendingAdmin details

Inspect func

MemberWeight

func(a .uverse.address) int64
Open
OID
0c2ed8…5996:35
MemberWeight details

Inspect func

BalanceOf

func(a .uverse.address) int64
Open
OID
0c2ed8…5996:36
BalanceOf details

Inspect func

Receivable

func() int64

Receivable reads this realm's accrued, not-yet-pulled provider balance inside the subscriptions realm — the other side of value boundary B2. It is deliberately NOT part of Held or of the local conservation equation.

Open
OID
0c2ed8…5996:43
Receivable details

Inspect func

indexOf

func(a .uverse.address) int
Open
OID
0c2ed8…5996:45
indexOf details

Inspect func

assertAdmin

func(caller .uverse.address)
Open
OID
0c2ed8…5996:47
assertAdmin details

Inspect func
Denom : untyped string ="ugnot"
MaxMembers : untyped bigint =(20 <untyped> bigint)
MaxWeight : int64 =10000
member : type =revshare.member
admin : .uverse.address =<gnolang.StringValue>
pendingAdmin : .uverse.address =<zero>
sweeper : .uverse.address =<gnolang.StringValue>
self : .uverse.address =<gnolang.StringValue>
members : []revshare.member (len=2) Inspect
totalWeight : int64 =4
ledger : *feeledger.Ledger Inspect
planIDs : []int64 (len=2) Inspect
pulled : int64 =3003
init.13 : func() Inspect
AddMember : func(a .uverse.address, weight int64) Inspect
SetWeight : func(a .uverse.address, weight int64) Inspect
RemoveMember : func(a .uverse.address) Inspect
CreatePlan : func(title string, description string, price int64, periodBlocks int64, maxFeeBps int64) int64 Inspect
RetirePlan : func(planID int64) Inspect
Pull : func() int64 Inspect
distribute : func(amount int64) Inspect
dustRecipient : func() .uverse.address Inspect
Claim : func(amount int64) Inspect
ClaimAll : func() Inspect
SweepDenom : func(denom string) Inspect
TransferAdmin : func(successor .uverse.address) Inspect
AcceptAdmin : func() Inspect
Admin : func() .uverse.address Inspect
PendingAdmin : func() .uverse.address Inspect
MemberCount : func() int64 Inspect
TotalWeight : func() int64 Inspect
MemberWeight : func(a .uverse.address) int64 Inspect
BalanceOf : func(a .uverse.address) int64 Inspect
UsersTotal : func() int64 Inspect
Pulled : func() int64 Inspect
NumPlans : func() int64 Inspect
PlanID : func(i int64) int64 Inspect
Address : func() .uverse.address Inspect
Held : func() int64 Inspect
Receivable : func() int64 Inspect
Render : func(path string) string Inspect
indexOf : func(a .uverse.address) int Inspect
assertNoSend : func() Inspect
assertAdmin : func(caller .uverse.address) Inspect
itoa : func(n int64) string Inspect