prediction-market-agent-tooling 0.64.10__py3-none-any.whl → 0.64.11.dev653__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/config.py +15 -0
- {prediction_market_agent_tooling-0.64.10.dist-info → prediction_market_agent_tooling-0.64.11.dev653.dist-info}/METADATA +1 -1
- {prediction_market_agent_tooling-0.64.10.dist-info → prediction_market_agent_tooling-0.64.11.dev653.dist-info}/RECORD +6 -6
- {prediction_market_agent_tooling-0.64.10.dist-info → prediction_market_agent_tooling-0.64.11.dev653.dist-info}/LICENSE +0 -0
- {prediction_market_agent_tooling-0.64.10.dist-info → prediction_market_agent_tooling-0.64.11.dev653.dist-info}/WHEEL +0 -0
- {prediction_market_agent_tooling-0.64.10.dist-info → prediction_market_agent_tooling-0.64.11.dev653.dist-info}/entry_points.txt +0 -0
@@ -278,9 +278,16 @@ class RPCConfig(BaseSettings):
|
|
278
278
|
env_file=".env", env_file_encoding="utf-8", extra="ignore"
|
279
279
|
)
|
280
280
|
|
281
|
+
ETHEREUM_RPC_URL: URI = Field(default=URI("https://ethereum-rpc.publicnode.com"))
|
281
282
|
GNOSIS_RPC_URL: URI = Field(default=URI("https://rpc.gnosischain.com"))
|
282
283
|
CHAIN_ID: ChainID = Field(default=ChainID(100))
|
283
284
|
|
285
|
+
@property
|
286
|
+
def ethereum_rpc_url(self) -> URI:
|
287
|
+
return check_not_none(
|
288
|
+
self.ETHEREUM_RPC_URL, "ETHEREUM_RPC_URL missing in the environment."
|
289
|
+
)
|
290
|
+
|
284
291
|
@property
|
285
292
|
def gnosis_rpc_url(self) -> URI:
|
286
293
|
return check_not_none(
|
@@ -291,6 +298,14 @@ class RPCConfig(BaseSettings):
|
|
291
298
|
def chain_id(self) -> ChainID:
|
292
299
|
return check_not_none(self.CHAIN_ID, "CHAIN_ID missing in the environment.")
|
293
300
|
|
301
|
+
def chain_id_to_rpc_url(self, chain_id: ChainID) -> URI:
|
302
|
+
if chain_id == ChainID(1):
|
303
|
+
return self.ethereum_rpc_url
|
304
|
+
elif chain_id == ChainID(100):
|
305
|
+
return self.gnosis_rpc_url
|
306
|
+
else:
|
307
|
+
raise ValueError(f"Unsupported chain ID: {chain_id}")
|
308
|
+
|
294
309
|
def get_web3(self) -> Web3:
|
295
310
|
return Web3(Web3.HTTPProvider(self.gnosis_rpc_url))
|
296
311
|
|
@@ -22,7 +22,7 @@ prediction_market_agent_tooling/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-
|
|
22
22
|
prediction_market_agent_tooling/benchmark/agents.py,sha256=B1-uWdyeN4GGKMWGK_-CcAFJg1m9Y_XuaeIHPB29QR8,3971
|
23
23
|
prediction_market_agent_tooling/benchmark/benchmark.py,sha256=MqTiaaJ3cYiOLUVR7OyImLWxcEya3Rl5JyFYW-K0lwM,17097
|
24
24
|
prediction_market_agent_tooling/benchmark/utils.py,sha256=D0MfUkVZllmvcU0VOurk9tcKT7JTtwwOp-63zuCBVuc,2880
|
25
|
-
prediction_market_agent_tooling/config.py,sha256=
|
25
|
+
prediction_market_agent_tooling/config.py,sha256=h2aJITajiqtnuWbIZSYBGBAiSuU_apwf_kUseDsFaog,10742
|
26
26
|
prediction_market_agent_tooling/deploy/agent.py,sha256=dobqPUQkaDPhsvMmXwibNKu4hSSTXTvmfa3F46ylLBc,26560
|
27
27
|
prediction_market_agent_tooling/deploy/agent_example.py,sha256=dIIdZashExWk9tOdyDjw87AuUcGyM7jYxNChYrVK2dM,1001
|
28
28
|
prediction_market_agent_tooling/deploy/betting_strategy.py,sha256=p25t7VU7I4hSkSl6SpzI_W55kLbYEySQdBqeschmARY,12918
|
@@ -125,8 +125,8 @@ prediction_market_agent_tooling/tools/tokens/usd.py,sha256=yuW8iPPtcpP4eLH2nORMD
|
|
125
125
|
prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
|
126
126
|
prediction_market_agent_tooling/tools/utils.py,sha256=AC2a68jwASMWuQi-w8twl8b_M52YwrEJ81abmuEaqMY,6661
|
127
127
|
prediction_market_agent_tooling/tools/web3_utils.py,sha256=zRq-eeBGWt8uUGN9G_WfjmJ0eVvO8aWE9S0Pz_Y6AOA,12342
|
128
|
-
prediction_market_agent_tooling-0.64.
|
129
|
-
prediction_market_agent_tooling-0.64.
|
130
|
-
prediction_market_agent_tooling-0.64.
|
131
|
-
prediction_market_agent_tooling-0.64.
|
132
|
-
prediction_market_agent_tooling-0.64.
|
128
|
+
prediction_market_agent_tooling-0.64.11.dev653.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
|
129
|
+
prediction_market_agent_tooling-0.64.11.dev653.dist-info/METADATA,sha256=dvLhCSpUWXLrS13lCWL6nhcQZ5Ql7ogyRqf0sjr5p1s,8749
|
130
|
+
prediction_market_agent_tooling-0.64.11.dev653.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
131
|
+
prediction_market_agent_tooling-0.64.11.dev653.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
|
132
|
+
prediction_market_agent_tooling-0.64.11.dev653.dist-info/RECORD,,
|
File without changes
|
File without changes
|