prediction-market-agent-tooling 0.69.0__py3-none-any.whl → 0.69.1__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.
@@ -30,7 +30,7 @@ from prediction_market_agent_tooling.markets.seer.data_models import (
30
30
  SeerMarketWithQuestions,
31
31
  )
32
32
  from prediction_market_agent_tooling.markets.seer.subgraph_data_models import (
33
- SeerPool,
33
+ SwaprPool,
34
34
  SwaprSwap,
35
35
  )
36
36
  from prediction_market_agent_tooling.tools.hexbytes_custom import HexBytes
@@ -373,7 +373,7 @@ class SeerSubgraphHandler(BaseSubgraphHandler):
373
373
 
374
374
  def get_pool_by_token(
375
375
  self, token_address: ChecksumAddress, collateral_address: ChecksumAddress
376
- ) -> SeerPool | None:
376
+ ) -> SwaprPool | None:
377
377
  # We iterate through the wrapped tokens and put them in a where clause so that we hit the subgraph endpoint just once.
378
378
 
379
379
  where_argument = {
@@ -397,7 +397,7 @@ class SeerSubgraphHandler(BaseSubgraphHandler):
397
397
  )
398
398
 
399
399
  fields = self._get_fields_for_pools(pools_field)
400
- pools = self.do_query(fields=fields, pydantic_model=SeerPool)
400
+ pools = self.do_query(fields=fields, pydantic_model=SwaprPool)
401
401
  # We assume there is only one pool for outcomeToken/sDAI.
402
402
  if len(pools) > 1:
403
403
  logger.info(
@@ -14,7 +14,7 @@ from prediction_market_agent_tooling.gtypes import (
14
14
  from prediction_market_agent_tooling.tools.datetime_utc import DatetimeUTC
15
15
 
16
16
 
17
- class SeerToken(BaseModel):
17
+ class SwaprToken(BaseModel):
18
18
  id: HexBytes
19
19
  name: str
20
20
  symbol: str
@@ -24,12 +24,12 @@ class SeerToken(BaseModel):
24
24
  return Web3.to_checksum_address(self.id.hex())
25
25
 
26
26
 
27
- class SeerPool(BaseModel):
27
+ class SwaprPool(BaseModel):
28
28
  model_config = ConfigDict(populate_by_name=True)
29
29
  id: HexBytes
30
30
  liquidity: int
31
- token0: SeerToken
32
- token1: SeerToken
31
+ token0: SwaprToken
32
+ token1: SwaprToken
33
33
  token0Price: CollateralToken
34
34
  token1Price: CollateralToken
35
35
  sqrtPrice: int
@@ -44,8 +44,8 @@ class SwaprSwap(BaseModel):
44
44
  price: Wei
45
45
  amount0: CollateralToken
46
46
  amount1: CollateralToken
47
- token0: SeerToken
48
- token1: SeerToken
47
+ token0: SwaprToken
48
+ token1: SwaprToken
49
49
  timestamp: int
50
50
 
51
51
  @property
@@ -65,34 +65,6 @@ class SwaprSwap(BaseModel):
65
65
  )
66
66
 
67
67
 
68
- class SeerSwap(BaseModel):
69
- id: str # It's like "0x73afd8f096096552d72a0b40ea66d2076be136c6a531e2f6b190d151a750271e#32" (note the #32) # web3-private-key-ok
70
- recipient: HexAddress
71
- sender: HexAddress
72
- price: Wei
73
- amount0: CollateralToken
74
- amount1: CollateralToken
75
- token0: SeerToken
76
- token1: SeerToken
77
- timestamp: int
78
-
79
- @property
80
- def timestamp_utc(self) -> DatetimeUTC:
81
- return DatetimeUTC.to_datetime_utc(self.timestamp)
82
-
83
- @property
84
- def buying_collateral_amount(self) -> CollateralToken:
85
- return self.amount0 if self.amount0 > 0 else self.amount1
86
-
87
- @property
88
- def received_shares_amount(self) -> OutcomeToken:
89
- return (
90
- OutcomeToken(abs(self.amount0).value)
91
- if self.amount0 < 0
92
- else OutcomeToken(abs(self.amount1).value)
93
- )
94
-
95
-
96
68
  class NewMarketEvent(BaseModel):
97
69
  market: HexAddress
98
70
  marketName: str
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: prediction-market-agent-tooling
3
- Version: 0.69.0
3
+ Version: 0.69.1
4
4
  Summary: Tools to benchmark, deploy and monitor prediction market agents.
5
5
  Author: Gnosis
6
6
  Requires-Python: >=3.10,<3.13
@@ -78,8 +78,8 @@ prediction_market_agent_tooling/markets/seer/price_manager.py,sha256=LCfbnwOlcWn
78
78
  prediction_market_agent_tooling/markets/seer/seer.py,sha256=UUH75JAMfI_uZE1pEbdI3rbf5c0K0KgUzBiaVRshjV0,31031
79
79
  prediction_market_agent_tooling/markets/seer/seer_api.py,sha256=4iiTWskxWm__oGgUUd1GhV_ItPSrAr0OfnYQ7lKndnQ,1143
80
80
  prediction_market_agent_tooling/markets/seer/seer_contracts.py,sha256=JqfQNFSRWREPw6pQGpJoh-No5ZlKwmTiALJiAYEuvW8,5516
81
- prediction_market_agent_tooling/markets/seer/seer_subgraph_handler.py,sha256=aohhV-VA2fsmmRpZSSsxUHpXW78wWzXvF2l2vqPsupI,18791
82
- prediction_market_agent_tooling/markets/seer/subgraph_data_models.py,sha256=u75DaEwQCl77eko2eNuUP8dJPBXIaBrERR8bLNeMdiM,3753
81
+ prediction_market_agent_tooling/markets/seer/seer_subgraph_handler.py,sha256=nmeSofxwtdB6osrP0ASmDWhL684U52Qp4bqJRbRFkCE,18794
82
+ prediction_market_agent_tooling/markets/seer/subgraph_data_models.py,sha256=96v41jdNNxBqTCp5g8SLMSrIgeeITVx5IsBjVgm-qdo,2920
83
83
  prediction_market_agent_tooling/markets/seer/swap_pool_handler.py,sha256=k_sCEJZLroVDjOVkZ084VKJGNODLGjBGezhsWEZvlH4,3528
84
84
  prediction_market_agent_tooling/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
85
85
  prediction_market_agent_tooling/tools/_generic_value.py,sha256=pD_PI13lpPp1gFoljHwa_Lzlp-u2pu0m-Z7LcxwDM2U,10618
@@ -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=mbOGoWKalNIm7M2K51TEPGwU9oVp1Z6SPsFaBgbn6ws,7397
134
134
  prediction_market_agent_tooling/tools/web3_utils.py,sha256=ajHZIBM_PNNNUp0ZxJ-AvpSzyVATm7LnZtb2hi6NcOw,12614
135
- prediction_market_agent_tooling-0.69.0.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
136
- prediction_market_agent_tooling-0.69.0.dist-info/METADATA,sha256=UtvkCNpHOorBV50gdyXVdgBJq3EiN15wH8SdyzeAt08,8805
137
- prediction_market_agent_tooling-0.69.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
138
- prediction_market_agent_tooling-0.69.0.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
139
- prediction_market_agent_tooling-0.69.0.dist-info/RECORD,,
135
+ prediction_market_agent_tooling-0.69.1.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
136
+ prediction_market_agent_tooling-0.69.1.dist-info/METADATA,sha256=rc8jY4PRLmMIkHD7xJdKYEf9QB2Y8Rs2B5XLFI7LGXM,8805
137
+ prediction_market_agent_tooling-0.69.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
138
+ prediction_market_agent_tooling-0.69.1.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
139
+ prediction_market_agent_tooling-0.69.1.dist-info/RECORD,,