prediction-market-agent-tooling 0.57.14__py3-none-any.whl → 0.57.16__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/gtypes.py +1 -1
- prediction_market_agent_tooling/markets/manifold/utils.py +3 -2
- prediction_market_agent_tooling/markets/omen/data_models.py +3 -2
- prediction_market_agent_tooling/markets/omen/omen.py +2 -2
- prediction_market_agent_tooling/tools/hexbytes_custom.py +1 -1
- {prediction_market_agent_tooling-0.57.14.dist-info → prediction_market_agent_tooling-0.57.16.dist-info}/METADATA +3 -2
- {prediction_market_agent_tooling-0.57.14.dist-info → prediction_market_agent_tooling-0.57.16.dist-info}/RECORD +10 -10
- {prediction_market_agent_tooling-0.57.14.dist-info → prediction_market_agent_tooling-0.57.16.dist-info}/LICENSE +0 -0
- {prediction_market_agent_tooling-0.57.14.dist-info → prediction_market_agent_tooling-0.57.16.dist-info}/WHEEL +0 -0
- {prediction_market_agent_tooling-0.57.14.dist-info → prediction_market_agent_tooling-0.57.16.dist-info}/entry_points.txt +0 -0
@@ -82,5 +82,5 @@ def secretstr_to_v1_secretstr(s: SecretStr | None) -> SecretStrV1 | None:
|
|
82
82
|
|
83
83
|
|
84
84
|
def int_to_hexbytes(v: int) -> HexBytes:
|
85
|
-
# Example: 1 -> HexBytes("0x0000000000000000000000000000000000000000000000000000000000000001").
|
85
|
+
# Example: 1 -> HexBytes("0x0000000000000000000000000000000000000000000000000000000000000001"). # web3-private-key-ok
|
86
86
|
return HexBytes.fromhex(format(v, "064x"))
|
@@ -4,9 +4,10 @@ from prediction_market_agent_tooling.markets.manifold.api import (
|
|
4
4
|
)
|
5
5
|
|
6
6
|
|
7
|
-
def find_resolution_on_manifold(question: str) -> Resolution | None:
|
7
|
+
def find_resolution_on_manifold(question: str, n: int = 100) -> Resolution | None:
|
8
|
+
# Even with exact-match search, Manifold doesn't return it as the first result, increase `n` if you can't find market that you know exists.
|
8
9
|
manifold_markets = get_manifold_binary_markets(
|
9
|
-
|
10
|
+
n, term=question, filter_=None, sort=None
|
10
11
|
)
|
11
12
|
for manifold_market in manifold_markets:
|
12
13
|
if manifold_market.question == question:
|
@@ -28,6 +28,7 @@ from prediction_market_agent_tooling.tools.utils import (
|
|
28
28
|
DatetimeUTC,
|
29
29
|
check_not_none,
|
30
30
|
should_not_happen,
|
31
|
+
utcnow,
|
31
32
|
)
|
32
33
|
from prediction_market_agent_tooling.tools.web3_utils import wei_to_xdai
|
33
34
|
|
@@ -245,7 +246,7 @@ class OmenMarket(BaseModel):
|
|
245
246
|
|
246
247
|
@property
|
247
248
|
def is_open(self) -> bool:
|
248
|
-
return self.
|
249
|
+
return self.close_time > utcnow()
|
249
250
|
|
250
251
|
@property
|
251
252
|
def is_resolved(self) -> bool:
|
@@ -584,7 +585,7 @@ class FixedProductMarketMakersResponse(BaseModel):
|
|
584
585
|
|
585
586
|
|
586
587
|
class RealityQuestion(BaseModel):
|
587
|
-
# This `id` is in form of `0x79e32ae03fb27b07c89c0c568f80287c01ca2e57-0x2d362f435e7b5159794ff0b5457a900283fca41fe6301dc855a647595903db13`,
|
588
|
+
# This `id` is in form of `0x79e32ae03fb27b07c89c0c568f80287c01ca2e57-0x2d362f435e7b5159794ff0b5457a900283fca41fe6301dc855a647595903db13`, # web3-private-key-ok
|
588
589
|
# which I couldn't find how it is created, but based on how it looks like I assume it's composed of `answerId-questionId`.
|
589
590
|
# (Why is answer id as part of the question object? Because this question object is actually received from the answer object below).
|
590
591
|
# And because all the contract methods so far needed bytes32 input, when asked for question id, `questionId` field was the correct one to use so far.
|
@@ -451,7 +451,7 @@ class OmenAgentMarket(AgentMarket):
|
|
451
451
|
HexBytes(HexStr(i.id)) for i in traded_market.trades if i.id is not None
|
452
452
|
]
|
453
453
|
prediction = ContractPrediction(
|
454
|
-
publisher=keys.
|
454
|
+
publisher=keys.bet_from_address,
|
455
455
|
ipfs_hash=ipfs_hash_decoded,
|
456
456
|
tx_hashes=tx_hashes,
|
457
457
|
estimated_probability_bps=int(traded_market.answer.p_yes * BPS_CONSTANT),
|
@@ -1209,7 +1209,7 @@ def omen_remove_fund_market_tx(
|
|
1209
1209
|
amount_per_index_set = get_conditional_tokens_balance_for_market(
|
1210
1210
|
market, from_address, web3
|
1211
1211
|
)
|
1212
|
-
# We fetch the minimum balance of outcome token - for ex, in this tx (https://gnosisscan.io/tx/0xc31c4e9bc6a60cf7db9991a40ec2f2a06e3539f8cb8dd81b6af893cef6f40cd7#eventlog) - event #460, this should yield 9804940144070370149. This amount matches what is displayed in the Omen UI.
|
1212
|
+
# We fetch the minimum balance of outcome token - for ex, in this tx (https://gnosisscan.io/tx/0xc31c4e9bc6a60cf7db9991a40ec2f2a06e3539f8cb8dd81b6af893cef6f40cd7#eventlog) - event #460, this should yield 9804940144070370149. This amount matches what is displayed in the Omen UI. # web3-private-key-ok
|
1213
1213
|
# See similar logic from Olas
|
1214
1214
|
# https://github.com/valory-xyz/market-creator/blob/4bc47f696fb5ecb61c3b7ec8c001ff2ab6c60fcf/packages/valory/skills/market_creation_manager_abci/behaviours.py#L1308
|
1215
1215
|
amount_to_merge = min(amount_per_index_set.values())
|
@@ -23,7 +23,7 @@ class BaseHex:
|
|
23
23
|
"0xd4e56740",
|
24
24
|
"0xd4e56740f876aef8",
|
25
25
|
"0xd4e56740f876aef8c010b86a40d5f567",
|
26
|
-
"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3",
|
26
|
+
"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3", # web3-private-key-ok
|
27
27
|
)
|
28
28
|
|
29
29
|
@classmethod
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: prediction-market-agent-tooling
|
3
|
-
Version: 0.57.
|
3
|
+
Version: 0.57.16
|
4
4
|
Summary: Tools to benchmark, deploy and monitor prediction market agents.
|
5
5
|
Author: Gnosis
|
6
6
|
Requires-Python: >=3.10,<3.13
|
@@ -16,6 +16,7 @@ Requires-Dist: autoflake (>=2.2.1,<3.0.0)
|
|
16
16
|
Requires-Dist: base58 (>=1.0.2,<2.0)
|
17
17
|
Requires-Dist: cron-validator (>=1.0.8,<2.0.0)
|
18
18
|
Requires-Dist: eth-account (>=0.8.0,<0.12.0)
|
19
|
+
Requires-Dist: eth-keys (>=0.6.1,<0.7.0)
|
19
20
|
Requires-Dist: eth-typing (>=3.0.0,<4.0.0)
|
20
21
|
Requires-Dist: functions-framework (>=3.5.0,<4.0.0)
|
21
22
|
Requires-Dist: google-api-python-client (==2.95.0) ; extra == "google"
|
@@ -192,5 +193,5 @@ This API can be built on top of to create your application. See [here](https://g
|
|
192
193
|
|
193
194
|
See the [Issues](https://github.com/gnosis/prediction-market-agent-tooling/issues) for ideas of things that need fixing or implementing. The team is also receptive to new issues and PRs.
|
194
195
|
|
195
|
-
We use `mypy` for static type checking, and `isort`, `black` and `autoflake` for linting. These all run as steps in CI.
|
196
|
+
We use `mypy` for static type checking, and `isort`, `black` and `autoflake` for linting, and `pre-commit` to minimise unwanted pushes to the public repositories. These all run as steps in CI, but `pre-commit` also needs to be installed locally using the provided `install_hooks.sh` script.
|
196
197
|
|
@@ -30,7 +30,7 @@ prediction_market_agent_tooling/deploy/gcp/deploy.py,sha256=CYUgnfy-9XVk04kkxA_5
|
|
30
30
|
prediction_market_agent_tooling/deploy/gcp/kubernetes_models.py,sha256=OsPboCFGiZKsvGyntGZHwdqPlLTthITkNF5rJFvGgU8,2582
|
31
31
|
prediction_market_agent_tooling/deploy/gcp/utils.py,sha256=oyW0jgrUT2Tr49c7GlpcMsYNQjoCSOcWis3q-MmVAhU,6089
|
32
32
|
prediction_market_agent_tooling/deploy/trade_interval.py,sha256=Xk9j45alQ_vrasGvsNyuW70XHIQ7wfvjoxNR3F6HYCw,1155
|
33
|
-
prediction_market_agent_tooling/gtypes.py,sha256=
|
33
|
+
prediction_market_agent_tooling/gtypes.py,sha256=G9KOKqYcxoKLv5Tfto4g5zq46FeIKxGl4RTArLIJn3I,2563
|
34
34
|
prediction_market_agent_tooling/jobs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
35
35
|
prediction_market_agent_tooling/jobs/jobs_models.py,sha256=GOtsNm7URhzZM5fPY64r8m8Gz-sSsUhG1qmDoC7wGL8,2231
|
36
36
|
prediction_market_agent_tooling/jobs/omen/omen_jobs.py,sha256=N0_jGDyXQeVXXlYg4oA_pOfqIjscHsLQbr0pBwFGoRo,5178
|
@@ -43,15 +43,15 @@ prediction_market_agent_tooling/markets/manifold/__init__.py,sha256=47DEQpj8HBSa
|
|
43
43
|
prediction_market_agent_tooling/markets/manifold/api.py,sha256=Fd0HYnstvvHO6AZkp1xiRlvCwQUc8kLR8DAj6PAZu0s,7297
|
44
44
|
prediction_market_agent_tooling/markets/manifold/data_models.py,sha256=eiGS4rEkxseZNpEb2BICKnjF0qqgkQTMuUPbSe7_04I,6059
|
45
45
|
prediction_market_agent_tooling/markets/manifold/manifold.py,sha256=qemQIwuFg4yf6egGWFp9lWpz1lXr02QiBeZ2akcT6II,5026
|
46
|
-
prediction_market_agent_tooling/markets/manifold/utils.py,sha256=
|
46
|
+
prediction_market_agent_tooling/markets/manifold/utils.py,sha256=_gGlWid0sPF127Omx5qQ1fq17frLInv0wdyXJBMGVzM,670
|
47
47
|
prediction_market_agent_tooling/markets/market_fees.py,sha256=Q64T9uaJx0Vllt0BkrPmpMEz53ra-hMVY8Czi7CEP7s,1227
|
48
48
|
prediction_market_agent_tooling/markets/markets.py,sha256=5x_bX_Mr-696RGXL97qZWnkqq6uV3q2stI-v2-dcaHs,3894
|
49
49
|
prediction_market_agent_tooling/markets/metaculus/api.py,sha256=4TRPGytQQbSdf42DCg2M_JWYPAuNjqZ3eBqaQBLkNks,2736
|
50
50
|
prediction_market_agent_tooling/markets/metaculus/data_models.py,sha256=Suxa7xELdYuFNKqvGvFh8qyfVtAg79E-vaQ6dqNZOtA,3261
|
51
51
|
prediction_market_agent_tooling/markets/metaculus/metaculus.py,sha256=86TIx6cavEWc8Cv4KpZxSvwiSw9oFybXE3YB49pg-CA,4377
|
52
52
|
prediction_market_agent_tooling/markets/omen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
53
|
-
prediction_market_agent_tooling/markets/omen/data_models.py,sha256=
|
54
|
-
prediction_market_agent_tooling/markets/omen/omen.py,sha256=
|
53
|
+
prediction_market_agent_tooling/markets/omen/data_models.py,sha256=uT8ILKrg2g4jGodPxtolPErk25buNzMYndb01ZL2dYE,28421
|
54
|
+
prediction_market_agent_tooling/markets/omen/omen.py,sha256=w6uf_hDpVS2_9LnfmC3ZX9KZSMtXeuUvyOr1fs9nGZU,51880
|
55
55
|
prediction_market_agent_tooling/markets/omen/omen_contracts.py,sha256=baXJwk-jSI3-FV-k239oCNOA4oKz6LT47juX8AKpW3A,28297
|
56
56
|
prediction_market_agent_tooling/markets/omen/omen_resolving.py,sha256=TTi-HP_fUHKH5YTlWSBdszQFb5q3pfzXnXr1FsFu3bM,9703
|
57
57
|
prediction_market_agent_tooling/markets/omen/omen_subgraph_handler.py,sha256=mZ0CgKfHj0gLFq9plNpBhNqMuclb8V3qNagWfLYcpUc,38806
|
@@ -87,7 +87,7 @@ prediction_market_agent_tooling/tools/data_models.py,sha256=jDQ7FU0QQhXlcgJh5VZZ
|
|
87
87
|
prediction_market_agent_tooling/tools/datetime_utc.py,sha256=8_WackjtjC8zHXrhQFTGQ6e6Fz_6llWoKR4CSFvIv9I,2766
|
88
88
|
prediction_market_agent_tooling/tools/db/db_manager.py,sha256=GtzHH1NLl8HwqC8Z7s6eTlIQXuV0blxfaV2PeQrBnfQ,3013
|
89
89
|
prediction_market_agent_tooling/tools/google_utils.py,sha256=t3_UEEvKX3L0biSIQ560GdRbllQ6eprhK_upE243A-0,3185
|
90
|
-
prediction_market_agent_tooling/tools/hexbytes_custom.py,sha256=
|
90
|
+
prediction_market_agent_tooling/tools/hexbytes_custom.py,sha256=ytwr4N8t-9UF1F4wXsln3IV1HBKgaYirsErc3NsKL-M,2119
|
91
91
|
prediction_market_agent_tooling/tools/httpx_cached_client.py,sha256=RxD-hwtZCMctnMwfzy8t51W9Z9gxFGtDYxBIMChazpc,406
|
92
92
|
prediction_market_agent_tooling/tools/image_gen/image_gen.py,sha256=HzRwBx62hOXBOmrtpkXaP9Qq1Ku03uUGdREocyjLQ_k,1266
|
93
93
|
prediction_market_agent_tooling/tools/image_gen/market_thumbnail_gen.py,sha256=jgOow4zw6g8dIJrog6Tp-3NQs4wjUJ3VgVKyMQv-0QM,1286
|
@@ -109,8 +109,8 @@ prediction_market_agent_tooling/tools/tavily/tavily_search.py,sha256=Kw2mXNkMTYT
|
|
109
109
|
prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
|
110
110
|
prediction_market_agent_tooling/tools/utils.py,sha256=jLG4nbEoIzzJiZ4RgMx4Q969Zdl0p0s63p8uET_0Fuw,6440
|
111
111
|
prediction_market_agent_tooling/tools/web3_utils.py,sha256=wqUDCed3iNrn1Wao1iwGN6tzIrhpzrTRj319wlveJEo,12275
|
112
|
-
prediction_market_agent_tooling-0.57.
|
113
|
-
prediction_market_agent_tooling-0.57.
|
114
|
-
prediction_market_agent_tooling-0.57.
|
115
|
-
prediction_market_agent_tooling-0.57.
|
116
|
-
prediction_market_agent_tooling-0.57.
|
112
|
+
prediction_market_agent_tooling-0.57.16.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
|
113
|
+
prediction_market_agent_tooling-0.57.16.dist-info/METADATA,sha256=zzuybuG_UoB-FM5_238aoaNwSQd152MHhyt9_W77EHM,8452
|
114
|
+
prediction_market_agent_tooling-0.57.16.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
115
|
+
prediction_market_agent_tooling-0.57.16.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
|
116
|
+
prediction_market_agent_tooling-0.57.16.dist-info/RECORD,,
|
File without changes
|
File without changes
|