Questions tagged [events]

Solidity events and logging problems. Events allow the convenient usage of the EVM logging facilities, which in turn can be used to “call” JavaScript callbacks in the user interface of a dapp, which listen for these events.

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

How to display formatted transaction information in Remix IDE from web3.eth.getTransactionReceipt()?

tl,dr: Remix shows a formatted transaction summary for transactions that are initiated within the Remix IDE. Is it possible to display the same output for an arbitrary transaction hash? Sorry if this ...
0
votes
0answers
11 views

Subscribing to new blocks doesn´t work [ROPSTEN]

I'm trying to subscribe to newBlockHeaders on the ropsten network, but it does not seem to work. The following code works for mainnet but not ropsten. Any ideas? const Web3 = require('web3') const ...
0
votes
0answers
8 views

Events stop triggering after a while

I created a script that subscribes to PairCreated event on Uniswap using Web3 and Infura API. The event works for a few minutes but stops working after a while (timeouts?). How can I make it watch the ...
0
votes
0answers
12 views

ethers.js Why aren't logs filtering? (query returned more than 10000 results)

I'm building an API to scrape events from a contract suite deployed to Rinkeby. Here's an example function with some context: const network = getNetwork(parseInt(`${process.env.CHAIN_ID}`)); const ...
0
votes
0answers
10 views

Event listener works correctly from outside of the machine but not from inside the machine

