PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/moul/x/daily/qvote/v0

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
v0
Namespace
moul / x / daily / qvote
Files
3 (README)(gnomod.toml)
Exported functions
4
Module
gno.land/r/moul/x/daily/qvote/v0
gno
0.9

Files (3)

  • README.mdmarkdown
  • gnomod.tomltoml
  • qvote.gnogno

Select a file to view its exact on-chain source. Sorted README → gnomod → sources → tests.

Functions

  • ClosePoll(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, pollID string) string

  • CreatePoll(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, question string, optionsCSV string) string

  • Render(path string) string

  • Vote(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, pollID string, optionIdx int, delta int64) string

Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

Rendered

RenderedRawgnoweb ↗
# Quadratic Voting

Create a poll, then spend voice credits on the options you care about -- the Nth vote you stack on one option costs N^2 credits out of a fixed budget of 100 per poll, so spreading support across options is cheap but dominating one gets steep fast.

## Polls

_no polls yet -- call `CreatePoll(question, "opt1,opt2,...")` to start one._

## How to use

1. `CreatePoll("Best pizza topping?", "pineapple,mushroom,pepperoni")` -- returns a poll ID.
2. `Vote(pollID, optionIdx, delta)` -- e.g. `Vote("1", 0, 3)` buys 3 votes on option 0 (costs 9 credits); a negative delta sells votes back for a refund.
3. `ClosePoll(pollID)` -- the creator ends voting.

View a poll at this realm's path plus its ID (e.g. `.../qvote:1`), or one voter's standing in it with `.../qvote:1/g1youraddress...`.

vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.