Skip to content
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

How to listen the contract event? #18

Closed
skywinder opened this issue Sep 5, 2018 · 5 comments
Closed

How to listen the contract event? #18

skywinder opened this issue Sep 5, 2018 · 5 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@skywinder
Copy link
Collaborator

From @BlueFlicker on August 29, 2018 8:22

Hello, I don't know where the event listener.

Copied from original issue: BANKEX/web3swift#216

@skywinder
Copy link
Collaborator Author

Hello. Me and Alex (@shamatar) as main maintainers are moving our development to the new repo ➡️ https://github.com/matterinc/web3swift ⬅️
Feel free continue discussion in the new repository. 👍
Cheers.

@skywinder
Copy link
Collaborator Author

From @BlueFlicker on September 4, 2018 9:33

installed web3swift version is 1.1.5

@shamatar
Copy link
Contributor

shamatar commented Sep 5, 2018

At the moment I didn’t implement the internal event loop to query the external node for new blocks and events. The library is primary for mobile devices without 100% uptime and limited connectivity.

There are examples in tests how to get the contract events (functions like “getIndexedEvents”) and you can manually setup an event loop in your app that every 10 seconds check if a new block was produced and tries to get events for specific contract in this specific block.

Sincerely, Alex

@BlueFlicker
Copy link

thanks. I also solved this by setup an event loop before.

@skywinder
Copy link
Collaborator Author

skywinder commented Sep 20, 2018

Glad to hear that, @BlueFlicker !
This kind of event listener could be a nice feature for the web3swift utils section.
I think it's a typical usecase
Feel free to add it with Pull Request. Would be much appreciated!

@skywinder skywinder added enhancement New feature or request question Further information is requested labels Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants