Questions tagged [event-handling]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
69 views

Listening to events in unit test using Viem

I want to be able to tell how many approval event were sent during my test as I cannot tell how many where sent since they are auto-approved by hardhat Running Environment.
codekoriko's user avatar
2 votes
1 answer
24 views

It is possible to listen Solidity events with Metamask provider?

I have an Smart Contract which submits events when a function is executed, and the associated transaction is mined. It works perfectly from NodeJS with a websocket network provider (wss://), but ...
Alexander Herranz's user avatar
2 votes
2 answers
142 views

Unable to fetch events using Ethers js

I am trying to fetch two events from a contract on Goerli. One of them is being fetched correctly but the other one doesn't. The working one : let eventFilter = Core.filters.AddChannel();//Core is ...
Zartaj Afser's user avatar
  • 3,754
0 votes
0 answers
116 views

Contract.on event listener not working (using Ethers.js + Next.js), how come?

got a simple question here for all you ethers.js hackers. Simple code, transactions go through, but why doesn't the contract.on function work? const handleSubmit = async (e) => { e....
sunsakis's user avatar
0 votes
1 answer
26 views

Why dynamic arrays seem to be empty when they are part of an event?

I am testing the correct emission of NFTMintedAll event on the following function, using hardhat: event NFTMintedAll( uint256 requestId, address indexed owner, uint256[] ...
Falcon Stakepool's user avatar
1 vote
2 answers
472 views

Does Hardhat node not support emitting events?

So I am running this code that is the standard code for logging events to the ReactJS App UI, but I cannot understand why it does not work. I am not getting any errors either. import React, { useState ...
sunsakis's user avatar
1 vote
0 answers
559 views

web3.eth.subscribe not working properly

import Web3 from "web3"; const web3 = new Web3(new Web3.providers.WebsocketProvider("url")); const addr = web3.utils.toChecksumAddress("...
Vishant Mittal's user avatar
0 votes
1 answer
173 views

Same event triggering action more than once using useEffect and Ethers.js

I am trying to listen to a smart contract event, but my event listener is getting triggered more than once per event. The event is being emitted and returns two strings. The event is declared as event ...
Fabio Benjovengo's user avatar
1 vote
1 answer
2k views

How can I efficiently watch for new ERC20 contracts deployed?

I am wanting to listen for new contracts deployed and monitor specific events within these contracts. The method I am currently using to retrieve newly deployed contracts is very long-winded and not ...
qoze's user avatar
  • 13
0 votes
1 answer
661 views

Is it possible to listen to an event of a wallet/address receiving fund

I am trying to dynamically update the balance of an ethereum address in database. For this i want to setup such a scenario that whenever that address receives ethers, an event or call back should be ...
Asad Hayat's user avatar
1 vote
1 answer
100 views

How to handle two solidity events with asyncio python

Im trying to get every Swap event happens on Uniswap and Sushiswap using python and do stuff based on these Swaps i know how to do it but with one exchange, it means that only one event in time . from ...
noro meb's user avatar
  • 338
1 vote
1 answer
391 views

Best way to listen to contract events and trigger a lambda function

I have a database that is updated when lambda functions through the gateway API are triggered. However from my front end when the user is sending a function there is no way to get the event of that ...
blockbyblock's user avatar
2 votes
1 answer
376 views

Optimizing Backend with a lot of Ethers.js Event listeners

I've been building an nft marketplace backend, on top of a manager contract that manages all the permissioned nft collections. The idea is that, manager can create erc721 or erc1155 contracts via this ...
Rafael's user avatar
  • 23
1 vote
0 answers
314 views

subscribing / unsubscribing functions to events with ethersjs

I'm trying to subscribe a function to an event and then unsubscribe it later on. Having a lot of difficulty with provider.off(event, listener) because i can't seem to get a listener object that I can ...
scheherazhaad's user avatar
1 vote
0 answers
12 views

ehters JS Event methods

Is there a difference between calling the event methods with provider.method and calling them with contract.method ? I could only imagine that contract.method only listens to events from that contract,...
PhilBrk8's user avatar
0 votes
1 answer
240 views

Solidity event returns object instead of string

I'm trying to test and learn how I can register a solidity event in front-end and get the value. everything seems to be fine except I get [object object] instead of the string and when I log the exact ...
m0j1's user avatar
  • 167
0 votes
1 answer
51 views

Ethereum Undecodable logs

I have encountered this transaction where all of its logs were undecodable. If you see the value of topic0 in events logs, it is function signature but ideally it should be the event signature. From ...
shadow's user avatar
  • 25
0 votes
1 answer
543 views

Get event call from solidity contract from react

I am looking for doing something, if an event is emmited from solidity contract. Here's my solidity contract:: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract QuoteV2{ string ...
TANJIRO KAMADO's user avatar
1 vote
1 answer
173 views

Is it possible to track how many event listener does the specific smart contract have?

I'm wondering if the above question is possible in ethers or web3? If yes, is it possible to get their IP as well? Thanks!
Lonewarp's user avatar
  • 151
1 vote
1 answer
28 views

Are there off-the-shelf solutions/services for receiving events from smart contracts on the server?

am working on a project where I need to catch events from smart contracts on the backend. Are there any solutions or services that help to catch events and pass them to the backend? The main ...
Dnebl's user avatar
  • 11
0 votes
1 answer
134 views

Should I build a function Event emitter?

Doing some frontend work, I'm sending a transaction using the method: await window.ethereum.request({ method: 'eth_sendTransaction', params: [tx], })` This is returning me the transaction ...
Franfran's user avatar
  • 583
1 vote
2 answers
234 views

brownie.exceptions.EventLookupError: Event 'xxx' did not fire

I am testing my contracts with brownie on local ganache and hit an issue where my events are not firing. When I call tx.events['xxx']['param1'] I get error: brownie.exceptions.EventLookupError: ...
user94798's user avatar
1 vote
1 answer
29 views

How can I tell an event is not forged?

Say you have a service in your system that listens to Ethereum events and let's imagine it does some pre-processing to broadcast only a subset of events to the rest of the system. When other parts of ...
Pinco Pallino's user avatar
2 votes
1 answer
297 views

Filter out mint and burn Transfers from Transfer events (web3.js)

In web.js Library Is there a way to filter out the Transfers events generated by the mint and burn function so as to ignore all the Transfer events generated by the mint or burn function. I know we ...
hassan ahmed's user avatar