Questions tagged [filters]

filter for the logs fired by contract's events

Filter by
Sorted by
Tagged with
3
votes
1answer
129 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 ...
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 ...
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 ...
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
949 views

What is 'the last add pending transaction' in web3 filter?

I run this code using MetaMask to inject web3 object: var filter = web3.eth.filter('pending'); filter.watch(function (error, log) { console.log(log); }); From web3 api docs: When using the "...
2
votes
1answer
520 views

What is being watched by filter.watch?

I'm interacting with the blockchain using MetaMask. Here's my JS code: var filter = web3.eth.filter('latest'); filter.watch(callback) function callback(error, result){ console.log(result); }...
1
vote
1answer
414 views

How to watch for a transaction send by Node A from another Node B?

What I am struggling to achieve is the following: Node A sends a transaction. Node B starts watching for this transaction. When Node B sees the transaction in the latest block (ie not as a pending ...
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 ...
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);...
5
votes
1answer
579 views

How to check if a filter has timed out?

According to the JSON RPC docs, filters timeout when they aren't polled with eth_getFilterChanges for a period of time. eth_getFilterChanges(ID) seems to return the same result {"jsonrpc"=>"2.0", "...
1
vote
1answer
609 views

Managing multiple filters in geth?

In the interactive JavaScript console of geth, I have added some JS snippets(filters) through the loadScript() command and I need to remove/stop executing those filters. Is there any way to do this ...
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?.
3
votes
1answer
342 views

filter for non-contract addresses?

If I set up a filter to receive changes, I only seem to receive transactions for addresses that are contract addresses. How to put a filter to receive transactions that are sent to an address that is ...
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 ...
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 ...
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 ...
10
votes
2answers
1k views

How can I trigger a PHP script when a transaction is received?

My goal is to have a PHP script be invoked whenever a transaction is received by a given address. I know Javascript but this is my first sally into Node.js. I think the right approach is to run a ...