Search Apps Documentation Source Content File Folder Download Copy Actions Download

events package

Overview

Package events allows you to upload data about specific IRL/online events It includes dynamic support for updating rendering events based on their status, ie if they are upcoming, in progress, or in the past.

Functions

AddEvent

func AddEvent(_ realm, name, description, link, location, startTime, endTime string) (string, error)
Execute

AddEvent adds auth new event Start time & end time need to be specified in RFC3339, ie 2024-08-08T12:00:00+02:00

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/devrels/events" -func "AddEvent" -args "" -args "" -args "" -args "" -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "http://gno-rpc:26657" ADDRESSgnokey query -remote "http://gno-rpc:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/devrels/events" -func "AddEvent" -args "" -args "" -args "" -args "" -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "http://gno-rpc:26657" call.tx

DeleteEvent

func DeleteEvent(_ realm, id string)
Execute

DeleteEvent deletes an event with auth given ID

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/devrels/events" -func "DeleteEvent" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "http://gno-rpc:26657" ADDRESSgnokey query -remote "http://gno-rpc:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/devrels/events" -func "DeleteEvent" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "http://gno-rpc:26657" call.tx

EditEvent

func EditEvent(_ realm, id string, name, description, link, location, startTime, endTime string)
Execute

EditEvent edits an event with auth given ID It only updates values corresponding to non-empty arguments sent with the call Note: if you need to update the start time or end time, you need to provide both every time

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/devrels/events" -func "EditEvent" -args "" -args "" -args "" -args "" -args "" -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "http://gno-rpc:26657" ADDRESSgnokey query -remote "http://gno-rpc:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/devrels/events" -func "EditEvent" -args "" -args "" -args "" -args "" -args "" -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "http://gno-rpc:26657" call.tx

Render

func Render(path string) string
Execute

Render is the main rendering entry point

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/devrels/events" -func "Render" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "http://gno-rpc:26657" ADDRESSgnokey query -remote "http://gno-rpc:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/devrels/events" -func "Render" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "http://gno-rpc:26657" call.tx

RenderEventWidget

func RenderEventWidget(eventsToRender int) (string, error)
Execute

RenderEventWidget shows up to eventsToRender of the latest events to a caller

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/devrels/events" -func "RenderEventWidget" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "http://gno-rpc:26657" ADDRESSgnokey query -remote "http://gno-rpc:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/devrels/events" -func "RenderEventWidget" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "http://gno-rpc:26657" call.tx

GetEventByID

func GetEventByID(id string) (*Event, int, error)
Execute

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/devrels/events" -func "GetEventByID" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "http://gno-rpc:26657" ADDRESSgnokey query -remote "http://gno-rpc:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/devrels/events" -func "GetEventByID" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "http://gno-rpc:26657" call.tx