Coder Social home page Coder Social logo

dex-buy-tools's People

Contributors

minh-trng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dex-buy-tools's Issues

Issue with the Amount

The bot always buys the same amount (0.0001) and changing the buy parameters won't affect it.

getting parsererror

hey. when i try to run a command i get this:

Traceback (most recent call last):
  File "/usr/local/bin/dexbuy", line 8, in <module>
    sys.exit(dexbuy())
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/dexbuytools/__main__.py", line 36, in instant
    helper.buy_instantly(token_address)
  File "/usr/local/lib/python3.9/site-packages/dexbuytools/helpers/AvaxHelper.py", line 25, in buy_instantly
    super().perform_uniswapv2_style_buy(self.w3, self.dex_router, token_address, chain_data["MAIN_TOKEN_ADDRESS"])
  File "/usr/local/lib/python3.9/site-packages/dexbuytools/helpers/EvmBaseHelper.py", line 53, in perform_uniswapv2_style_buy
    tx = dex_router.functions[swap_method](
  File "/usr/local/lib/python3.9/site-packages/web3/contract.py", line 202, in __getitem__
    return getattr(self, function_name)
  File "/usr/local/lib/python3.9/site-packages/web3/contract.py", line 194, in __getattr__
    raise ABIFunctionNotFound(
web3.exceptions.ABIFunctionNotFound: ("The function 'swapExactETHForTokensSupportingFeeOnTransferTokens' was not found in this contract's abi. ", 'Are you sure you provided the correct contract abi?')

on the eth i think it's ok. but when using avax i get this. could you please tell me what should i do?

Gas Standard

ok so i've tried the bot on a few test TXs and here is my thought:

if you ever support the priority fee and max fee (the new EIP-1559 as you mentioned in the other discussion) to the bot, it would make this perfect; this is absolutely essential in launches because it's only about gas wars.

the bot tx looks like this:
image

the metamask tx with max priority and max fee:
image

Thank you!

Approve Issue

The bot always tries to approve the token swap after buy even if the buy parameter is set to false.

Gas Estimate

hey, i'm trying to swap on avax and it was working before this but now i get a weird gas estimate and this:

Transaction not executed, because the gas estimate is greater than the limit configured in the buy_params-file.
Gas estimate in wei : 163852000000000000
Traceback (most recent call last):
  File "/usr/local/bin/dexbuy", line 8, in <module>
    sys.exit(dexbuy())
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/dexbuytools/__main__.py", line 36, in instant
    helper.buy_instantly(token_address)
  File "/usr/local/lib/python3.9/site-packages/dexbuytools/helpers/AvaxHelper.py", line 27, in buy_instantly
    super().perform_uniswapv2_style_buy(self.dex_router, token_address,
  File "/usr/local/lib/python3.9/site-packages/dexbuytools/helpers/EvmBaseHelper.py", line 71, in perform_uniswapv2_style_buy
    raise NotImplementedError
NotImplementedError

would appericate it of you could tell me how to fix this. i tried using fixed gas in EvmBaseHelper.py but i get the error that it's less than base fee per block.

401 Client Error: Unauthorized for url: https://mainnet.infura.io/v3/...

Hi there,

I already updated dexbuytools/config/general_params.yml file with my infura project id but I keep getting:

requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://mainnet.infura.io/v3/...

Do you have an idea why that is happening? Appreciate your help.

Issue with the py

Hi !
When i run a command i get this error :

root@dex-tools:~/dex# dexbuy instant bsc 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56
Traceback (most recent call last):
  File "/usr/local/bin/dexbuy", line 5, in <module>
    from dexbuytools.__main__ import dexbuy
  File "/usr/local/lib/python3.10/site-packages/dexbuytools/__main__.py", line 38, in <module>
    def onliquidity(network_name, token_address, search_term, buy_params_path, wallet_data_path, general_params_path):
  File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 247, in decorator
    _param_memo(f, OptionClass(param_decls, **option_attrs))
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 2465, in __init__
    super().__init__(param_decls, type=type, multiple=multiple, **attrs)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 2029, in __init__
    self.name, self.opts, self.secondary_opts = self._parse_decls(
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 2610, in _parse_decls
    raise TypeError(
TypeError: No options defined but a name was passed (search_term). Did you mean to declare an argument instead? Did you mean to pass '--search_term'?

I run on docker python:latest (debian11)

root@dex-tools:~/dex# python --version
Python 3.10.4

Could you help me ?

regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.