prediction-market-agent-tooling 0.48.9__py3-none-any.whl → 0.48.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- prediction_market_agent_tooling/markets/omen/omen_subgraph_handler.py +46 -8
- {prediction_market_agent_tooling-0.48.9.dist-info → prediction_market_agent_tooling-0.48.10.dist-info}/METADATA +1 -1
- {prediction_market_agent_tooling-0.48.9.dist-info → prediction_market_agent_tooling-0.48.10.dist-info}/RECORD +6 -6
- {prediction_market_agent_tooling-0.48.9.dist-info → prediction_market_agent_tooling-0.48.10.dist-info}/LICENSE +0 -0
- {prediction_market_agent_tooling-0.48.9.dist-info → prediction_market_agent_tooling-0.48.10.dist-info}/WHEEL +0 -0
- {prediction_market_agent_tooling-0.48.9.dist-info → prediction_market_agent_tooling-0.48.10.dist-info}/entry_points.txt +0 -0
@@ -608,21 +608,25 @@ class OmenSubgraphHandler(metaclass=SingletonMeta):
|
|
608
608
|
)
|
609
609
|
return [b for b in bets if b.fpmm.is_resolved_with_valid_answer]
|
610
610
|
|
611
|
-
|
612
|
-
|
611
|
+
@staticmethod
|
612
|
+
def get_reality_question_filters(
|
613
613
|
user: HexAddress | None = None,
|
614
614
|
claimed: bool | None = None,
|
615
615
|
current_answer_before: datetime | None = None,
|
616
616
|
finalized_before: datetime | None = None,
|
617
617
|
finalized_after: datetime | None = None,
|
618
618
|
id_in: list[str] | None = None,
|
619
|
+
question_id: HexBytes | None = None,
|
619
620
|
question_id_in: list[HexBytes] | None = None,
|
620
|
-
) ->
|
621
|
+
) -> dict[str, t.Any]:
|
621
622
|
where_stms: dict[str, t.Any] = {}
|
622
623
|
|
623
624
|
if user is not None:
|
624
625
|
where_stms["user"] = user.lower()
|
625
626
|
|
627
|
+
if question_id is not None:
|
628
|
+
where_stms["questionId"] = question_id.hex()
|
629
|
+
|
626
630
|
if claimed is not None:
|
627
631
|
if claimed:
|
628
632
|
where_stms["historyHash"] = ZERO_BYTES.hex()
|
@@ -650,6 +654,27 @@ class OmenSubgraphHandler(metaclass=SingletonMeta):
|
|
650
654
|
if question_id_in is not None:
|
651
655
|
where_stms["questionId_in"] = [x.hex() for x in question_id_in]
|
652
656
|
|
657
|
+
return where_stms
|
658
|
+
|
659
|
+
def get_questions(
|
660
|
+
self,
|
661
|
+
user: HexAddress | None = None,
|
662
|
+
claimed: bool | None = None,
|
663
|
+
current_answer_before: datetime | None = None,
|
664
|
+
finalized_before: datetime | None = None,
|
665
|
+
finalized_after: datetime | None = None,
|
666
|
+
id_in: list[str] | None = None,
|
667
|
+
question_id_in: list[HexBytes] | None = None,
|
668
|
+
) -> list[RealityQuestion]:
|
669
|
+
where_stms: dict[str, t.Any] = self.get_reality_question_filters(
|
670
|
+
user=user,
|
671
|
+
claimed=claimed,
|
672
|
+
finalized_before=finalized_before,
|
673
|
+
finalized_after=finalized_after,
|
674
|
+
current_answer_before=current_answer_before,
|
675
|
+
id_in=id_in,
|
676
|
+
question_id_in=question_id_in,
|
677
|
+
)
|
653
678
|
questions = self.realityeth_subgraph.Query.questions(where=where_stms)
|
654
679
|
fields = self._get_fields_for_reality_questions(questions)
|
655
680
|
result = self.sg.query_json(fields)
|
@@ -669,11 +694,24 @@ class OmenSubgraphHandler(metaclass=SingletonMeta):
|
|
669
694
|
items = self._parse_items_from_json(result)
|
670
695
|
return [RealityAnswer.model_validate(i) for i in items]
|
671
696
|
|
672
|
-
def get_responses(
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
697
|
+
def get_responses(
|
698
|
+
self,
|
699
|
+
user: HexAddress | None = None,
|
700
|
+
question_id: HexBytes | None = None,
|
701
|
+
question_claimed: bool | None = None,
|
702
|
+
question_finalized_before: datetime | None = None,
|
703
|
+
) -> list[RealityResponse]:
|
704
|
+
where_stms: dict[str, t.Any] = {}
|
705
|
+
|
706
|
+
if user is not None:
|
707
|
+
where_stms["user"] = user.lower()
|
708
|
+
|
709
|
+
where_stms["question_"] = self.get_reality_question_filters(
|
710
|
+
question_id=question_id,
|
711
|
+
claimed=question_claimed,
|
712
|
+
finalized_before=question_finalized_before,
|
713
|
+
)
|
714
|
+
|
677
715
|
responses = self.realityeth_subgraph.Query.responses(where=where_stms)
|
678
716
|
fields = self._get_fields_for_responses(responses)
|
679
717
|
result = self.sg.query_json(fields)
|
@@ -41,7 +41,7 @@ prediction_market_agent_tooling/markets/omen/data_models.py,sha256=7KXT8a_WYyXMF
|
|
41
41
|
prediction_market_agent_tooling/markets/omen/omen.py,sha256=0odOGRtuDjB12sXnRglUyW8IdOsuha7X6ALc2OryF3c,40156
|
42
42
|
prediction_market_agent_tooling/markets/omen/omen_contracts.py,sha256=MfaWfDDfEzHYVAbeT3Dgtl8KG7XsqEpdY3m3-rsOPwo,23588
|
43
43
|
prediction_market_agent_tooling/markets/omen/omen_resolving.py,sha256=Awaw1r32IBAClCktrXbYJ24RNyLDWcLb8RqAx6FGSkI,9529
|
44
|
-
prediction_market_agent_tooling/markets/omen/omen_subgraph_handler.py,sha256=
|
44
|
+
prediction_market_agent_tooling/markets/omen/omen_subgraph_handler.py,sha256=Zxxu3HKg8e-uUNywJSaXUjkzHHrZxq3WC0x6pILAavA,29742
|
45
45
|
prediction_market_agent_tooling/markets/polymarket/api.py,sha256=HXmA1akA0qDj0m3e-GEvWG8x75pm6BX4H7YJPQcST7I,4767
|
46
46
|
prediction_market_agent_tooling/markets/polymarket/data_models.py,sha256=9CJzakyEcsn6DQBK2nOXjOMzTZBLAmK_KqevXvW17DI,4292
|
47
47
|
prediction_market_agent_tooling/markets/polymarket/data_models_web.py,sha256=IPsFT3FX9Ge5l5zR1nBd2w-sd5ue7oR8PJSW710vFWY,12479
|
@@ -78,8 +78,8 @@ prediction_market_agent_tooling/tools/tavily_storage/tavily_models.py,sha256=dr-
|
|
78
78
|
prediction_market_agent_tooling/tools/tavily_storage/tavily_storage.py,sha256=eln3BygdfsDf8WOlSQPL7qH946QnGnThRkazRZKBA8o,3194
|
79
79
|
prediction_market_agent_tooling/tools/utils.py,sha256=JE9YWtPPhnTgLiOyGAZDNG5K8nCwUY9IZEuAlm9UcxA,6611
|
80
80
|
prediction_market_agent_tooling/tools/web3_utils.py,sha256=euq_MH-LhTowACq42colks2IXxZQjqjuisYl91EYZtU,10440
|
81
|
-
prediction_market_agent_tooling-0.48.
|
82
|
-
prediction_market_agent_tooling-0.48.
|
83
|
-
prediction_market_agent_tooling-0.48.
|
84
|
-
prediction_market_agent_tooling-0.48.
|
85
|
-
prediction_market_agent_tooling-0.48.
|
81
|
+
prediction_market_agent_tooling-0.48.10.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
|
82
|
+
prediction_market_agent_tooling-0.48.10.dist-info/METADATA,sha256=KCZBnatFqFzYv_MNiRcnAomqicUKMhxjlEaf5gCdKjc,7811
|
83
|
+
prediction_market_agent_tooling-0.48.10.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
84
|
+
prediction_market_agent_tooling-0.48.10.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
|
85
|
+
prediction_market_agent_tooling-0.48.10.dist-info/RECORD,,
|
File without changes
|
File without changes
|