rajsLil Noun Mint + Traits
Updated 2022-06-12Copy Reference Fork
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 winners as
(
SELECT
tx_json:receipt:logs[0]:decoded:inputs:nounId::integer as token_id,
max(block_timestamp) as winner_bid_timestamp
-- *
from flipside_prod_db.ethereum_core.fact_transactions
where to_address = '0x55e0f7a3bb39a28bd7bcc458e04b3cf00ad3219e'
and status = 'SUCCESS'
group by 1
)
,
traits AS
(
select
tx_hash,
tokenflow_eth.hextoint(topics[1])::integer as token_id,
tokenflow_eth.hextoint(substr(data,3,64)) as background,
tokenflow_eth.hextoint(substr(data,67,64)) as body,
tokenflow_eth.hextoint(substr(data,131,64)) as accessory,
tokenflow_eth.hextoint(substr(data,195,64)) as head,
tokenflow_eth.hextoint(substr(data,259,64)) as glasses
from ethereum.core.fact_event_logs
where block_timestamp > '2022-05-01'
and contract_address = lower('0x4b10701Bfd7BFEdc47d50562b76b436fbB5BdB3B')
and topics[0]::string = '0x1106ee9d020bfbb5ee34cf5535a5fbf024a011bd130078088cbf124ab3092478'
)
SELECT
w.token_id,
eth_value as mint_price,
background,
body,
accessory,
head,
Run a query to Download Data