How to build a CRYPTOCURRENCY TRADING BOT w/ ethers.js (Uniswap, Pancakeswap, Quickswap, Sushiswap)




UPDATED CODE!!! USE THIS GITHUB REPO TO SEE THE NEW CHANGE TO THE SWAP METHOD!!!


50 Comments

  1. I am getting " Uncaught Error Error: cannot estimate gas; transaction may fail or may require manual gas limit " for const approveTx = await busdContract.approve(

    router,

    BUSDamountIn

    ); @BlockchainWithLeif

  2. Seems like every tutorial about this subject tends to just gloss over where the ABI string comes from… I still can't figure that out. Can you explain in detail where you get the ABI method strings from? Also the contract addresses you really just glossed over that as well. That may be obvious to a person familiar with blockchain dev but as a beginner I really need you to spell it out and give me more info about how you know which addresses to use. Would be helpful to see you navigate to them from the DEX website so we all can understand that process better. Hopefully this feedback is helpful.

  3. kindly do another video showing the format of the secret key and some testing on buying and selling. Thanks for the great content. subscribed)

  4. Great tutorial man! Thanks 🙂
    When i run the script,i get an error: Error: nonce has already been user …
    Anyone has expereinced that? Thanks

  5. Thanks Leif! Hey I implemented this, but with V3 when you have multi hop swaps it seems that I only get the first address. Do you know how to get the array {tokenAddress – fee – tokenAddress – fee – tokenAddress…..} of the addresses that the multi hop followed?

  6. Awesome content mate, I have been trying to do the similar things on Solana with Raydium but I can't seem to find any smart contracts(router/factory contracts). If you are up for a challenge it would be awesome if you can make a video on it or even just explaining it in the comment here would be more than enough for me. Cheers.

  7. Thank you for the information! If I may, just to confirm, would it be possible to automate a busd to other tokens swap using these methods? It'd be just searching for that specific pair contract and using it instead, correct? Thanks in advance!

  8. Hi Leif, I appreciate your work. But, when I run, I alwasy receive this error[(node:11920) UnhandledPromiseRejectionWarning: Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.5.0)]. Tried with both http & wss. Still same. Any suggestion?

  9. Hi Leif, I can't get your GitHub code to work. I have enough funds, but always got the same error: (node:18884) UnhandledPromiseRejectionWarning: Error: insufficient funds for intrinsic transaction cost (error={"code":-32000,"response":"{"jsonrpc":"2.0","id":10,"error":{"code":-32000,"message":"insufficient funds for gas * price +

    value"}}"}

Leave a Reply

Your email address will not be published.


*