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

tipjar/v0 package

Overview

Package tipjar is a public tip jar. Anyone can send real ugnot with an optional message via Tip; the realm keeps a running leaderboard of the most generous tippers and a feed of the most recent tips, both shown in Render. Only the deployer (captured as owner at init time) can Withdraw the accumulated balance. State-mutating functions are crossing functions (`cur realm`) per the gno 0.9 interrealm convention.

Function

Tip

func Tip(cur realm, message string) string

Tip credits the caller's OriginSend ugnot to the jar and records it against their running total. Only an EOA calling directly via MsgCall may tip — see the payment-guard note on IsUserCall vs IsUser.

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/moul/x/daily/tipjar/v0" -func "Tip" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/x/daily/tipjar/v0" -func "Tip" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx