Skip to content

Polls

The PollSDK and PollFactorySDK manage on-chain community polls. Unlike DAO proposals (which execute on-chain actions), polls are for community sentiment and signaling.

import { PollSDK, PollFactorySDK } from '@akta/sdk/poll'
const pollFactory = new PollFactorySDK({ algorand })
// Interact with an existing poll
const poll = new PollSDK({
algorand,
factoryParams: { appId: pollAppId },
})
const poll = await pollFactory.new({
type: PollTypeEnum.SingleChoice,
question: 'What feature should we build next?',
options: ['Staking V2', 'NFT Marketplace', 'Social Platform'],
maxSelected: 1n,
endTime: BigInt(Math.floor(Date.now() / 1000) + 604800), // 7 days
gateId: 0n, // No gate
})
  • Factory pattern — Create polls on demand
  • Multiple options — Configure any number of voting options
  • Time-limited — Polls have configurable duration
  • Gate integration — Polls can be gated (e.g., only stakers can vote)
  • Poll Gate — A subgate that checks poll voting status

Poll voting through a wallet uses the PollPlugin. See Wallet Plugins.