prediction-market-agent-tooling 0.61.1.dev477__py3-none-any.whl → 0.61.2.dev479__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/gvp2_settlement.abi.json +89 -0
- prediction_market_agent_tooling/config.py +3 -2
- prediction_market_agent_tooling/markets/omen/omen_contracts.py +24 -0
- prediction_market_agent_tooling/markets/seer/data_models.py +0 -3
- prediction_market_agent_tooling/markets/seer/seer_subgraph_handler.py +2 -5
- {prediction_market_agent_tooling-0.61.1.dev477.dist-info → prediction_market_agent_tooling-0.61.2.dev479.dist-info}/METADATA +1 -1
- {prediction_market_agent_tooling-0.61.1.dev477.dist-info → prediction_market_agent_tooling-0.61.2.dev479.dist-info}/RECORD +10 -9
- {prediction_market_agent_tooling-0.61.1.dev477.dist-info → prediction_market_agent_tooling-0.61.2.dev479.dist-info}/LICENSE +0 -0
- {prediction_market_agent_tooling-0.61.1.dev477.dist-info → prediction_market_agent_tooling-0.61.2.dev479.dist-info}/WHEEL +0 -0
- {prediction_market_agent_tooling-0.61.1.dev477.dist-info → prediction_market_agent_tooling-0.61.2.dev479.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,89 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"anonymous": false,
|
4
|
+
"inputs": [
|
5
|
+
{
|
6
|
+
"indexed": true,
|
7
|
+
"internalType": "address",
|
8
|
+
"name": "owner",
|
9
|
+
"type": "address"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"indexed": false,
|
13
|
+
"internalType": "contract IERC20",
|
14
|
+
"name": "sellToken",
|
15
|
+
"type": "address"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"indexed": false,
|
19
|
+
"internalType": "contract IERC20",
|
20
|
+
"name": "buyToken",
|
21
|
+
"type": "address"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"indexed": false,
|
25
|
+
"internalType": "uint256",
|
26
|
+
"name": "sellAmount",
|
27
|
+
"type": "uint256"
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"indexed": false,
|
31
|
+
"internalType": "uint256",
|
32
|
+
"name": "buyAmount",
|
33
|
+
"type": "uint256"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"indexed": false,
|
37
|
+
"internalType": "uint256",
|
38
|
+
"name": "feeAmount",
|
39
|
+
"type": "uint256"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"indexed": false,
|
43
|
+
"internalType": "bytes",
|
44
|
+
"name": "orderUid",
|
45
|
+
"type": "bytes"
|
46
|
+
}
|
47
|
+
],
|
48
|
+
"name": "Trade",
|
49
|
+
"type": "event"
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"inputs": [
|
53
|
+
{
|
54
|
+
"internalType": "bytes",
|
55
|
+
"name": "orderUid",
|
56
|
+
"type": "bytes"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"internalType": "bool",
|
60
|
+
"name": "signed",
|
61
|
+
"type": "bool"
|
62
|
+
}
|
63
|
+
],
|
64
|
+
"name": "setPreSignature",
|
65
|
+
"outputs": [],
|
66
|
+
"stateMutability": "nonpayable",
|
67
|
+
"type": "function"
|
68
|
+
},
|
69
|
+
{
|
70
|
+
"inputs": [
|
71
|
+
{
|
72
|
+
"internalType": "bytes",
|
73
|
+
"name": "orderUid",
|
74
|
+
"type": "bytes"
|
75
|
+
}
|
76
|
+
],
|
77
|
+
"name": "invalidateOrder",
|
78
|
+
"outputs": [],
|
79
|
+
"stateMutability": "nonpayable",
|
80
|
+
"type": "function"
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"inputs": [],
|
84
|
+
"name": "domainSeparator",
|
85
|
+
"outputs": [{ "name": "", "type": "bytes32" }],
|
86
|
+
"stateMutability": "nonpayable",
|
87
|
+
"type": "function"
|
88
|
+
}
|
89
|
+
]
|
@@ -3,6 +3,7 @@ import typing as t
|
|
3
3
|
from copy import deepcopy
|
4
4
|
|
5
5
|
from eth_account.signers.local import LocalAccount
|
6
|
+
from eth_typing import URI
|
6
7
|
from pydantic import Field, model_validator
|
7
8
|
from pydantic.types import SecretStr
|
8
9
|
from pydantic.v1.types import SecretStr as SecretStrV1
|
@@ -277,11 +278,11 @@ class RPCConfig(BaseSettings):
|
|
277
278
|
env_file=".env", env_file_encoding="utf-8", extra="ignore"
|
278
279
|
)
|
279
280
|
|
280
|
-
GNOSIS_RPC_URL:
|
281
|
+
GNOSIS_RPC_URL: URI = Field(default=URI("https://rpc.gnosischain.com"))
|
281
282
|
CHAIN_ID: ChainID = Field(default=ChainID(100))
|
282
283
|
|
283
284
|
@property
|
284
|
-
def gnosis_rpc_url(self) ->
|
285
|
+
def gnosis_rpc_url(self) -> URI:
|
285
286
|
return check_not_none(
|
286
287
|
self.GNOSIS_RPC_URL, "GNOSIS_RPC_URL missing in the environment."
|
287
288
|
)
|
@@ -893,6 +893,30 @@ class OmenThumbnailMapping(ContractOnGnosisChain):
|
|
893
893
|
)
|
894
894
|
|
895
895
|
|
896
|
+
class CowGPv2SettlementContract(ContractOnGnosisChain):
|
897
|
+
# Contract ABI taken from https://github.com/cowprotocol/cow-sdk/blob/main/abi/GPv2Settlement.json.
|
898
|
+
abi: ABI = abi_field_validator(
|
899
|
+
os.path.join(
|
900
|
+
os.path.dirname(os.path.realpath(__file__)),
|
901
|
+
"../../abis/gvp2_settlement.abi.json",
|
902
|
+
)
|
903
|
+
)
|
904
|
+
|
905
|
+
def setPreSignature(
|
906
|
+
self,
|
907
|
+
api_keys: APIKeys,
|
908
|
+
orderId: HexBytes,
|
909
|
+
signed: bool,
|
910
|
+
web3: Web3 | None = None,
|
911
|
+
) -> None:
|
912
|
+
self.send(
|
913
|
+
api_keys=api_keys,
|
914
|
+
function_name="setPreSignature",
|
915
|
+
function_params=[orderId, signed],
|
916
|
+
web3=web3,
|
917
|
+
)
|
918
|
+
|
919
|
+
|
896
920
|
class CollateralTokenChoice(str, Enum):
|
897
921
|
wxdai = "wxdai"
|
898
922
|
sdai = "sdai"
|
@@ -120,10 +120,10 @@ class SeerSubgraphHandler(BaseSubgraphHandler):
|
|
120
120
|
match sort_by:
|
121
121
|
case SortBy.NEWEST:
|
122
122
|
sort_direction = "desc"
|
123
|
-
sort_by_field = self.seer_subgraph.Market.
|
123
|
+
sort_by_field = self.seer_subgraph.Market.block_timestamp
|
124
124
|
case SortBy.CLOSING_SOONEST:
|
125
125
|
sort_direction = "asc"
|
126
|
-
sort_by_field = self.seer_subgraph.Market.
|
126
|
+
sort_by_field = self.seer_subgraph.Market.opening_ts
|
127
127
|
# ToDo - Implement liquidity conditions by looking up Swapr subgraph.
|
128
128
|
case SortBy.NONE | SortBy.HIGHEST_LIQUIDITY | SortBy.LOWEST_LIQUIDITY:
|
129
129
|
sort_direction = None
|
@@ -200,9 +200,6 @@ class SeerSubgraphHandler(BaseSubgraphHandler):
|
|
200
200
|
fields = [
|
201
201
|
pools_field.id,
|
202
202
|
pools_field.liquidity,
|
203
|
-
pools_field.sqrtPrice,
|
204
|
-
pools_field.token0Price,
|
205
|
-
pools_field.token1Price,
|
206
203
|
pools_field.token0.id,
|
207
204
|
pools_field.token0.name,
|
208
205
|
pools_field.token0.symbol,
|
@@ -3,6 +3,7 @@ prediction_market_agent_tooling/abis/depositablewrapper_erc20.abi.json,sha256=m0
|
|
3
3
|
prediction_market_agent_tooling/abis/erc20.abi.json,sha256=b8t6tPUhjBo5dHFq8ipsK-ih_g29dOTbWI0GBZiEWL8,3685
|
4
4
|
prediction_market_agent_tooling/abis/erc4626.abi.json,sha256=qvmonhj3tJU5flR4pJjXCSSwB8tgEiJcx4Sc5ilQ5VY,17801
|
5
5
|
prediction_market_agent_tooling/abis/erc721.abi.json,sha256=sslrlTfLAkHA7cAJAaAHmGBSsY8_3K6jNK-2OoPUTPs,5396
|
6
|
+
prediction_market_agent_tooling/abis/gvp2_settlement.abi.json,sha256=J-OqsRqeqIo81RaT4btCGmwqBv6s7mYuTI9vWLr6Eu4,1790
|
6
7
|
prediction_market_agent_tooling/abis/omen_agentresultmapping.abi.json,sha256=TVWP5J6RO8mb1YpI-RA2iCgeCqGfrIw0OfbHngekTSs,5769
|
7
8
|
prediction_market_agent_tooling/abis/omen_dxdao.abi.json,sha256=Z1kD1QfgYfGwsZEI2UFDNEGZ4hMOix3HGICk8xlO4Ds,9578
|
8
9
|
prediction_market_agent_tooling/abis/omen_fpmm.abi.json,sha256=CDib_b5PVj4m0JBVCB20cTshiVx8st1Be-7E460qFoY,11406
|
@@ -20,7 +21,7 @@ prediction_market_agent_tooling/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-
|
|
20
21
|
prediction_market_agent_tooling/benchmark/agents.py,sha256=B1-uWdyeN4GGKMWGK_-CcAFJg1m9Y_XuaeIHPB29QR8,3971
|
21
22
|
prediction_market_agent_tooling/benchmark/benchmark.py,sha256=MqTiaaJ3cYiOLUVR7OyImLWxcEya3Rl5JyFYW-K0lwM,17097
|
22
23
|
prediction_market_agent_tooling/benchmark/utils.py,sha256=D0MfUkVZllmvcU0VOurk9tcKT7JTtwwOp-63zuCBVuc,2880
|
23
|
-
prediction_market_agent_tooling/config.py,sha256=
|
24
|
+
prediction_market_agent_tooling/config.py,sha256=QWybGq-DfjlRKG2G4l_4kJEyH3pmUvmcw4n2d2-z3eQ,10183
|
24
25
|
prediction_market_agent_tooling/deploy/agent.py,sha256=tMREXM2LwFsatbysCaNRvtCAyCNMAPMGgkkIEpCRj7g,25022
|
25
26
|
prediction_market_agent_tooling/deploy/agent_example.py,sha256=dIIdZashExWk9tOdyDjw87AuUcGyM7jYxNChYrVK2dM,1001
|
26
27
|
prediction_market_agent_tooling/deploy/betting_strategy.py,sha256=Y6Pb8OfSb6galRbfdNBvvNTgO-4dR2ybJ4o5GKJcMoM,12894
|
@@ -53,7 +54,7 @@ prediction_market_agent_tooling/markets/omen/__init__.py,sha256=47DEQpj8HBSa-_TI
|
|
53
54
|
prediction_market_agent_tooling/markets/omen/data_models.py,sha256=sfaOpNk6oFIzxYQzs9EehqAT_19IxYJy9pns-UTepOc,28934
|
54
55
|
prediction_market_agent_tooling/markets/omen/omen.py,sha256=FUPGOKmhiKjLHLmfgHBM_MzoiKVWiPOu8SzRk-AKrNk,53339
|
55
56
|
prediction_market_agent_tooling/markets/omen/omen_constants.py,sha256=D9oflYKafLQiHYtB5sScMHqmXyzM8JP8J0yATmc4SQQ,233
|
56
|
-
prediction_market_agent_tooling/markets/omen/omen_contracts.py,sha256=
|
57
|
+
prediction_market_agent_tooling/markets/omen/omen_contracts.py,sha256=SZbHZKtvED_elhrcYeY0TYsWcxzDGXm_wAczAQ3dP_I,29332
|
57
58
|
prediction_market_agent_tooling/markets/omen/omen_resolving.py,sha256=B4z9dPqtEfows8-1hkstBLLS_7X0L9z3CG41adyCYgg,10336
|
58
59
|
prediction_market_agent_tooling/markets/omen/omen_subgraph_handler.py,sha256=dQyz1RR1MlQncb1Slq7tk1Maql-sbb5YYE_sDe26MYA,38711
|
59
60
|
prediction_market_agent_tooling/markets/polymarket/api.py,sha256=UZ4_TG8ceb9Y-qgsOKs8Qiv8zDt957QkT8IX2c83yqo,4800
|
@@ -61,10 +62,10 @@ prediction_market_agent_tooling/markets/polymarket/data_models.py,sha256=Fd5PI5y
|
|
61
62
|
prediction_market_agent_tooling/markets/polymarket/data_models_web.py,sha256=VZhVccTApygSKMmy6Au2G02JCJOKJnR_oVeKlaesuSg,12548
|
62
63
|
prediction_market_agent_tooling/markets/polymarket/polymarket.py,sha256=NRoZK71PtH8kkangMqme7twcAXhRJSSabbmOir-UnAI,3418
|
63
64
|
prediction_market_agent_tooling/markets/polymarket/utils.py,sha256=8kTeVjXPcXC6DkDvWYsZQLY7x8DS6CEp_yznSEazsNU,2037
|
64
|
-
prediction_market_agent_tooling/markets/seer/data_models.py,sha256=
|
65
|
+
prediction_market_agent_tooling/markets/seer/data_models.py,sha256=HGJv4XSvCxXLLC5VwxZTZ5E4w_bWGKv50fM_6ssloxI,8203
|
65
66
|
prediction_market_agent_tooling/markets/seer/seer.py,sha256=r21sXj_4_oIG2L1N5l56vEYGI_q2RGem_6G-Sixkbck,12954
|
66
67
|
prediction_market_agent_tooling/markets/seer/seer_contracts.py,sha256=E7CYAKZiK6cg3dyj1kJuIPKSYYUft98F64shF5S0g4s,2730
|
67
|
-
prediction_market_agent_tooling/markets/seer/seer_subgraph_handler.py,sha256
|
68
|
+
prediction_market_agent_tooling/markets/seer/seer_subgraph_handler.py,sha256=aycOvJ1_f5m7xzd_Hlx98_-VeM869IY9mTzJ2zn_VEM,8577
|
68
69
|
prediction_market_agent_tooling/monitor/financial_metrics/financial_metrics.py,sha256=fjIgjDIx5MhH5mwf7S0cspLOOSU3elYLhGYoIiM26mU,2746
|
69
70
|
prediction_market_agent_tooling/monitor/markets/manifold.py,sha256=TS4ERwTfQnot8dhekNyVNhJYf5ysYsjF-9v5_kM3aVI,3334
|
70
71
|
prediction_market_agent_tooling/monitor/markets/metaculus.py,sha256=LOnyWWBFdg10-cTWdb76nOsNjDloO8OfMT85GBzRCFI,1455
|
@@ -117,8 +118,8 @@ prediction_market_agent_tooling/tools/tokens/main_token.py,sha256=7JPgVF4RbiFzLD
|
|
117
118
|
prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
|
118
119
|
prediction_market_agent_tooling/tools/utils.py,sha256=jLG4nbEoIzzJiZ4RgMx4Q969Zdl0p0s63p8uET_0Fuw,6440
|
119
120
|
prediction_market_agent_tooling/tools/web3_utils.py,sha256=3wfqNxvMn44ivweFRoeKNVb9QRtFd7kFtp7VUY5juEE,12862
|
120
|
-
prediction_market_agent_tooling-0.61.
|
121
|
-
prediction_market_agent_tooling-0.61.
|
122
|
-
prediction_market_agent_tooling-0.61.
|
123
|
-
prediction_market_agent_tooling-0.61.
|
124
|
-
prediction_market_agent_tooling-0.61.
|
121
|
+
prediction_market_agent_tooling-0.61.2.dev479.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
|
122
|
+
prediction_market_agent_tooling-0.61.2.dev479.dist-info/METADATA,sha256=ufY7OTlPCjde-fnIbsozbmh8j-zLx2VFGPyIVCLSlzY,8636
|
123
|
+
prediction_market_agent_tooling-0.61.2.dev479.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
124
|
+
prediction_market_agent_tooling-0.61.2.dev479.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
|
125
|
+
prediction_market_agent_tooling-0.61.2.dev479.dist-info/RECORD,,
|
File without changes
|
File without changes
|