Hessishlbt clm %
    Updated 2 days ago
    -- forked from lbt clm @ https://flipsidecrypto.xyz/studio/queries/7daad822-8346-44e2-b87d-1ebc7b843d27

    with claims as (select '0x'||SUBSTRING(topics[2], 27) as user_add,
    CAST(ethereum.public.udf_hex_to_int( data) AS NUMERIC) / 1e6 AS amount,
    tx_hash,
    BLOCK_TIMESTAMP
    from monad.testnet.fact_event_logs
    where -- tx_hash = '0xb4fad7b9942b28f1d153a4c7c984b791fb1227956756c4fa2293c83f519adbb3' and
    ORIGIN_FUNCTION_SIGNATURE = '0x40c10f19'
    and CONTRACT_ADDRESS = '0xbf7a88acbb8cf66b72af6c399569e37ee4d5195f'
    and topics[0] = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
    and topics[1] = '0x0000000000000000000000000000000000000000000000000000000000000000'

    union


    select '0x'||SUBSTRING(topics[2], 27) as user_add,
    CAST(ethereum.public.udf_hex_to_int( data) AS NUMERIC) / 1e6 AS amount,
    tx_hash,
    BLOCK_TIMESTAMP
    from monad.testnet.fact_event_logs
    where -- tx_hash = '0xb4fad7b9942b28f1d153a4c7c984b791fb1227956756c4fa2293c83f519adbb3' and
    ORIGIN_FUNCTION_SIGNATURE = '0x40c10f19'
    and CONTRACT_ADDRESS = '0x168a6c1889c9b04a2985769dc189aad421f1ae86'
    and topics[0] = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
    and topics[1] = '0x0000000000000000000000000000000000000000000000000000000000000000'),

    all_txs as
    (select a.ORIGIN_FROM_ADDRESS as address,
    a.TOPICS[1] as game_id,
    CAST(ethereum.public.udf_hex_to_int(b.data) AS NUMERIC) / 1e6 AS amount,
    SUBSTRING(a.data, 193, 2)||'x' as leverage,
    a.tx_hash,
    a.BLOCK_TIMESTAMP::date as time
    from monad.testnet.fact_event_logs a
    join monad.testnet.fact_event_logs b
    Last run: 1 day ago
    ADDRESSES
    TYPE
    1
    411843Minters-only
    2
    110616Beta Testers
    2
    50B
    177s