prediction-market-agent-tooling 0.63.0.dev512__py3-none-any.whl → 0.63.0.dev514__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,6 +1,5 @@
1
1
  import typing as t
2
2
 
3
- import tenacity
4
3
  from eth_pydantic_types import HexStr
5
4
  from eth_typing import ChecksumAddress
6
5
  from web3 import Web3
@@ -15,6 +14,7 @@ from prediction_market_agent_tooling.gtypes import (
15
14
  OutcomeStr,
16
15
  OutcomeToken,
17
16
  OutcomeWei,
17
+ xDai,
18
18
  )
19
19
  from prediction_market_agent_tooling.loggers import logger
20
20
  from prediction_market_agent_tooling.markets.agent_market import (
@@ -304,13 +304,6 @@ class SeerAgentMarket(AgentMarket):
304
304
 
305
305
  return order_metadata.uid.root
306
306
 
307
- @tenacity.retry(
308
- stop=tenacity.stop_after_attempt(3),
309
- wait=tenacity.wait_fixed(1),
310
- after=lambda x: logger.debug(
311
- f"seer_sell_outcome_tx failed, {x.attempt_number=}."
312
- ),
313
- )
314
307
  def sell_tokens(
315
308
  self,
316
309
  outcome: bool,
@@ -325,7 +318,6 @@ class SeerAgentMarket(AgentMarket):
325
318
  outcome_token = self.get_wrapped_token_for_outcome(outcome)
326
319
  api_keys = api_keys if api_keys is not None else APIKeys()
327
320
 
328
- ########
329
321
  token_amount = (
330
322
  amount.as_outcome_wei.as_wei
331
323
  if isinstance(amount, OutcomeToken)
@@ -358,7 +350,7 @@ def seer_create_market_tx(
358
350
  outcomes: t.Sequence[OutcomeStr],
359
351
  auto_deposit: bool,
360
352
  category: str,
361
- min_bond_wei: int,
353
+ min_bond: xDai,
362
354
  web3: Web3 | None = None,
363
355
  ) -> ChecksumAddress:
364
356
  web3 = web3 or SeerMarketFactory.get_web3() # Default to Gnosis web3.
@@ -399,7 +391,7 @@ def seer_create_market_tx(
399
391
  opening_time=opening_time,
400
392
  language=language,
401
393
  category=category,
402
- min_bond=min_bond_wei,
394
+ min_bond=min_bond,
403
395
  )
404
396
  tx_receipt = factory_contract.create_categorical_market(
405
397
  api_keys=api_keys, params=params, web3=web3
@@ -9,6 +9,7 @@ from prediction_market_agent_tooling.gtypes import (
9
9
  ChecksumAddress,
10
10
  OutcomeStr,
11
11
  TxReceipt,
12
+ xDai,
12
13
  )
13
14
  from prediction_market_agent_tooling.markets.seer.subgraph_data_models import (
14
15
  CreateCategoricalMarketsParams,
@@ -37,7 +38,7 @@ class SeerMarketFactory(ContractOnGnosisChain):
37
38
  market_question: str,
38
39
  outcomes: t.Sequence[OutcomeStr],
39
40
  opening_time: DatetimeUTC,
40
- min_bond: int,
41
+ min_bond: xDai,
41
42
  language: str = "en_US",
42
43
  category: str = "misc",
43
44
  ) -> CreateCategoricalMarketsParams:
@@ -46,7 +47,7 @@ class SeerMarketFactory(ContractOnGnosisChain):
46
47
  token_names=[
47
48
  o.upper() for o in outcomes
48
49
  ], # Following usual token names on Seer (YES,NO).
49
- min_bond=min_bond,
50
+ min_bond=min_bond.as_xdai_wei.value,
50
51
  opening_time=int(opening_time.timestamp()),
51
52
  outcomes=list(outcomes),
52
53
  lang=language,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: prediction-market-agent-tooling
3
- Version: 0.63.0.dev512
3
+ Version: 0.63.0.dev514
4
4
  Summary: Tools to benchmark, deploy and monitor prediction market agents.
5
5
  Author: Gnosis
6
6
  Requires-Python: >=3.10,<3.13
@@ -63,8 +63,8 @@ prediction_market_agent_tooling/markets/polymarket/polymarket.py,sha256=6rc9qulP
63
63
  prediction_market_agent_tooling/markets/polymarket/utils.py,sha256=8kTeVjXPcXC6DkDvWYsZQLY7x8DS6CEp_yznSEazsNU,2037
64
64
  prediction_market_agent_tooling/markets/seer/data_models.py,sha256=FwTOq9X2iJ7r3ijtE0evl8pMSbFPm4lUwuc9m7YsMVA,6373
65
65
  prediction_market_agent_tooling/markets/seer/price_manager.py,sha256=GaDaFIz1jMgUUg4TpR-FdIF-_-C6pX4sjp3xTLi8KyI,4691
66
- prediction_market_agent_tooling/markets/seer/seer.py,sha256=LcNc9vH8OMkzr7FgzKHqMqxd86FNRRG57BRbvvZuvu8,15150
67
- prediction_market_agent_tooling/markets/seer/seer_contracts.py,sha256=0pXFzCNO9RFgCWAyyVRQliJuMvMr4uVS5B7cmSz_ffA,2685
66
+ prediction_market_agent_tooling/markets/seer/seer.py,sha256=PQ685AE9BjH4QZC_zcTCGt7RNBRI6wKkXoCUvQeMDO0,14897
67
+ prediction_market_agent_tooling/markets/seer/seer_contracts.py,sha256=yufEojZxLa_SQv9xhsG23wLGsyHOWD8Azm7-7E5Zn_8,2714
68
68
  prediction_market_agent_tooling/markets/seer/seer_subgraph_handler.py,sha256=KKRI493VNNAY9tR1AjzNraeH76MvDsBV6GsiLZas0_Y,9859
69
69
  prediction_market_agent_tooling/markets/seer/subgraph_data_models.py,sha256=0izxS8Mtzonfdl9UqvFVXrdj0hVzieroekXhogfZKCw,1817
70
70
  prediction_market_agent_tooling/monitor/financial_metrics/financial_metrics.py,sha256=fjIgjDIx5MhH5mwf7S0cspLOOSU3elYLhGYoIiM26mU,2746
@@ -121,8 +121,8 @@ prediction_market_agent_tooling/tools/tokens/usd.py,sha256=Qq8ofVCCMX-eo8mDlHv4g
121
121
  prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
122
122
  prediction_market_agent_tooling/tools/utils.py,sha256=1xsyBBJfiEdSoMlceB2F8o2sCb6Z8-qNz11pEJFrdyE,6566
123
123
  prediction_market_agent_tooling/tools/web3_utils.py,sha256=eYCc1iWAVtqDKUPTwnMUHuYolPdwh_OTiM3-AdRgDp4,12198
124
- prediction_market_agent_tooling-0.63.0.dev512.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
125
- prediction_market_agent_tooling-0.63.0.dev512.dist-info/METADATA,sha256=KJkbi1uEguo47ndK7U4zdtPRgM0p8PMv3VEs6GqxjCM,8696
126
- prediction_market_agent_tooling-0.63.0.dev512.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
127
- prediction_market_agent_tooling-0.63.0.dev512.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
128
- prediction_market_agent_tooling-0.63.0.dev512.dist-info/RECORD,,
124
+ prediction_market_agent_tooling-0.63.0.dev514.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
125
+ prediction_market_agent_tooling-0.63.0.dev514.dist-info/METADATA,sha256=dK7H3h-CiXy3msZcIuXF8utgfqki49coe6NKD1Eyzhk,8696
126
+ prediction_market_agent_tooling-0.63.0.dev514.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
127
+ prediction_market_agent_tooling-0.63.0.dev514.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
128
+ prediction_market_agent_tooling-0.63.0.dev514.dist-info/RECORD,,