MoeTest compound V3 repay USDC
    Updated 2024-10-30
    select
    l.BLOCK_NUMBER,
    l.BLOCK_TIMESTAMP,
    l.TX_HASH,
    l.EVENT_INDEX,
    l.CONTRACT_ADDRESS as PROTOCOL_MARKET,
    l.TOPICS[1] ,
    concat('0x',substring(TOPICS[1], 26+1, 40)) as Borrower,BORROWER as BORROWR,
    'Repay' as action,
    'Compound V3' as PLATFORM,
    'Polygon' as chain,
    ethereum.public.udf_hex_to_int(substring(data, 60, 64))::float as amount
    from polygon.core.fact_event_logs l
    left join polygon.defi.ez_lending_repayments r using (tx_hash)
    where CONTRACT_ADDRESS = lower ('0xf25212e676d1f7f89cd72ffee66158f541246445')
    and TOPICS[0] = '0xd1cf3d156d5f8f0d50f6c122ed609cec09d35c9b9fb3fff6ea0959134dae424e'
    --and EVENT_NAME = 'Withdraw'
    --and tx_hash = '0xa96d2234571d1c3e4153d8b2c4414ef1daa693b361f370d4608cf7ef0b7159e7'
    LIMIT 10


    QueryRunArchived: QueryRun has been archived