MoDeFiGPC - tokens trades
    Updated 2 hours ago
    with tokens_data as (
    select *
    from $query('75f58bb3-b2cd-4208-85e9-e3d75d901a1c')
    ),

    tokens_supply as (
    select *
    from $query('d113b02b-ad6c-4fc4-8bfb-df28c696d7da')
    ),

    polygon_txs as (
    select BLOCK_TIMESTAMP, TX_HASH, ORIGIN_FUNCTION_SIGNATURE, ORIGIN_FROM_ADDRESS, ORIGIN_TO_ADDRESS, CONTRACT_ADDRESS , FROM_ADDRESS, TO_ADDRESS,
    RAW_AMOUNT_PRECISE, AMOUNT, AMOUNT_USD, b.*
    from polygon.core.ez_token_transfers a
    left join tokens_data b
    on contract=CONTRACT_ADDRESS
    where BLOCK_TIMESTAMP::date>='2025-01-27'
    union all
    select BLOCK_TIMESTAMP, TX_HASH, ORIGIN_FUNCTION_SIGNATURE, ORIGIN_FROM_ADDRESS, ORIGIN_TO_ADDRESS, '' as CONTRACT_ADDRESS , FROM_ADDRESS, TO_ADDRESS,
    AMOUNT_PRECISE_RAW, AMOUNT, AMOUNT_USD, '', 'POL', 0, '', ''
    from polygon.core.ez_native_transfers
    where BLOCK_TIMESTAMP::date>='2025-01-27'),

    polygon_undetected_swaps_raw as
    (select a.BLOCK_TIMESTAMP, a.TX_HASH, a.ORIGIN_FUNCTION_SIGNATURE, a.ORIGIN_FROM_ADDRESS, a.ORIGIN_TO_ADDRESS,
    b.RAW_AMOUNT_PRECISE as AMOUNT_IN_UNADJ, b.AMOUNT as AMOUNT_IN, b.AMOUNT_USD as AMOUNT_IN_USD,
    a.RAW_AMOUNT_PRECISE as AMOUNT_OUT_UNADJ, a.AMOUNT as AMOUNT_OUT, a.AMOUNT_USD as AMOUNT_OUT_USD, 'Other' as PLATFORM,
    b.CONTRACT_ADDRESS as TOKEN_IN, a.CONTRACT_ADDRESS as TOKEN_OUT, b.SYMBOL as SYMBOL_IN, a.SYMBOL as SYMBOL_OUT
    from polygon_txs a
    join polygon_txs b
    on a.TX_HASH=b.TX_HASH and a.ORIGIN_FROM_ADDRESS=a.FROM_ADDRESS and a.ORIGIN_FROM_ADDRESS=b.TO_ADDRESS
    where TOKEN_OUT!=TOKEN_IN
    and (TOKEN_IN in (select contract from tokens_data) or TOKEN_OUT in (select contract from tokens_data))
    and a.tx_hash not in (select tx_hash from polygon.defi.ez_dex_swaps)),

    polygon_dexs_swaps as (
    Last run: about 2 hours agoAuto-refreshes every 1 hour
    SYMBOL
    TXS
    TRADERS
    VOLUME_USD
    SUPPLY
    HOLDERS
    MC
    TOKEN_ADDRESS
    SWAPS_7D
    SWAPS_24H
    VOLUME_7D
    VOLUME_24H
    TRADERS_7D
    1
    OGC2074747429404.7001816110000000011054166.7417943930xccf37622e6b72352e7b410481dd4913563038b7c00000
    2
    DDD1741769540674.98745854610000000087062319.4965677820x4bf82cf0d6b2afc87367052b793097153c859d3800000
    3
    DHG1154849616644.57933322710000000014128299.3364677030x75c0a194cd8b4f01d5ed58be5b7c5b61a9c69d0a00000
    4
    LGP991040111098.45036552910000000011027315.2776849640xddc330761761751e005333208889bfe36c6e676000000
    5
    BTN990733011086.99112888100000000260340137.0978379590xd7c584d40216576f1d8651eab8bef9de6949766600000
    6
    EGP809237114390.67411411610000000083923046.1662681650x64f6f111e9fdb753877f17f399b759de9737917000000
    7
    PKT746929710458.59857843810000000013146626.3923790430x8a088dceecbcf457762eb7c66f78fff27dc0c04a00000
    8
    IGS67442539692.74416249310000000022432556.637558950xe302672798d12e7f68c783db2c2d5e6b48ccf3ce00000
    9
    LANTERN52012173289.084384143657535764.0482082060x8e87497ec9fd80fc102b33837035f76cf17c302000000
    10
    PEAR367144735294.285511041100000000059833035.0689499320xc760a77356563560260c9e571af6dbbab396be3800000
    11
    SOLAR23241811633.00553821410000000016962559.8290005560x1772a283501b108c0f0016224518ff38db72de2f00000
    12
    STONEY167137713880.50173688410000000002084711.4070023650x1917f5c4d5ed06383b43e47f1e59ed1f3cb5707400000
    13
    GONE127436515730.5314076586934206941022790229534.1680904540x162539172b53e9a93b7d98fb6c41682de558a32000000
    14
    EARTH1051116487.1523683943046.2941760x9f9f149a02cddc9a8251207cefd3ff774daf56f600000
    15
    KC1006864454.087291087982226226.877759583071463.7531249220x784665471bb8b945b57a76a9200b109ee214e78900000
    16
    NEUS495793751.5124949121000000000843812.2610092590x1d9ccbe51cc6b4deeeca686d409561cf9f801fbc00000
    17
    VOCATE405723637.73049121000000000896273.066071130x560d5b84d081b3a91e1cea3a971347330312473000000
    18
    WORDS396702645.420185841000000000749098.6843302460xa76164b3d0a2f35b140ec57f1552f7d6987e06db00000
    19
    KIRANA37759991.0503432841000000000843413.7764320920xfec68cbf04f7c069628cf9e9c609abc95f9a476b00000
    20
    NOMAD282571151.01108727510000000007200xd7b0c417365b63f098c1c4ad2ced35982d64887600000
    39
    4KB
    114s