Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Comments
1
Ty_Sir avatar

This is great! I personally found it very helpful, but noticed the for of loop going through the instructions stops and returns after finding the first swap event. Since Jupiter will hop to multiple pairs sometimes we need all of the events. To resolve that, I just initialized a swapEvents array above the loop and then pushed each event to it. Then return that array at the end of the function.

Updated: December 28, 2024