PotLockUsers per Stamp
Updated 2024-06-13
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 txns AS (
SELECT DISTINCT tx_hash, transaction_fee AS tx_fee
FROM near.core.fact_transactions b
WHERE (tx_receiver = 'v1.nadabot.near'
OR tx_signer = 'v1.nadabot.near'
AND tx_succeeded = TRUE))
,
qmain AS (
SELECT block_timestamp,
b.ARGS,
b.tx_hash,
signer_id,
ACTION_NAME,
receiver_id,
method_name,
deposit / 1e24 AS deposit,
COALESCE(TRY_PARSE_JSON(ARGS):provider.name,'') AS sybil_name,
SPLIT_PART(PARSE_JSON(ARGS):provider_id, ':', 1) AS contract_address,
SPLIT_PART(PARSE_JSON(ARGS):provider_id, ':', 2) AS check_type
FROM near.core.fact_actions_events_function_call b, txns
WHERE b.tx_hash = txns.tx_hash
AND receiver_id = 'v1.nadabot.near'
AND method_name = 'verify_stamp_callback'
AND contract_address NOT LIKE '%test%'
)
SELECT sybil_name AS stamp
,contract_address AS contract_name
,check_type AS method
,count(DISTINCT signer_id) AS users
FROM qmain
GROUP BY sybil_name,contract_address, check_type
QueryRunArchived: QueryRun has been archived