Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

contest package

Overview

Package contest is a Remix Lab "demo-contest" app generated from a project configuration. Entrants submit through a fixed form, reviewers admit up to 10 entries, and members vote for a winner.

The contest runs once: opening the vote closes submissions and review, freezes the admitted entries as the ballot's options and captures the current members as the electorate. Every submission is public chain data, including entries that are later rejected.

Authority model: every write derives the actor from cur.Previous(), the immediate caller. An intermediary realm calling on a user's behalf acts as itself and gains none of that user's roles. Block state lives in unexported variables and only inert views leave the realm.

Function

Submit

func Submit(cur realm, title string, link string, team string) uint64
Ask AI Claude ChatGPT

Submit stores a contest entry for review and returns its ID. Every answer is public. Leave optional fields empty.

  • title: required text, at most 80 bytes
  • link: required text, at most 200 bytes
  • team: optional text, at most 120 bytes

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/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/remixlab/contest" -func "Submit" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/remixlab/contest" -func "Submit" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx