prediction-market-agent-tooling 0.36.0__py3-none-any.whl → 0.38.0__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/abis/omen_thumbnailmapping.abi.json +52 -0
- prediction_market_agent_tooling/config.py +7 -0
- prediction_market_agent_tooling/gtypes.py +1 -0
- prediction_market_agent_tooling/markets/omen/omen.py +29 -15
- prediction_market_agent_tooling/markets/omen/omen_contracts.py +65 -1
- prediction_market_agent_tooling/markets/omen/omen_subgraph_handler.py +21 -10
- prediction_market_agent_tooling/tools/balances.py +4 -0
- prediction_market_agent_tooling/tools/image_gen/image_gen.py +49 -0
- prediction_market_agent_tooling/tools/image_gen/market_thumbnail_gen.py +30 -0
- prediction_market_agent_tooling/tools/web3_utils.py +22 -0
- {prediction_market_agent_tooling-0.36.0.dist-info → prediction_market_agent_tooling-0.38.0.dist-info}/METADATA +4 -1
- {prediction_market_agent_tooling-0.36.0.dist-info → prediction_market_agent_tooling-0.38.0.dist-info}/RECORD +15 -12
- {prediction_market_agent_tooling-0.36.0.dist-info → prediction_market_agent_tooling-0.38.0.dist-info}/LICENSE +0 -0
- {prediction_market_agent_tooling-0.36.0.dist-info → prediction_market_agent_tooling-0.38.0.dist-info}/WHEEL +0 -0
- {prediction_market_agent_tooling-0.36.0.dist-info → prediction_market_agent_tooling-0.38.0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,52 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"type": "function",
|
4
|
+
"name": "get",
|
5
|
+
"inputs": [
|
6
|
+
{
|
7
|
+
"name": "marketAddress",
|
8
|
+
"type": "address",
|
9
|
+
"internalType": "address"
|
10
|
+
}
|
11
|
+
],
|
12
|
+
"outputs": [
|
13
|
+
{
|
14
|
+
"name": "",
|
15
|
+
"type": "bytes32",
|
16
|
+
"internalType": "bytes32"
|
17
|
+
}
|
18
|
+
],
|
19
|
+
"stateMutability": "view"
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"type": "function",
|
23
|
+
"name": "remove",
|
24
|
+
"inputs": [
|
25
|
+
{
|
26
|
+
"name": "marketAddress",
|
27
|
+
"type": "address",
|
28
|
+
"internalType": "address"
|
29
|
+
}
|
30
|
+
],
|
31
|
+
"outputs": [],
|
32
|
+
"stateMutability": "nonpayable"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"type": "function",
|
36
|
+
"name": "set",
|
37
|
+
"inputs": [
|
38
|
+
{
|
39
|
+
"name": "marketAddress",
|
40
|
+
"type": "address",
|
41
|
+
"internalType": "address"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"name": "image_hash",
|
45
|
+
"type": "bytes32",
|
46
|
+
"internalType": "bytes32"
|
47
|
+
}
|
48
|
+
],
|
49
|
+
"outputs": [],
|
50
|
+
"stateMutability": "nonpayable"
|
51
|
+
}
|
52
|
+
]
|
@@ -27,6 +27,7 @@ class APIKeys(BaseSettings):
|
|
27
27
|
BET_FROM_PRIVATE_KEY: t.Optional[PrivateKey] = None
|
28
28
|
SAFE_ADDRESS: t.Optional[ChecksumAddress] = None
|
29
29
|
OPENAI_API_KEY: t.Optional[SecretStr] = None
|
30
|
+
GRAPH_API_KEY: t.Optional[SecretStr] = None
|
30
31
|
|
31
32
|
GOOGLE_SEARCH_API_KEY: t.Optional[SecretStr] = None
|
32
33
|
GOOGLE_SEARCH_ENGINE_ID: t.Optional[SecretStr] = None
|
@@ -72,6 +73,12 @@ class APIKeys(BaseSettings):
|
|
72
73
|
self.OPENAI_API_KEY, "OPENAI_API_KEY missing in the environment."
|
73
74
|
)
|
74
75
|
|
76
|
+
@property
|
77
|
+
def graph_api_key(self) -> SecretStr:
|
78
|
+
return check_not_none(
|
79
|
+
self.GRAPH_API_KEY, "GRAPH_API_KEY missing in the environment."
|
80
|
+
)
|
81
|
+
|
75
82
|
@property
|
76
83
|
def google_search_api_key(self) -> SecretStr:
|
77
84
|
return check_not_none(
|
@@ -34,6 +34,7 @@ Mana = NewType("Mana", float) # Manifold's "currency"
|
|
34
34
|
USDC = NewType("USDC", float)
|
35
35
|
DatetimeWithTimezone = NewType("DatetimeWithTimezone", datetime)
|
36
36
|
ChainID = NewType("ChainID", int)
|
37
|
+
IPFSCIDVersion0 = NewType("IPFSCIDVersion0", str)
|
37
38
|
|
38
39
|
|
39
40
|
def usd_type(amount: Union[str, int, float]) -> USD:
|
@@ -10,7 +10,6 @@ from prediction_market_agent_tooling.gtypes import (
|
|
10
10
|
ChecksumAddress,
|
11
11
|
HexAddress,
|
12
12
|
HexStr,
|
13
|
-
OmenOutcomeToken,
|
14
13
|
OutcomeStr,
|
15
14
|
Probability,
|
16
15
|
Wei,
|
@@ -84,7 +83,6 @@ class OmenAgentMarket(AgentMarket):
|
|
84
83
|
finalized_time: datetime | None
|
85
84
|
created_time: datetime
|
86
85
|
close_time: datetime
|
87
|
-
outcome_token_amounts: list[OmenOutcomeToken]
|
88
86
|
fee: float # proportion, from 0 to 1
|
89
87
|
|
90
88
|
INVALID_MARKET_ANSWER: HexStr = HexStr(
|
@@ -144,6 +142,7 @@ class OmenAgentMarket(AgentMarket):
|
|
144
142
|
amount: BetAmount,
|
145
143
|
omen_auto_deposit: bool = True,
|
146
144
|
web3: Web3 | None = None,
|
145
|
+
api_keys: APIKeys | None = None,
|
147
146
|
) -> None:
|
148
147
|
if not self.can_be_traded():
|
149
148
|
raise ValueError(
|
@@ -153,7 +152,7 @@ class OmenAgentMarket(AgentMarket):
|
|
153
152
|
raise ValueError(f"Omen bets are made in xDai. Got {amount.currency}.")
|
154
153
|
amount_xdai = xDai(amount.amount)
|
155
154
|
binary_omen_buy_outcome_tx(
|
156
|
-
api_keys=APIKeys(),
|
155
|
+
api_keys=api_keys if api_keys is not None else APIKeys(),
|
157
156
|
amount=amount_xdai,
|
158
157
|
market=self,
|
159
158
|
binary_outcome=outcome,
|
@@ -161,20 +160,34 @@ class OmenAgentMarket(AgentMarket):
|
|
161
160
|
web3=web3,
|
162
161
|
)
|
163
162
|
|
163
|
+
def buy_tokens(
|
164
|
+
self,
|
165
|
+
outcome: bool,
|
166
|
+
amount: TokenAmount,
|
167
|
+
web3: Web3 | None = None,
|
168
|
+
api_keys: APIKeys | None = None,
|
169
|
+
) -> None:
|
170
|
+
return self.place_bet(
|
171
|
+
outcome=outcome,
|
172
|
+
amount=amount,
|
173
|
+
web3=web3,
|
174
|
+
api_keys=api_keys,
|
175
|
+
)
|
176
|
+
|
164
177
|
def calculate_sell_amount_in_collateral(
|
165
|
-
self, amount: TokenAmount, outcome: bool
|
178
|
+
self, amount: TokenAmount, outcome: bool, web3: Web3 | None = None
|
166
179
|
) -> xDai:
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
180
|
+
pool_balance = get_conditional_tokens_balance_for_market(
|
181
|
+
self, self.market_maker_contract_address_checksummed, web3=web3
|
182
|
+
)
|
183
|
+
|
184
|
+
sell_str = self.outcomes[self.yes_index if outcome else self.no_index]
|
185
|
+
other_str = self.outcomes[self.no_index if outcome else self.yes_index]
|
186
|
+
|
174
187
|
collateral = calculate_sell_amount_in_collateral(
|
175
188
|
shares_to_sell=amount.amount,
|
176
|
-
holdings=wei_to_xdai(
|
177
|
-
other_holdings=wei_to_xdai(
|
189
|
+
holdings=wei_to_xdai(pool_balance[self.get_index_set(sell_str)]),
|
190
|
+
other_holdings=wei_to_xdai(pool_balance[self.get_index_set(other_str)]),
|
178
191
|
fee=self.fee,
|
179
192
|
)
|
180
193
|
return xDai(collateral)
|
@@ -197,6 +210,7 @@ class OmenAgentMarket(AgentMarket):
|
|
197
210
|
collateral = self.calculate_sell_amount_in_collateral(
|
198
211
|
amount=amount,
|
199
212
|
outcome=outcome,
|
213
|
+
web3=web3,
|
200
214
|
)
|
201
215
|
binary_omen_sell_outcome_tx(
|
202
216
|
amount=collateral,
|
@@ -282,7 +296,6 @@ class OmenAgentMarket(AgentMarket):
|
|
282
296
|
url=model.url,
|
283
297
|
volume=wei_to_xdai(model.collateralVolume),
|
284
298
|
close_time=model.close_time,
|
285
|
-
outcome_token_amounts=model.outcomeTokenAmounts,
|
286
299
|
fee=float(wei_to_xdai(model.fee)) if model.fee is not None else 0.0,
|
287
300
|
)
|
288
301
|
|
@@ -462,8 +475,9 @@ def omen_buy_outcome_tx(
|
|
462
475
|
for_address=from_address_checksummed, web3=web3
|
463
476
|
)
|
464
477
|
if auto_deposit and collateral_token_balance < amount_wei:
|
478
|
+
deposit_amount_wei = Wei(amount_wei - collateral_token_balance)
|
465
479
|
collateral_token_contract.deposit(
|
466
|
-
api_keys=api_keys, amount_wei=
|
480
|
+
api_keys=api_keys, amount_wei=deposit_amount_wei, web3=web3
|
467
481
|
)
|
468
482
|
# Buy shares using the deposited xDai in the collateral token.
|
469
483
|
market_contract.buy(
|
@@ -13,6 +13,7 @@ from prediction_market_agent_tooling.gtypes import (
|
|
13
13
|
HexAddress,
|
14
14
|
HexBytes,
|
15
15
|
HexStr,
|
16
|
+
IPFSCIDVersion0,
|
16
17
|
OmenOutcomeToken,
|
17
18
|
TxParams,
|
18
19
|
TxReceipt,
|
@@ -26,7 +27,12 @@ from prediction_market_agent_tooling.tools.contract import (
|
|
26
27
|
ContractOnGnosisChain,
|
27
28
|
abi_field_validator,
|
28
29
|
)
|
29
|
-
from prediction_market_agent_tooling.tools.web3_utils import
|
30
|
+
from prediction_market_agent_tooling.tools.web3_utils import (
|
31
|
+
ZERO_BYTES,
|
32
|
+
byte32_to_ipfscidv0,
|
33
|
+
ipfscidv0_to_byte32,
|
34
|
+
xdai_to_wei,
|
35
|
+
)
|
30
36
|
|
31
37
|
|
32
38
|
class OmenOracleContract(ContractOnGnosisChain):
|
@@ -610,3 +616,61 @@ class OmenRealitioContract(ContractOnGnosisChain):
|
|
610
616
|
web3: Web3 | None = None,
|
611
617
|
) -> TxReceipt:
|
612
618
|
return self.send(api_keys=api_keys, function_name="withdraw", web3=web3)
|
619
|
+
|
620
|
+
|
621
|
+
class OmenThumbnailMapping(ContractOnGnosisChain):
|
622
|
+
# Contract ABI taken from built https://github.com/gnosis/labs-contracts.
|
623
|
+
abi: ABI = abi_field_validator(
|
624
|
+
os.path.join(
|
625
|
+
os.path.dirname(os.path.realpath(__file__)),
|
626
|
+
"../../abis/omen_thumbnailmapping.abi.json",
|
627
|
+
)
|
628
|
+
)
|
629
|
+
address: ChecksumAddress = Web3.to_checksum_address(
|
630
|
+
"0x5D8B7B619EcdE05B8A94C0a0E99E0A0727A0e2e7"
|
631
|
+
)
|
632
|
+
|
633
|
+
def get(
|
634
|
+
self,
|
635
|
+
market_address: ChecksumAddress,
|
636
|
+
web3: Web3 | None = None,
|
637
|
+
) -> IPFSCIDVersion0 | None:
|
638
|
+
hash_bytes = HexBytes(
|
639
|
+
self.call("get", function_params=[market_address], web3=web3)
|
640
|
+
)
|
641
|
+
return byte32_to_ipfscidv0(hash_bytes) if hash_bytes != ZERO_BYTES else None
|
642
|
+
|
643
|
+
def get_url(
|
644
|
+
self,
|
645
|
+
market_address: ChecksumAddress,
|
646
|
+
web3: Web3 | None = None,
|
647
|
+
) -> str | None:
|
648
|
+
hash_ = self.get(market_address, web3)
|
649
|
+
return f"https://ipfs.io/ipfs/{hash_}" if hash_ is not None else None
|
650
|
+
|
651
|
+
def set(
|
652
|
+
self,
|
653
|
+
api_keys: APIKeys,
|
654
|
+
market_address: ChecksumAddress,
|
655
|
+
image_hash: IPFSCIDVersion0,
|
656
|
+
web3: Web3 | None = None,
|
657
|
+
) -> TxReceipt:
|
658
|
+
return self.send(
|
659
|
+
api_keys=api_keys,
|
660
|
+
function_name="set",
|
661
|
+
function_params=[market_address, ipfscidv0_to_byte32(image_hash)],
|
662
|
+
web3=web3,
|
663
|
+
)
|
664
|
+
|
665
|
+
def remove(
|
666
|
+
self,
|
667
|
+
api_keys: APIKeys,
|
668
|
+
market_address: ChecksumAddress,
|
669
|
+
web3: Web3 | None = None,
|
670
|
+
) -> TxReceipt:
|
671
|
+
return self.send(
|
672
|
+
api_keys=api_keys,
|
673
|
+
function_name="remove",
|
674
|
+
function_params=[market_address],
|
675
|
+
web3=web3,
|
676
|
+
)
|
@@ -6,6 +6,7 @@ import tenacity
|
|
6
6
|
from eth_typing import ChecksumAddress
|
7
7
|
from subgrounds import FieldPath, Subgrounds
|
8
8
|
|
9
|
+
from prediction_market_agent_tooling.config import APIKeys
|
9
10
|
from prediction_market_agent_tooling.gtypes import HexAddress, HexBytes, Wei, wei_type
|
10
11
|
from prediction_market_agent_tooling.loggers import logger
|
11
12
|
from prediction_market_agent_tooling.markets.agent_market import FilterBy, SortBy
|
@@ -29,13 +30,11 @@ class OmenSubgraphHandler(metaclass=SingletonMeta):
|
|
29
30
|
Class responsible for handling interactions with Omen subgraphs (trades, conditionalTokens).
|
30
31
|
"""
|
31
32
|
|
32
|
-
OMEN_TRADES_SUBGRAPH = "https://
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
REALITYETH_GRAPH_URL =
|
37
|
-
"https://api.thegraph.com/subgraphs/name/realityeth/realityeth-gnosis"
|
38
|
-
)
|
33
|
+
OMEN_TRADES_SUBGRAPH = "https://gateway-arbitrum.network.thegraph.com/api/{graph_api_key}/subgraphs/id/9fUVQpFwzpdWS9bq5WkAnmKbNNcoBwatMR4yZq81pbbz"
|
34
|
+
|
35
|
+
CONDITIONAL_TOKENS_SUBGRAPH = "https://gateway-arbitrum.network.thegraph.com/api/{graph_api_key}/subgraphs/id/7s9rGBffUTL8kDZuxvvpuc46v44iuDarbrADBFw5uVp2"
|
36
|
+
|
37
|
+
REALITYETH_GRAPH_URL = "https://gateway-arbitrum.network.thegraph.com/api/{graph_api_key}/subgraphs/id/E7ymrCnNcQdAAgLbdFWzGE5mvr5Mb5T9VfT43FqA7bNh"
|
39
38
|
|
40
39
|
INVALID_ANSWER = "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
41
40
|
|
@@ -49,12 +48,24 @@ class OmenSubgraphHandler(metaclass=SingletonMeta):
|
|
49
48
|
after=lambda x: logger.debug(f"query_json failed, {x.attempt_number=}."),
|
50
49
|
)(self.sg.query_json)
|
51
50
|
|
51
|
+
keys = APIKeys()
|
52
|
+
|
52
53
|
# Load the subgraph
|
53
|
-
self.trades_subgraph = self.sg.load_subgraph(
|
54
|
+
self.trades_subgraph = self.sg.load_subgraph(
|
55
|
+
self.OMEN_TRADES_SUBGRAPH.format(
|
56
|
+
graph_api_key=keys.graph_api_key.get_secret_value()
|
57
|
+
)
|
58
|
+
)
|
54
59
|
self.conditional_tokens_subgraph = self.sg.load_subgraph(
|
55
|
-
self.CONDITIONAL_TOKENS_SUBGRAPH
|
60
|
+
self.CONDITIONAL_TOKENS_SUBGRAPH.format(
|
61
|
+
graph_api_key=keys.graph_api_key.get_secret_value()
|
62
|
+
)
|
63
|
+
)
|
64
|
+
self.realityeth_subgraph = self.sg.load_subgraph(
|
65
|
+
self.REALITYETH_GRAPH_URL.format(
|
66
|
+
graph_api_key=keys.graph_api_key.get_secret_value()
|
67
|
+
)
|
56
68
|
)
|
57
|
-
self.realityeth_subgraph = self.sg.load_subgraph(self.REALITYETH_GRAPH_URL)
|
58
69
|
|
59
70
|
def _get_fields_for_bets(self, bets_field: FieldPath) -> list[FieldPath]:
|
60
71
|
markets = bets_field.fpmm
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import base64
|
2
|
+
import io
|
3
|
+
import typing as t
|
4
|
+
|
5
|
+
from PIL import Image
|
6
|
+
from PIL.Image import Image as ImageType
|
7
|
+
|
8
|
+
from prediction_market_agent_tooling.config import APIKeys
|
9
|
+
from prediction_market_agent_tooling.tools.utils import check_not_none
|
10
|
+
|
11
|
+
|
12
|
+
def generate_image(
|
13
|
+
prompt: str,
|
14
|
+
model: str = "dall-e-3",
|
15
|
+
size: t.Literal[
|
16
|
+
"256x256", "512x512", "1024x1024", "1792x1024", "1024x1792"
|
17
|
+
] = "1024x1024",
|
18
|
+
quality: t.Literal["standard", "hd"] = "standard",
|
19
|
+
) -> ImageType:
|
20
|
+
try:
|
21
|
+
from openai import OpenAI
|
22
|
+
except ImportError:
|
23
|
+
raise ImportError(
|
24
|
+
"openai not installed, please install extras `openai` to use this function."
|
25
|
+
)
|
26
|
+
response = (
|
27
|
+
OpenAI(
|
28
|
+
api_key=APIKeys().openai_api_key.get_secret_value(),
|
29
|
+
)
|
30
|
+
.images.generate(
|
31
|
+
model=model,
|
32
|
+
prompt=prompt,
|
33
|
+
size=size,
|
34
|
+
quality=quality,
|
35
|
+
response_format="b64_json",
|
36
|
+
n=1,
|
37
|
+
)
|
38
|
+
.data[0]
|
39
|
+
)
|
40
|
+
image = Image.open(
|
41
|
+
io.BytesIO(
|
42
|
+
base64.b64decode(
|
43
|
+
check_not_none(
|
44
|
+
response.b64_json, "Can't be none if response_format is b64_json."
|
45
|
+
)
|
46
|
+
)
|
47
|
+
)
|
48
|
+
)
|
49
|
+
return image
|
@@ -0,0 +1,30 @@
|
|
1
|
+
from PIL.Image import Image as ImageType
|
2
|
+
|
3
|
+
from prediction_market_agent_tooling.config import APIKeys
|
4
|
+
from prediction_market_agent_tooling.tools.image_gen.image_gen import generate_image
|
5
|
+
|
6
|
+
|
7
|
+
def rewrite_question_into_image_generation_prompt(question: str) -> str:
|
8
|
+
try:
|
9
|
+
from langchain_openai import ChatOpenAI
|
10
|
+
except ImportError:
|
11
|
+
raise ImportError(
|
12
|
+
"openai not installed, please install extras `langchain` to use this function."
|
13
|
+
)
|
14
|
+
llm = ChatOpenAI(
|
15
|
+
model="gpt-4-turbo",
|
16
|
+
temperature=0.0,
|
17
|
+
api_key=APIKeys().openai_api_key.get_secret_value(),
|
18
|
+
)
|
19
|
+
rewritten = str(
|
20
|
+
llm.invoke(
|
21
|
+
f"Rewrite this prediction market question '{question}' into a form that will generate nice thumbnail with DALL-E-3."
|
22
|
+
"The thumbnail should be catchy and visually appealing. With a large object in the center of the image."
|
23
|
+
).content
|
24
|
+
)
|
25
|
+
return rewritten
|
26
|
+
|
27
|
+
|
28
|
+
def generate_image_for_market(question: str) -> ImageType:
|
29
|
+
prompt = rewrite_question_into_image_generation_prompt(question)
|
30
|
+
return generate_image(prompt)
|
@@ -1,5 +1,7 @@
|
|
1
|
+
import binascii
|
1
2
|
from typing import Any, Optional, TypeVar
|
2
3
|
|
4
|
+
import base58
|
3
5
|
import tenacity
|
4
6
|
from eth_account import Account
|
5
7
|
from eth_typing import URI
|
@@ -16,6 +18,7 @@ from prediction_market_agent_tooling.gtypes import (
|
|
16
18
|
HexAddress,
|
17
19
|
HexBytes,
|
18
20
|
HexStr,
|
21
|
+
IPFSCIDVersion0,
|
19
22
|
PrivateKey,
|
20
23
|
xDai,
|
21
24
|
xdai_type,
|
@@ -287,3 +290,22 @@ def send_xdai_to(
|
|
287
290
|
web3, tx_params_new, from_private_key, timeout
|
288
291
|
)
|
289
292
|
return receipt_tx
|
293
|
+
|
294
|
+
|
295
|
+
def ipfscidv0_to_byte32(cid: IPFSCIDVersion0) -> HexBytes:
|
296
|
+
"""
|
297
|
+
Convert ipfscidv0 to 32 bytes.
|
298
|
+
Modified from https://github.com/emg110/ipfs2bytes32/blob/main/python/ipfs2bytes32.py
|
299
|
+
"""
|
300
|
+
decoded = base58.b58decode(cid)
|
301
|
+
sliced_decoded = decoded[2:]
|
302
|
+
return HexBytes(binascii.b2a_hex(sliced_decoded).decode("utf-8"))
|
303
|
+
|
304
|
+
|
305
|
+
def byte32_to_ipfscidv0(hex: HexBytes) -> IPFSCIDVersion0:
|
306
|
+
"""
|
307
|
+
Convert 32 bytes hex to ipfscidv0.
|
308
|
+
Modified from https://github.com/emg110/ipfs2bytes32/blob/main/python/ipfs2bytes32.py
|
309
|
+
"""
|
310
|
+
completed_binary_str = b"\x12 " + hex
|
311
|
+
return IPFSCIDVersion0(base58.b58encode(completed_binary_str).decode("utf-8"))
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: prediction-market-agent-tooling
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.38.0
|
4
4
|
Summary: Tools to benchmark, deploy and monitor prediction market agents.
|
5
5
|
Author: Gnosis
|
6
6
|
Requires-Python: >=3.10,<3.12
|
@@ -9,7 +9,9 @@ Classifier: Programming Language :: Python :: 3.10
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.11
|
10
10
|
Provides-Extra: google
|
11
11
|
Provides-Extra: langchain
|
12
|
+
Provides-Extra: openai
|
12
13
|
Requires-Dist: autoflake (>=2.2.1,<3.0.0)
|
14
|
+
Requires-Dist: base58 (>=2.1.1,<3.0.0)
|
13
15
|
Requires-Dist: cron-validator (>=1.0.8,<2.0.0)
|
14
16
|
Requires-Dist: eth-account (>=0.8.0,<0.9.0)
|
15
17
|
Requires-Dist: eth-typing (>=3.0.0,<4.0.0)
|
@@ -25,6 +27,7 @@ Requires-Dist: langchain-openai (>=0.0.5,<0.0.6) ; extra == "langchain"
|
|
25
27
|
Requires-Dist: langfuse (>=2.27.1,<3.0.0)
|
26
28
|
Requires-Dist: loguru (>=0.7.2,<0.8.0)
|
27
29
|
Requires-Dist: numpy (>=1.26.4,<2.0.0)
|
30
|
+
Requires-Dist: openai (>=1.0.0,<2.0.0) ; extra == "openai"
|
28
31
|
Requires-Dist: prompt-toolkit (>=3.0.43,<4.0.0)
|
29
32
|
Requires-Dist: pydantic (>=2.6.1,<3.0.0)
|
30
33
|
Requires-Dist: pydantic-settings (>=2.1.0,<3.0.0)
|
@@ -6,19 +6,20 @@ prediction_market_agent_tooling/abis/omen_fpmm_factory.abi.json,sha256=KBEb-COXM
|
|
6
6
|
prediction_market_agent_tooling/abis/omen_kleros.abi.json,sha256=QPMXrYA5UCo_wVUqmzwCxes1bfvfzqzif3L_mJcx6j4,7315
|
7
7
|
prediction_market_agent_tooling/abis/omen_oracle.abi.json,sha256=YPZ-FLvd4PA9pYd6d5mQI1TD11JnsE0LGxH4XcZZFCA,1775
|
8
8
|
prediction_market_agent_tooling/abis/omen_realitio.abi.json,sha256=7HmFkBF_rq83UTaH2kRRsEfc_WZuf4n-qvkB4nhvweo,15953
|
9
|
+
prediction_market_agent_tooling/abis/omen_thumbnailmapping.abi.json,sha256=u1-3B8FB3Ys9KVJCH-lw9ArkicdxbNMf34dV-VEGMMU,930
|
9
10
|
prediction_market_agent_tooling/abis/wxdai.abi.json,sha256=m3qC06Yug-pToI0lSFe1f8e6gKMIulnV3MA2K0X51hI,6055
|
10
11
|
prediction_market_agent_tooling/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
12
|
prediction_market_agent_tooling/benchmark/agents.py,sha256=HPIFJvackW110ch3UkktbxhU48gMRVo4gQse84Klhdc,4000
|
12
13
|
prediction_market_agent_tooling/benchmark/benchmark.py,sha256=xiHKzZx5GHSsDerFHMZ9j_LXAXnSaITSvv67iPe3MEU,21095
|
13
14
|
prediction_market_agent_tooling/benchmark/utils.py,sha256=iS1BzyXcCMfMm1Rx--1QCH0pHvBTblTndcDQFbTUJ2s,2897
|
14
|
-
prediction_market_agent_tooling/config.py,sha256=
|
15
|
+
prediction_market_agent_tooling/config.py,sha256=pTeV4mbvPmrS_MzmiBklg05_gtsR3pa9Id5HCS-AzKQ,4519
|
15
16
|
prediction_market_agent_tooling/deploy/agent.py,sha256=h33uU97x3DjBy8INONtS1Hc5B-NnNDV6MENeeCp0qoA,10185
|
16
17
|
prediction_market_agent_tooling/deploy/agent_example.py,sha256=tqXVA2HSFK3pdZ49tMmta8aKdJFT8JN8WeJ1akjrpBk,909
|
17
18
|
prediction_market_agent_tooling/deploy/constants.py,sha256=M5ty8URipYMGe_G-RzxRydK3AFL6CyvmqCraJUrLBnE,82
|
18
19
|
prediction_market_agent_tooling/deploy/gcp/deploy.py,sha256=CYUgnfy-9XVk04kkxA_5yp0GE9Mw5caYqlFUZQ2j3ks,3739
|
19
20
|
prediction_market_agent_tooling/deploy/gcp/kubernetes_models.py,sha256=qYIHRxQLac3yxtZ8ChikiPG9O1aUQucHW0muTSm1nto,2627
|
20
21
|
prediction_market_agent_tooling/deploy/gcp/utils.py,sha256=oyW0jgrUT2Tr49c7GlpcMsYNQjoCSOcWis3q-MmVAhU,6089
|
21
|
-
prediction_market_agent_tooling/gtypes.py,sha256=
|
22
|
+
prediction_market_agent_tooling/gtypes.py,sha256=lbV2nsPyhMIRI9olx0_6A06jwTWKYBPGMxyiGVFysag,2467
|
22
23
|
prediction_market_agent_tooling/loggers.py,sha256=ua9rynYmsbOJZjxPIFxRBooomeN08zuLSJ7lxZMDS7w,3133
|
23
24
|
prediction_market_agent_tooling/markets/agent_market.py,sha256=SMvkXct_RgHXqF-fVq3ooTIQ_99MG77kVlvS3rM8Ozo,7019
|
24
25
|
prediction_market_agent_tooling/markets/categorize.py,sha256=yTd-lDMPW4ESDSzmxeLLBuzLX0FggOF7Vbswh7295o0,941
|
@@ -31,10 +32,10 @@ prediction_market_agent_tooling/markets/manifold/utils.py,sha256=cPPFWXm3vCYH1jy
|
|
31
32
|
prediction_market_agent_tooling/markets/markets.py,sha256=w05Oo7yCA2axpCw69Q9y4i9Gcdpht0u5bZGbWqld3rU,2964
|
32
33
|
prediction_market_agent_tooling/markets/omen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
33
34
|
prediction_market_agent_tooling/markets/omen/data_models.py,sha256=EXtjmcujx68Xu50BVkYXvLuf_Asx5o65RvFS3ZS6HGs,14405
|
34
|
-
prediction_market_agent_tooling/markets/omen/omen.py,sha256=
|
35
|
-
prediction_market_agent_tooling/markets/omen/omen_contracts.py,sha256
|
35
|
+
prediction_market_agent_tooling/markets/omen/omen.py,sha256=fS19WoDG_N8WIa5FY-YRF21Np46y6d93QBJOpNKXi7Q,33939
|
36
|
+
prediction_market_agent_tooling/markets/omen/omen_contracts.py,sha256=-EEmN4vA8Fn52ewqQ7ZXZAFnfP4EQ4YISkeDHb9oeLk,21722
|
36
37
|
prediction_market_agent_tooling/markets/omen/omen_resolving.py,sha256=g77QsQ5WnSI2rzBlX87L_EhWMwobkyXyfRhHQmpAdzo,9012
|
37
|
-
prediction_market_agent_tooling/markets/omen/omen_subgraph_handler.py,sha256=
|
38
|
+
prediction_market_agent_tooling/markets/omen/omen_subgraph_handler.py,sha256=2y89FJlDrJ_hpeNTFZU1W30xCpt8QXjssEW8bNZnEpU,23596
|
38
39
|
prediction_market_agent_tooling/markets/polymarket/api.py,sha256=HXmA1akA0qDj0m3e-GEvWG8x75pm6BX4H7YJPQcST7I,4767
|
39
40
|
prediction_market_agent_tooling/markets/polymarket/data_models.py,sha256=9CJzakyEcsn6DQBK2nOXjOMzTZBLAmK_KqevXvW17DI,4292
|
40
41
|
prediction_market_agent_tooling/markets/polymarket/data_models_web.py,sha256=f8SRQy0Rn-gIHSEMrJJAI8H3J7l8lzOLj3aCMe0vJv8,11324
|
@@ -48,7 +49,7 @@ prediction_market_agent_tooling/monitor/monitor.py,sha256=uJdaEpGWp4VcejoQLF0uOx
|
|
48
49
|
prediction_market_agent_tooling/monitor/monitor_app.py,sha256=rDxgdDJqSK0ARx0TJFMkS76npkHZJz0__Rp0xTpiRok,4611
|
49
50
|
prediction_market_agent_tooling/monitor/monitor_settings.py,sha256=Xiozs3AsufuJ04JOe1vjUri-IAMWHjjmc2ugGGiHNH4,947
|
50
51
|
prediction_market_agent_tooling/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
51
|
-
prediction_market_agent_tooling/tools/balances.py,sha256=
|
52
|
+
prediction_market_agent_tooling/tools/balances.py,sha256=nR8_dSfbm3yTOOmMAwhGlurftEiNo1w1WIVzbskjdmM,837
|
52
53
|
prediction_market_agent_tooling/tools/betting_strategies/kelly_criterion.py,sha256=IbhQPoKsQnjnag_n_wAL12n8QdCe7tAMRNV2QS8yYxY,3520
|
53
54
|
prediction_market_agent_tooling/tools/betting_strategies/market_moving.py,sha256=wtrHVQRuA0uDx06z0OxQLYbswuOpHQ1UyCWwLCrD_oM,4400
|
54
55
|
prediction_market_agent_tooling/tools/betting_strategies/minimum_bet_to_win.py,sha256=-FUSuQQgjcWSSnoFxnlAyTeilY6raJABJVM2QKkFqAY,438
|
@@ -59,15 +60,17 @@ prediction_market_agent_tooling/tools/costs.py,sha256=EaAJ7v9laD4VEV3d8B44M4u3_o
|
|
59
60
|
prediction_market_agent_tooling/tools/gnosis_rpc.py,sha256=_MYSoyOR2MgAJkop1ERf8RhLum-M8S6OjaAsaqUW41w,203
|
60
61
|
prediction_market_agent_tooling/tools/google.py,sha256=SfVDxb3oEOUK8mpd0l3mTX9ybrdrTPNM6HjfJ7kfNjA,1794
|
61
62
|
prediction_market_agent_tooling/tools/hexbytes_custom.py,sha256=Bp94qgPjvjWf1Vb4lNzGFDXRdThw1rJ91vL6r2PWq5E,2096
|
63
|
+
prediction_market_agent_tooling/tools/image_gen/image_gen.py,sha256=HzRwBx62hOXBOmrtpkXaP9Qq1Ku03uUGdREocyjLQ_k,1266
|
64
|
+
prediction_market_agent_tooling/tools/image_gen/market_thumbnail_gen.py,sha256=svEu-oJNVuqpPpA7JjPEz3s1yM1_DgVf4M6gu90YKMQ,1110
|
62
65
|
prediction_market_agent_tooling/tools/is_predictable.py,sha256=yRSkmu4lZqrSje9QGpnyWTFmdCnRvClfaFDHE2Zf9G4,2936
|
63
66
|
prediction_market_agent_tooling/tools/parallelism.py,sha256=8mgkF5sBwFGS5GMvlpzam82Y3p2swPYuNsywpQuy-a4,1508
|
64
67
|
prediction_market_agent_tooling/tools/safe.py,sha256=h0xOO0eNtitClf0fPkn-0oTc6A_bflDTee98V_aiV-A,5195
|
65
68
|
prediction_market_agent_tooling/tools/singleton.py,sha256=CiIELUiI-OeS7U7eeHEt0rnVhtQGzwoUdAgn_7u_GBM,729
|
66
69
|
prediction_market_agent_tooling/tools/streamlit_user_login.py,sha256=NXEqfjT9Lc9QtliwSGRASIz1opjQ7Btme43H4qJbzgE,3010
|
67
70
|
prediction_market_agent_tooling/tools/utils.py,sha256=-G22UEbCRm59bm1RWFdeF55hRsaxgwZVAHvK32-Ye1g,6190
|
68
|
-
prediction_market_agent_tooling/tools/web3_utils.py,sha256=
|
69
|
-
prediction_market_agent_tooling-0.
|
70
|
-
prediction_market_agent_tooling-0.
|
71
|
-
prediction_market_agent_tooling-0.
|
72
|
-
prediction_market_agent_tooling-0.
|
73
|
-
prediction_market_agent_tooling-0.
|
71
|
+
prediction_market_agent_tooling/tools/web3_utils.py,sha256=nKRHmdLnWSKd3wpo-cysXGvhhrJ2Yf69sN2FFQfSt6s,10578
|
72
|
+
prediction_market_agent_tooling-0.38.0.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
|
73
|
+
prediction_market_agent_tooling-0.38.0.dist-info/METADATA,sha256=BCdK9YuigO1Rdphbyjb_MfbI1HgJJkQsnH53ZAF6opg,7634
|
74
|
+
prediction_market_agent_tooling-0.38.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
75
|
+
prediction_market_agent_tooling-0.38.0.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
|
76
|
+
prediction_market_agent_tooling-0.38.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|