JeffersMint count
    Updated 2025-03-26
    with tx_hashes as
    (
    select
    distinct m.tx_hash
    from monad.testnet.fact_event_logs m
    join monad.testnet.fact_transactions t
    on m.tx_hash = t.tx_hash
    where (m.contract_address = '0xed52e0d80f4e7b295df5e622b55eff22d262f6ed' -- include all txs related to the NFT address
    or (m.contract_address = '0x760afe86e5de5fa0ee542fc7b7b713e1c5425701' and m.origin_to_address = '0x224ecb4eae96d31372d1090c3b0233c8310dbbab')) -- include txs that involve a payment for a NFT on Magic Eden
    and m.block_timestamp >= '2025-03-03 18:33:00' -- start of minting phase
    and t.tx_succeeded = TRUE
    ),

    transfers as -- this part decodes hexadecimal values to numeric and make sure only the relevant tx hashes are included
    (
    select
    m.block_timestamp,
    m.tx_hash,
    m.contract_address AS nft_contract,
    m.origin_from_address,
    m.origin_to_address,
    m.topic_0,
    m.topic_1,
    m.topic_2,
    CASE
    when topic_3 = NULL
    then 0
    else TO_NUMERIC(utils.udf_hex_to_int(topic_3)) -- convert tokenid to numeric
    END as token_id,
    CASE
    when m.contract_address = '0x760afe86e5de5fa0ee542fc7b7b713e1c5425701'
    then TO_NUMERIC(utils.udf_hex_to_int(REPLACE(m.data, '0x0000000000000000000000000000000000000000000000', ''))) / POWER(10,18) -- make the hex WMON value numeric
    else 0
    END as data_converted,
    t.value as MON_value,
    t.tx_fee as gas_fee
    Last run: 13 days ago
    COUNT(*)
    1
    333
    1
    7B
    47s