minh-trng / dex-buy-tools Goto Github PK
View Code? Open in Web Editor NEWCLI application to buy tokens on various chains
License: MIT License
CLI application to buy tokens on various chains
License: MIT License
The bot always buys the same amount (0.0001) and changing the buy parameters won't affect it.
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?
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 metamask tx with max priority and max fee:
Thank you!
The bot always tries to approve the token swap after buy even if the buy parameter is set to false
.
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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.