Query ENS and 0x contract events with SQL in Google BigQuery
--
- You can now easily query parsed ENS, 0x and many more (see below) smart contract events in Google BigQuery: 0x tables, ENS tables. Those tables are near real-time.
- You can easily add events for any Ethereum contract you are interested in to public
blockchain-etl
datasets. Find instructions below.
Accessing Datasets in BigQuery
After you open the dataset links (0x tables, ENS tables) in your browser you should be able to see the blockchain-etl
project and the available datasets within it on the left:
You can select each table and view its schema, details, and preview the data on the bottom right.
Try pasting this query to the editor on the top right and click the Run button to query the ETHRegistrarController_event_NameRegistered
table:
select name, owner, cost
from `blockchain-etl.ethereum_ens.ETHRegistrarController_event_NameRegistered`
order by cost desc
limit 10
Adding Your Datasets and Tables
Follow the instructions here https://towardsdatascience.com/how-to-get-any-ethereum-smart-contract-into-bigquery-in-8-mins-bab5db1fdeee.
Other Datasets Available in BigQuery
blockchain-etl.ethereum_kyber
(for Kyber Network)blockchain-etl.ethereum_compound
(for Compound)blockchain-etl.ethereum_airswap
(for AirSwap)blockchain-etl.ethereum_axie
(for AxieAffinity)blockchain-etl.ethereum_dex_ag
(for DEX.AG Token Wire)blockchain-etl.ethereum_maker
(for MakerDAO)blockchain-etl.ethereum_uniswap
(for Uniswap Exchange)blockchain-etl.ethereum_idex
(for IDEX Exchange)blockchain-etl.ethereum_etherdelta
(for EtherDelta Exchange)blockchain-etl.ethereum_kleros
(for Kleros)blockchain-etl.ethereum_bounties_network
(for Bounties Network)