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 package

Overview

Package bond is the create-bond policy for gnomemepad — separate from pad so promo schedules can change without redeploying the pad realm.

Pad calls CurrentBondUgnot() at Create time. This package owns:

  • normal bond (default 2 GNOT)
  • promo bond (default ~$20 in ugnot at a fixed GNOT rate, admin-adjustable)
  • 10-day window OR admin EndPromo → back to normal

USD is not on-chain: promo amount is ugnot. Admin sets PromoBondUgnot to approximate $20 (e.g. at $1/GNOT → 20e6 ugnot; at $0.5/GNOT → 40e6).

Functions

Admin

func Admin() string

Admin returns the admin (deploy) address.

Command

gnokey query vm/qeval -remote "https://rpc.sapphire.testnets.gno.land" -data "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond.Admin()"

Result

BondInfo

func BondInfo() string

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

Command

gnokey query vm/qeval -remote "https://rpc.sapphire.testnets.gno.land" -data "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond.BondInfo()"

Result

CurrentBondUgnot

func CurrentBondUgnot() int64

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

Command

gnokey query vm/qeval -remote "https://rpc.sapphire.testnets.gno.land" -data "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond.CurrentBondUgnot()"

Result

EndPromo

func EndPromo(cur realm)

EndPromo forces normal bond immediately (deploy admin).

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond" -func "EndPromo" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "sapphire-1" -remote "https://rpc.sapphire.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.sapphire.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond" -func "EndPromo" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "sapphire-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.sapphire.testnets.gno.land" call.tx
  

ExtendPromo

func ExtendPromo(cur realm, extraSec int64)

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

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond" -func "ExtendPromo" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "sapphire-1" -remote "https://rpc.sapphire.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.sapphire.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond" -func "ExtendPromo" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "sapphire-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.sapphire.testnets.gno.land" call.tx
  

Init

func Init(cur realm)

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

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond" -func "Init" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "sapphire-1" -remote "https://rpc.sapphire.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.sapphire.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond" -func "Init" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "sapphire-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.sapphire.testnets.gno.land" call.tx
  

IsPromoActive

func IsPromoActive() bool

IsPromoActive reports whether the promo window is currently in force.

Command

gnokey query vm/qeval -remote "https://rpc.sapphire.testnets.gno.land" -data "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond.IsPromoActive()"

Result

NormalBondUgnot

func NormalBondUgnot() int64

NormalBondUgnot returns the post-promo / default bond.

Command

gnokey query vm/qeval -remote "https://rpc.sapphire.testnets.gno.land" -data "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond.NormalBondUgnot()"

Result

PromoBondUgnot

func PromoBondUgnot() int64

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

Command

gnokey query vm/qeval -remote "https://rpc.sapphire.testnets.gno.land" -data "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond.PromoBondUgnot()"

Result

PromoEndsAt

func PromoEndsAt() int64

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

Command

gnokey query vm/qeval -remote "https://rpc.sapphire.testnets.gno.land" -data "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond.PromoEndsAt()"

Result

PromoSecondsLeft

func PromoSecondsLeft() int64

PromoSecondsLeft returns remaining promo seconds (0 if inactive).

Command

gnokey query vm/qeval -remote "https://rpc.sapphire.testnets.gno.land" -data "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond.PromoSecondsLeft()"

Result

Render

func Render(path string) string

Param

Command

gnokey query vm/qeval -remote "https://rpc.sapphire.testnets.gno.land" -data "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond.Render()"

Result

SetNormalBond

func SetNormalBond(cur realm, ugnot int64)

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

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond" -func "SetNormalBond" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "sapphire-1" -remote "https://rpc.sapphire.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.sapphire.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond" -func "SetNormalBond" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "sapphire-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.sapphire.testnets.gno.land" call.tx
  

SetPromoBond

func SetPromoBond(cur realm, ugnot int64)

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

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond" -func "SetPromoBond" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "sapphire-1" -remote "https://rpc.sapphire.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.sapphire.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond" -func "SetPromoBond" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "sapphire-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.sapphire.testnets.gno.land" call.tx
  

StartPromo

func StartPromo(cur realm, promoUgnot, 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).

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond" -func "StartPromo" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "sapphire-1" -remote "https://rpc.sapphire.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.sapphire.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond" -func "StartPromo" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "sapphire-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.sapphire.testnets.gno.land" call.tx
  

Status

func Status() int

Status: 0=normal 1=promo active.

Command

gnokey query vm/qeval -remote "https://rpc.sapphire.testnets.gno.land" -data "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond.Status()"

Result

TransferAdmin

func TransferAdmin(cur realm, newAdmin address)

TransferAdmin rotates admin (current admin only).

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond" -func "TransferAdmin" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "sapphire-1" -remote "https://rpc.sapphire.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.sapphire.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1mv0052e7r6s09f5t9xsqf00nj3tqsgt9dg52jr/gnomemepad/bond" -func "TransferAdmin" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "sapphire-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.sapphire.testnets.gno.land" call.tx