Closed gabrielfior closed 3 weeks ago
The changes introduce several new classes and modify existing ones to enhance the handling of subgraph queries in the prediction market tooling. A new BaseSubgraphHandler
class implements a Singleton pattern and includes retry logic for querying subgraphs. The OmenSubgraphHandler
class is refactored to inherit from this new base class, simplifying its structure and removing retry logic. Additionally, three new Pydantic data model classes are created for handling market data, and a new SeerSubgraphHandler
class is introduced for managing Seer subgraphs. A corresponding test suite is added to validate the functionality of the SeerSubgraphHandler
.
File | Change Summary |
---|---|
prediction_market_agent_tooling/markets/base_subgraph_handler.py |
Added BaseSubgraphHandler class with retry logic for query_json and load_subgraph methods, and methods for parsing items and executing queries. |
prediction_market_agent_tooling/markets/omen/omen_subgraph_handler.py |
Updated OmenSubgraphHandler to inherit from BaseSubgraphHandler , removed singleton pattern, and modified error handling and query execution methods. |
prediction_market_agent_tooling/markets/seer/data_models.py |
Introduced SeerMarket , SeerToken , and SeerPool classes using Pydantic for data validation and serialization. |
prediction_market_agent_tooling/markets/seer/seer_subgraph_handler.py |
Added SeerSubgraphHandler class for managing Seer subgraphs, including methods for querying market and pool data. |
tests_integration/markets/seer/test_seer_subgraph_handler.py |
Introduced a test suite for SeerSubgraphHandler , covering functionalities like retrieving markets and pools, with assertions for expected behaviors. |
OmenSubgraphHandler
regarding the addition of the creator_in
parameter for filtering markets are related to the main PR's focus on enhancing subgraph query handling, as both involve modifications to the same class and improve functionality for market queries.omen_subgraph_handler.py
related to the get_responses
method and its parameters are relevant since they also involve changes to how subgraph queries are executed, similar to the enhancements made in the main PR.max_price_impact
parameter in the KellyBettingStrategy
is related as it involves adjustments to market strategies, which may interact with the querying and data handling improvements made in the main PR.DeployablePredictionAgent
, may relate to the overall enhancements in handling predictions and market interactions, which aligns with the objectives of the main PR.Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
-> Created SeerSubgraphHandler with methods for fetching markets and fetching associated pools (will be needed for later placement of bets) -> Wrote tests