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