yuichiroaoki / poly-flashloan-bot

Flashloan Bot on Polygon
https://yuichiroaoki.medium.com/flashloan-bot-on-polygon-part-2-3eae0ac33986?sk=80821da4ca1d0462c7c9ae617df56bdd
MIT License
302 stars 192 forks source link

"Yarn Start" and nothing happens. #91

Open maximenz opened 2 years ago

maximenz commented 2 years ago

Did I do something wrong? Thanks.

saedmohamad commented 2 years ago

same

remusnegrota commented 2 years ago

same here. Can't tell if no output is getting logged until it actually finds an opportunity or if there is indeed an issue. The error logs don't show anything. The Alchemy logs show that there is activity and successful requests are being made while the bot is running.

LE: Put some logs around, confirming that it is running.

enricocagliari commented 2 years ago

Same here! Actually, I thought it was not working, but now I see that @remusnegrota see activity on Alchemy...

Yet, I'm confused... Is it working? What should I expect to happen if there is no output log? Will I see something only when a trade is executed?

CecoSvidovski commented 1 year ago

@enricocagliari

Same here! Actually, I thought it was not working, but now I see that @remusnegrota see activity on Alchemy...

Yet, I'm confused... Is it working? What should I expect to happen if there is no output log? Will I see something only when a trade is executed?

It is working. Just checked it. You can simply put a console log in index.ts just after the isProfitable const.

For example you can do something like this: const currentTime = new Date(); console.log(currentTime.toLocaleDateString() + ' ' + currentTime.toLocaleTimeString() + ': ' + (isProfitable ? 'Profitable' : 'Not profitable'));

That way you'll know the app is running. Also you can see that it is indeed running by checking your alchemy requests. I'm not sure what happened I haven't checked this repository for months but with a glance I can tell that the table functionality that used to log all the coin pairs is commented out and removed from index.ts. Probably because in the 3.0 version 1 inch is removed.