kirastudioEthereum L2 set-off Monthly Data (zksync, zkEVM)
    Updated 2023-08-17
    WITH
    zksync_era_hash AS (
    select tx_hash from ethereum.core.fact_transactions
    where

    /*
    --(from_address like '0x3527439923a63f8c13cf72b8fe80a77f6e572092'
    --OR from_address like '0xfeee860e7aae671124e9a4e61139f3a5085dfeee'
    --OR from_address like '0xa9232040bf0e0aea2578a5b2243f2916dbfc0a69')

    --commit,prove,execute

    --and */

    to_address in (lower('0x3dB52cE065f728011Ac6732222270b3F2360d919')--,lower('0x550F589100E379C8530c0564566D6e270ff13457')
    )
    and (origin_function_signature like '0x0c4dd81%' or origin_function_signature like '0xce9dcf16%' or origin_function_signature like '0x7739cbe7%')
    ),
    polygon_zkevm_hash AS (
    select tx_hash from ethereum.core.fact_transactions
    where to_address = '0x5132a183e9f3cb7c848b0aac5ae0c4f0491b7ab2'
    and origin_function_signature like '0x5e9145c9%' -- sequenceBatches
    ),
    starknet_hash AS (
    select tx_hash from ethereum.core.fact_transactions
    where from_address = '0x2c169dfe5fbba12957bdd0ba47d9cedbfe260ca7' --state update post
    AND to_address = lower('0xc662c410C0ECf747543f5bA90660f6ABeBD9C8c4') -- proxy
    and origin_function_signature like '0x77552641%'

    ),

    ethereum_data AS (
    SELECT
    date_trunc('month', block_timestamp) AS month,
    sum((((LENGTH(input_data) - 2) / 2) + {{fixed_data}}) / (1024 * 1024)) AS data_size_in_MB
    FROM ethereum.core.fact_transactions ft
    Run a query to Download Data