Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [filters]

filter for the logs fired by contract's events

0
votes
0answers
11 views

What does that Filter By means? in ropsten etherscan while deploying tokens on ropsten

I've deployed my token contract on ropsten etherscan. Sometimes it shows me some address besides Filter By what doed that filter by exactly means?
2
votes
0answers
15 views

Accessing the network through light node

I've been trying, unsuccessfully, to make a web3.py app that needs to catch events, with the use of filters. After hours and hours of testing it appeared the problem was that Infura, which is the ...
0
votes
0answers
15 views

Get the entries of an event by an event filter in web3.py

here is my Solidity Contract: # Solidity source code contract_source_code = ''' pragma solidity ^0.4.1; contract Identities { event ExistProduction(bool); address private owner; mapping(address =&...
1
vote
1answer
50 views

Using the same event name in different contracts

Suppose I have two different contracts, and I implement an event in each one of them. If I use the same event name in both contracts, will it make it more difficult (or even impossible) to filter the ...
1
vote
1answer
32 views

Filter topic across multiple contracts

Is there something I could add to my contract which allows my application to filter for all the deployed contracts which also included this topic/identifier? The only other option to manage this I ...
1
vote
0answers
30 views

How to fix TypeError: 'xxx' is not a function

I have a project is to listen event of one deployed contract. Now I' m using BNB for testing. Here is my code: var Web3 = require("web3"); var fs = require("fs"); web3 = new Web3(new Web3.providers....
1
vote
0answers
79 views

Filtering blocks on basis of transaction logs in web3j

I want to filter blocks on the basis of a log present inside transactions. How can I do that? I don't have any contract address and want to filter all the blocks generated by all the contracts. ...
4
votes
1answer
188 views

web3.py createFilter: filter => SyntaxError: positional argument follows keyword argument

