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

fee_split state

Back to all declarations

Split

type

Split holds a fee-splitting configuration with percentage-based shares denominated in basis points (1 bp = 0.01%, 10000 bp = 100%).

Value

fee_split.Split

MaxRecipients

untyped bigint

Value

(20 <untyped> bigint)

MaxSplitsPerOwner

untyped bigint

Value

(10 <untyped> bigint)

MaxRenderSplits

untyped bigint

Value

(100 <untyped> bigint)

MaxFeeBps

int64

Value

100

MaxRecipientListLen

untyped bigint

Value

(1024 <untyped> bigint)

MaxShareListLen

untyped bigint

Value

(128 <untyped> bigint)

Denom

untyped string

Value

"ugnot"

MaxDepositAmount

int64

Value

922337203685477

splits

map[string]*fee_split.Split
Open
OID
029269…50fe:39
splits details

Inspect map

splitIDs

[]string (len=0)

// insertion-ordered for deterministic Render

Open
OID
029269…50fe:47
Inspect slice

ownerSplits

map[.uverse.address]int
Open
OID
029269…50fe:41
ownerSplits details

Inspect map

nextID

int

Value

2

feeBps

int64

Value

100

feeAdmin

.uverse.address

// deployer; can set the fee and claim accrued fees

Value

<gnolang.StringValue>

pendingFeeAdmin

.uverse.address

// two-step handover, must AcceptFeeAdmin

Value

<zero>

feesAccrued

int64

Value

0

feesClaimed

int64

Value

500

formatPct

func(bp int64) string
Open
OID
029269…50fe:15
formatPct details

Inspect func

mustGetSplit

func(id string) *fee_split.Split
Open
OID
029269…50fe:16
mustGetSplit details

Inspect func

mustGetActive

func(id string) *fee_split.Split
Open
OID
029269…50fe:17
mustGetActive details

Inspect func

parseBasisPoints

func(raw string) []int64
Open
OID
029269…50fe:19
parseBasisPoints details

Inspect func

parseAddresses

func(raw string) [].uverse.address
Open
OID
029269…50fe:20
parseAddresses details

Inspect func

validateRecipients

func(recipients [].uverse.address, shares []int64)
Open
OID
029269…50fe:21
validateRecipients details

Inspect func

sortedBalanceAddrs

func(s *fee_split.Split) []string

sortedBalanceAddrs returns the balance-map keys in deterministic order, so panics and renders never depend on map iteration order.

Open
OID
029269…50fe:22
sortedBalanceAddrs details

Inspect func

rejectStraySend

func()

rejectStraySend aborts when coins are attached to a call that does not accept them — the abort reverts the transfer back to the sender instead of stranding the coins on the realm address (re-audit P3). Direct bank transfers to the realm address remain unrecoverable by design.

Open
OID
029269…50fe:23
rejectStraySend details

Inspect func

CreateSplit

func(recipientList string, shareList string) string

CreateSplit registers a new split. The caller becomes the owner. Recipients and shares are comma-separated; shares are in basis points summing to 10000.

Open
OID
029269…50fe:24
CreateSplit details

Inspect func

Deposit

func(splitID string)

Deposit distributes the coins sent with the call across recipients proportionally. DEPLOYMENT PRECONDITION (round-4 audit): on a network with restricted/token-locked ugnot transfers, the bank gate is SENDER-whitelist-based — a whitelisted user's Deposit succeeds but Claim sends FROM this realm's (non-whitelisted) address and reverts. Funds would flow in and not out until the restriction lifts. Deploy only to networks with unrestricted ugnot, or have governance whitelist this realm's address first. LIMITATION (round-3 audit, documented): only direct user calls can deposit. A DAO/realm treasury has NO deposit path — a realm-routed call is refused, and a bare banker send to this realm's address is an unrecoverable donation. Realm treasuries must route deposits through a user account. The deposit is the ACTUAL attached send — exactly one coin of Denom — so balances are always backed by funds this realm holds. Direct user calls only: a deposit routed through an intermediary realm would deliver its coins to that realm, not here, and must be rejected. Rounding dust goes to the highest-share recipient (deterministic, not order-dependent).

Open
OID
029269…50fe:25
Deposit details

Inspect func

Claim

func(splitID string) int64

Claim withdraws the caller's accumulated balance and SENDS the coins to the caller's address. Balance is zeroed before the transfer. Claims remain possible on frozen splits, and by ex-recipients whose accrued balance predates a share update.

Open
OID
029269…50fe:26
Claim details

Inspect func

UpdateShares

func(splitID string, recipientList string, shareList string)

UpdateShares replaces recipients and shares. Owner only. Not if frozen. Removed recipients keep any accrued balance and can still Claim it.

Open
OID
029269…50fe:27
UpdateShares details