I have created an event listener for my application. When I run the event listener from outside of the machine it listens correctly to all the events but when I run the same event listener (with ...
1
vote
2answers
27 views

Is Ethereum fast sync feasible to get logs

I want to get the logs of an contract address by filtering the even with transfer Event. I cant use Infura for its restrictions and limits. So i want to sync my own ethereum node for myself. Since my ...
0
votes
1answer
23 views

Is there some possibility to listen MakerDAO's LogNote events?

I wonder is there some possibility to listen MakerDAO's LogNote events, like we able to do with standard events. What I managed to research: I saw that LogNote was listed as an event from contract ...
0
votes
0answers
17 views

How to find a specific event if it has no indexed params

I understand that I can filter for logs with indexed events like so: event Transfer(address indexed src, address indexed dst, uint wad); whereby, I can search for all Transfer events with src=...
0
votes
1answer
16 views

Functions that are used for token transfers for ERC20 and ERC721 tokens

Let's suppose there is a contract address A of an erc721 token B. If I want to monitor all of its transfers from A to another address say C then should I only filter the Transfer function or should I ...
0
votes
1answer
26 views

Array lenght and data miss match while storing data of events

Can someone help me in finding what is wrong here a why the length of task info is 0 even the taskInfo has some data. I'm using events to fill the taskinfo array. I'm stuck at this place for almost 2 ...
0
votes
1answer
31 views

Does variables inside Event gets stored in blockchain?

Hey I have following event event Submitted(bytes32 indexed docHash); The event is called by a function function submitHash(bytes32 docHash) public onlyOwner() { Submitted(docHash); } It ...
0
votes
0answers
26 views

Which Ethereum library is the one to use nowadays? Contract events on mobile must work

I used drizzle in our dApp and contract events work fine on Desktop browsers with MetaMask. However, on mobile (tested with Rinkeby deployment on MetaMask and Status on Android) the contract events ...
0
votes
1answer
22 views

How to use truffle-assertions to verify parameters of an emit?

I have not been able to find any resources with usage instruction besides github and blog post by the author On github an example is show as such: truffleAssert.eventEmitted(result, 'TestEvent', (...
1
vote
1answer
24 views

Correct approach of replicating smart contract balances

We are storing user balances on smart contract and as well as on our local db, so that we dont always have to query blockchain for user balance. For this we use contract events to update balances ...
0
votes
1answer
20 views

Why eth_getLogs returns empty result for Ethereum account address?

I'm developing an Ethereum platform and need to fetch the events log of a desired address. I found a code like this: curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"topics":...
0
votes
0answers
28 views

How to listen for contract creation, or all block events?

I'm building a web app with web3 where users can deploy a certain contract and assign some people to it. Inside the constructor of that contract I also output a certain event. I want these assigned ...
0
votes
0answers
21 views

How to filter an indexed event parameter using web3j?

I am planning to use ethereum logs as a data storage on my private blockchain. I have defined event in my contract like this: event logDomainFilter(uint128 indexed _campaignId, uint128 indexed ...
0
votes
0answers
14 views

In EtherJs how to find account number of balance change event?

I am creating Ethereum Wallet application & I am using EtherJs for Web wallet development. When I try to listen for Balance Change event for multiple accounts then How do I find account number ...
0
votes
0answers
15 views

How can I listen for Truffle Actions such as TX_BROADCASTED, TX_ERROR via the Drizzle Vue Plugin?

In my Vue JS Dapp, which uses Drizzle Vue Plugin, I listen for contract events using $drizzleEvents like so: this.$drizzleEvents.$on('drizzle/contractEvent', (payload) => { this....
0
votes
0answers
17 views

Ethereum Logs since Beginning of Time

I can subscribe to all events in ethereum network (logs, pendingTransaction etc) so I can get only newly generated events (while I am subscribed). For my analysis I need to retrieve all logs from ...
0
votes
1answer
14 views

How is data sent to the front-end by a View function?

I am required to send some data from a view-only function to the front-end. I tried using the standard approach by emitting an event with the required fields. However, when the emit call is placed ...
1
vote
0answers
30 views

What is the maximum size of ABI in real world contracts?

To monitor my contracts during development and test in a private blockchain I’ve written an event explorer that encodes beside other parameter the ABI in an URL parameter. The ABI will be compressed ...
1
vote
0answers
19 views

Websocket provider reconnects every 1 minute

I'm developing an application on a private Ethereum chain and trying to listen to some events. I wrote a basic indexer script for listening to events and writing them in a database. To listen to the ...
0
votes
1answer
20 views

Are the events raised in a private transaction in quorum also private?

I'm trying to understand the specifics of privacy in quorum transactions, specially regarding the events. Are the events raised in a private transaction in quorum also private? I can't find any ...
2
votes
1answer
46 views

web3.js: call event handler after N confirmations

web3.js seems to call the event handler of an event directly upon confirmation. I would like to know if it is possible to call an event handler only after e.g. 5 confirmations using web3.js. Is that ...
0
votes
0answers
33 views

How to log an event which emits state of the contract in nethereum?

I am logging a specific event from a specific contract using nethereum. However, my event emits contract state (enum in solidity). My log processor shows 0 events instead of 2. Solidity code snippet:...
1
vote
1answer
32 views

How to handle events for testnet and mainnet?

I know how to handle events using personalised blockchain using ganache, can anyone tell me how to handle events in Kovan,rinkeby testnets?
0
votes
0answers
11 views

Failed to get events from kovan testnet. Same code working in ganache testnet

I'm unable to get events from kovan testnet. The same code is working with ganache blockchain, but when using kovan testnet. I'm not getting any response. Can anyone tell me what I have done wrong?. I'...
0
votes
0answers
126 views

Listening to events in Ethers.js with websockets

I'm trying to listen to all emitted events from a contract with Ethers.js and Websockets. Any idea why this is not working? var wsProvider = new ethers.providers.WebSocketProvider("wss://rinkeby....
0
votes
0answers
34 views

web3 filter function not working

I am trying to filter Transfer events from my local Ethereum node using web3 py. I am accessing my local ethereum node remotely using teamviewer and it was running and fully synced as well. My code is ...
0
votes
1answer
48 views

'Contract' object has no attribute 'eventFilter' web3.py

I am trying to filter Transfer events from my local ethereum node using web3 py. I have created a venv in visual studio code. My code is as follows: def decodeLogswithfilter(t1, t2, abi1, addr): ...
0
votes
0answers
13 views

get statistics by event filters or normal blockchain traversal

I want to ask what's the better approach among the following two: Filter events using address.eventFilter function or traversing the local blockchain block by block and getting events statistics. I ...
1
vote
1answer
28 views

Can't find address in abi encoded data of event

I have an event with the signature Event(address, uint256, string) which my smart contract emit from time to time. I am testing said contract on a ganache test net where when the Ganache picks up ...
0
votes
1answer
25 views

Etherscan event retrieval. Topic

Here's the contract events I want to pull from the ropsten network. Here's how I constructed the event request event_request = ("https://api.etherscan.io/api?module=logs&action=getLogs"+ ...
0
votes
1answer
33 views

Creating complex queries from events emitted by a smart contract

I need to create complex queries from events emitted by a smart contract. For example, I need to make a kind of "sql join" between data from different events. I know a simple solution would be to ...
0
votes
0answers
25 views

web3.js function contract.once() not working on Kovan, but working on ganache

I am subscribing to an event (just once, queued after an update) of a contract to reload the data like this on my react frontend: const instance = new web3.eth.Contract(abi, address) instance.once( ...
0
votes
2answers
61 views

What is the websocket URL in Ethereum on Geth?

I've lunched an Ethereum server based on Geth. Now, I need to be notified about all incoming transactions on my generated accounts. In my previous Bitcoin Core server, I had an option in its config ...
0
votes
0answers
23 views

Unable to hear emitted events

I'm using Infura as my provider. From what I've read online, it seems that using a websocket with infura instead of http is the first step to being able to hear events however I only get an empty list ...
0
votes
0answers
8 views

Setting up listener using web3py

I'm setting up a proof of work contract. When a solution is found, the contract emits a Transfer event and the number that gets hashed with future solutions changes. I need to set up a listener so ...
3
votes
1answer
18 views

Why are etherscan ENS events so old?

When I go to https://etherscan.io/ens, and then go to the "More" menu, and from there the "ENS Events" menus, all of the events listed are more than 320 days old. Is there a way to get recent events ...
1
vote
0answers
35 views

listening for solidity event with Javascript

I am attempting to make a simple guessing game. Game rules: Player 1 initiates the game with a contract address, upper bound, lower bound and answer. Player 2 has 10 guesses to guess the answer or ...
0
votes
1answer
15 views

Web3.JS 1.2.6 reporting PastEvents but not new events

relevant code: token.getPastEvents('Approval', { fromBlock: 0, toBlock: 'latest' }, function (error, events) { console.log("ETHEREUM past events " + JSON.stringify(events)); }); token.events....
1
vote
1answer
73 views

Watching events with truffle test

Given following solidity code: pragma solidity ^0.5.1; contract Foo { event FooInc(uint256 _a); uint256 a; constructor() public { a = 42; } function inc() public ...
0
votes
0answers
19 views

How to listen and get events in solidity [duplicate]

I'm using a smart contract that create posts , and i want to trigger the creation of a post , i want to listen to an event and pass the result to a node js server This is my event : event ...
0
votes
0answers
46 views

Timeout when try to connect over websocket in web3.py

I am trying to listen for events emitted by a simple Solidity contract. I am not able to connect using ws though I can commit transactions using http. Here's my code for event listening - import ...
0
votes
0answers
17 views

How unique are the event log ids?

I am using log_ids of events to keep track of which events I've processed. Log ids are formed using the word log followed by 8 hexadecimal characters i.e. log_d758eda8 The possible combinations of ...
0
votes
1answer
35 views

How can I extract a wallet address from event data?

I have a contract that returns event data including the sender's address: event Result( address indexed _walletAddress, string _name, uint256 _amount ) And in my Node.js app I try to ...
0
votes
1answer
50 views

How do I get all logs for all time for a given contract using web3?

This answer worked when filter.get was not deprecated, but now I am not sure how to do the same thing with subscribe - web3.eth.subscribe hears new events and acts on them after I create the ...
0
votes
1answer
50 views

Unable to filter events with specific values of indexed parameters

I am currently trying to test a smart contract using the truffle suit ( with 'truffle test'). My contract is of a simple ERC20 token which includes the standard Transfer event: event Transfer(address ...
1
vote
1answer
51 views

how to be notified about incoming transactions instantly?

I'm creating a platform which users are able to receive ETH on their own wallets (addresses). They will give the addresses to others, but the question is how can I be notified that new transactions ...

1
2 3 4 5
12