Open fubuloubu opened 1 year ago
Thinking further on this, not sure how necessary the query subclasses are. I was thinking they can be used to upcast the more-general view call query into something that many indexers are already indexing, so they can more easily determine if they have it indexed. And if not, just convert it to it's base query so that it can be done the harder way if necessary
Overview
There are lots of indexes out there that index specific token information such as
totalSupply
andbalanceOf
over ranges of block history, such as Etherscan. Define several subclasses of the query definition in https://github.com/ApeWorX/ape/issues/380 to define an easier way to source this information from these indexes.Specification
Might look something like this:
Also, to be most useful it would need to have the ability to use
ORDER BY
andLIMIT
semantics to do queries like "get me the top 20 accounts over the last 1000 blocks for token X by % of total supply", something like:NOTE: Above is just a sketch, needs work
Dependencies
https://github.com/ApeWorX/ape/issues/380