Inspect func

TransferOwnership

func(splitID string, newOwner .uverse.address)

TransferOwnership hands control to a new owner. The per-owner split slot moves with it: the old owner's count is freed and the new owner's is consumed (and must be under the limit).

Open
OID
029269…50fe:28
TransferOwnership details

Inspect func

Freeze

func(splitID string)

Freeze permanently locks shares and stops further deposits. One-way, cannot be undone. Claims remain possible.

Open
OID
029269…50fe:29
Freeze details

Inspect func

Archive

func(splitID string)

Archive marks a fully-claimed split as archived. Only the owner can archive, and only if EVERY balance — including balances held by ex-recipients removed in a share update — is zero, since archiving blocks all further claims. Cannot be undone.

Open
OID
029269…50fe:30
Archive details

Inspect func

SetFee

func(bps int64)

SetFee sets the protocol fee in basis points, admin only, hard-capped at MaxFeeBps. Applies to FUTURE deposits only.

Open
OID
029269…50fe:31
SetFee details

Inspect func

ClaimFees

func() int64

ClaimFees sends all accrued protocol fees to the fee admin.

Open
OID
029269…50fe:32
ClaimFees details

Inspect func

NominateFeeAdmin

func(nominee .uverse.address)

NominateFeeAdmin begins a two-step admin handover; the nominee must AcceptFeeAdmin. Pass "" to clear a pending nomination. Two-step because the admin address is a funds destination: a typo'd one-step transfer would strand all future fees.

Open
OID
029269…50fe:33
NominateFeeAdmin details

Inspect func

AcceptFeeAdmin

func()

AcceptFeeAdmin completes the handover; only the nominee can accept.

Open
OID
029269…50fe:34
AcceptFeeAdmin details

Inspect func

GetFeeInfo

func() string

GetFeeInfo returns the current fee configuration and accrued total.

Open
OID
029269…50fe:35
GetFeeInfo details

Inspect func

GetSplitInfo

func(splitID string) string

GetSplitInfo returns a human-readable summary.

Open
OID
029269…50fe:36
GetSplitInfo details

Inspect func

GetClaimable

func(splitID string, addr .uverse.address) int64

GetClaimable returns claimable balance for an address.

Open
OID
029269…50fe:37
GetClaimable details

Inspect func

Render

func(path string) string

Render returns a markdown overview. Never panics.

Open
OID
029269…50fe:38
Render details

Inspect func
Split : type =fee_split.Split
MaxRecipients : untyped bigint =(20 <untyped> bigint)
MaxSplitsPerOwner : untyped bigint =(10 <untyped> bigint)
MaxRenderSplits : untyped bigint =(100 <untyped> bigint)
MaxFeeBps : int64 =100
MaxRecipientListLen : untyped bigint =(1024 <untyped> bigint)
MaxShareListLen : untyped bigint =(128 <untyped> bigint)
Denom : untyped string ="ugnot"
MaxDepositAmount : int64 =922337203685477
splits : map[string]*fee_split.Split Inspect
splitIDs : []string
ownerSplits : map[.uverse.address]int Inspect
nextID : int =2
feeBps : int64 =100
feeAdmin : .uverse.address =<gnolang.StringValue>
pendingFeeAdmin : .uverse.address =<zero>
feesAccrued : int64 =0
feesClaimed : int64 =500
init.18 : func() Inspect
caller : func() .uverse.address Inspect
formatPct : func(bp int64) string Inspect
mustGetSplit : func(id string) *fee_split.Split Inspect
mustGetActive : func(id string) *fee_split.Split Inspect
boolStr : func(v bool) string Inspect
parseBasisPoints : func(raw string) []int64 Inspect
parseAddresses : func(raw string) [].uverse.address Inspect
validateRecipients : func(recipients [].uverse.address, shares []int64) Inspect
sortedBalanceAddrs : func(s *fee_split.Split) []string Inspect
rejectStraySend : func() Inspect
CreateSplit : func(recipientList string, shareList string) string Inspect
Deposit : func(splitID string) Inspect
Claim : func(splitID string) int64 Inspect
UpdateShares : func(splitID string, recipientList string, shareList string) Inspect
TransferOwnership : func(splitID string, newOwner .uverse.address) Inspect
Freeze : func(splitID string) Inspect
Archive : func(splitID string) Inspect
SetFee : func(bps int64) Inspect
ClaimFees : func() int64 Inspect
NominateFeeAdmin : func(nominee .uverse.address) Inspect
AcceptFeeAdmin : func() Inspect
GetFeeInfo : func() string Inspect
GetSplitInfo : func(splitID string) string Inspect
GetClaimable : func(splitID string, addr .uverse.address) int64 Inspect
Render : func(path string) string Inspect