prediction-market-agent-tooling 0.69.3__py3-none-any.whl → 0.69.4.dev1071__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/data_models.py +11 -0
- {prediction_market_agent_tooling-0.69.3.dist-info → prediction_market_agent_tooling-0.69.4.dev1071.dist-info}/METADATA +1 -1
- {prediction_market_agent_tooling-0.69.3.dist-info → prediction_market_agent_tooling-0.69.4.dev1071.dist-info}/RECORD +6 -6
- {prediction_market_agent_tooling-0.69.3.dist-info → prediction_market_agent_tooling-0.69.4.dev1071.dist-info}/LICENSE +0 -0
- {prediction_market_agent_tooling-0.69.3.dist-info → prediction_market_agent_tooling-0.69.4.dev1071.dist-info}/WHEEL +0 -0
- {prediction_market_agent_tooling-0.69.3.dist-info → prediction_market_agent_tooling-0.69.4.dev1071.dist-info}/entry_points.txt +0 -0
@@ -1,4 +1,5 @@
|
|
1
1
|
import typing as t
|
2
|
+
from datetime import timedelta
|
2
3
|
|
3
4
|
from pydantic import BaseModel, ConfigDict, Field, computed_field, model_validator
|
4
5
|
from web3 import Web3
|
@@ -86,6 +87,7 @@ class Question(BaseModel):
|
|
86
87
|
templateId: int
|
87
88
|
outcomes: t.Sequence[OutcomeStr]
|
88
89
|
isPendingArbitration: bool
|
90
|
+
timeout: int # Finalization time in seconds
|
89
91
|
openingTimestamp: int
|
90
92
|
answerFinalizedTimestamp: t.Optional[DatetimeUTC] = None
|
91
93
|
currentAnswer: t.Optional[str] = None
|
@@ -99,6 +101,10 @@ class Question(BaseModel):
|
|
99
101
|
# Based on https://github.com/protofire/omen-exchange/blob/2cfdf6bfe37afa8b169731d51fea69d42321d66c/app/src/hooks/graph/useGraphMarketMakerData.tsx#L217.
|
100
102
|
return self.data
|
101
103
|
|
104
|
+
@property
|
105
|
+
def timeout_timedelta(self) -> timedelta:
|
106
|
+
return timedelta(seconds=self.timeout)
|
107
|
+
|
102
108
|
@property
|
103
109
|
def n_outcomes(self) -> int:
|
104
110
|
return len(self.outcomes)
|
@@ -256,6 +262,10 @@ class OmenMarket(BaseModel):
|
|
256
262
|
|
257
263
|
return self
|
258
264
|
|
265
|
+
@property
|
266
|
+
def creator_checksum(self) -> ChecksumAddress:
|
267
|
+
return Web3.to_checksum_address(self.creator)
|
268
|
+
|
259
269
|
@property
|
260
270
|
def openingTimestamp(self) -> int:
|
261
271
|
# This field is also available on this model itself, but for some reason it's typed to be optional,
|
@@ -471,6 +481,7 @@ class OmenMarket(BaseModel):
|
|
471
481
|
outcomes=model.question_event.parsed_question.outcomes,
|
472
482
|
isPendingArbitration=False, # Can not be, it's a fresh market.
|
473
483
|
openingTimestamp=model.question_event.opening_ts,
|
484
|
+
timeout=model.question_event.timeout,
|
474
485
|
answerFinalizedTimestamp=None, # It's a new one, can not be.
|
475
486
|
currentAnswer=None, # It's a new one, no answer yet.
|
476
487
|
),
|
@@ -58,7 +58,7 @@ prediction_market_agent_tooling/markets/metaculus/data_models.py,sha256=WjPt0MKe
|
|
58
58
|
prediction_market_agent_tooling/markets/metaculus/metaculus.py,sha256=kM0U0k90YfLE82ra53JAoCR9uIc9wm4B8l32hLw5imU,5312
|
59
59
|
prediction_market_agent_tooling/markets/omen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
60
60
|
prediction_market_agent_tooling/markets/omen/cow_contracts.py,sha256=sFaW82u_haL4nze8fjTmnQsOuV0OecunQlAhh1OAw0w,1091
|
61
|
-
prediction_market_agent_tooling/markets/omen/data_models.py,sha256=
|
61
|
+
prediction_market_agent_tooling/markets/omen/data_models.py,sha256=UcvwAMMlQSDkEoWQd73Rn0aAKswb9szWfNZVFaxpagM,31331
|
62
62
|
prediction_market_agent_tooling/markets/omen/omen.py,sha256=zs0VSUmJh3ZxwD4IA781TWVDYjNdHOODaKjGRXXokjQ,52819
|
63
63
|
prediction_market_agent_tooling/markets/omen/omen_constants.py,sha256=XtRk4vpxwUYkTndfjlcmghA-NOIneV8zdHFdyI7tHhM,487
|
64
64
|
prediction_market_agent_tooling/markets/omen/omen_contracts.py,sha256=0tzaL9P9T7whcTdgK1q_XsEKK3kzCAHs-eZEh-nTZEY,24105
|
@@ -132,8 +132,8 @@ prediction_market_agent_tooling/tools/tokens/usd.py,sha256=DPO-4HBTy1-TZHKL_9CnH
|
|
132
132
|
prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
|
133
133
|
prediction_market_agent_tooling/tools/utils.py,sha256=ruq6P5TFs8CBHxeBLj1Plpx7kuNFPpDgMsJGQgDiRNs,8785
|
134
134
|
prediction_market_agent_tooling/tools/web3_utils.py,sha256=CDbaidlLeQ4VHzSg150L7QNfHfGveljSePGuDVFEYqc,13963
|
135
|
-
prediction_market_agent_tooling-0.69.
|
136
|
-
prediction_market_agent_tooling-0.69.
|
137
|
-
prediction_market_agent_tooling-0.69.
|
138
|
-
prediction_market_agent_tooling-0.69.
|
139
|
-
prediction_market_agent_tooling-0.69.
|
135
|
+
prediction_market_agent_tooling-0.69.4.dev1071.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
|
136
|
+
prediction_market_agent_tooling-0.69.4.dev1071.dist-info/METADATA,sha256=TqLCPuR-0s2OBfLZGE3MBVcmkOzSCBcSyJMucpg2Reo,8813
|
137
|
+
prediction_market_agent_tooling-0.69.4.dev1071.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
138
|
+
prediction_market_agent_tooling-0.69.4.dev1071.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
|
139
|
+
prediction_market_agent_tooling-0.69.4.dev1071.dist-info/RECORD,,
|
File without changes
|
File without changes
|