alleriaGP All Addresses involved in Aftermarket
Updated 2021-10-25Copy 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 all_transactions as (
SELECT
block_timestamp,
tx_id,
--msg_value,
msg_value:sender::string as current_owner,
msg_value:execute_msg:execute_order:order:order:maker_asset:info:nft:token_id::string as galactic_punks_ID
FROM terra.msgs
WHERE tx_status = 'SUCCEEDED'
AND msg_value:execute_msg:execute_order:order:order:maker_asset:info:nft:contract_addr = 'terra103z9cnqm8psy0nyxqtugg6m7xnwvlkqdzm4s4k'
AND msg_value:execute_msg:execute_order:order:order:maker_asset:info:nft:contract_addr is not NULL
UNION ALL
SELECT
block_timestamp,
tx_id,
--msg_value,
msg_value:execute_msg:transfer_nft:recipient::string as current_owner,
msg_value:execute_msg:transfer_nft:token_id::string as galactic_punks_ID
FROM terra.msgs t
WHERE tx_status = 'SUCCEEDED'
AND msg_value:contract::string = 'terra103z9cnqm8psy0nyxqtugg6m7xnwvlkqdzm4s4k'
AND msg_value:execute_msg:transfer_nft is not NULL
UNION ALL
SELECT
block_timestamp,
tx_id,
--event_attributes,
event_attributes:recipient::string as current_owner,
event_attributes:token_id::string as galactic_punks_ID
FROM terra.msg_events
WHERE event_type = 'from_contract'
Run a query to Download Data