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.
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.