-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Utility] Contract event listener #112
Comments
Issue Status: 1. Open 2. Started 3. Submitted 4. Done This issue now has a funding of 2.962 ETH (249.97 USD @ $84.39/ETH) attached to it as part of the ethsociety fund.
|
Issue Status: 1. Open 2. Cancelled Workers have applied to start work. These users each claimed they can complete the work by 3 years, 2 months ago. 1) baldyash has applied to start work (Funders only: approve worker | reject worker).
Learn more on the Gitcoin Issue Details page. |
@barrasso Hi. I looked at what is done in lib and @shamatar had already made built-in Event listener. Also look at And you can listen events in current block in that way:
Please, tell me if you did not find what you were looking for |
@BaldyAsh Thanks! This is pretty much exactly what I was looking for. Very glad that this functionality already exists in the library. :) I'm trying to use these event listeners from within the context of the ENS Registrar contract. Specifically, I want to get a list of "Recently opened auctions" using an event filter. Let's say I want to get a list of all the auctions that were opened in the past 5000 blocks. Do I simply just filter the event using a previous blockNumber? (i.e. currentBlockNumber - 5000?) |
Thank you @shamatar! That test function is exactly what I was looking for 👍🏼 |
Issue Status: 1. Open 2. Cancelled The funding of 2.962 ETH (249.97 USD @ $84.39/ETH) attached to this issue has been cancelled by the bounty submitter
|
Background
Events allow the convenient usage of the EVM logging facilities, which in turn can be used to “call” callback functions in the user interface of an app, which listens for these events. You can find more info on events here.
It would be great to have an easy way to subscribe to events that occur within smart contracts in web3swift's
Utils/
.This functionality spans many use cases since developers consistently want to reflect UI changes based on smart contract event updates in real-time.
Acceptance Criteria
[] Clear and concise code that makes it easy to listen to smart contract events and handles subscriptions to those events
[] Document sample usage of how to use your code
The text was updated successfully, but these errors were encountered: