datavortexcapable-gray
Updated 2025-02-20
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
/*
WITH nft_mints AS (
SELECT
'0x' || SUBSTR(topics[1], 27) AS minter, -- The recipient of the minted NFT
'0x' || SUBSTR(topics[2], 27) AS nft_contract, -- The NFT contract address
ethereum.public.udf_hex_to_int(SUBSTRING(l.data, 3, 64)) AS token_id, -- Token ID for ERC-721
ethereum.public.udf_hex_to_int(SUBSTRING(l.data, 67, 64)) AS amount, -- Amount (for ERC-1155 mints)
l.block_timestamp AS block_timestamp,
l.tx_hash AS tx_hash,
l.origin_function_signature AS origin_function_signature,
l.origin_from_address AS origin_from_address,
l.origin_to_address AS origin_to_address,
l.event_index AS event_index,
l.contract_address AS contract_address,
topics[1] AS topic1,
topics[2] AS topic2,
topics[3] AS topic3,
l.data AS data
FROM monad.testnet.fact_event_logs l
WHERE l.topics[0] IN (
'0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', -- ERC-721 Transfer (minting if from=0x0)
'0xc3d58168c5a93e63b73a5dc6f869a3a05a39e951f2c1ecf8a35d2bb0d92738a1', -- ERC-1155 TransferSingle
'0x4a39dc06d4c0dbc64b70bdb39c4f3d09d0d7e797f39a5a3c7dd2f4c9d0db6c25' -- ERC-1155 TransferBatch
)
AND '0x' || SUBSTR(topics[1], 27) = '0x0000000000000000000000000000000000000000' -- Ensures minting (from = 0x0)
AND l.contract_address = LOWER('0xb33D7138c53e516871977094B249C8f2ab89a4F4')
)
SELECT * FROM nft_mints;
QueryRunArchived: QueryRun has been archived