mhmOptimism NFT sales on TofuNFT
Updated 2022-10-15Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
select
distinct TX_HASH,
l1.block_timestamp::date as date,
l2.EVENT_INPUTS:from as seller,
l2.EVENT_INPUTS:to as buyer,
l2.contract_Address as nft_address,
l2.EVENT_INPUTS:tokenId as token_id,
ADDRESS_NAME as collection_name,
sum(l1.EVENT_INPUTS:wad)/1e18 as price_eth
from optimism.core.fact_event_logs l1 join optimism.core.fact_event_logs l2 using(tx_hash)
left join optimism.core.dim_labels labels on l2.contract_Address = labels.ADDRESS
where l1.EVENT_NAME = 'Withdrawal'
and l1.ORIGIN_FUNCTION_SIGNATURE = '0xba847759'
and l1.CONTRACT_ADDRESS = '0x4200000000000000000000000000000000000006'
and l1.tx_hash not in ('0xc34620449e6ca96e04844ba614d8a4d488c902715308d3af343446c745366116', '0xddfdb06699f6a84b66e956ec44bfad66fcc38b42d945545af2ab3410a4859979')
and l2.EVENT_NAME = 'Transfer'
and l2.EVENT_INPUTS:tokenId is not null
group by 1,2,3,4,5,6,7
order by date desc
limit 100
Run a query to Download Data