The aim of this article is to get folks started with decoding tables, on Ethereum Virtual Machine chains (EVM), through the logs
table, using open-source BigQuery tables. I will not dive into how logs
are generated or the EVM works. I will only attempt to give a very high-level overview for the uninitiated.
The BigQuery tables for Ethereum can be found under the bigquery-public-data.crypto_ethereum
dataset.
The crypto_ethereum
dataset contains the following 5 tables:
traces
: Each individual calls for each line of a smart contract. (most granular bits)
logs
: Each individual call that was explicitly printed out by the developer of the smart contract. (2nd most granular, less information than traces
)
transactions
: Each individual transaction in a certain block
blocks
: Each individual block contains a bunch of transactions
, who validated the block, the difficulty
of the block as well as many other columns. (Least granular)
Reading Material
For those interested to find out more about how…
logs
are emitted, I would recommend this article by Luit Hollander.We’ll do 3 levels of “complexity” for decoding a table.
https://embed.notionlytics.com/wt/ZXlKd1lXZGxTV1FpT2lJM01UVTJOV0poWlRZMk5tVTBZbVV6WWprMU5qQTJZVEUyTTJZME5UazBaQ0lzSW5kdmNtdHpjR0ZqWlZSeVlXTnJaWEpKWkNJNklreHRjVFZwYWs5T2JteDJSbXhHVGpkaGFYRlNJbjA9