wayfinder-paths 0.1.17__py3-none-any.whl → 0.1.18__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.
Potentially problematic release.
This version of wayfinder-paths might be problematic. Click here for more details.
- wayfinder_paths/adapters/hyperlend_adapter/adapter.py +2 -4
- wayfinder_paths/core/config.py +12 -0
- wayfinder_paths/core/utils/web3.py +2 -2
- {wayfinder_paths-0.1.17.dist-info → wayfinder_paths-0.1.18.dist-info}/METADATA +1 -1
- {wayfinder_paths-0.1.17.dist-info → wayfinder_paths-0.1.18.dist-info}/RECORD +7 -7
- {wayfinder_paths-0.1.17.dist-info → wayfinder_paths-0.1.18.dist-info}/LICENSE +0 -0
- {wayfinder_paths-0.1.17.dist-info → wayfinder_paths-0.1.18.dist-info}/WHEEL +0 -0
|
@@ -191,8 +191,7 @@ class HyperlendAdapter(BaseAdapter):
|
|
|
191
191
|
target=self.gateway_address,
|
|
192
192
|
abi=WRAPPED_TOKEN_GATEWAY_ABI,
|
|
193
193
|
fn_name="withdrawETH",
|
|
194
|
-
args=[self._gateway_first_arg(
|
|
195
|
-
underlying_token), qty, strategy],
|
|
194
|
+
args=[self._gateway_first_arg(underlying_token), qty, strategy],
|
|
196
195
|
from_address=strategy,
|
|
197
196
|
chain_id=chain_id,
|
|
198
197
|
)
|
|
@@ -292,6 +291,5 @@ class HyperlendAdapter(BaseAdapter):
|
|
|
292
291
|
|
|
293
292
|
def _checksum(self, address: str | None) -> str:
|
|
294
293
|
if not address:
|
|
295
|
-
raise ValueError(
|
|
296
|
-
"Missing required contract address in HyperLend config")
|
|
294
|
+
raise ValueError("Missing required contract address in HyperLend config")
|
|
297
295
|
return to_checksum_address(address)
|
wayfinder_paths/core/config.py
CHANGED
|
@@ -195,6 +195,18 @@ class StrategyJobConfig:
|
|
|
195
195
|
)
|
|
196
196
|
|
|
197
197
|
|
|
198
|
+
def set_rpc_urls(rpc_urls):
|
|
199
|
+
if "strategy" not in CONFIG:
|
|
200
|
+
CONFIG["strategy"] = {}
|
|
201
|
+
if "rpc_urls" not in CONFIG["strategy"]:
|
|
202
|
+
CONFIG["strategy"]["rpc_urls"] = {}
|
|
203
|
+
CONFIG["strategy"]["rpc_urls"] = rpc_urls
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
def get_rpc_urls() -> dict[str, Any]:
|
|
207
|
+
return CONFIG.get("strategy", {}).get("rpc_urls", {})
|
|
208
|
+
|
|
209
|
+
|
|
198
210
|
def get_api_base_url() -> str:
|
|
199
211
|
system = CONFIG.get("system", {}) if isinstance(CONFIG, dict) else {}
|
|
200
212
|
api_url = system.get("api_base_url")
|
|
@@ -4,7 +4,7 @@ from web3 import AsyncHTTPProvider, AsyncWeb3
|
|
|
4
4
|
from web3.middleware import ExtraDataToPOAMiddleware
|
|
5
5
|
from web3.module import Module
|
|
6
6
|
|
|
7
|
-
from wayfinder_paths.core.config import
|
|
7
|
+
from wayfinder_paths.core.config import get_rpc_urls
|
|
8
8
|
|
|
9
9
|
POA_MIDDLEWARE_CHAIN_IDS: set = {56, 137, 43114}
|
|
10
10
|
|
|
@@ -21,7 +21,7 @@ class HyperModule(Module):
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
def _get_rpcs_for_chain_id(chain_id: int) -> list:
|
|
24
|
-
rpcs =
|
|
24
|
+
rpcs = get_rpc_urls().get(str(chain_id))
|
|
25
25
|
if rpcs is None:
|
|
26
26
|
raise ValueError(f"No RPCs configured for chain ID {chain_id}")
|
|
27
27
|
return rpcs
|
|
@@ -10,7 +10,7 @@ wayfinder_paths/adapters/brap_adapter/adapter.py,sha256=1qdE9jfnxkwuIKxeVnn6z50h
|
|
|
10
10
|
wayfinder_paths/adapters/brap_adapter/examples.json,sha256=FGZhNaMCAQ56KhovEGSsV1BHOcMd_QqQBNmCU6m8zfQ,5389
|
|
11
11
|
wayfinder_paths/adapters/brap_adapter/test_adapter.py,sha256=ohaiMPyGxW5faOXjjAHuW5yAdcqx_lRWa3-Tm6Px0U0,12110
|
|
12
12
|
wayfinder_paths/adapters/hyperlend_adapter/__init__.py,sha256=DsWOnEn-Tlu9ZoIoGaFeSqOYI3b4lXGVK3_FTntWpLw,139
|
|
13
|
-
wayfinder_paths/adapters/hyperlend_adapter/adapter.py,sha256=
|
|
13
|
+
wayfinder_paths/adapters/hyperlend_adapter/adapter.py,sha256=MVxgcwx6qjrqLw8jWRlAvm8pqg0q_AKWEgY9Y4duXS0,9920
|
|
14
14
|
wayfinder_paths/adapters/hyperlend_adapter/test_adapter.py,sha256=UEKGh-cRMhuc7k1tClLu8wuh6oQ4KV8ViczUa62qibk,11811
|
|
15
15
|
wayfinder_paths/adapters/hyperliquid_adapter/__init__.py,sha256=QpA258RzVbxzsha86HQduAuNVG0g0qvsI5OcZunQ8DQ,467
|
|
16
16
|
wayfinder_paths/adapters/hyperliquid_adapter/adapter.py,sha256=Z5Gl9M9wk7PVUIyP_i2oAMegmCTbVFd48Zp57DURh6M,34510
|
|
@@ -60,7 +60,7 @@ wayfinder_paths/core/clients/WalletClient.py,sha256=efvdJlS1fZfvNBU_hXn63mOKoETB
|
|
|
60
60
|
wayfinder_paths/core/clients/WayfinderClient.py,sha256=gl-YHTYDa5GStg5O2xETiL4dAaCLphRos-btB1rQzVE,4319
|
|
61
61
|
wayfinder_paths/core/clients/__init__.py,sha256=2xpZ4tBYkK0QjpBI88ZB4t4esfIc-enm0LqHdRo479M,1173
|
|
62
62
|
wayfinder_paths/core/clients/protocols.py,sha256=Z0vvce55wfXrSXfuO0Y-s9EfT9zvwUier4-XhwPZSTs,7984
|
|
63
|
-
wayfinder_paths/core/config.py,sha256=
|
|
63
|
+
wayfinder_paths/core/config.py,sha256=_puUFYBnXBvmMmUx50Urc4H62KIOrodlrYQd7tuIhlU,7866
|
|
64
64
|
wayfinder_paths/core/constants/__init__.py,sha256=upAVwHDgMXJ3DWaAuXo52UZktS8NZ17s5XwVH0qxgzg,591
|
|
65
65
|
wayfinder_paths/core/constants/base.py,sha256=mJHZWZ9g9loIV0RVVJNRAM0wUid4vW2ql1bn-qAco48,1481
|
|
66
66
|
wayfinder_paths/core/constants/erc20_abi.py,sha256=SQD4aNiw_xhb-8NxsnAfUAx1LeG9cIaBbCVrtU_5Z68,2885
|
|
@@ -77,7 +77,7 @@ wayfinder_paths/core/utils/erc20_service.py,sha256=MM2nE1iirPdqpohzvmbv50tFsu03L
|
|
|
77
77
|
wayfinder_paths/core/utils/evm_helpers.py,sha256=ml6f2oMRv_YWFoiPxsoZYUSqM-IOkp4IbTrpfFHn-fU,5400
|
|
78
78
|
wayfinder_paths/core/utils/transaction.py,sha256=JDeSOHw7YxTMsYmMmCXk28nIdmH9FQ99b8F0fw0fYl4,6914
|
|
79
79
|
wayfinder_paths/core/utils/wallets.py,sha256=ccCQ128lDShO265AFMOCdijzPLucWe-Neg5wjLrOsnk,1948
|
|
80
|
-
wayfinder_paths/core/utils/web3.py,sha256=
|
|
80
|
+
wayfinder_paths/core/utils/web3.py,sha256=r0vHvKvFC167MygHhmxr2nfYtLYN0ttSUEI--hPetO0,1877
|
|
81
81
|
wayfinder_paths/policies/enso.py,sha256=oytco04eeGjiRbZPGFE1YpH4NxvV0tfVM14QmlyzjkY,428
|
|
82
82
|
wayfinder_paths/policies/erc20.py,sha256=K5PQCUivBrU2nYmIdsIARzRiFy36Rijver-RJnaxNT8,960
|
|
83
83
|
wayfinder_paths/policies/evm.py,sha256=8fJpjAl6XVxr51sVMw_VkWmIaI_lj2T7qrLcR8_sWgs,713
|
|
@@ -124,7 +124,7 @@ wayfinder_paths/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
|
124
124
|
wayfinder_paths/tests/test_smoke_manifest.py,sha256=kTcIa4qikcspVh2ohQIk0aHUdIvBvcQBfNbm3PNiVvg,1636
|
|
125
125
|
wayfinder_paths/tests/test_test_coverage.py,sha256=9NrZeVmP02D4W7Qc0XjciC05bhvdTCVibYjTGfa_GQk,7893
|
|
126
126
|
wayfinder_paths/tests/test_utils.py,sha256=pxHT0QKFlyJeJo8bFnKXzWcOdi6t8rbJ0JFCBaFCBRQ,2112
|
|
127
|
-
wayfinder_paths-0.1.
|
|
128
|
-
wayfinder_paths-0.1.
|
|
129
|
-
wayfinder_paths-0.1.
|
|
130
|
-
wayfinder_paths-0.1.
|
|
127
|
+
wayfinder_paths-0.1.18.dist-info/LICENSE,sha256=dYKnlkC_xosBAEQNUvB6cHMuhFgcUtN0oBR7E8_aR2Y,1066
|
|
128
|
+
wayfinder_paths-0.1.18.dist-info/METADATA,sha256=czvCqhqHboASHW2gjzPK5TpeTLOqrNmsu0_u7MHnyZM,22924
|
|
129
|
+
wayfinder_paths-0.1.18.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
130
|
+
wayfinder_paths-0.1.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|