Index the Proposals and RFPs
Closed this issue · 0 comments
Tguntenaar commented
Description:
We need to implement an indexer for the proposals and RFPs in the system to improve query efficiency and enable fast data retrieval. This will help streamline the front-end functionality that relies on this data and ensure that the new indexer integrates seamlessly with the rest of the system.
To track what we've already indexed, we will store the latest block that has been indexed. Using the NEARBlocks API, we will query for transactions made since that block across our four contracts. By leveraging the NEARBlocks API, we will avoid the need to modify our contracts to maintain a changelog on-chain.
Tasks:
- Implement the indexer to handle proposals and RFPs.
- Store the latest indexed block to track progress.
- Query the NEARBlocks API for transactions made since the latest indexed block on our four contracts.
- Ensure the indexer is optimized for quick and efficient querying.
- Integrate the indexer with the back-end API.
- Test the indexer to ensure it returns accurate and up-to-date data.
- Update relevant API endpoints to use the indexed data instead of direct blockchain queries.
Acceptance Criteria:
- The indexer must return data for proposals and RFPs with low latency.
- The latest indexed block must be stored and used to track future transactions.
- The API must integrate with the indexer to fetch proposals and RFP data efficiently.
- The NEARBlocks API must be used to track transactions since the latest indexed block for our four contracts.
- The implementation should not cause any regressions in the existing proposal and RFP features.
- Tests must verify the correctness of the indexed data.
Dependencies:
- NEARBlocks API integration.