api.derive.democracy.referendumVotes is not a function
See original GitHub issueHello,
I face a problem with fetching votes for selected referendum from api.
According to implementation I need to just call api.derive.democracy.referendumVotes(index)
unfortunately this method doesn’t work on api@1.8.1
If I want to use old approach with api.derive.democracy.referendumVotesFor(index)
I got another error:
DRR: TypeError: "api.query.democracy.votersFor is not a function"
Used chain: Kusama CC3
Thanks 🚀
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Initiative and Referendum Overview and Resources
Citizen Initiative Overview ... In political terminology, the initiative is a process that enables citizens to bypass their state legislature by ...
Read more >Arizona Proposition 132, 60% Vote Requirement for Ballot ...
The measure was approved. A "yes" vote supported this constitutional amendment to require a 60% vote for voters to pass ballot measures to...
Read more >Disinformation and propaganda – impact on the functioning of ...
This study, commissioned by the European Parliament's Policy Department for Citizens'. Rights and Constitutional Affairs and requested by ...
Read more >Code of Good Practice on Referendums - Venice Commission
In response to a request from the Parliamentary Assembly, the Council for Democratic. Elections and subsequently the Venice Commission adopted ...
Read more >Voter turnout - Wikipedia
In political science, voter turnout is the participation rate of a given election. This can be the percentage of registered voters, eligible voters, ......
Read more >
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Make the queries directly via
api.query.*
as per the chain you are connecting to. Each chain exposes the info and exposes queries via metadata, albeit in different places, there is no real magic behind derives.All derives do is to grab info from multiple sources, supporting all available query types and construct it into a usable format - these undocumented for a reason, since they can change at will, and certainly after massive breaking democracy changes, they are changing very rapidly for the sake of efficiency.
If you want to use the derives for this, you are better suited with the 1.9-beta versions which has full support for the new democracy in all derives.
And yes, as expected with the upgraded democarcy, the old endpoints are not decorated - https://polkadot.js.org/api/start/basics.html#metadata
The API can only make available what is exposed by metadata, after 1055 on Kusama those old query endpoints don’t exist.