Questions tagged [filters]

filter for the logs fired by contract's events

Filter by
Sorted by
Tagged with
16
votes
2answers
2k views

How do I retrieve the Voted events from TheDAO?

This question was asked by @Pablo Yabo in the comment section of the question How can I view The DAO proposals including the current voting status?.
14
votes
1answer
4k views

How can I create a listener for new transaction with Ethereum RPC calls?

I am trying to create mini-service which would allow me to subscribe for incoming Ethereum transactions (coinbase example). I thought that in Ethereum it could be done with eth_newFilter and ...
0
votes
1answer
2k 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 ...
14
votes
2answers
1k views

Filters: what's “latest” and “pending”?

I want to monitor accounts for incoming transactions (RPC/IPC API) and call a function whenever any one of a number of monitored accounts receives ether which is "confirmed", as in, "sufficiently many ...
2
votes
1answer
940 views

Asynchronously querying the block chain

This question is related to this one or this one. There is a tutorial here that shows some filtering examples but it doesn't get into transaction level granularity. Can we query the block chain by ...
5
votes
1answer
797 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 ...
2
votes
1answer
887 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 ...
52
votes
2answers
15k 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? ...
1
vote
1answer
5k 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 ...
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: "...
2
votes
1answer
343 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
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 ...
3
votes
0answers
1k views

web3 filter option not working

var filter = web3.eth.filter({fromBlock: 350000, toBlock: 'latest',address:"0x075da4ebae466b80d451b0627296d5d38b3e99c1"}); var myResults1 = filter.watch(function (error, log) { console.log(error);...
7
votes
1answer
195 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 ...
5
votes
1answer
258 views

Cannot catch every event (logs) from contract - catch a couple of random events instead

My contract has a transaction which fires an event. I was able to catch every event when I was sending transactions manually. But now I'm sending 100 transactions in cycle and get only 2..5 events. ...
4
votes
1answer
992 views

Are events in a contract triggered after that particular transaction is mined?

Let's say I have an event notify() in a function called buy(). event notify(); buy(){ //... notify(); } Problem here is that my the notify watch handle is triggered only after that ...
4
votes
1answer
239 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='...
3
votes
2answers
979 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
938 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}})" ...