It’s been documented elsewhere in this forum that the Polygon getPastLogs
API behaves differently to mainnet ETHEREUM.
For a while there was a hard limit of 100,000 blocks per request.
But recently, this seems to have been dropped without notice to 3,500
.
For example, we could make a request to ETH like this to find the ERC721 Transfer
events for a given token ID:
const scan = await web3.eth.getPastLogs({
address,
topics: [transferTopic, null, null, tokenId], // Scan for the ERC 721 Transfer topic for a given tokenId
0, // From block
'now', // To block
})
(And for the record, the token ID should be indexed according to the spec:
event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);
)
…and as long as the total number of events returned doesn’t exceed some large value, it works in a timely manner. But if we try the same on Polygon we get an error:
eth_getLogs block range too large, range: 119593, max: 3500
So my question is, is there any chance Infura will implement this for Polygon?
Is it just simply it hasn’t been implemented yet or is this a fundamental limit due to the scale of Polygon?
Our use case is being able to find the full Transfer
even history for NFTs so it’s quite a pain that we can’t do this with Infura.
Thanks!