Questions tagged [filters]

filter for the logs fired by contract's events

23 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
2answers
1k 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 ...
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);...
2
votes
1answer
943 views

Is there any way to get pending transaction for specified address?

is there any way to get pending transaction for a specified address? I can filter them on bscscan here, but I can't do the same in my web3py code. I can get all pending transaction for current pending ...
2
votes
0answers
83 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 ...
2
votes
0answers
618 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
0answers
201 views

Can not run more than 1 event in Infura

I am trying to listening to many events from infura but it is not working. Only one filter work, when I add the second filter, this message appear: RuntimeError: cannot call recv while another ...
1
vote
0answers
115 views

How does function getPastEvents works? It's too quick

I'm trying to understand how .getPastEvents function works. When given block range to search is {fromBlock:0, toBlock: 'latest'} it finds my events almost instantaneously. Shouldn't filtering all 7M ...
1
vote
1answer
69 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
285 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
160 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. ...
1
vote
0answers
180 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:...
0
votes
0answers
63 views

web3.py " filter not found "

im using web3.py v5.19 in my project and we are on BSC mainnet also i use bsc urls recommended in site to connect to nodes this is my code to get events : block_filter1 = contract.events....
0
votes
0answers
59 views

Filter event ethers.js sample code not working

I've been trying to follow the Listening to Events sample code and make a filter that detects when a specific address receives BUSD instead of DAI. However, it doesn't seem to do any filtering and ...
0
votes
0answers
38 views

Enhancing geth subscription processing to be able to work with transaction data

I'm thinking to have a geth "extension" that would be working with a Geth subscriptions. I would like to filter over pending transactions. When I'm searching in the code I can see that I can ...
0
votes
0answers
18 views

getPastEvents OR filter across two parameters

Web3 allows one to filter events by indexed parameters (see here). For example: {filter: {myNumber: [12,13]}} would pull only events where “myNumber” is 12 or 13. Is it possible to filter across two ...
0
votes
1answer
29 views

Is there a way to filter token contracts based on whether they contain certain code?

Basically if I had a list of 500 token contracts instead of manually going and reading through each token contract, is there a quick and easy function (such as an RPC call method) that checks if the ...
0
votes
0answers
103 views

How can I stream pending transactions (ideally including transaction details) of a specific contract with web3.py?

This link seems to answer a very similar question, but it is for web3.js and doesn't return transaction details: How to get a pending filter only for a contract Thanks
0
votes
0answers
69 views

w3.eth.filter returns multiple transaction with same transaction hash, block and transaction index

When running geth for bsc and doing filter via web3 with fromBlock and toBlock equal to 6000000 Here is bscscan of the transaction https://bscscan.com/tx/...
0
votes
1answer
501 views

Monitoring pending transactions with Go

I'm trying to write a program in Go to watch pending transactions, using a geth full node that I'm connected to over websockets. I'm pretty sure I have to use the github.com/ethereum/go-ethereum/eth/...
0
votes
0answers
29 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 ...
0
votes
1answer
336 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 ...
0
votes
1answer
478 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
2answers
248 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){ ...