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) diff --git a/pyproject.toml b/pyproject.toml index 5ca7c53b..1d31c285 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,13 +26,13 @@ dynaconf = ">=3.2.0" loguru = ">=0.6.0" pycoingecko = "3.1.0" requests = "^2.31.0" -web3 = "6.15.0" -eth-tester = "0.9.1b1" +web3 = "6.15.1" 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" +#eth-ape = "0.7.7" [tool.poetry.group.dev.dependencies] python-semantic-release = ">=8.0.8"