winnie-fsManta (Pacific + New Paradigm) I Total value bridged copy
    Updated 2024-01-29
    -- forked from tkvresearch / Manta (Pacific + New Paradigm) I Total value bridged @ https://flipsidecrypto.xyz/tkvresearch/q/AwEwumfZ5R41/manta-pacific-new-paradigm-i-total-value-bridged

    with

    -- MANTA PACIFIC
    A as( select amount as amount, eth_from_address as user, eth_to_address as bridge, tx_hash, block_timestamp from ethereum.core.ez_eth_transfers union all
    select 0 - amount as amount, eth_to_address as user, eth_from_address as bridge, tx_hash, block_timestamp from ethereum.core.ez_eth_transfers),
    BA as( select date_trunc('day',block_timestamp) as time, 'ETH' as symbol, '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' as token_address, sum(amount) as amount
    from A
    where bridge in ('0x9168765ee952de7c6f8fc6fad5ec209b960b7622')
    group by 1,2,3),

    AA as( select symbol, amount as amount, from_address as user, to_address as bridge, tx_hash, block_timestamp, contract_address from ethereum.core.ez_token_transfers union all
    select symbol, 0 - amount as amount, to_address as user, from_address as bridge, tx_hash, block_timestamp, contract_address from ethereum.core.ez_token_transfers),
    BB as( select date_trunc('day',block_timestamp) as time, symbol, contract_address as token_address, sum(amount) as amount
    from AA
    where bridge in ('0x3b95bc951ee0f553ba487327278cac44f29715e5')
    group by 1,2,3 ),

    -- MANTA PARADIGM
    B1 as( select date_trunc('day',block_timestamp) as time, 'ETH' as symbol, '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' as token_address, sum(amount) as amount
    from ethereum.core.ez_eth_transfers
    where eth_to_address = lower('0xdAf1695c41327b61B9b9965Ac6A5843A3198cf07')
    group by 1,2,3),

    B2 as( select date_trunc('day',BLOCK_TIMESTAMP) as time, symbol, contract_address as token_address, sum(amount) as amount
    from ethereum.core.ez_token_transfers
    where to_address = lower('0x32a786f22c303dA1B0038fA26773c2dE48209eF8')
    group by 1,2,3),

    -- all
    CC as( select 'Manta Paradigm' as chain, * from B1
    union all select 'Manta Paradigm' as chain, * from B2
    union all select 'Manta Pacific' as chain, * from BA
    Last run: about 1 year ago
    TIME
    CHAIN
    VALUE
    TVB
    TVB_TOTAL
    1
    2024-01-29 00:00:00.000Manta Pacific23479.87640688797887348.7300359907608594.191658
    2
    2024-01-29 00:00:00.000Manta Paradigm0809721245.461622907608594.191658
    3
    2024-01-28 00:00:00.000Manta Pacific-2375904.8803831397863868.853629907608594.191658
    4
    2024-01-28 00:00:00.000Manta Paradigm0809721245.461622907608594.191658
    5
    2024-01-27 00:00:00.000Manta Pacific-144529.728931057100239773.734012907608594.191658
    6
    2024-01-27 00:00:00.000Manta Paradigm0809721245.461622907608594.191658
    7
    2024-01-26 00:00:00.000Manta Pacific-2187453.49386326100384303.462943907608594.191658
    8
    2024-01-26 00:00:00.000Manta Paradigm0809721245.461622907608594.191658
    9
    2024-01-25 00:00:00.000Manta Pacific-501039.160939585102571756.956806907608594.191658
    10
    2024-01-25 00:00:00.000Manta Paradigm0809721245.461622907608594.191658
    11
    2024-01-24 00:00:00.000Manta Pacific1027836.6930379103072796.117746907608594.191658
    12
    2024-01-24 00:00:00.000Manta Paradigm0809721245.461622907608594.191658
    13
    2024-01-23 00:00:00.000Manta Pacific-200868.55162471102044959.424708907608594.191658
    14
    2024-01-23 00:00:00.000Manta Paradigm0809721245.461622907608594.191658
    15
    2024-01-22 00:00:00.000Manta Pacific-141220.974597345102245827.976333907608594.191658
    16
    2024-01-22 00:00:00.000Manta Paradigm0809721245.461622907608594.191658
    17
    2024-01-21 00:00:00.000Manta Pacific736906.708972059102387048.95093907608594.191658
    18
    2024-01-21 00:00:00.000Manta Paradigm0809721245.461622907608594.191658
    19
    2024-01-20 00:00:00.000Manta Pacific711892.072467588101650142.241958907608594.191658
    20
    2024-01-20 00:00:00.000Manta Paradigm0809721245.461622907608594.191658
    ...
    120
    11KB
    31s