We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [filters]

filter for the logs fired by contract's events

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

Nethreum CreateFilterInput Block Number boundary issue

I obtained the latest block number by using: var Latest = web3.Eth.Blocks.GetBlockNumber.SendRequestAsync().Result; Assume Latest = 400000 I create a filter even from block number 390000 to (the ...
0
votes
1answer
111 views

Filters object not working for web3.eth.contract getPastEvents() method

I have referred, Web3 Events, but filters object is not working for me, I've got the same result for events before and after applying filter object. Here's the code: instance.getPastEvents( "...
0
votes
0answers
22 views

How to filter by string parameter , web3 2.0.0-alpha.1 Solidity events?

I'm trying to filter some events , and I noticed since I updated the web3 to version 2.0.0-alpha 1 the event catch is a little bit different. I have a Smart Contract with this event : event ...
1
vote
0answers
10 views

Changing from Filter to Subscribe with the current code im using

i'm having difficulties to change this line of code to web3.eth.subscribe anyone know how to write in subcribe for this since i want to change from old ver to new beta ver. const filter2 = web3....
0
votes
0answers
66 views

“Method not found” when trying to parity_subscribe to eth_getFilterChanges

Parity Ethereum version: 2.5.1-beta, tested on 2.4.6 as well Operating system: Linux (Ubuntu) Installation: binary Fully synchronized: yes Network: ethereum Restarted: yes I'm using a websocket. I ...
0
votes
1answer
147 views

How to use eth_newFilter to get pending incoming transactions to a contract?

I'm trying to get pending transactions to a certain contract using Infura. Is it possible to do that using eth_newFilter? Since apparently these filters only "trigger" from contract events, does that ...
2
votes
1answer
80 views

NEthereum, Number of indexes don't match the number of topics

I would like to get all Transfer events for a specific interval of blocks. When I call GetAllChanges with the following parameters, I get this error message: 'Number of indexes don't match the ...
0
votes
0answers
28 views

Catching FilterException web3j

I'm using web3j to subscribe for transactions: Flowable<Transaction> observable = web3.replayPastAndFutureTransactionsFlowable(startBlockParameter); Scheduler ...
0
votes
1answer
113 views

Query Ethereum Blockchain for functions return value of a Specified Smart Contract

I want to get smart contract functions return value sent by a specified smart contract within a range of blocks. I found a [manual] working method to achieve this: async function getTxsByAccount(...
0
votes
0answers
43 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
33 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
60 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
98 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
37 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
120 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
108 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
240 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='...
2
votes
1answer
237 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
979 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
70 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 ...
1
vote
1answer
73 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
81 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 ...
1
vote
2answers
821 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
813 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
586 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
495 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', { ...
2
votes
1answer
895 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
101 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:...
3
votes
0answers
564 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
219 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
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 ...
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
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 ...
1
vote
1answer
344 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
160 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
233 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
738 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
185 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 ...
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
987 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
657 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
686 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
317 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
292 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
165 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?
5
votes
3answers
766 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 = ...