0x18721921cAEC1608557777ec65f6D713D2DB51D1Near Contract Creations
Updated 2023-08-23
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 base as (
-- SELECT
-- tx_receiver as contract,
-- a.block_timestamp,
-- first_value(a.block_timestamp) OVER (PARTITION BY contract ORDER BY a.block_timestamp) as origin,
-- tx
-- from near.core.fact_actions_events a
-- LEFT JOIN near.core.fact_transactions t ON t.tx_hash = a.tx_hash
-- where action_name = 'DeployContract'
-- ),
-- refine as(
-- SELECT
-- *,
-- CASE WHEN block_timestamp = origin THEN 'new' ELSE 'upgrade existing' END as cat
-- from base
-- )
-- SELECT *
-- FROM refine
-- LIMIT 10
SELECT
t.tx as t_tx,
t.tx_hash as txn_hash,
t.tx_receiver as t_tx_receiver,
a.*
-- tx_receiver as contract,
-- a.block_timestamp,
-- first_value(a.block_timestamp) OVER (PARTITION BY contract ORDER BY a.block_timestamp) as origin,
-- tx,
from near.core.fact_actions_events a
LEFT JOIN near.core.fact_transactions t ON t.tx_hash = a.tx_hash
WHERE 1=1
-- where t.block_timestamp::date = '2023-07-21'
-- AND a.block_timestamp::date = '2023-07-21'
AND action_name = 'DeployContract'
Run a query to Download Data