From 052877e0c069247016d186a4abc7b3693d5a76e3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 22:27:48 +0000 Subject: [PATCH 1/7] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20=F0=9F=9B=A0=EF=B8=8F(?= =?UTF-8?q?deps):=20update=20dependency=20web3=20to=20v6.15.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5ca7c53b..23bec456 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ dynaconf = ">=3.2.0" loguru = ">=0.6.0" pycoingecko = "3.1.0" requests = "^2.31.0" -web3 = "6.15.0" +web3 = "6.15.1" eth-tester = "0.9.1b1" uniswap-python = "0.7.1" kwenta = "1.2.0" From 12ddbc7251e20569dbc943ecb366f459842bff0a Mon Sep 17 00:00:00 2001 From: mraniki Date: Sun, 11 Feb 2024 12:06:16 +0100 Subject: [PATCH 2/7] Update eth-tester version to 0.9.1b2 --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 23bec456..da40c222 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,12 +27,12 @@ loguru = ">=0.6.0" pycoingecko = "3.1.0" requests = "^2.31.0" web3 = "6.15.1" -eth-tester = "0.9.1b1" +eth-tester = "0.9.1b2" uniswap-python = "0.7.1" kwenta = "1.2.0" web3client = "1.3.7" #eth-brownie = "1.19.3" -eth-ape = "0.7.7" +#eth-ape = "0.7.7" [tool.poetry.group.dev.dependencies] python-semantic-release = ">=8.0.8" From 7cd2829e29b60d5bca3dee6c21931889a104cc68 Mon Sep 17 00:00:00 2001 From: mraniki Date: Sun, 11 Feb 2024 12:15:13 +0100 Subject: [PATCH 3/7] Update web3 and eth-tester versions --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index da40c222..bd5fbdc2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,8 +26,8 @@ dynaconf = ">=3.2.0" loguru = ">=0.6.0" pycoingecko = "3.1.0" requests = "^2.31.0" -web3 = "6.15.1" -eth-tester = "0.9.1b2" +web3 = "6.15.0" +eth-tester = "0.9.0" uniswap-python = "0.7.1" kwenta = "1.2.0" web3client = "1.3.7" From c5ab50906a32503947ea9124665f7940afe650d6 Mon Sep 17 00:00:00 2001 From: mraniki Date: Sun, 11 Feb 2024 12:19:37 +0100 Subject: [PATCH 4/7] Update eth-tester version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bd5fbdc2..d167aaa2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ loguru = ">=0.6.0" pycoingecko = "3.1.0" requests = "^2.31.0" web3 = "6.15.0" -eth-tester = "0.9.0" +eth-tester = "0.10.0b2" uniswap-python = "0.7.1" kwenta = "1.2.0" web3client = "1.3.7" From de7c47f5cfb10ab37491ca21503de3eab7442255 Mon Sep 17 00:00:00 2001 From: mraniki Date: Sun, 11 Feb 2024 12:38:44 +0100 Subject: [PATCH 5/7] Update web3 version --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d167aaa2..c0d4636b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,8 +26,8 @@ dynaconf = ">=3.2.0" loguru = ">=0.6.0" pycoingecko = "3.1.0" requests = "^2.31.0" -web3 = "6.15.0" -eth-tester = "0.10.0b2" +web3 = "6.15.1" +#eth-tester = "0.10.0b2" uniswap-python = "0.7.1" kwenta = "1.2.0" web3client = "1.3.7" From 462e6c1d441f35e20334943c9ccd8c96c59cb613 Mon Sep 17 00:00:00 2001 From: mraniki Date: Sun, 11 Feb 2024 12:49:06 +0100 Subject: [PATCH 6/7] Remove eth-tester and add web3client to pyproject.toml --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c0d4636b..1d31c285 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,10 +27,10 @@ loguru = ">=0.6.0" pycoingecko = "3.1.0" requests = "^2.31.0" web3 = "6.15.1" -#eth-tester = "0.10.0b2" uniswap-python = "0.7.1" kwenta = "1.2.0" -web3client = "1.3.7" +#eth-tester = "0.10.0b2" +#web3client = "1.3.7" #eth-brownie = "1.19.3" #eth-ape = "0.7.7" From cbda811704713db6f468bb01a1121178e7cd0467 Mon Sep 17 00:00:00 2001 From: mraniki Date: Sun, 11 Feb 2024 13:08:37 +0100 Subject: [PATCH 7/7] Remove DexEVM protocol and update __all__ in __init__.py --- dxsp/protocols/__init__.py | 2 +- dxsp/protocols/evm.py | 72 -------------------------------------- 2 files changed, 1 insertion(+), 73 deletions(-) delete mode 100644 dxsp/protocols/evm.py diff --git a/dxsp/protocols/__init__.py b/dxsp/protocols/__init__.py index 37576308..a01e8f1a 100644 --- a/dxsp/protocols/__init__.py +++ b/dxsp/protocols/__init__.py @@ -4,4 +4,4 @@ from dxsp.protocols.uniswap import DexUniswap from dxsp.protocols.zerox import DexZeroX -__all__ = ["DexUniswap", "DexZeroX", "DexKwenta", "DexEVM"] +__all__ = ["DexUniswap", "DexZeroX", "DexKwenta"] diff --git a/dxsp/protocols/evm.py b/dxsp/protocols/evm.py deleted file mode 100644 index 0c0c7295..00000000 --- a/dxsp/protocols/evm.py +++ /dev/null @@ -1,72 +0,0 @@ -""" -🔗 EVM - -""" -from loguru import logger - -# from web3client.base_client import BaseClient -from dxsp.protocols.client import DexClient - - -class DexEVM(DexClient): - """ - A DexClient class using coccoinomane web3client - https://github.com/coccoinomane/web3client - - """ - - def __init__(self): - #super().__init__() - client = "BaseClient()" - logger.debug("EVM client {}", client) - - async def get_quote( - self, - buy_address=None, - buy_symbol=None, - sell_address=None, - sell_symbol=None, - amount=1, - ): - """ - Retrieves a quote for a given buy and sell token pair. - - Args: - buy_address (str, optional): The address of the buy token. Defaults to None. - buy_symbol (str, optional): The symbol of the buy token. Defaults to None. - sell_address (str, optional): - The address of the sell token. Defaults to None. - sell_symbol (str, optional): - The symbol of the sell token. Defaults to None. - amount (int, optional): The amount of sell tokens. Defaults to 1. - - Returns: - Quote - """ - try: - logger.debug( - "evm quote {} {} {} {}", - buy_address, - buy_symbol, - sell_address, - sell_symbol, - ) # noqa: E501 - buy_token = await self.resolve_buy_token( - buy_address=buy_address, buy_symbol=buy_symbol - ) - sell_token = await self.resolve_sell_token( - sell_address=sell_address, sell_symbol=sell_symbol - ) - amount = str(amount * (10**sell_token.decimals)) - logger.debug(f"evm quote {buy_token.address} {sell_token.address} {amount}") - - # return self.client.get_quote() - - except Exception as error: - logger.error("Quote failed {}", error) - - async def make_swap(self, buy_address, sell_address, amount): - logger.debug(f"evm make_swap {buy_address} {sell_address} {amount}") - # swap_order = await self.get_quote(buy_address, sell_address, amount) - # if swap_order: - # return await self.account.get_sign(swap_order)