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

wrapped state

Back to all declarations

balances

v0.Tree

balances maps owner address (string) -> wrapped balance (uint64).

Open
OID
0f70f5…cbe3:4
balances details

Inspect ref

totalSupply

uint64

balances maps owner address (string) -> wrapped balance (uint64).

Value

0

Deposit

func(amount uint64)

Deposit wraps \`amount\` units of the (notional) native coin, crediting the caller's wrapped balance and the global totalSupply. Accounting only: no real coin ever moves — it models locking native funds to mint the wrapped token.

Open
OID
0f70f5…cbe3:6
Deposit details

Inspect func

Withdraw

func(amount uint64)

Withdraw unwraps \`amount\` units, burning them from the caller's balance and from totalSupply. Panics if the caller lacks the balance.

Open
OID
0f70f5…cbe3:8
Withdraw details

Inspect func

Transfer

func(to .uverse.address, amount uint64)

Transfer moves \`amount\` wrapped units from the caller to \`to\`.

Open
OID
0f70f5…cbe3:9
Transfer details

Inspect func

balanceOf

func(owner .uverse.address) uint64

balanceOf returns the wrapped balance of \`owner\` (read-only, not crossing).

Open
OID
0f70f5…cbe3:10
balanceOf details

Inspect func

BalanceOf

func(owner .uverse.address) uint64

BalanceOf is the exported read-only accessor for a single owner.

Open
OID
0f70f5…cbe3:11
BalanceOf details

Inspect func

TotalSupply

func() uint64

TotalSupply returns the total amount of wrapped units in existence.

Open
OID
0f70f5…cbe3:12
TotalSupply details

Inspect func

setBalance

func(owner .uverse.address, amount uint64)
Open
OID
0f70f5…cbe3:13
setBalance details

Inspect func

canDebit

func(bal uint64, amount uint64) bool

canDebit reports whether \`bal\` can cover \`amount\` for a burn/transfer.

Open
OID
0f70f5…cbe3:14
canDebit details

Inspect func

formatUnits

func(n uint64) string

formatUnits renders a raw uint64 amount as a decimal string.

Open
OID
0f70f5…cbe3:15
formatUnits details

Inspect func

Render

func(path string) string

Render shows the total supply and a table of non-zero balances.

Open
OID
0f70f5…cbe3:16
Render details

Inspect func
balances : v0.Tree Inspect
totalSupply : uint64 =0
Deposit : func(amount uint64) Inspect
Withdraw : func(amount uint64) Inspect
Transfer : func(to .uverse.address, amount uint64) Inspect
balanceOf : func(owner .uverse.address) uint64 Inspect
BalanceOf : func(owner .uverse.address) uint64 Inspect
TotalSupply : func() uint64 Inspect
setBalance : func(owner .uverse.address, amount uint64) Inspect
canDebit : func(bal uint64, amount uint64) bool Inspect
formatUnits : func(n uint64) string Inspect
Render : func(path string) string Inspect