maybeyonasterra_growth_protocol_1
    Updated 2022-05-03
    with
    contract_interacts as (
    select
    block_timestamp,
    tx_id,
    msg_value:sender::string as user,
    msg_value:contract::string as contract,
    rank() over(partition by user order by block_timestamp) as rank
    from terra.msgs
    where msg_value:sender::string is not null
    and msg_value:contract::string is not null
    ),
    first_interacts as (
    select * from contract_interacts
    where rank <= 1
    ),
    protocol_names as (
    select
    block_timestamp,
    tx_id,
    user,
    contract,
    case when label is null
    then case contract
    when 'terra1angxk38zehp0k09m0wqrrxf0r3ces6qjj432l8' then 'prism' -- forge -- https://finder.extraterrestrial.money/mainnet/projects/Prism
    when 'terra1fyyq65sfltsnj53jdfsf6dammdfhjnelt9eh72' then 'prism' -- vesting
    when 'terra1h4al753uvwmhxwhn2dlvm9gfk0jkf52xqasmq2' then 'prism' -- gov
    when 'terra1xw3h7jsmxvh6zse74e4099c6gl03fnmxpep76h' then 'prism' -- luna vault
    when 'terra1p7jp8vlt57cf8qwazjg58qngwvarmszsamzaru' then 'prism' -- yluna stake
    when 'terra1u600u35p84fntlk5cnwvy373s2qzk903qnsdyf' then 'prism' -- airdrop
    when 'terra1yxgq5y6mw30xy9mmvz9mllneddy9jaxndrphvk' then 'prism' -- cluna lp
    when 'terra1persuahr6f8fm6nyup0xjc7aveaur89nwgs5vs' then 'prism' -- pluna lp
    when 'terra1kqc65n5060rtvcgcktsxycdt2a4r67q2zlvhce' then 'prism' -- yluna lp
    when 'terra1r38qlqt69lez4nja5h56qwf4drzjpnu8gz04jd' then 'prism' -- yluna lp
    when 'terra13zaagrrrxj47qjwczsczujlvnnntde7fdt0mau' then 'prism' -- cluna
    when 'terra17wkadg0tah554r35x6wvff0y5s7ve8npcjfuhz' then 'prism' -- yluna
    Run a query to Download Data