We want to be able to create these polls in the activity section of discussions
On the technical side:
Creating
To create a discussion we will follow a similar structure to linking discussions and proposals from the orbis side, extending the discussion's context and storing data in data as json with all options and time
Importantly we will also store the current snapshot ID of the DAO on orbis
Voting
To count votes we will reuse use a context from the parent poll's ID
Votes will only store the time and the user's choice
Then on the frontend we will fetch the user's voting power as specified by the parent poll's data
We will also check the vote was made before the poll ended
This means technically there is no state changes in the poll or final state, instead its all interpreted on the client side
Fetching
Pull all polls related to current discussion
For each poll, query for votes using context
Validate and aggregate all votes with the voting power as of the polls snapshotId
User Story As a user making a discussion I want to be able to temp check voters with an off chain poll before going on chain.
Idea is very similar to twitter polls https://twitter.com/RossNeilson_dev/status/1634085229244846081
We want to be able to create these polls in the activity section of discussions
On the technical side:
Creating
data
as json with all options and timeVoting
Fetching