Open a poll
Count one vote per person, with a relay budget so voters’ wallets never appear.
A poll counts one vote per enrolled person among the options you give it. Each vote is a claim, relayed so the voter's wallet appears nowhere, and you pay for that relaying up front with a relay budget. You see each option's tally and a ledger of scope nullifiers, with nothing that ties a vote to a person.
Before you start
- A wallet holding the relay budget in SOL, plus SOL for the fee and the scope account's rent.
- The terms: a title, 2 to 8 options of up to 32 bytes each, the cap, and when it opens and closes.
The relay budget is the relay fee per vote times the cap. Polls carry no protocol fee.
Open it in the app
Fill in the terms
Open
/app/createwith your wallet connected and choose Poll. Enter the Title and the Options, then the Cap, Opens in (hours from now) and Open for (days). Choose Review.Review
The review shows the window, the options and, under From your wallet, the Relay budget. Nothing has been signed yet; Edit goes back.
Sign and open
Choose Sign and open and approve in your wallet. The program creates the scope and moves the relay budget into it.
Share it
The app shows It's open with the scope's number and a link to share. The scope's page shows the tally as votes land.
Open it from the CLI
$ once scope create --kind poll --title "Which grants open next" --option Tooling --option Research --option Education --cap 500 --duration 604800 --key creator.jsonOpen it from code
The same calls as a drop, with the poll's terms:
const terms = {
kind: 'poll',
wallet: creator.publicKey.toBase58(),
title: 'Which grants open next',
options: ['Tooling', 'Research', 'Education'],
cap: 500,
opensAt: new Date().toISOString(),
closesAt: new Date(Date.now() + 7 * day).toISOString(),
} as constreviewScope returns the relayBudget it will take; buildScope returns the transactions to sign.
Read the tally
$ once scope show <id>Each option comes back with its index, label and tally. A program can read the same tally from the scope account once the poll has closed: Check a claim from another program shows it.
Close it
After the window ends, anyone can close the poll; on its page in the app, Close and settle does it, or once scope close <id> --key <keypair file>, which signs the closing transaction. close_scope returns whatever is left of the relay budget to your wallet and marks the poll closed. The tally stays on the scope account.