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

bond state

Back to all declarations

DenomUgnot

untyped string

Value

"ugnot"

DefaultNormalBondUgnot

int64

// 100 GNOT

Value

100000000

DefaultPromoBondUgnot

int64

// same unless StartPromo changes it

Value

100000000

DefaultPromoDuration

int64

// 10 days (seconds)

Value

864000

StatusNormal

untyped bigint

Value

(0 <untyped> bigint)

StatusPromo

untyped bigint

Value

(1 <untyped> bigint)

inited

bool

Value

true

admin

.uverse.address

Value

<gnolang.StringValue>

normalBondUgnot

int64

Value

150000000

promoBondUgnot

int64

Value

100000000

promoEndsAt

int64

Value

0

promoEnded

bool

// admin force-end (or auto after window)

Value

true

promoStartedAt

int64

Value

0

Init

func()

Init sets admin (deploy EOA) and default bond amounts. Call once.

Open
OID
091891…51d9:10
Init details

Inspect func

Admin

func() string

Admin returns the admin (deploy) address.

Open
OID
091891…51d9:14
Admin details

Inspect func

TransferAdmin

func(newAdmin .uverse.address)

TransferAdmin rotates admin (current admin only).

Open
OID
091891…51d9:15
TransferAdmin details

Inspect func

IsPromoActive

func() bool

IsPromoActive reports whether the promo window is currently in force.

Open
OID
091891…51d9:16
IsPromoActive details

Inspect func

CurrentBondUgnot

func() int64

CurrentBondUgnot is the create bond pad must require (cross-safe read). Pad: if sent \< CurrentBondUgnot() → panic underpaid.

Open
OID
091891…51d9:17
CurrentBondUgnot details

Inspect func

NormalBondUgnot

func() int64

NormalBondUgnot returns the post-promo / default bond.

Open
OID
091891…51d9:18
NormalBondUgnot details

Inspect func

PromoBondUgnot

func() int64

PromoBondUgnot returns the promo-period bond amount (may be inactive).

Open
OID
091891…51d9:19
PromoBondUgnot details

Inspect func

PromoEndsAt

func() int64

PromoEndsAt returns unix end of promo (0 if never started).

Open
OID
091891…51d9:20
PromoEndsAt details

Inspect func

PromoSecondsLeft

func() int64

PromoSecondsLeft returns remaining promo seconds (0 if inactive).

Open
OID
091891…51d9:21
PromoSecondsLeft details

Inspect func

Status

func() int

Status: 0=normal 1=promo active.

Open
OID
091891…51d9:22
Status details

Inspect func

BondInfo

func() string

BondInfo: status|currentUgnot|normalUgnot|promoUgnot|endsAt|secondsLeft|admin

Open
OID
091891…51d9:23
BondInfo details

Inspect func

StartPromo

func(promoUgnot int64, durationSec int64)

StartPromo begins a promo window from now. promoUgnot: bond during promo (e.g. 20e6 ≈ $20 at $1/GNOT). 0 → keep current promoBondUgnot. durationSec: window length. 0 → DefaultPromoDuration (10 days).

Open
OID
091891…51d9:24
StartPromo details

Inspect func

EndPromo

func()

EndPromo forces normal bond immediately (deploy admin).

Open
OID
091891…51d9:25
EndPromo details

Inspect func

SetNormalBond

func(ugnot int64)

SetNormalBond updates the post-promo bond (default 2 GNOT).

Open
OID
091891…51d9:26
SetNormalBond details

Inspect func

SetPromoBond

func(ugnot int64)

SetPromoBond updates promo amount without restarting the clock. Use to re-target ~$20 when GNOT price moves during the window.

Open
OID
091891…51d9:27
SetPromoBond details

Inspect func

ExtendPromo

func(extraSec int64)

ExtendPromo adds seconds to the current end (or starts from now if inactive).

Open
OID
091891…51d9:28
ExtendPromo details

Inspect func
DenomUgnot : untyped string ="ugnot"
DefaultNormalBondUgnot : int64 =100000000
DefaultPromoBondUgnot : int64 =100000000
DefaultPromoDuration : int64 =864000
StatusNormal : untyped bigint =(0 <untyped> bigint)
StatusPromo : untyped bigint =(1 <untyped> bigint)
inited : bool =true
admin : .uverse.address =<gnolang.StringValue>
normalBondUgnot : int64 =150000000
promoBondUgnot : int64 =100000000
promoEndsAt : int64 =0
promoEnded : bool =true
promoStartedAt : int64 =0
Init : func() Inspect
requireInit : func() Inspect
requireAdmin : func() Inspect
Admin : func() string Inspect
TransferAdmin : func(newAdmin .uverse.address) Inspect
IsPromoActive : func() bool Inspect
CurrentBondUgnot : func() int64 Inspect
NormalBondUgnot : func() int64 Inspect
PromoBondUgnot : func() int64 Inspect
PromoEndsAt : func() int64 Inspect
PromoSecondsLeft : func() int64 Inspect
Status : func() int Inspect
BondInfo : func() string Inspect
StartPromo : func(promoUgnot int64, durationSec int64) Inspect
EndPromo : func() Inspect
SetNormalBond : func(ugnot int64) Inspect
SetPromoBond : func(ugnot int64) Inspect
ExtendPromo : func(extraSec int64) Inspect
Render : func(path string) string Inspect