Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index democracy proposals #205

Open
stephanie-olp opened this issue Mar 25, 2022 · 4 comments
Open

Index democracy proposals #205

stephanie-olp opened this issue Mar 25, 2022 · 4 comments
Assignees
Labels

Comments

@stephanie-olp
Copy link

Right now we only have the ongoing democracy proposals.
We would like to have all proposals, the ongoing, the one that passed but also the one that got canceled

@silva-fj silva-fj changed the title Index past democracy proposals Index democracy proposals May 6, 2022
@silva-fj
Copy link
Contributor

silva-fj commented May 6, 2022

We have some data available (here) with the following query:

query DemocracyProposalsQuery {
  substrateDemocracyProposals(limit: 10, where: {network_eq: polkadot}) {
    id
    rootAccount
    proposalIndex
    date
    blockNumber
    amount
    account {
      id
    }
  }
}

Notes on the things we can improve and missing data:

  • It is a bit hard to understand what some fields represent without looking into the code, for example rootAccount (which is the address hex string of the extrinsic's signer) and account with an Id which is the public address of the extrinsic's signer). In the context of a proposal this is the proposer.
  • We can rename amount with lockedAmount or deposit to make it a bit more explicit.
  • We can also add some more info like the MetaCall info (method, section, meta and args) which helps to add more context
  • We could also add at least a count of accounts that have Endorsed/seconded the proposal.
  • We can also add a status field (for example when the proposal moves to Referendum, was rejected, etc), we should also keep record of the dates the status was changed

@silva-fj
Copy link
Contributor

silva-fj commented May 6, 2022

@geastwood FYI

@stephanie-olp
Copy link
Author

stephanie-olp commented Jun 1, 2022

Data that need to be indexed (can change) :

  • Proposal ID
  • Title of the proposal (if there is one)
  • Type of action (module)
  • Proposal Description (if there is one)
  • Proposal hash
  • Date of creation
  • Date of the last update
  • Proposal author
  • Proposal status
  • Deposit
  • Number of people who endorsed that proposal and who they are
  • Link to Polkassembly discussion

@stephanie-olp
Copy link
Author

stephanie-olp commented Jun 8, 2022

@markdavison markdavison self-assigned this Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants