prediction-market-agent-tooling 0.66.4__py3-none-any.whl → 0.66.5__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.
@@ -140,17 +140,20 @@ class SeerAgentMarket(AgentMarket):
140
140
  logger.warning(
141
141
  f"Could not get quote for {self.collateral_token_contract_address_checksummed} from Cow, exception {e=}. Falling back to pools. "
142
142
  )
143
- token_price = self.get_colateral_price_from_pools()
144
- if token_price is None:
143
+ usd_token_price = self.get_collateral_price_from_pools()
144
+ if usd_token_price is None:
145
145
  raise RuntimeError(
146
146
  "Both CoW and pool-fallback way of getting price failed."
147
147
  ) from e
148
- return USD(x.value * token_price.value)
148
+ return USD(x.value * usd_token_price.value)
149
149
 
150
- def get_colateral_price_from_pools(self) -> CollateralToken | None:
150
+ def get_collateral_price_from_pools(self) -> USD | None:
151
151
  p = PriceManager.build(HexBytes(HexStr(self.id)))
152
152
  token_price = p.get_token_price_from_pools(token=SDAI_CONTRACT_ADDRESS)
153
- return token_price
153
+ if token_price:
154
+ return get_token_in_usd(token_price, SDAI_CONTRACT_ADDRESS)
155
+
156
+ return None
154
157
 
155
158
  def get_usd_in_token(self, x: USD) -> CollateralToken:
156
159
  try:
@@ -161,12 +164,12 @@ class SeerAgentMarket(AgentMarket):
161
164
  logger.warning(
162
165
  f"Could not get quote for {self.collateral_token_contract_address_checksummed} from Cow, exception {e=}. Falling back to pools. "
163
166
  )
164
- token_price = self.get_colateral_price_from_pools()
165
- if not token_price:
167
+ usd_token_price = self.get_collateral_price_from_pools()
168
+ if not usd_token_price:
166
169
  raise RuntimeError(
167
170
  "Both CoW and pool-fallback way of getting price failed."
168
171
  ) from e
169
- return CollateralToken(x.value / token_price.value)
172
+ return CollateralToken(x.value / usd_token_price.value)
170
173
 
171
174
  def get_buy_token_amount(
172
175
  self, bet_amount: USD | CollateralToken, outcome_str: OutcomeStr
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: prediction-market-agent-tooling
3
- Version: 0.66.4
3
+ Version: 0.66.5
4
4
  Summary: Tools to benchmark, deploy and monitor prediction market agents.
5
5
  Author: Gnosis
6
6
  Requires-Python: >=3.10,<3.13
@@ -71,7 +71,7 @@ prediction_market_agent_tooling/markets/polymarket/utils.py,sha256=8kTeVjXPcXC6D
71
71
  prediction_market_agent_tooling/markets/seer/data_models.py,sha256=Fkn9jG8f0W8XlfM4EFfMSw0V0c3IGSqnKPt1UnG34Ag,6084
72
72
  prediction_market_agent_tooling/markets/seer/exceptions.py,sha256=cEObdjluivD94tgOLzmimR7wgQEOt6SRakrYdhsRQtk,112
73
73
  prediction_market_agent_tooling/markets/seer/price_manager.py,sha256=MClY2NGwOV70nZYIcmzXFy6Ogd8NBIq7telQcQ3VcU4,6243
74
- prediction_market_agent_tooling/markets/seer/seer.py,sha256=ZeP7TecIK8QOLojh-3kLoBmLjjMFGo2YVYB6Kl7bhE8,27331
74
+ prediction_market_agent_tooling/markets/seer/seer.py,sha256=iGX1M4VI5yaEImemM8h7HHx2v20U2JcVKLSp3xS4vV4,27436
75
75
  prediction_market_agent_tooling/markets/seer/seer_contracts.py,sha256=uMzpHpI6_tgfhWxPzupLdUJlZ1P2wr0rRiYjAGClKgU,4984
76
76
  prediction_market_agent_tooling/markets/seer/seer_subgraph_handler.py,sha256=DwFR_EscEujnja8KvtpiL1U4RKcO8noHnZVoUn17_to,11670
77
77
  prediction_market_agent_tooling/markets/seer/subgraph_data_models.py,sha256=0izxS8Mtzonfdl9UqvFVXrdj0hVzieroekXhogfZKCw,1817
@@ -125,8 +125,8 @@ prediction_market_agent_tooling/tools/tokens/usd.py,sha256=yuW8iPPtcpP4eLH2nORMD
125
125
  prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
126
126
  prediction_market_agent_tooling/tools/utils.py,sha256=RlWSlzS2LavMIWrpwn1fevbzgPZruD4VcXTa-XxjWnE,7343
127
127
  prediction_market_agent_tooling/tools/web3_utils.py,sha256=0r26snqCXGdLKCWA8jpe7DV8x2NPYWZwOy4oyKyDCYk,12615
128
- prediction_market_agent_tooling-0.66.4.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
129
- prediction_market_agent_tooling-0.66.4.dist-info/METADATA,sha256=GCQu4RpxmyMXJNideo3bY_YM06t3A-1O4Cxb7Cf5R6U,8726
130
- prediction_market_agent_tooling-0.66.4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
131
- prediction_market_agent_tooling-0.66.4.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
132
- prediction_market_agent_tooling-0.66.4.dist-info/RECORD,,
128
+ prediction_market_agent_tooling-0.66.5.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
129
+ prediction_market_agent_tooling-0.66.5.dist-info/METADATA,sha256=TL6nv417zcI3bQYRUO4xDeOBa69H7EO340O289dhH_A,8726
130
+ prediction_market_agent_tooling-0.66.5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
131
+ prediction_market_agent_tooling-0.66.5.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
132
+ prediction_market_agent_tooling-0.66.5.dist-info/RECORD,,