mucrypto2023-08-25 04:59 AM DeFiLlama
    Updated 2023-08-25
    with resps as
    (select defillama.get('/protocols', {}) as resp)

    select
    value:name::string as Name,
    value:category::string as Category,
    value:tvl::number as TVL
    from resps,
    lateral flatten (input => resp:data)
    where Category = 'Cross Chain'
    and TVL != '0'
    order by TVL desc


    -- data as (
    -- select
    -- resp['data'] as defi
    -- from resps)

    -- select *
    -- from data,
    -- lateral flatten (input => defi:data)

    -- select *
    -- from ethereum.core.ez_decoded_event_logs
    -- where contract_address = '0xd51a44d3fae010294c616388b506acda1bfaae46' --Curve's tricrypto2 pool; https://curve.fi/#/ethereum/pools/tricrypto2/deposit
    -- and event_name = 'AddLiquidity'
    -- limit 5
    Run a query to Download Data