Closed sinancetinkaya closed 1 year ago
Hey there!
No unit tests exist (yet). I don't feel like adding them would bring much value at the moment as the bot has been pretty battle-tested (by me) but I'd be happy to consider a PR.
Good luck for your own bot!
Thanks for replying back. Do you test your code with real money on the mainnet? Have you ever tried to use the testnet?
I test with real money on mainnet but setting it up for testnet is as simple as changing the RPC url to one of the testnet ones, and modifying the Dex router + factory address (currently hardcoded unfortunately).
I tried your code and got similar errors. I think testnet has some weird problems with LP.
I edited my comment to mention you need to change the factory and router addresses in the code
I guess the token addresses also needs updating. Here are some addresses you can use: https://bsc.kiemtienonline360.com/
And the code https://github.com/beeb/pancaketrade/blob/1527f5babb6687e51d0bb98a33c5eb17ea8178ba/pancaketrade/network/bsc.py#L24
Yes I know they are different on the testnet. I'll give it a try again. I might have forgotten to change one of these 👍
Feature Request
I tried to write my own a DeFi bot but I failed because testing the code with BSC testnet was not working. Forking mainnet in Ganache, Hardhat was also problematic. LP pairs on testnets were always giving weird errors.
How do you test your code? Would you like to share your unit tests (if any)?