question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Utility] Contract event listener

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
shamatarcommented, Dec 17, 2018

Filter structure is quire advanced, you can specify block limits. Please refer to this test file, function called testGetIndexedEventsPromise

You can also specify some manual listener function like in an example here

0reactions
gitcoinbotcommented, Dec 17, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Listen to Smart Contract Events Using Ethers.js - Moralis
One of the most efficient ways to do so is through blockchain listeners that receive alerts regarding smart contract events in real time....
Read more >
How to listen to Smart Contract Events with Web3.js
The guide below gets you started with listening to past events from a smart contract.You can interact with smart contracts using the popular ......
Read more >
How to Monitor On-chain Events - Level Up Coding
Overall, there are only two steps to set up the monitor: Define and emit events in the smart contract. Define and register event...
Read more >
solidity - What is in return when listening to an event?
Let's say you have a contract with an event that looks like this event metadata(bytes32 indexed fileHash, string name, string meta );.
Read more >
Web3 Tutorial: the 3 ways to listen to smart contract events
FREE TRAININGS (WEB3 DEV, FLASH LOANS...) How to find your first 6-Figures Blockchain Developer Job: https://bit.ly/390ebTq Learn how to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found