wayfinder-paths 0.1.20__tar.gz → 0.1.21__tar.gz
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.
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/PKG-INFO +3 -3
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/pyproject.toml +2 -2
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/balance_adapter/adapter.py +1 -1
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/brap_adapter/adapter.py +1 -1
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/hyperlend_adapter/adapter.py +1 -1
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/moonwell_adapter/adapter.py +1 -1
- wayfinder_paths-0.1.20/wayfinder_paths/core/utils/erc20_service.py → wayfinder_paths-0.1.21/wayfinder_paths/core/utils/tokens.py +25 -20
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/LICENSE +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/README.md +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/balance_adapter/README.md +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/balance_adapter/examples.json +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/balance_adapter/test_adapter.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/brap_adapter/README.md +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/brap_adapter/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/brap_adapter/examples.json +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/brap_adapter/test_adapter.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/hyperlend_adapter/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/hyperlend_adapter/test_adapter.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/hyperliquid_adapter/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/hyperliquid_adapter/adapter.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/hyperliquid_adapter/executor.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/hyperliquid_adapter/paired_filler.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/hyperliquid_adapter/test_adapter.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/hyperliquid_adapter/test_adapter_live.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/hyperliquid_adapter/test_executor.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/hyperliquid_adapter/test_utils.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/hyperliquid_adapter/utils.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/ledger_adapter/README.md +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/ledger_adapter/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/ledger_adapter/adapter.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/ledger_adapter/examples.json +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/ledger_adapter/test_adapter.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/moonwell_adapter/README.md +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/moonwell_adapter/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/moonwell_adapter/test_adapter.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/pool_adapter/README.md +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/pool_adapter/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/pool_adapter/adapter.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/pool_adapter/examples.json +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/pool_adapter/test_adapter.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/token_adapter/README.md +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/token_adapter/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/token_adapter/adapter.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/token_adapter/examples.json +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/token_adapter/test_adapter.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/conftest.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/adapters/BaseAdapter.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/adapters/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/adapters/models.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/analytics/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/analytics/bootstrap.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/analytics/stats.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/analytics/test_analytics.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/BRAPClient.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/ClientManager.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/HyperlendClient.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/LedgerClient.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/PoolClient.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/TokenClient.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/WalletClient.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/WayfinderClient.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/protocols.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/config.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/constants/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/constants/base.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/constants/erc20_abi.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/constants/hyperlend_abi.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/constants/moonwell_abi.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/engine/StrategyJob.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/services/test_local_evm_txn.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/strategies/Strategy.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/strategies/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/strategies/base.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/strategies/descriptors.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/utils/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/utils/evm_helpers.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/utils/transaction.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/utils/wallets.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/utils/web3.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/policies/enso.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/policies/erc20.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/policies/evm.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/policies/hyper_evm.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/policies/hyperlend.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/policies/hyperliquid.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/policies/moonwell.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/policies/prjx.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/policies/util.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/run_strategy.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/scripts/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/scripts/create_strategy.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/scripts/make_wallets.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/basis_trading_strategy/README.md +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/basis_trading_strategy/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/basis_trading_strategy/constants.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/basis_trading_strategy/examples.json +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/basis_trading_strategy/snapshot_mixin.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/basis_trading_strategy/strategy.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/basis_trading_strategy/test_strategy.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/basis_trading_strategy/types.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/hyperlend_stable_yield_strategy/README.md +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/hyperlend_stable_yield_strategy/examples.json +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/hyperlend_stable_yield_strategy/strategy.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/hyperlend_stable_yield_strategy/test_strategy.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/moonwell_wsteth_loop_strategy/README.md +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/moonwell_wsteth_loop_strategy/examples.json +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/moonwell_wsteth_loop_strategy/strategy.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/moonwell_wsteth_loop_strategy/test_strategy.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/stablecoin_yield_strategy/README.md +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/stablecoin_yield_strategy/examples.json +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/stablecoin_yield_strategy/strategy.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/strategies/stablecoin_yield_strategy/test_strategy.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/templates/adapter/README.md +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/templates/adapter/adapter.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/templates/adapter/examples.json +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/templates/adapter/test_adapter.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/templates/strategy/README.md +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/templates/strategy/examples.json +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/templates/strategy/strategy.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/templates/strategy/test_strategy.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/tests/__init__.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/tests/test_smoke_manifest.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/tests/test_test_coverage.py +0 -0
- {wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: wayfinder-paths
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.21
|
|
4
4
|
Summary: Wayfinder Path: strategies and adapters
|
|
5
5
|
Author: Wayfinder
|
|
6
6
|
Author-email: dev@wayfinder.ai
|
|
@@ -11,7 +11,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
11
11
|
Requires-Dist: aiohttp (>=3.13.0,<4.0.0)
|
|
12
12
|
Requires-Dist: eth-account (>=0.13.7,<0.14.0)
|
|
13
13
|
Requires-Dist: httpx (>=0.28.1,<0.29.0)
|
|
14
|
-
Requires-Dist: hyperliquid-
|
|
14
|
+
Requires-Dist: hyperliquid-python-sdk (>=0.21.0,<0.22.0)
|
|
15
15
|
Requires-Dist: loguru (>=0.7.3,<0.8.0)
|
|
16
16
|
Requires-Dist: numpy (>=1.26.0,<2.0.0)
|
|
17
17
|
Requires-Dist: pandas (>=2.2.0,<3.0.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "wayfinder-paths"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.21"
|
|
4
4
|
description = "Wayfinder Path: strategies and adapters"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = ["Wayfinder <dev@wayfinder.ai>"]
|
|
@@ -19,7 +19,7 @@ eth-account = "^0.13.7"
|
|
|
19
19
|
aiohttp = "^3.13.0"
|
|
20
20
|
numpy = "^1.26.0"
|
|
21
21
|
pandas = "^2.2.0"
|
|
22
|
-
hyperliquid-
|
|
22
|
+
hyperliquid-python-sdk = "^0.21.0"
|
|
23
23
|
|
|
24
24
|
[tool.poetry.group.dev.dependencies]
|
|
25
25
|
pytest = "^8.4.2"
|
|
@@ -5,8 +5,8 @@ from wayfinder_paths.adapters.token_adapter.adapter import TokenAdapter
|
|
|
5
5
|
from wayfinder_paths.core.adapters.BaseAdapter import BaseAdapter
|
|
6
6
|
from wayfinder_paths.core.clients.TokenClient import TokenClient
|
|
7
7
|
from wayfinder_paths.core.clients.WalletClient import WalletClient
|
|
8
|
-
from wayfinder_paths.core.utils.erc20_service import build_send_transaction
|
|
9
8
|
from wayfinder_paths.core.utils.evm_helpers import resolve_chain_id
|
|
9
|
+
from wayfinder_paths.core.utils.tokens import build_send_transaction
|
|
10
10
|
from wayfinder_paths.core.utils.transaction import send_transaction
|
|
11
11
|
|
|
12
12
|
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/brap_adapter/adapter.py
RENAMED
|
@@ -15,7 +15,7 @@ from wayfinder_paths.core.clients.BRAPClient import (
|
|
|
15
15
|
from wayfinder_paths.core.clients.LedgerClient import TransactionRecord
|
|
16
16
|
from wayfinder_paths.core.clients.TokenClient import TokenClient
|
|
17
17
|
from wayfinder_paths.core.constants import DEFAULT_SLIPPAGE, ZERO_ADDRESS
|
|
18
|
-
from wayfinder_paths.core.utils.
|
|
18
|
+
from wayfinder_paths.core.utils.tokens import (
|
|
19
19
|
build_approve_transaction,
|
|
20
20
|
get_token_allowance,
|
|
21
21
|
)
|
|
@@ -16,7 +16,7 @@ from wayfinder_paths.core.constants.hyperlend_abi import (
|
|
|
16
16
|
POOL_ABI,
|
|
17
17
|
WRAPPED_TOKEN_GATEWAY_ABI,
|
|
18
18
|
)
|
|
19
|
-
from wayfinder_paths.core.utils.
|
|
19
|
+
from wayfinder_paths.core.utils.tokens import (
|
|
20
20
|
build_approve_transaction,
|
|
21
21
|
get_token_allowance,
|
|
22
22
|
)
|
|
@@ -14,7 +14,7 @@ from wayfinder_paths.core.constants.moonwell_abi import (
|
|
|
14
14
|
REWARD_DISTRIBUTOR_ABI,
|
|
15
15
|
WETH_ABI,
|
|
16
16
|
)
|
|
17
|
-
from wayfinder_paths.core.utils.
|
|
17
|
+
from wayfinder_paths.core.utils.tokens import (
|
|
18
18
|
build_approve_transaction,
|
|
19
19
|
get_token_allowance,
|
|
20
20
|
)
|
|
@@ -3,7 +3,7 @@ from web3 import AsyncWeb3
|
|
|
3
3
|
from wayfinder_paths.core.constants.erc20_abi import ERC20_ABI
|
|
4
4
|
from wayfinder_paths.core.utils.web3 import web3_from_chain_id
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
NATIVE_TOKEN_ADDRESSES: set = {
|
|
7
7
|
"0x0000000000000000000000000000000000000000",
|
|
8
8
|
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
9
9
|
# TODO: This is not a proper SOL address, this short form is for LIFI only, fix this after fixing lifi
|
|
@@ -12,21 +12,26 @@ NATIVE_CURRENCY_ADDRESSES: set = {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
def is_native_token(token_address: str) -> bool:
|
|
16
|
+
return token_address.lower() in NATIVE_TOKEN_ADDRESSES
|
|
17
|
+
|
|
18
|
+
|
|
15
19
|
async def get_token_balance(
|
|
16
20
|
token_address: str, chain_id: int, wallet_address: str
|
|
17
21
|
) -> int:
|
|
18
22
|
async with web3_from_chain_id(chain_id) as web3:
|
|
19
23
|
checksum_wallet = AsyncWeb3.to_checksum_address(wallet_address)
|
|
20
|
-
|
|
24
|
+
|
|
25
|
+
if is_native_token(token_address):
|
|
21
26
|
balance = await web3.eth.get_balance(checksum_wallet)
|
|
22
27
|
return int(balance)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
else:
|
|
29
|
+
checksum_token = AsyncWeb3.to_checksum_address(token_address)
|
|
30
|
+
contract = web3.eth.contract(address=checksum_token, abi=ERC20_ABI)
|
|
31
|
+
balance = await contract.functions.balanceOf(checksum_wallet).call(
|
|
32
|
+
block_identifier="pending"
|
|
33
|
+
)
|
|
34
|
+
return int(balance)
|
|
30
35
|
|
|
31
36
|
|
|
32
37
|
async def get_token_allowance(
|
|
@@ -79,21 +84,21 @@ async def build_send_transaction(
|
|
|
79
84
|
from_checksum = web3.to_checksum_address(from_address)
|
|
80
85
|
to_checksum = web3.to_checksum_address(to_address)
|
|
81
86
|
|
|
82
|
-
if
|
|
87
|
+
if is_native_token(token_address):
|
|
83
88
|
return {
|
|
84
89
|
"to": to_checksum,
|
|
85
90
|
"from": from_checksum,
|
|
86
91
|
"value": amount,
|
|
87
92
|
"chainId": chain_id,
|
|
88
93
|
}
|
|
94
|
+
else:
|
|
95
|
+
token_checksum = web3.to_checksum_address(token_address)
|
|
96
|
+
contract = web3.eth.contract(address=token_checksum, abi=ERC20_ABI)
|
|
97
|
+
data = contract.encode_abi("transfer", [to_checksum, amount])
|
|
89
98
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
"from": from_checksum,
|
|
97
|
-
"data": data,
|
|
98
|
-
"chainId": chain_id,
|
|
99
|
-
}
|
|
99
|
+
return {
|
|
100
|
+
"to": token_checksum,
|
|
101
|
+
"from": from_checksum,
|
|
102
|
+
"data": data,
|
|
103
|
+
"chainId": chain_id,
|
|
104
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/balance_adapter/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/brap_adapter/README.md
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/brap_adapter/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/ledger_adapter/README.md
RENAMED
|
File without changes
|
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/ledger_adapter/adapter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/pool_adapter/README.md
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/pool_adapter/__init__.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/pool_adapter/adapter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/token_adapter/README.md
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/token_adapter/__init__.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/adapters/token_adapter/adapter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/adapters/BaseAdapter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/analytics/__init__.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/analytics/bootstrap.py
RENAMED
|
File without changes
|
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/analytics/test_analytics.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/BRAPClient.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/ClientManager.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/HyperlendClient.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/LedgerClient.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/PoolClient.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/TokenClient.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/WalletClient.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/clients/WayfinderClient.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/constants/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/constants/erc20_abi.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/constants/hyperlend_abi.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/constants/moonwell_abi.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/engine/StrategyJob.py
RENAMED
|
File without changes
|
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/strategies/Strategy.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/strategies/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/core/strategies/descriptors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/scripts/create_strategy.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/templates/adapter/README.md
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/templates/adapter/adapter.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/templates/adapter/examples.json
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/templates/adapter/test_adapter.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/templates/strategy/README.md
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/templates/strategy/examples.json
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/templates/strategy/strategy.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/tests/test_smoke_manifest.py
RENAMED
|
File without changes
|
{wayfinder_paths-0.1.20 → wayfinder_paths-0.1.21}/wayfinder_paths/tests/test_test_coverage.py
RENAMED
|
File without changes
|
|
File without changes
|