AI WaifuWaifu NFTs Minted
    Updated 2024-05-30
    -- Types of origin_function_signature in the NFT Waifu Contract add :
    -- 0x5095307b - Mint, 0x0ce90ec2 - Lvl up, 0x77a084dd - Update Health.

    with waifu_mint_txns as (
    select *,
    -- data, topics,
    -- block_timestamp,
    -- tx_hash,
    -- -- origin_from_address,
    -- -- origin_to_address,
    -- contract_address,
    -- concat ('0x', substr(topics[1], 27, 40)) :: string as from_address,
    concat ('0x', substr(topics[2], 27, 40)) :: string as address_minted_to
    -- livequery.utils.udf_hex_to_int(SUBSTR(data, 3, 64)) as amt
    from blast.core.fact_event_logs
    where true
    -- where topics[0]::string = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' -- signifies token transfers
    and contract_address = '0x159a319e73f2e8455d5fdb1467fa0b29ec99af56'
    and origin_function_signature = '0x5095307b'
    -- and tx_hash = '0x2691b240db0d774d3fd4f61f3c6aede7c3b2ba21ccd0d4a9f8a7a59fae8c3c32'
    )

    -- Each mint txn has two rows, one that returns no topic data (no address_minted_to) and another that has.
    select count(distinct address_minted_to) as no_players, count(address_minted_to) as no_waifu_nfts
    from waifu_mint_txns
    where address_minted_to is not null

    QueryRunArchived: QueryRun has been archived