Hessishrbts rew 2
    Updated 2 hours ago
    with all_tx as (
    select
    b.value as bet_amt,
    ((LENGTH(RIGHT(data, LENGTH(data) - 194)) / 64) - 1) as cards_in_slip,
    ethereum.public.udf_hex_to_int(a.TOPICS[2]) as bet_id ,
    a.tx_hash,
    a.ORIGIN_FROM_ADDRESS,
    a.BLOCK_TIMESTAMP
    from monad.testnet.fact_event_logs a
    join monad.testnet.fact_transactions b
    on a.tx_hash = b.tx_hash
    WHERE
    a.ORIGIN_FUNCTION_SIGNATURE = '0x5029defb'
    and a.ORIGIN_TO_ADDRESS = '0x3ad50059d6008b711209a509fe58e68f0b672a42'
    and b.TO_ADDRESS = '0x3ad50059d6008b711209a509fe58e68f0b672a42'
    group by all ),


    all_rew as
    (select
    b.value,
    ethereum.public.udf_hex_to_int(a.TOPICS[2]) as bet_id_fin,
    a.tx_hash,
    a.ORIGIN_FROM_ADDRESS,
    a.BLOCK_TIMESTAMP
    from monad.testnet.fact_event_logs a
    join monad.testnet.fact_traces b
    on a.tx_hash = b.tx_hash and a.ORIGIN_from_ADDRESS = b.TO_ADDRESS
    WHERE --a.tx_hash = '0x13e5fb9b3048e0983a9a5cba212620238859d338e2a4ff2cf38e7ea19a73e8ed' and
    a.ORIGIN_FUNCTION_SIGNATURE = '0xa11fd1e3'
    and a.ORIGIN_TO_ADDRESS = '0x3ad50059d6008b711209a509fe58e68f0b672a42'
    and a.TOPICS[0] = '0x9f930e45e5f186baa9054d3efb58f5f12c8894372119fb461d8abd2b9418cf2d'
    and b.FROM_ADDRESS = '0x3ad50059d6008b711209a509fe58e68f0b672a42'
    and value > 0)


    Last run: about 2 hours ago
    BETS
    Rarelink status
    1
    8443won
    2
    171042lost/not decided yet
    2
    46B
    218s