Hey first of all, thanks for the code. I was able to deploy the contract and start the bot. the pair file was created and is very extensive. A successful transaction is performed every few hours. so in general it works.However, when I run the bot in debug mode, I can see that it is not running properly.
On the one hand, this error occurs 90% of the time:
2022-07-12 09:01:45 debug: call revert exception; VM Exception while processing transaction: reverted with reason string "Complex number" [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="getProfit(address,address)", data="0x.......00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000.............000000000000000000000000000000000000", errorArgs=["Complex number"], errorName="Error", errorSignature="Error(string)", reason="Complex number", code=CALL_EXCEPTION, version=abi/5.6.4)
(... for parts of my contract adress)
On the other hand, many calculations are simply 0.0 : Profit on CAKE-WBNB: 0.0
lp addresses were generated correctly in the pairs file.
Do you have ideas for the issues? I've tried many things