MoDeFiTrue Freeze Unlocks Detailed List
    Updated 2023-04-13
    with lock_ETH as
    (select BLOCK_TIMESTAMP, EVENT_INPUTS:from as address, TX_HASH, EVENT_INPUTS:value/1e18 as ETH_amount
    from ethereum.core.fact_event_logs
    where ORIGIN_FUNCTION_SIGNATURE='0x0f221cab' and CONTRACT_ADDRESS='0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    and ORIGIN_TO_ADDRESS='0xa4b41efc1b6f73355c90119aeefddb1ffcf907b0'
    ),

    get_frETH as
    (select TX_HASH, EVENT_INPUTS:value/1e18 as frETH_amount
    from ethereum.core.fact_event_logs
    where ORIGIN_FUNCTION_SIGNATURE='0x0f221cab' and CONTRACT_ADDRESS='0xb4bd4628e6efb0cb521d9ec35050c75840320374'
    and ORIGIN_TO_ADDRESS='0xa4b41efc1b6f73355c90119aeefddb1ffcf907b0'),

    get_nft as (
    select TX_HASH, EVENT_INPUTS:tokenId as nft_id
    from ethereum.core.fact_event_logs
    where ORIGIN_FUNCTION_SIGNATURE='0x0f221cab' and CONTRACT_ADDRESS='0x6c4e530a6f5cec117bbd1ed2937584a71c75ca22'
    and ORIGIN_TO_ADDRESS='0xa4b41efc1b6f73355c90119aeefddb1ffcf907b0'),

    tf_locks as (
    select a.BLOCK_TIMESTAMP as lock_date,address,ETH_amount,frETH_amount,nft_id, frETH_amount*365/ETH_amount as lock_days,TX_FEE,a.TX_HASH
    from lock_ETH a
    join get_frETH b
    on a.TX_HASH=b.TX_HASH
    join get_nft c
    on a.TX_HASH=c.TX_HASH
    join ethereum.core.fact_transactions d
    on a.TX_HASH=d.TX_HASH ),
    raw_unlock_ETH as
    (select BLOCK_TIMESTAMP, EVENT_INPUTS:to as address, TX_HASH, EVENT_INPUTS:value/1e18 as ETH_amount
    from ethereum.core.fact_event_logs
    where ORIGIN_FUNCTION_SIGNATURE='0xbe5021ec' and CONTRACT_ADDRESS='0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    and ORIGIN_TO_ADDRESS='0xa4b41efc1b6f73355c90119aeefddb1ffcf907b0'
    ),
    Run a query to Download Data