prediction-market-agent-tooling 0.59.0.dev399__py3-none-any.whl → 0.59.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.
@@ -2,6 +2,7 @@ import asyncio
2
2
  from datetime import timedelta
3
3
 
4
4
  import httpx
5
+ import tenacity
5
6
  from cowdao_cowpy import swap_tokens
6
7
  from cowdao_cowpy.common.chains import Chain
7
8
  from cowdao_cowpy.common.config import SupportedChainId
@@ -34,6 +35,11 @@ def get_order_book_api(env: Envs, chain: Chain) -> OrderBookApi:
34
35
  return OrderBookApi(OrderBookAPIConfigFactory.get_config(env, chain_id))
35
36
 
36
37
 
38
+ @tenacity.retry(
39
+ stop=tenacity.stop_after_attempt(3),
40
+ wait=tenacity.wait_fixed(1),
41
+ after=lambda x: logger.debug(f"get_buy_token_amount failed, {x.attempt_number=}."),
42
+ )
37
43
  def get_buy_token_amount(
38
44
  amount_wei: Wei,
39
45
  sell_token: ChecksumAddress,
@@ -164,7 +164,8 @@ def _prepare_tx_params(
164
164
 
165
165
  @tenacity.retry(
166
166
  # Don't retry on `reverted` messages, as they would always fail again.
167
- retry=tenacity.retry_if_exception_message(match=NOT_REVERTED_ICASE_REGEX_PATTERN),
167
+ # TODO: Check this, see https://github.com/gnosis/prediction-market-agent-tooling/issues/625.
168
+ # retry=tenacity.retry_if_exception_message(match=NOT_REVERTED_ICASE_REGEX_PATTERN),
168
169
  wait=tenacity.wait_chain(*[tenacity.wait_fixed(n) for n in range(1, 10)]),
169
170
  stop=tenacity.stop_after_attempt(9),
170
171
  after=lambda x: logger.debug(
@@ -201,7 +202,8 @@ def send_function_on_contract_tx(
201
202
 
202
203
  @tenacity.retry(
203
204
  # Don't retry on `reverted` messages, as they would always fail again.
204
- retry=tenacity.retry_if_exception_message(match=NOT_REVERTED_ICASE_REGEX_PATTERN),
205
+ # TODO: Check this, see https://github.com/gnosis/prediction-market-agent-tooling/issues/625.
206
+ # retry=tenacity.retry_if_exception_message(match=NOT_REVERTED_ICASE_REGEX_PATTERN),
205
207
  wait=tenacity.wait_chain(*[tenacity.wait_fixed(n) for n in range(1, 10)]),
206
208
  stop=tenacity.stop_after_attempt(5),
207
209
  after=lambda x: logger.debug(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: prediction-market-agent-tooling
3
- Version: 0.59.0.dev399
3
+ Version: 0.59.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
@@ -86,7 +86,7 @@ prediction_market_agent_tooling/tools/caches/serializers.py,sha256=vFDx4fsPxclXp
86
86
  prediction_market_agent_tooling/tools/contract.py,sha256=gmSuANqlfwldFG7hc4uom0q1Z-mo40qfYh5TDUKLFTs,20518
87
87
  prediction_market_agent_tooling/tools/costs.py,sha256=EaAJ7v9laD4VEV3d8B44M4u3_oEO_H16jRVCdoZ93Uw,954
88
88
  prediction_market_agent_tooling/tools/cow/cow_manager.py,sha256=WK6Uk722VotjLHtxDPHxvwBrWVb3rvTegg_3w58ehwU,3869
89
- prediction_market_agent_tooling/tools/cow/cow_order.py,sha256=ohriN_65BZ69f_BV6bNg_AwZjidip4yi4d2G6Ddy5Qg,4238
89
+ prediction_market_agent_tooling/tools/cow/cow_order.py,sha256=M3zQohgAzy_LETnf9rKtS1L9rr7FP92CH6v0G2laZkM,4435
90
90
  prediction_market_agent_tooling/tools/custom_exceptions.py,sha256=Fh8z1fbwONvP4-j7AmV_PuEcoqb6-QXa9PJ9m7guMcM,93
91
91
  prediction_market_agent_tooling/tools/datetime_utc.py,sha256=8_WackjtjC8zHXrhQFTGQ6e6Fz_6llWoKR4CSFvIv9I,2766
92
92
  prediction_market_agent_tooling/tools/db/db_manager.py,sha256=GtzHH1NLl8HwqC8Z7s6eTlIQXuV0blxfaV2PeQrBnfQ,3013
@@ -116,9 +116,9 @@ prediction_market_agent_tooling/tools/tokens/auto_withdraw.py,sha256=B02maQkl3wN
116
116
  prediction_market_agent_tooling/tools/tokens/main_token.py,sha256=5iHO7-iehSlXuue6ocVrr4IsklVjm7QHIwln4BsebJA,573
117
117
  prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
118
118
  prediction_market_agent_tooling/tools/utils.py,sha256=jLG4nbEoIzzJiZ4RgMx4Q969Zdl0p0s63p8uET_0Fuw,6440
119
- prediction_market_agent_tooling/tools/web3_utils.py,sha256=e7lqqQddVZaa905rhBb6L1fC3o39Yr-PDJsJjHFBeRE,12523
120
- prediction_market_agent_tooling-0.59.0.dev399.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
121
- prediction_market_agent_tooling-0.59.0.dev399.dist-info/METADATA,sha256=2hdm2FPByw4iA2un7-to2JRnrvo-pOV6PHz8lkG61zE,8636
122
- prediction_market_agent_tooling-0.59.0.dev399.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
123
- prediction_market_agent_tooling-0.59.0.dev399.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
124
- prediction_market_agent_tooling-0.59.0.dev399.dist-info/RECORD,,
119
+ prediction_market_agent_tooling/tools/web3_utils.py,sha256=2PXZfGRrDVZD60agVpBN4JkOF0YsNBXgTEH1y-V71uQ,12723
120
+ prediction_market_agent_tooling-0.59.1.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
121
+ prediction_market_agent_tooling-0.59.1.dist-info/METADATA,sha256=N_mRu0JnDDQKsmdWO2N9wrS7n3y-4t4_hFs4vFIemjE,8629
122
+ prediction_market_agent_tooling-0.59.1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
123
+ prediction_market_agent_tooling-0.59.1.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
124
+ prediction_market_agent_tooling-0.59.1.dist-info/RECORD,,