SocioCryptoHack - transfers
    Updated 2023-02-25


    SELECT 'Ethereum' as chain, tx_hash, block_number,block_timestamp, eth_from_address as hacked_wallet, eth_to_address as hacker_wallet, amount, 'ETH' as symbol, amount_usd
    FROM ethereum.core.ez_eth_transfers
    WHERE eth_from_address = '0x51ef542b956a147684690d3d99e85be15236e872'
    AND block_timestamp::date = '2021-12-31'
    UNION
    SELECT 'Polygon' as chain, tx_hash, block_number,block_timestamp, matic_from_address as hacked_wallet, matic_to_address as hacker_wallet, amount, 'MATIC' as symbol, amount_usd
    FROM polygon.core.ez_matic_transfers
    WHERE matic_from_address = '0x51ef542b956a147684690d3d99e85be15236e872'
    AND block_timestamp::date = '2021-12-31'
    UNION
    SELECT 'Polygon' as chain, tx_hash, block_number,block_timestamp,from_address as hacked_wallet, to_address as hacker_wallet, raw_amount/pow(10,decimals) as amount, symbol, null as amount_usd
    FROM polygon.core.fact_token_transfers a
    LEFT JOIN polygon.core.dim_contracts b
    ON a.contract_address = b.address
    WHERE from_address = '0x51ef542b956a147684690d3d99e85be15236e872'
    AND block_timestamp::date = '2021-12-31'
    and symbol != 'SLP'
    UNION
    SELECT 'bsc' as chain, tx_hash, block_number,block_timestamp, from_address as hacked_wallet, to_address as hacker_wallet,
    CASE when contract_address = '0xd48474e7444727bf500a32d5abe01943f3a59a64' then raw_amount/pow(10,9)
    when contract_address = '0xcc42724c6683b7e57334c4e856f4c9965ed682bd' then raw_amount/pow(10,18) end as amount,
    CASE when contract_address = '0xd48474e7444727bf500a32d5abe01943f3a59a64' then 'BTT'
    when contract_address = '0xcc42724c6683b7e57334c4e856f4c9965ed682bd' then 'MATIC'
    end as symbol, null as amount_usd
    FROM bsc.core.fact_token_transfers
    WHERE from_address = '0x51ef542b956a147684690d3d99e85be15236e872'
    AND block_timestamp::date = '2021-12-31'
    UNION
    SELECT 'bsc' as chain, tx_hash, block_number,block_timestamp, bnb_from_address as hacked_wallet, bnb_to_address as hacker_wallet, amount, 'BNB' as symbol, amount_usd
    FROM bsc.core.ez_bnb_transfers
    WHERE bnb_from_address = '0x51ef542b956a147684690d3d99e85be15236e872'
    AND block_timestamp::date = '2021-12-31'
    ORDER BY block_timestamp


    Run a query to Download Data