Questions tagged [event-handling]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
76 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
  • 2,230
0 votes
0 answers
91 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
0 answers
12 views

Not able to dynamically assign values to array

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
0 votes
0 answers
60 views

How does an event listener work in real time?

My frontend is watching/listening for a contract event. When an event is emitted after the contract is called, how is a listener notified in real time? If it is done through JSON-RPC polling using ...
sinoTrinity's user avatar
0 votes
0 answers
22 views

How to detect payment and get contract information via Metamask using javascript?

I am writing a function for a Chrome extension, how can I retrieve information of the contract I am calling the payment function on (such as the contract address) each time I execute the payment ...
Quang Tran's user avatar
0 votes
0 answers
13 views

Getting the value of a event topic with Go ethereum [duplicate]

I have an event that has two indexed arguments, a uint256 and a string. I am successfully able to get the Hex value of the event topics i am looking for but I am having trouble to decode the string ...
DevEth1797's user avatar
1 vote
2 answers
358 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
419 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
133 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
0 votes
1 answer
1k 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
  • 3
0 votes
0 answers
51 views

decode event data - param sequence

I am looking at ethereum trx at log tab to get event details. Here is function that was called: BurnConfirmed (index_topic_1 uint256 nonce, index_topic_2 address requester, uint256 amount, string ...
Oleg Saushkin OcMaRUS's user avatar
0 votes
1 answer
507 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
95 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
  • 328
0 votes
1 answer
335 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
336 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
264 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
211 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
45 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
453 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
165 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
  • 141
1 vote
1 answer
25 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
125 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
  • 564
1 vote
2 answers
224 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
281 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