10Blockchainverif 2024-08-09
    Updated 2025-02-22
    WITH l1_tx AS (
    SELECT
    'L1' AS chain,
    block_timestamp,
    tx_hash,
    from_address,
    to_address,
    gas_used,
    effective_gas_price,
    -- Conversion en ETH : gas_used * effective_gas_price (en Gwei) / 1e9
    (gas_used * effective_gas_price) / 1e9 AS cost_eth,
    NULL AS cost_mnt -- Sur L1, pas de MNT
    FROM ethereum.core.fact_transactions
    WHERE tx_hash = LOWER('0x80992d8b5ddcd626ad824ae16ea45c2981f32b95f9424d327f60f927f22064c5')
    ),
    l2_tx AS (
    SELECT
    'L2' AS chain,
    block_timestamp,
    tx_hash,
    from_address,
    to_address,
    -- Mantle ne stocke pas forcément gas_used/effective_gas_price de la même manière
    -- On récupère surtout la colonne TX_FEE (exprimée en MNT selon la doc)
    NULL AS gas_used,
    NULL AS effective_gas_price,
    NULL AS cost_eth,
    tx_fee AS cost_mnt -- fees L2 en MNT
    FROM mantle.core.fact_transactions
    WHERE tx_hash = LOWER('0xfa773ad5e0d939d0e54d112b60fd5a81ecc5bd5aff2cce71cab8a3a97596d210')
    )

    SELECT *
    FROM l1_tx
    UNION ALL
    SELECT *
    Last run: 2 months ago
    CHAIN
    BLOCK_TIMESTAMP
    TX_HASH
    FROM_ADDRESS
    TO_ADDRESS
    GAS_USED
    EFFECTIVE_GAS_PRICE
    COST_ETH
    COST_MNT
    1
    L12024-08-09 11:21:11.0000x80992d8b5ddcd626ad824ae16ea45c2981f32b95f9424d327f60f927f22064c50x6667961f5e9c98a76a48767522150889703ed77d0x31d543e7be1da6efdc2206ef7822879045b9f481868862.9630581360.0002574482692
    2
    L22024-08-09 10:23:08.0000xfa773ad5e0d939d0e54d112b60fd5a81ecc5bd5aff2cce71cab8a3a97596d2100x5598e6596e92ee25158544727fdd5aa3cf8a42040x15ea68a802f9baa5b020f8be7913131f29c1f1413.123958621
    2
    451B
    5s