and filter the data based on the governingTokenMint.
You can run this code in replit to see it in action.
Fetch Active Proposals
Get all proposals sorted by voting time
Each proposal has a votingAt timestamp, which tells you when voting started for that proposal. While fetching proposals, we can order them by votingAt to see new proposals first.
Each proposals goes though different states which you can read more about . We are interested in active proposals, which means we need all proposals where state equals to 2. We will modify the above example to account for it.