rate limit exceeded — the render query is served by the Gnoland archive RPC.
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.
"gno.land/r/gnoswap/access/v1"
9
10 gnsmath "gno.land/p/gnoswap/gnsmath/v1"
11"gno.land/p/gnoswap/utils/v1"
12
13"gno.land/r/gnoswap/emission"
14
15"gno.land/r/gnoswap/gov/governance"
16)
17
18// Vote casts a vote on a proposal.
19//
20// Records an on-chain vote with weight based on delegated xGNS.
21// Uses the proposal's timestamp anchors and configured smoothing duration to
22// prevent manipulation. Votes are final and cannot be changed.
23//
24// Parameters:
25// - _: leading realm-call discriminator; callers pass 0 while threading the realm context
26// - rlm: current realm context; implementation validates it before reading or writing governance state
27// - proposalID: ID of the proposal to vote on
28// - yes: true for yes vote, false for no vote
29//
30// Vote Weight Calculation:
31// - Based on the voter's delegated xGNS amount
32// - Averages delegation at the stored smoothing timestamp and proposal creation time
33// - Uses Unix timestamp history, not a block-height snapshot
34// - Includes self-delegation and delegations received by the voter
35//
36// Requirements:
37// - Proposal must be in voting period
38// - Voter must have xGNS delegated at one of the lookup timestamps
39// - Cannot vote twice on same proposal
40// - Voting period is 7 days by default and is configurable
41//
42// Returns:
43// - voteWeight: voting weight applied to the caller's vote, formatted as a string