prediction-market-agent-tooling 0.48.3__py3-none-any.whl → 0.48.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.
- prediction_market_agent_tooling/tools/gnosis_rpc.py +1 -1
- prediction_market_agent_tooling/tools/tavily_storage/tavily_models.py +1 -1
- prediction_market_agent_tooling/tools/tavily_storage/tavily_storage.py +1 -3
- prediction_market_agent_tooling/tools/web3_utils.py +5 -10
- {prediction_market_agent_tooling-0.48.3.dist-info → prediction_market_agent_tooling-0.48.5.dist-info}/METADATA +1 -1
- {prediction_market_agent_tooling-0.48.3.dist-info → prediction_market_agent_tooling-0.48.5.dist-info}/RECORD +9 -9
- {prediction_market_agent_tooling-0.48.3.dist-info → prediction_market_agent_tooling-0.48.5.dist-info}/LICENSE +0 -0
- {prediction_market_agent_tooling-0.48.3.dist-info → prediction_market_agent_tooling-0.48.5.dist-info}/WHEEL +0 -0
- {prediction_market_agent_tooling-0.48.3.dist-info → prediction_market_agent_tooling-0.48.5.dist-info}/entry_points.txt +0 -0
@@ -3,4 +3,4 @@ import os
|
|
3
3
|
from prediction_market_agent_tooling.gtypes import ChainID
|
4
4
|
|
5
5
|
GNOSIS_NETWORK_ID = ChainID(100) # xDai network.
|
6
|
-
GNOSIS_RPC_URL = os.getenv("GNOSIS_RPC_URL", "https://
|
6
|
+
GNOSIS_RPC_URL = os.getenv("GNOSIS_RPC_URL", "https://rpc.gnosischain.com")
|
@@ -60,9 +60,7 @@ def tavily_search(
|
|
60
60
|
return response_parsed
|
61
61
|
|
62
62
|
|
63
|
-
@tenacity.retry(
|
64
|
-
stop=tenacity.stop_after_attempt(3), wait=tenacity.wait_fixed(1), reraise=True
|
65
|
-
)
|
63
|
+
@tenacity.retry(stop=tenacity.stop_after_attempt(3), wait=tenacity.wait_fixed(1))
|
66
64
|
def _tavily_search(
|
67
65
|
query: str,
|
68
66
|
search_depth: t.Literal["basic", "advanced"],
|
@@ -28,6 +28,7 @@ from prediction_market_agent_tooling.loggers import logger
|
|
28
28
|
ONE_NONCE = Nonce(1)
|
29
29
|
ONE_XDAI = xdai_type(1)
|
30
30
|
ZERO_BYTES = HexBytes(HASH_ZERO)
|
31
|
+
NOT_REVERTED_ICASE_REGEX_PATTERN = "(?i)(?!.*reverted.*)"
|
31
32
|
|
32
33
|
|
33
34
|
def private_key_to_public_key(private_key: SecretStr) -> ChecksumAddress:
|
@@ -154,11 +155,8 @@ def _prepare_tx_params(
|
|
154
155
|
|
155
156
|
|
156
157
|
@tenacity.retry(
|
157
|
-
#
|
158
|
-
|
159
|
-
retry=tenacity.retry_if_exception_message(
|
160
|
-
match="(.*wrong transaction nonce.*)|(.*Invalid.*)|(.*OldNonce.*)"
|
161
|
-
),
|
158
|
+
# Don't retry on `reverted` messages, as they would always fail again.
|
159
|
+
retry=tenacity.retry_if_exception_message(match=NOT_REVERTED_ICASE_REGEX_PATTERN),
|
162
160
|
wait=tenacity.wait_chain(*[tenacity.wait_fixed(n) for n in range(1, 10)]),
|
163
161
|
stop=tenacity.stop_after_attempt(9),
|
164
162
|
after=lambda x: logger.debug(
|
@@ -194,11 +192,8 @@ def send_function_on_contract_tx(
|
|
194
192
|
|
195
193
|
|
196
194
|
@tenacity.retry(
|
197
|
-
#
|
198
|
-
|
199
|
-
retry=tenacity.retry_if_exception_message(
|
200
|
-
match="(.*wrong transaction nonce.*)|(.*Invalid.*)|(.*OldNonce.*)"
|
201
|
-
),
|
195
|
+
# Don't retry on `reverted` messages, as they would always fail again.
|
196
|
+
retry=tenacity.retry_if_exception_message(match=NOT_REVERTED_ICASE_REGEX_PATTERN),
|
202
197
|
wait=tenacity.wait_chain(*[tenacity.wait_fixed(n) for n in range(1, 10)]),
|
203
198
|
stop=tenacity.stop_after_attempt(9),
|
204
199
|
after=lambda x: logger.debug(
|
@@ -62,7 +62,7 @@ prediction_market_agent_tooling/tools/betting_strategies/stretch_bet_between.py,
|
|
62
62
|
prediction_market_agent_tooling/tools/cache.py,sha256=tGHHd9HCiE_hCCtPtloHZQdDfBuiow9YsqJNYi2Tx_0,499
|
63
63
|
prediction_market_agent_tooling/tools/contract.py,sha256=d6eR1CSSKRxyM-zgUtp5jmj3z8nAfwTdtiTGWjzlvYU,19388
|
64
64
|
prediction_market_agent_tooling/tools/costs.py,sha256=EaAJ7v9laD4VEV3d8B44M4u3_oEO_H16jRVCdoZ93Uw,954
|
65
|
-
prediction_market_agent_tooling/tools/gnosis_rpc.py,sha256=
|
65
|
+
prediction_market_agent_tooling/tools/gnosis_rpc.py,sha256=ctBfB1os-MvZ1tm0Rwdyn9b3dvFnlM9naKvZmzywc3A,197
|
66
66
|
prediction_market_agent_tooling/tools/google.py,sha256=SfVDxb3oEOUK8mpd0l3mTX9ybrdrTPNM6HjfJ7kfNjA,1794
|
67
67
|
prediction_market_agent_tooling/tools/hexbytes_custom.py,sha256=Bp94qgPjvjWf1Vb4lNzGFDXRdThw1rJ91vL6r2PWq5E,2096
|
68
68
|
prediction_market_agent_tooling/tools/image_gen/image_gen.py,sha256=HzRwBx62hOXBOmrtpkXaP9Qq1Ku03uUGdREocyjLQ_k,1266
|
@@ -73,12 +73,12 @@ prediction_market_agent_tooling/tools/parallelism.py,sha256=Rz8QdVUWX8KCbr8UZfaC
|
|
73
73
|
prediction_market_agent_tooling/tools/safe.py,sha256=h0xOO0eNtitClf0fPkn-0oTc6A_bflDTee98V_aiV-A,5195
|
74
74
|
prediction_market_agent_tooling/tools/singleton.py,sha256=CiIELUiI-OeS7U7eeHEt0rnVhtQGzwoUdAgn_7u_GBM,729
|
75
75
|
prediction_market_agent_tooling/tools/streamlit_user_login.py,sha256=NXEqfjT9Lc9QtliwSGRASIz1opjQ7Btme43H4qJbzgE,3010
|
76
|
-
prediction_market_agent_tooling/tools/tavily_storage/tavily_models.py,sha256=
|
77
|
-
prediction_market_agent_tooling/tools/tavily_storage/tavily_storage.py,sha256=
|
76
|
+
prediction_market_agent_tooling/tools/tavily_storage/tavily_models.py,sha256=dr-N-G67f4au6s5xLwZPNbKhe4BFaEuYpQTn0KZ4EKg,4377
|
77
|
+
prediction_market_agent_tooling/tools/tavily_storage/tavily_storage.py,sha256=eln3BygdfsDf8WOlSQPL7qH946QnGnThRkazRZKBA8o,3194
|
78
78
|
prediction_market_agent_tooling/tools/utils.py,sha256=JE9YWtPPhnTgLiOyGAZDNG5K8nCwUY9IZEuAlm9UcxA,6611
|
79
|
-
prediction_market_agent_tooling/tools/web3_utils.py,sha256=
|
80
|
-
prediction_market_agent_tooling-0.48.
|
81
|
-
prediction_market_agent_tooling-0.48.
|
82
|
-
prediction_market_agent_tooling-0.48.
|
83
|
-
prediction_market_agent_tooling-0.48.
|
84
|
-
prediction_market_agent_tooling-0.48.
|
79
|
+
prediction_market_agent_tooling/tools/web3_utils.py,sha256=euq_MH-LhTowACq42colks2IXxZQjqjuisYl91EYZtU,10440
|
80
|
+
prediction_market_agent_tooling-0.48.5.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
|
81
|
+
prediction_market_agent_tooling-0.48.5.dist-info/METADATA,sha256=T6nk1eHBTZTrt6UXFqHHb2gPP7K_2TEe_orSRBQIuCM,7810
|
82
|
+
prediction_market_agent_tooling-0.48.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
83
|
+
prediction_market_agent_tooling-0.48.5.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
|
84
|
+
prediction_market_agent_tooling-0.48.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|