prediction-market-agent-tooling 0.63.0.dev511__py3-none-any.whl → 0.63.0.dev513__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.
@@ -39,19 +39,9 @@ def store_trades(
39
39
  ipfs_hash_decoded = ipfscidv0_to_byte32(ipfs_hash)
40
40
 
41
41
  # tx_hashes must be list of bytes32 (see Solidity contract).
42
- # For regular tx hashes that's fine, but for other types of IDs we take the first 32 bytes (orderDigest).
43
- tx_hashes = []
44
- for trade in traded_market.trades:
45
- if not trade.id:
46
- continue
47
-
48
- tx_hash = HexBytes(HexStr(trade.id))
49
- if len(tx_hash) > 32:
50
- logger.info(
51
- f"len(tx_hash) is {len(tx_hash)} should be <= 32, else contract will not accept it."
52
- )
53
- else:
54
- tx_hashes.append(HexBytes(HexStr(trade.id)))
42
+ tx_hashes = [
43
+ HexBytes(HexStr(i.id)) for i in traded_market.trades if i.id is not None
44
+ ]
55
45
 
56
46
  prediction = ContractPrediction(
57
47
  publisher=keys.bet_from_address,
@@ -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
@@ -304,13 +303,6 @@ class SeerAgentMarket(AgentMarket):
304
303
 
305
304
  return order_metadata.uid.root
306
305
 
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
306
  def sell_tokens(
315
307
  self,
316
308
  outcome: bool,
@@ -325,7 +317,6 @@ class SeerAgentMarket(AgentMarket):
325
317
  outcome_token = self.get_wrapped_token_for_outcome(outcome)
326
318
  api_keys = api_keys if api_keys is not None else APIKeys()
327
319
 
328
- ########
329
320
  token_amount = (
330
321
  amount.as_outcome_wei.as_wei
331
322
  if isinstance(amount, OutcomeToken)
@@ -209,7 +209,7 @@ async def swap_tokens_waiting_async(
209
209
  OrderStatus.cancelled,
210
210
  OrderStatus.expired,
211
211
  ):
212
- raise ValueError(f"Order {order.uid} failed. {order.url}")
212
+ raise OrderStatusError(f"Order {order.uid} failed. {order.url}")
213
213
 
214
214
  if utcnow() - start_time > timeout:
215
215
  raise TimeoutError(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: prediction-market-agent-tooling
3
- Version: 0.63.0.dev511
3
+ Version: 0.63.0.dev513
4
4
  Summary: Tools to benchmark, deploy and monitor prediction market agents.
5
5
  Author: Gnosis
6
6
  Requires-Python: >=3.10,<3.13
@@ -36,7 +36,7 @@ prediction_market_agent_tooling/jobs/omen/omen_jobs.py,sha256=Pf6QxPXGyie-2l_wZU
36
36
  prediction_market_agent_tooling/loggers.py,sha256=MvCkQSJL2_0yErNatqr81sJlc4aOgPzDp9VNrIhKUcc,4140
37
37
  prediction_market_agent_tooling/markets/agent_market.py,sha256=1NomilM0GCXcRq_1N_cr2AbSK5ONTowFeRbrhc7V5zE,14929
38
38
  prediction_market_agent_tooling/markets/base_subgraph_handler.py,sha256=7RaYO_4qAmQ6ZGM8oPK2-CkiJfKmV9MxM-rJlduaecU,1971
39
- prediction_market_agent_tooling/markets/blockchain_utils.py,sha256=13OUImn2afOjTv943X9DoC50jKxCONBp1zZao1fkBLI,2645
39
+ prediction_market_agent_tooling/markets/blockchain_utils.py,sha256=qm21scopQ6dfewkoqQF6lWLDGg2BblsKUdC9aG93Hmc,2249
40
40
  prediction_market_agent_tooling/markets/categorize.py,sha256=jsoHWvZk9pU6n17oWSCcCxNNYVwlb_NXsZxKRI7vmsk,1301
41
41
  prediction_market_agent_tooling/markets/data_models.py,sha256=_R9Hr5zwGLpZLPXq0Jo2wZRNRQyOnSi3WVQJZ81syuk,4541
42
42
  prediction_market_agent_tooling/markets/manifold/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -63,7 +63,7 @@ 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
66
+ prediction_market_agent_tooling/markets/seer/seer.py,sha256=yX0c8Qb15VPIMlIKkdsFmeDzChXviw-yHglskPwmquI,14894
67
67
  prediction_market_agent_tooling/markets/seer/seer_contracts.py,sha256=0pXFzCNO9RFgCWAyyVRQliJuMvMr4uVS5B7cmSz_ffA,2685
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
@@ -88,7 +88,7 @@ prediction_market_agent_tooling/tools/caches/inmemory_cache.py,sha256=ZW5iI5rmjq
88
88
  prediction_market_agent_tooling/tools/caches/serializers.py,sha256=vFDx4fsPxclXp2q0sv27j4al_M_Tj9aR2JJP-xNHQXA,2151
89
89
  prediction_market_agent_tooling/tools/contract.py,sha256=1ZFp_VoqTjM8cqOfAhco2Ht0DTqakjhZpuZUrAXr28Q,21332
90
90
  prediction_market_agent_tooling/tools/costs.py,sha256=EaAJ7v9laD4VEV3d8B44M4u3_oEO_H16jRVCdoZ93Uw,954
91
- prediction_market_agent_tooling/tools/cow/cow_order.py,sha256=8t9_QQpoL6j_R9ommqZSklaQKK2vaO2gv9_FY-SFktY,6953
91
+ prediction_market_agent_tooling/tools/cow/cow_order.py,sha256=jWBRF5UdXjlWNn3X8BxcMXSuU3fegoZzz-NXB7sSIt8,6959
92
92
  prediction_market_agent_tooling/tools/custom_exceptions.py,sha256=Fh8z1fbwONvP4-j7AmV_PuEcoqb6-QXa9PJ9m7guMcM,93
93
93
  prediction_market_agent_tooling/tools/datetime_utc.py,sha256=8_WackjtjC8zHXrhQFTGQ6e6Fz_6llWoKR4CSFvIv9I,2766
94
94
  prediction_market_agent_tooling/tools/db/db_manager.py,sha256=GtzHH1NLl8HwqC8Z7s6eTlIQXuV0blxfaV2PeQrBnfQ,3013
@@ -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.dev511.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
125
- prediction_market_agent_tooling-0.63.0.dev511.dist-info/METADATA,sha256=EGjg-cJr7WjjJbJ5VvYbb_Y_yqtjv67qcS_6DbHTp1I,8696
126
- prediction_market_agent_tooling-0.63.0.dev511.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
127
- prediction_market_agent_tooling-0.63.0.dev511.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
128
- prediction_market_agent_tooling-0.63.0.dev511.dist-info/RECORD,,
124
+ prediction_market_agent_tooling-0.63.0.dev513.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
125
+ prediction_market_agent_tooling-0.63.0.dev513.dist-info/METADATA,sha256=CnAmduzJjvhswieiuB3Wb6frZZChWtQQS1FwPzGcqHc,8696
126
+ prediction_market_agent_tooling-0.63.0.dev513.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
127
+ prediction_market_agent_tooling-0.63.0.dev513.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
128
+ prediction_market_agent_tooling-0.63.0.dev513.dist-info/RECORD,,