commanderjoseph-761gwXIMX Bridge Total Deposit
    Updated 2024-10-17
    WITH
    total
    AS
    (
    SELECT
    block_timestamp,
    decoded_log:depositorEthKey::string AS depositor,
    decoded_log:nonQuantizedAmount::int/POW(10, 18) AS amount,
    decoded_log:assetType::string AS asset,
    CASE
    WHEN asset = '1103114524755001640548555873671808205895038091681120606634696969331999845790' THEN 'ETH'
    END AS token,
    tx_hash
    FROM
    ethereum.core.fact_decoded_event_logs
    WHERE
    contract_address = lower('0x5FDCCA53617f4d2b9134B29090C87D01058e27e9') -- IMX BRIDGE
    AND
    event_name = 'LogDeposit'
    )
    SELECT
    COUNT(DISTINCT depositor) AS total_depositor,
    SUM(amount) AS total_amount_deposited,
    COUNT(tx_hash) AS total_deposits,
    COUNT(DISTINCT asset) AS total_asset_deposited
    FROM
    total

    QueryRunArchived: QueryRun has been archived