maybeyonastest_liq_staker
    Updated 2022-10-02
    with
    transfer_txs as (
    select
    t.block_timestamp,
    t.tx_hash,
    method_name,
    tx_signer as token_sender,
    tx_receiver as token_contract,
    try_parse_json(args) as args_json,
    l.token as token_name,
    l.symbol as token_symbol,
    case when l.decimals is null then 24 else l.decimals end as decimals,
    args_json:amount::integer/pow(10,decimals) as amt,
    args_json:receiver_id::string as token_receiver
    from near.core.fact_transactions t
    join near.core.fact_actions_events_function_call f on t.tx_hash = f.tx_hash
    left outer join near.core.dim_token_labels l on t.tx_receiver = l.token_contract
    where t.tx_status = 'Success'
    and method_name in (
    'ft_transfer',
    'ft_transfer_call'
    )
    -- @notice unidentified edge case
    -- 'eyJhbW91bnQiOiAiMTAwMDAwMDAwMDAwMDAwMDAwMCIsICJyZWNlaXZlcl9pZCI6ICI5ZTBiOGVjMWZjZDhjMzJhYmJkYWFjN2UyMjQwYzgzYzU0YTY5NTAyYzg0NDcwNGM3ODgzMGExZWY3ZDcwOTEyIn0'
    -- @notice turn the below on for filtering
    -- and args_json:msg is null
    -- and args_json:msg is not null
    )

    select
    from near.core.fact_receipts
    where tx_hash = 'FNnNFspeaJjrnmVQrwLBX6NZn8FaZHqzZpMEKVBgm4pE'
    limit 100

    Run a query to Download Data