prediction-market-agent-tooling 0.69.3__py3-none-any.whl → 0.69.4.dev1070__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.
@@ -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,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: prediction-market-agent-tooling
3
- Version: 0.69.3
3
+ Version: 0.69.4.dev1070
4
4
  Summary: Tools to benchmark, deploy and monitor prediction market agents.
5
5
  Author: Gnosis
6
6
  Requires-Python: >=3.10,<3.13
@@ -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=2dXP27rvx3qkYG0qU8lrkMFQSq41fd-6HlN0SkcpIFM,30969
61
+ prediction_market_agent_tooling/markets/omen/data_models.py,sha256=UszdvdCUeYEL5Wh5avIPeEiYEtbYHNkNohf6B2r2X8A,31277
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.3.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
136
- prediction_market_agent_tooling-0.69.3.dist-info/METADATA,sha256=-gIsHi82sLLHXFEGQfs572_BTlaJcfbZkqfUrZLZhFk,8805
137
- prediction_market_agent_tooling-0.69.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
138
- prediction_market_agent_tooling-0.69.3.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
139
- prediction_market_agent_tooling-0.69.3.dist-info/RECORD,,
135
+ prediction_market_agent_tooling-0.69.4.dev1070.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
136
+ prediction_market_agent_tooling-0.69.4.dev1070.dist-info/METADATA,sha256=DmUQo7C-NlawUyxQ05Rw8f_MfmaNS2qiZpgoPLSEJuM,8813
137
+ prediction_market_agent_tooling-0.69.4.dev1070.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
138
+ prediction_market_agent_tooling-0.69.4.dev1070.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
139
+ prediction_market_agent_tooling-0.69.4.dev1070.dist-info/RECORD,,