maybeyonasbridge_addresses
    Updated 2021-11-10
    with
    luna_price as(
    select
    date(block_timestamp) as date,
    avg(luna_exchange_rate) as luna_val
    from terra.oracle_prices
    where symbol = 'UST'
    -- and block_timestamp >= getdate() - interval '30 days'
    group by 1
    ),
    mir_bridge as(
    select
    block_timestamp,
    msg_value:execute_msg:transfer:amount::string/pow(10,6) as amt,
    msg_value:execute_msg:transfer:recipient::string as user
    from terra.msgs
    where msg_value:sender::string = 'terra13yxhrk08qvdf5zdc9ss5mwsg5sf7zva9xrgwgc'
    and msg_value:contract::string = 'terra15gwkyepfc6xgca5t5zefzwy42uts8l2m4g40k6'
    and tx_status = 'SUCCEEDED'
    and msg_value:execute_msg:transfer:amount::string/pow(10,6) > 0
    -- and block_timestamp >= getdate() - interval '30 days'
    ),
    wmir_burns as(
    select
    block_timestamp,
    from_address as reciever,
    symbol as token,
    amount as amt,
    amount_usd
    from ethereum.udm_events
    where
    contract_address ='0x09a3ecafa817268f77be1283176b946c4ff2e608' -- wMIR
    and to_address = '0x0000000000000000000000000000000000000000'
    and amount > 0