Colm3na / polkastats-backend-v3

polkastats.io backend repository
Apache License 2.0
17 stars 15 forks source link

Add governance proposals and referendums #157

Open mariopino opened 4 years ago

mariopino commented 4 years ago

Is your feature request related to a problem? Please describe.

Fetch and store governance proposals and referendums.

Additional context

Proposals:

const proposals = await api.derive.democracy.proposals();

proposals.forEach(proposal => {
  console.log(JSON.stringify(proposal, null, 2));
  console.log(JSON.stringify(proposal.image.proposal.toHuman()));
})