Web3.py version 4.2.1 geth version: 1.8.0-unstable I have followed web3.py guide for filtering. Through the contract instance api: event_filter = mycontract.events.myEvent.createFilter(fromBlock='...
0
votes
0answers
55 views

How can I ping when a transaction has been mined?

// Send transaction to network var from = userAccount; var to = toAccount; var value = 10000000000000000; var txHash; web3.eth.sendTransaction( {from: from, to: to, value: value}, function(err, ...
1
vote
1answer
126 views

Listing filters in geth. Do they timeout and expire?

Suppose I make a JSON-RPC call to create a new filter as follows (from the documention page): // Request curl -X POST --data '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"topics":["...
1
vote
1answer
555 views

Python 3 How to make Event Filter via createFilter web3.py v4.2.1

According to the Web3.py Documentation: http://web3py.readthedocs.io/en/latest/filters.html Quote "event_filter = contract.events.myEvent.createFilter(fromBlock='latest', {'filter': {'arg1':10}})" ...
0
votes
1answer
56 views

Python How to make Filter topics: encode integers to its hex string representation

In the documentation: http://web3py.readthedocs.io/en/latest/filters.html Quote "Subsequent topic items are the hex encoded values for indexed event arguments. In the above example, the second item ...
0
votes
0answers
128 views

How to watch erc20 transactions for many accounts and multiple tokens

I need do track customer deposits on a multitude of addresses with various tokens I want do to this with Logs web3.eth.subscribe('logs'.. or web3.eth.getPastLogs - which one is better? how do I ...
1
vote
1answer
65 views

How to find all tokens that implements a specific contract

I'm trying to filter all the Tokens that implement a specific contract for a specific public address. I'm using web3 / metamask app. I'm trying to do it on via var options = { .... //address: ".......
2
votes
1answer
48 views

Is it possible Filter events with wildcards based on recorded indexed parameters

Let's say I have a contract that fire an event PersonCreated(uint personId, bytes32 indexed name) every time a person is created. To query for all the past events with name equal to Jason, we can ...
0
votes
0answers
75 views

Watching on filter event not producing results?

I would like to view all ether delta trades for a given ethereum address but for some reason it is not working for me. The contract address for EtherDelta is ...
1
vote
2answers
548 views

How to get only latest log from my event?

I currently am using Oraclize in my contract and I make a call to a contract function from my front-end and don't want to continue onto the next call until the Oraclize function has returned. So I ...
5
votes
1answer
622 views

Cannot create filter on Infura via web3.py

I have an Infura account and I have the following code: ... web3 = Web3(HTTPProvider("https://ropsten.infura.io/mytoken") ) web3_pending_filter = web3.eth.filter('pending') ... when line ...
3
votes
1answer
381 views

web3.eth.getFilterChanges(web3_filter.filter_id) throws 'filter not found'

I am listening ethereum network through local geth node. I connected to geth through web3.py. I started a job in python code that periodically gets new blocks from filter. Here is the code: def main()...
1
vote
0answers
412 views

Web3.js filtering on allEvents

I'm struggling to figure out how to add a filter to allEvents requests. My current code: const contract = getState().web3Reducer.get('contract'); contract.getPastEvents('allEvents', { ...
1
vote
1answer
781 views

Should I use Infura with Web3j for Event filter?

I'm using Web3j with Infura for smart contract deployment, calling contract method and transactions. Now I want to use Filter contract event from log. Should I use Infura for this? Is Web3j filter ...
1
vote
0answers
86 views

Why do null topics affect the output of filter logs in geth?

I'm connected to a private chain with geth and this is the output I get when trying to retreive logs (first topic is function signature): > eth.filter({'fromBlock': 0, 'toBlock': 'latest', address:...
2
votes
0answers
496 views

Web3 Event Filtering timeout

This is the code I use to get all events from a certain contract. Solidity: event NewEvent(address indexed contractAddress, address newBOPAddress, address payer, uint commitThreshold, bool ...
0
votes
2answers
202 views

filter: logs.blockNumber = undefined

I have the following code: var filter = web3.eth.filter({ fromBlock:4076955, toBlock:"latest", address:"0x0123456789012345678901234567890123456789" }); filter.get(function(error,logs){ ...
0
votes
1answer
1k views

Mistake when using web3.eth.filter() and filter.get()

I went to the website https://etherscan.io/txs?block=4067373 and with that information choose the following address (third in line) to test on: 0x25f000254108a104A7127B5a5697cb3C12643e62 And the ...
6
votes
1answer
2k views

Understanding web3.eth.filter parameters

I have been looking through that web3.eth.filter function, and ran into a bit of a wall: var options = { fromBlock: "pending", toBlock: "latest", address: "...
1
vote
1answer
4k views

Using web3.eth.filter

The following link describes some of how the function web3.eth.filter(...) works: https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethfilter What I would like to do is get a list of the ...
1
vote
1answer
246 views

Events in failed transactions

Can anybody say for sure, if the events that occur in failed transactions (i.e. before "throw") will not be logged?
0
votes
1answer
148 views

filter doesn't trigger events for my contract

I have a trivial contract and I want to get notification of all events for the contract. But I don't see any events being called for my contract: contract MainContract{ event Evt(address indexed ...
3
votes
1answer
144 views

Events filtering with OR operator

I want to get all user's transactions from ERC20 compatible tokens. I can get all incoming transactions using this code: const to = token.Transfer({_to: account}, {fromBlock: 0, toBlock: 'latest'}); ...
3
votes
1answer
586 views

Filtering events by contract address and sender address

I need to watch events by two parameters: address of token contract and sender address. I found how to watch contract address, but not sure how to watch also by sender address? Shoud I specify address ...
1
vote
1answer
172 views

How reliable are Ethereum logs?

Do they have a lifespan? Can they be deleted? Have there been any cases of errors with logging or logs not being written? I'd like to know if I can rely on logs and build application logic on top of ...
0
votes
0answers
166 views

Find all contracts in private chain

I have few token contracts deployed in private chain. I need to scan chain and select all contracts with getName function to find all types of tokens. I think I need use web3 filter, but not sure. Any ...
4
votes
1answer
1k views

How do I filter an event by the hash of the transaction that generated the event?

I read the following in Andreas Olofsson's answer: Events can also be filtered by the hash of the transaction that generated the event Would someone please post an example of how to do this with ...
3
votes
2answers
895 views

Retrieving logs using filter is not working?

web3 has been connected to Infura node, can send signed transactions but web3.eth.filter is not working(405 error)?
1
vote
1answer
535 views

Problem with log filters in java (web3j). Maybe proble with geth parameters?

I'm having trouble trying to create a simple contract that "just log" to the blockchain what is being sent from a java client. The transaction executing the log looks to be correct (how can I be sure ...
3
votes
1answer
1k views

How to extract all event logs from the blockchain?

I'm trying to extract all event logs from the blockchain, this is how I called an Event in the smart contract. function rateBook(uint id, uint rating, string comments) onlyMember { if (id > ...
2
votes
2answers
639 views

how to use filter from web3.js properly

I want to get the block number based on the transactionhash from filter,however, when I add the following codes to my project,I found it strange because sometimes it automatically transfer the money ...
2
votes
1answer
2k views

web3.eth.filter({ fromBlock:1, toBlock: “latest” }).get() not working

web3.eth.filter({ fromBlock:1, toBlock: "latest" }).get() is not working on my geth console. I downgraded my geth from 1.5.9 to 1.3.5 to resolve this but it's still not working. Strange thing is that ...
4
votes
3answers
3k views

filter indexed events from browser using web3.js

I Have a contract defined which logs 2 events : myEvent(string data, uint32 indexed id), myEvent1(string data, uint32 indexed id). I want to filter all the events on the browser using web3 by ...
5
votes
1answer
260 views

Filtering logs for entries greater than a specific value

I know that you can filter logs in web3 by topic using: web3.eth.filter({ topics: ["0x00..."] }).watch(console.log) Is it possible to filter for a topic value greater than a given value?
3
votes
1answer
3k views

How to watch for 12th confirmation with web3 filters

It doesn't seem possible to update the options in web3.eth.filter() dynamically, so how would one watch for a transaction involving a particular account appearing on the 12th latest block?
3
votes
1answer
256 views

Best way to watch for contracts created from a given account

I want to watch the blockchain for new contracts created from some given account. I’ve got an Ethereum node with RPC enabled. I think, it should be something like this: Call eth_newBlockFilter() and ...
2
votes
1answer
145 views

How is a filter ID generated?

If I create a filter with the same parameters twice in a row, I get different filter IDs. Is the ID deterministic? If so, how is it generated?
6
votes
3answers
693 views

How can I read log/events that have been triggered in the past?

I have a smart contract with an event. event NewContractCreated(address _callerAddress, address _newContractAddress); I know how to actively listen for new events: var newContractEvent = ...
45
votes
2answers
12k views

What does the indexed keyword do?

What does the "indexed" keyword do in the below line of code? I'm guessing it just tells the event object that the following input should be logged? Can we use it other places ie outside of events? ...
3
votes
1answer
111 views

Are both the eth_newFilter from/to fields inclusive?

Does anyone know if the fields are inclusive? The documentation doesn't specify, and I would assume that they are probably inclusive fields unless otherwise stated, but it would be nice to confirm ...
4
votes
1answer
2k views

Why use filters - eth_getLogs vs eth_newFilter

It seems to me eth_getLogs is much simpler than eth_newFilter + eth_getFilterLogs. eth_getLogs has no need for installation, got same parameters, catches events retrospectively. What are use cases ...
2
votes
1answer
312 views

Why cannot catch events retrospectively using filter (eth_newFilter)?

I've put the same filter with eth_newFilter before and after a set of transactions. The one which is installed after transactions catched 0 events. Is it how events work? Is there any other way to ...
6
votes
1answer
180 views

What's the maximum number of filters geth can hold and what happens when this maximum is met?

Obviously, we should be calling uninstall on the filters we create on the node. However, assuming someone didn't uninstall them, how many are stored in memory and would there be a circular buffer to ...