kind: DatasetSnapshot
version: 1
content:
name: net.rocketpool.reth.mint-burn
kind: Root
metadata:
- kind: SetPollingSource
fetch:
kind: EthereumLogs
# Ethereum Mainnet
# See: https://chainlist.org/
chainId: 1
# Read raw logs, filtering by signatures we care about
filter: |
address = X'ae78736cd615f374d3085123a210448e74fc6393'
and (
topic0 = eth_event_selector(
'TokensMinted(address indexed to, uint256 amount, uint256 ethAmount, uint256 time)'
)
or topic0 = eth_event_selector(
'TokensBurned(address indexed from, uint256 amount, uint256 ethAmount, uint256 time)'
)
)
and block_number > 13325304
read:
kind: Parquet
preprocess:
kind: Sql
engine: datafusion
query: |
select
to_timestamp_seconds(
cast(json_get_str(event, 'time') as bigint
) as event_time,
block_number,
block_hash,
transaction_index,
transaction_hash,
log_index,
json_get_str(event, 'name') as event_name,
decode(
coalesce(
json_get_str(event, 'to'),
json_get_str(event, 'from')
),
'hex'
) as holder_address,
json_get_str(event, 'amount') as amount,
json_get_str(event, 'ethAmount') as eth_amount
from (
select
*,
coalesce(
eth_try_decode_event(
'TokensMinted(address indexed to, uint256 amount, uint256 ethAmount, uint256 time)',
topic0,
topic1,
topic2,
topic3,
data
),
eth_try_decode_event(
'TokensBurned(address indexed from, uint256 amount, uint256 ethAmount, uint256 time)',
topic0,
topic1,
topic2,
topic3,
data
)
) as event
from input
)
merge:
kind: Append