kimkimmint-redeem of GLP
    Updated 2022-08-19
    with mint_user_transfer as (
    select
    block_timestamp,
    tx_hash,
    origin_from_address,
    contract_address as asset_user_sawpped_for_glp,
    event_inputs:value as asset_amount_user_swapped_for_glp
    from avalanche.core.fact_event_logs
    where 1 =1
    --and tx_hash = '0xe24a0dac4c656e7dbd1038696f6d012e894dc4b3c650837e745d0994caf1358c'
    and origin_function_signature = '0x364e2311' -- minting GLP
    and event_inputs:to = lower('0x9ab2De34A33fB459b538c43f251eB825645e8595') -- gmx vault
    and event_inputs:from = origin_from_address
    ),

    mint_null_mints_glp as (
    select
    tx_hash,
    event_inputs:value / 1e18 as glp_amount_minted
    from avalanche.core.fact_event_logs
    where 1 =1
    --and tx_hash = '0xe24a0dac4c656e7dbd1038696f6d012e894dc4b3c650837e745d0994caf1358c'
    and origin_function_signature = '0x364e2311'
    and event_inputs:from = '0x0000000000000000000000000000000000000000'
    and event_inputs:to = origin_from_address
    and contract_address = lower('0x9e295B5B976a184B14aD8cd72413aD846C299660')
    ),

    mint_null_mints_usdg as (
    select
    tx_hash,
    event_inputs:value / 1e18 as asset_amount_usd_mint
    from avalanche.core.fact_event_logs
    where 1 =1
    -- and tx_hash = '0xe24a0dac4c656e7dbd1038696f6d012e894dc4b3c650837e745d0994caf1358c'
    and origin_function_signature = '0x364e2311'
    Run a query to Download Data