Replies: 1 comment
-
The event listner might not immediately log output in console, it does only when there'd be an event. But you can console log before adding the listener. function startPairDetection() {
console.log('pair detection started');
factory.on('PairCreated', async (token0, token1, pairAddress) => {
...
})
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to call the
function in a menu run by a while loop:
I've tried wrapping it in an async function called snipe, but all it does is return to while loop menu prompting me for an option. I've even tried printing statements written in the snipe function before the factory.on method is run and after. All it does is print both statements consecutively without running the factory.on method, then it returns to the menu.
I've run this without the menu and it runs fine, even printing the console.log command in the factory.on event.
Beta Was this translation helpful? Give feedback.
All reactions