18268
Index Supply
@indexsupply #18268
Indexing Ethereum https://indexsupply.com
Support email: support@indexsupply.com
554 Follower 1 Following
Fascinating example of how to query events with nested tuples!
674
anthony
@fascinated·5 days ago
you can get these events, including the commentIdentifier tuple with this query (note the cool tuple-extracting syntax, thanks @ryansmith!)
specifying a block_num window speeds up the query considerably, block 22675000 is close to the first SparkedComment event.
https://tinyurl.com/fetch-sparkedcomment-zora
specifying a block_num window speeds up the query considerably, block 22675000 is close to the first SparkedComment event.
https://tinyurl.com/fetch-sparkedcomment-zora
The list of chains grow like the grass of spring
Here is a power user's tip for querying the logs table directly.
Keep in mind: you'll want to add a `block_num` predicate since we don't have an index on tx_hash.
This is useful if you want all logs for a specific tx.
https://www.indexsupply.net/query?query=select+topics%2C+data+%0Afrom+logs+%0Awhere+tx_hash+%3D+0x856230d65058272c1c53722e758c737f190722523f745b2e62dddcf33ee31179%0Aand+block_num+%3D+26774642&event_signatures=&chain=8453
Keep in mind: you'll want to add a `block_num` predicate since we don't have an index on tx_hash.
This is useful if you want all logs for a specific tx.
https://www.indexsupply.net/query?query=select+topics%2C+data+%0Afrom+logs+%0Awhere+tx_hash+%3D+0x856230d65058272c1c53722e758c737f190722523f745b2e62dddcf33ee31179%0Aand+block_num+%3D+26774642&event_signatures=&chain=8453
How Index Supply collects payments with Daimo Pay + Index Supply
@daimo is the simplest service for accepting any coin, on any chain, from any wallet. Index Supply is the simplest API for instant access to Ethereum. But can they blend?
@daimo is the simplest service for accepting any coin, on any chain, from any wallet. Index Supply is the simplest API for instant access to Ethereum. But can they blend?
If you are querying WowTokenCreated on the Index Supply free plan, please reach out to me as I have a query suggestion for you. It will bring your cold query latency from a couple of seconds down to ~150ms.
here is the faster query: https://tinyurl.com/wowtoken-with-addr
here is the faster query: https://tinyurl.com/wowtoken-with-addr
SQL CASE Now Supported
Here is a fun query from @liam.eth showcasing World App User Migrations on the World Chain.
https://tinyurl.com/wrldchain
Here is a fun query from @liam.eth showcasing World App User Migrations on the World Chain.
https://tinyurl.com/wrldchain
We track every API query and carefully study the latency. Now you can too!
Fast is a feature.
This number is the time it took us to serve the request. It does not include client download and decoding. Which, depending on your client and your location may be significant. But hopefully not.
Fast is a feature.
This number is the time it took us to serve the request. It does not include client download and decoding. Which, depending on your client and your location may be significant. But hopefully not.
Queries using indexed fields typically run in sub-millisecond time.
So you'll never see the loading indicator.
But, If you query a contract with ¼ × 10⁶ rows then we have to do an index scan, and send the data; which, even on dialed hardware, can take time.
And for these cases, there is now a fun loading indicator.
(it’s database themed)
So you'll never see the loading indicator.
But, If you query a contract with ¼ × 10⁶ rows then we have to do an index scan, and send the data; which, even on dialed hardware, can take time.
And for these cases, there is now a fun loading indicator.
(it’s database themed)
SQL API CHANGELOG
1. nested expressions `where a and (b or c)`
2. min/max aggregate functions `max(block_num) from transfer`
3. fix bool predicates `where spent = true`
4. Added mainnet and zora chains
1. nested expressions `where a and (b or c)`
2. min/max aggregate functions `max(block_num) from transfer`
3. fix bool predicates `where spent = true`
4. Added mainnet and zora chains
Few know this, but Shovel includes a nice little PG migration system to create indexes, unique indexes, and deals with adding columns to prev. defined tables!
Here is a "index" example. Learn more here: https://indexsupply.com/shovel/docs/#table
Here is a "index" example. Learn more here: https://indexsupply.com/shovel/docs/#table

New TS package for building Shovel config: https://indexsupply.com/shovel/docs/#typescript
Shovel now logs on each tick: nrows=X nrpc=Y nblocks=Z
- number of rows inserted into Postgres
- number of rpc calls made to process
- number of blocks processed
https://indexsupply.com/shovel/docs/#logging
- number of rows inserted into Postgres
- number of rpc calls made to process
- number of blocks processed
https://indexsupply.com/shovel/docs/#logging

Added a diagnostics endpoint to Shovel. It will show you a comparison of the latest block in the db/node. Latency for db/node operations. And any errors encountered along the way.
https://indexsupply.com/shovel/docs/#monitoring
https://indexsupply.com/shovel/docs/#monitoring