PotLockProject Registration Until First Donation
Updated 2024-05-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
›
⌄
-- forked from brian-terra / All Potlock Registers @ https://flipsidecrypto.xyz/brian-terra/q/_CbXCPpmisyW/all-potlock-registers
-- forked from All Potlock Donations @ https://flipsidecrypto.xyz/edit/queries/9297bc52-b0cc-4a3c-b2bc-dcd99993c7be
WITH txns as
(select distinct tx_hash, transaction_fee as tx_fee
from near.core.fact_transactions b
where (tx_receiver = 'registry.potlock.near'
or tx_signer = 'registry.potlock.near')
and tx_succeeded = TRUE)
,
qmain as (
select block_timestamp,
b.tx_hash,
signer_id,
--args,
deposit / 1e24 as deposit
from near.core.fact_actions_events_function_call b, txns
where b.tx_hash = txns.tx_hash
and method_name = 'register'
),
txns_donate as
(select distinct a.tx_hash, transaction_fee as tx_fee
from near.core.fact_actions_events_function_call a, near.core.fact_transactions b
where receiver_id = 'donate.potlock.near'
and method_name = 'donate'
and a.tx_hash = b.tx_hash
and tx_succeeded = TRUE)
,
qmain_donate as (
select block_timestamp,
b.action_name,
signer_id,
receiver_id,
try_parse_json(b.action_data):"deposit"::float / 1e24 as deposit,
QueryRunArchived: QueryRun has been archived