Questions tagged [event-handling]
The event-handling tag has no usage guidance.
24
questions
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....
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.
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 ...
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 ...
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[] ...
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 ...
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("...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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,...
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 ...
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 ...
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 ...
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!
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 ...
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 ...
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: ...
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 ...
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 ...