10Blockchain2) Aller plus loin (analyse des fonctions appelées)
    Updated 2025-02-24
    WITH ctc_calls AS (
    SELECT
    block_timestamp,
    SUBSTRING(input_data, 1, 10) AS fourbyte_signature,
    tx_hash,
    gas_used,
    tx_fee
    FROM ethereum.core.fact_transactions
    WHERE to_address IN (
    '0x291dc3819b863e19b0a9b9809f8025d2eb4aae93', -- CTC
    '0x89E9D387555AF0cDE22cb98833Bae40d640AD7fa' -- SCC
    )
    )
    SELECT
    DATE_TRUNC('day', block_timestamp) AS day,
    CASE
    WHEN fourbyte_signature = '0xd0f89344' THEN 'appendSequencerBatch()'
    WHEN fourbyte_signature = '0x6fee07e0' THEN 'enqueue(address,uint256,bytes)'
    ELSE 'other'
    END AS function_called,
    COUNT(DISTINCT tx_hash) AS calls_count,
    SUM(gas_used) AS total_gas_used,
    SUM(tx_fee) AS total_tx_fee
    FROM ctc_calls
    GROUP BY 1,2
    ORDER BY day;

    Last run: about 2 months ago
    DAY
    FUNCTION_CALLED
    CALLS_COUNT
    TOTAL_GAS_USED
    TOTAL_TX_FEE
    1
    2023-07-03 00:00:00.000enqueue(address,uint256,bytes)21731820.005797115749
    2
    2023-07-04 00:00:00.000enqueue(address,uint256,bytes)21761160.002966342613
    3
    2023-07-04 00:00:00.000appendSequencerBatch()8793342370.1827811762
    4
    2023-07-05 00:00:00.000appendSequencerBatch()59417440.04834892129
    5
    2023-07-06 00:00:00.000appendSequencerBatch()7276098510.2774106076
    6
    2023-07-07 00:00:00.000appendSequencerBatch()9196012510.3142117594
    7
    2023-07-08 00:00:00.000appendSequencerBatch()9498336080.1918822301
    8
    2023-07-09 00:00:00.000appendSequencerBatch()9195251830.1688126423
    9
    2023-07-10 00:00:00.000appendSequencerBatch()9296908970.2080632011
    10
    2023-07-11 00:00:00.000appendSequencerBatch()93100668810.2191077176
    11
    2023-07-12 00:00:00.000appendSequencerBatch()9299932420.2705637762
    12
    2023-07-13 00:00:00.000appendSequencerBatch()9299854350.3101367066
    13
    2023-07-14 00:00:00.000appendSequencerBatch()9198998430.2348406436
    14
    2023-07-15 00:00:00.000appendSequencerBatch()9399501800.139208044
    15
    2023-07-16 00:00:00.000appendSequencerBatch()9297764950.1556345461
    16
    2023-07-17 00:00:00.000appendSequencerBatch()97153634990.3529412892
    17
    2023-07-18 00:00:00.000appendSequencerBatch()92178624800.5530869586
    18
    2023-07-19 00:00:00.000appendSequencerBatch()94156673370.3989687106
    19
    2023-07-20 00:00:00.000appendSequencerBatch()97182560040.4869019324
    20
    2023-07-21 00:00:00.000appendSequencerBatch()95208414980.5922374929
    ...
    258
    20KB
    58s