You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a limit of blocks range for eth_getLogsevmos/ethermint#860 that throws an error like Returned error: maximum [from, to] blocks distance: 10000 before actually fetching logs from blockchain itself
Expected Behavior
Expected by our partners: Alchemy and Infura made this limit with another approach described at their docs:
You can make eth_getLogs requests with up to a 2K block range and 150MB limit on the response size OR you can request any block range with a cap of 10K logs in the response.
If you need to pull logs frequently, we recommend using WebSockets to push new logs to you when they are available.
To prevent queries from consuming too many resources, eth_getLogs requests are currently limited by two constraints:
A max of 10,000 results can be returned by a single query
Query duration must not exceed 10 seconds
Steps to Reproduce
constweb3=newWeb3(<#json-rpcurl#>);
const contractAbi = require(<#ABI forcontract#>);
const contract = new web3.eth.Contract(contractAbi, <#contract'saddress#>);
await contract.getPastEvents(
"Transfer",
{filter: {from: <#wallet address#>},fromBlock: "earliest",toBlock: "latest",// make sure there is more than 10k blocks between `earliest` and `latest`},(err,events)=>{res.send(err??events);});
The text was updated successfully, but these errors were encountered:
Current Behaviour
There is a limit of blocks range for
eth_getLogs
evmos/ethermint#860 that throws an error likeReturned error: maximum [from, to] blocks distance: 10000
before actually fetching logs from blockchain itselfExpected Behavior
Expected by our partners:
Alchemy
andInfura
made this limit with another approach described at their docs:Alchemy
Infura
Steps to Reproduce
The text was updated successfully, but these errors were encountered: