Add a "listen for event" function
See original GitHub issueOverview
This is something I would have liked to see some additional functionality in brownie from.
Specification
Maybe the API looks something like:
from ape import networks
event = networks.listen_for_event(contract_address, event_name, timeout=200)
I made a custom edition of this in my chainlink-mix would be great for ape to have this built-in.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
EventTarget.addEventListener() - Web APIs | MDN
The method addEventListener() works by adding a function, or an object that implements EventListener , to the list of event listeners for ...
Read more >JavaScript HTML DOM EventListener - W3Schools
The addEventListener() method allows you to add event listeners on any HTML DOM object such as HTML elements, the HTML document, the window...
Read more >How to Add an Event Handler to an Event of the Element in JS
To add an event handler to an event of an element, you use the addEventListener() method of the element object: element.addEventListener(type,eventListener);.
Read more >How to Use Event Listeners in JavaScript - MakeUseOf
You can listen for events on any element in the DOM. JavaScript has an addEventListener() function that you can call on any element...
Read more >JavaScript Event Listeners Ultimate Guide
To set up an event listener you just need to have a variable that references an element and then call the addEventListener function...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK yeah reading more closely, you are trying to basically have an async type deal that waits for a log and then carries on with something else once it arrives, right?
To get the historicial logs from query manager, and then wait on any new ones stays as it is today