Skip to main content

Questions tagged [event-handling]

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

Getting 403 forbidden error when useWatchContractEvent hook is used in next, wagmi, react

I am getting 403 forbidden on every interval multiple times. I used the useWatchContractEvent() hook from wagmi in my next js app. Getting same error multiple times in intervals: POST https://sepolia....
mari0's user avatar
  • 11
1 vote
1 answer
210 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
34 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
1 vote
2 answers
162 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
  • 4,935
0 votes
1 answer
27 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
584 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
657 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
193 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
740 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
103 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
  • 368
1 vote
1 answer
437 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
410 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
378 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
273 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
  • 177
0 votes
1 answer
52 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
681 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
180 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
30 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
139 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
  • 635
1 vote
2 answers
242 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
31 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
306 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