prediction-market-agent-tooling 0.69.10.dev1120__py3-none-any.whl → 0.69.11__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.

Potentially problematic release.


This version of prediction-market-agent-tooling might be problematic. Click here for more details.

@@ -4,6 +4,7 @@ from datetime import date, timedelta
4
4
 
5
5
  from pydantic import BaseModel
6
6
 
7
+ from prediction_market_agent_tooling.gtypes import HexBytes
7
8
  from prediction_market_agent_tooling.tools.datetime_utc import DatetimeUTC
8
9
 
9
10
 
@@ -12,7 +13,7 @@ def json_serializer(x: t.Any) -> str:
12
13
 
13
14
 
14
15
  def json_serializer_default_fn(
15
- y: DatetimeUTC | timedelta | date | BaseModel,
16
+ y: DatetimeUTC | timedelta | date | HexBytes | BaseModel,
16
17
  ) -> str | dict[str, t.Any]:
17
18
  """
18
19
  Used to serialize objects that don't support it by default into a specific string that can be deserialized out later.
@@ -25,6 +26,8 @@ def json_serializer_default_fn(
25
26
  return f"timedelta::{y.total_seconds()}"
26
27
  elif isinstance(y, date):
27
28
  return f"date::{y.isoformat()}"
29
+ elif isinstance(y, HexBytes):
30
+ return f"HexBytes::{y.to_0x_hex()}"
28
31
  elif isinstance(y, BaseModel):
29
32
  return y.model_dump()
30
33
  raise TypeError(
@@ -51,6 +54,9 @@ def replace_custom_stringified_objects(obj: t.Any) -> t.Any:
51
54
  elif obj.startswith("date::"):
52
55
  iso_str = obj[len("date::") :]
53
56
  return date.fromisoformat(iso_str)
57
+ elif obj.startswith("HexBytes::"):
58
+ hex_str = obj[len("HexBytes::") :]
59
+ return HexBytes(hex_str)
54
60
  else:
55
61
  return obj
56
62
  elif isinstance(obj, dict):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prediction-market-agent-tooling
3
- Version: 0.69.10.dev1120
3
+ Version: 0.69.11
4
4
  Summary: Tools to benchmark, deploy and monitor prediction market agents.
5
5
  License-File: LICENSE
6
6
  Author: Gnosis
@@ -91,7 +91,7 @@ prediction_market_agent_tooling/tools/betting_strategies/stretch_bet_between.py,
91
91
  prediction_market_agent_tooling/tools/betting_strategies/utils.py,sha256=MpS3FOMn0C7nbmbQRUT9QwSh3UzzsgGczP91iSMr9wo,261
92
92
  prediction_market_agent_tooling/tools/caches/db_cache.py,sha256=V6o6UdesjkKzSJMhqkUtD76cJGPaNhuwA4OL2chIYSI,13801
93
93
  prediction_market_agent_tooling/tools/caches/inmemory_cache.py,sha256=ZW5iI5rmjqeAebu5T7ftRnlkxiL02IC-MxCfDB80x7w,1506
94
- prediction_market_agent_tooling/tools/caches/serializers.py,sha256=vFDx4fsPxclXp2q0sv27j4al_M_Tj9aR2JJP-xNHQXA,2151
94
+ prediction_market_agent_tooling/tools/caches/serializers.py,sha256=fwyIHUsL7u9NY7ZihTcUdqsvl2psatcbTfgWHTSez3U,2427
95
95
  prediction_market_agent_tooling/tools/contract.py,sha256=BzpAFcbKl_KqwgAlaXx63Fg8jzr0EO3qEeOs1K11CPA,33905
96
96
  prediction_market_agent_tooling/tools/contract_utils.py,sha256=9X9raICUZkPDShilt02aYzS_ILZ62u0vG5081uWLdqk,2152
97
97
  prediction_market_agent_tooling/tools/costs.py,sha256=EaAJ7v9laD4VEV3d8B44M4u3_oEO_H16jRVCdoZ93Uw,954
@@ -137,8 +137,8 @@ prediction_market_agent_tooling/tools/tokens/usd.py,sha256=DPO-4HBTy1-TZHKL_9CnH
137
137
  prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
138
138
  prediction_market_agent_tooling/tools/utils.py,sha256=ruq6P5TFs8CBHxeBLj1Plpx7kuNFPpDgMsJGQgDiRNs,8785
139
139
  prediction_market_agent_tooling/tools/web3_utils.py,sha256=CDbaidlLeQ4VHzSg150L7QNfHfGveljSePGuDVFEYqc,13963
140
- prediction_market_agent_tooling-0.69.10.dev1120.dist-info/METADATA,sha256=_zBgziT22Ha55DnWQSUlO2ITl7W1-zIXoNY19nKoGqs,8899
141
- prediction_market_agent_tooling-0.69.10.dev1120.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
142
- prediction_market_agent_tooling-0.69.10.dev1120.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
143
- prediction_market_agent_tooling-0.69.10.dev1120.dist-info/licenses/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
144
- prediction_market_agent_tooling-0.69.10.dev1120.dist-info/RECORD,,
140
+ prediction_market_agent_tooling-0.69.11.dist-info/METADATA,sha256=jj2zFrbI7W25ONYuuS5PajYF1dYmozE9Y44k9DW-kCU,8891
141
+ prediction_market_agent_tooling-0.69.11.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
142
+ prediction_market_agent_tooling-0.69.11.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
143
+ prediction_market_agent_tooling-0.69.11.dist-info/licenses/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
144
+ prediction_market_agent_tooling-0.69.11.dist-info/RECORD,,