TheLaughingMan[NEAR][T3] Ref Finance Calls Failures
Updated 2022-08-11
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
›
⌄
with base as (
SELECT
date_trunc('day', a.block_timestamp) as ddate,
a.tx_hash,
receipt_index,
receiver_id,
tx_signer,
tx_receiver,
logs,
method_name,
tx,
CASE WHEN tx not ilike '%"status":{"Failure"%' THEN 'success' ELSE 'fail' END as cat
from near.core.fact_receipts a
LEFT JOIN near.core.fact_transactions t ON a.tx_hash = t.tx_hash
LEFT JOIN near.core.fact_actions_events_function_call f ON a.tx_hash=f.tx_hash
WHERE 1=1
AND receiver_id='v2.ref-finance.near'
--AND (a.tx_hash = '9PTe5i2iV7CgHdHFj5zyL7TTRATKege6bG3z7PzD2VGN' OR a.tx_hash='zzwK6JTxtSNFhWX2k7gfvuA7ZgfkxrfokpS4F71y9K8')
--AND (tx_receiver = 'v2.ref-finance.near' OR args LIKE '%\"receiver_id\":\"v2.ref-finance.near\"%')
)
SELECT
COUNT(DISTINCT tx_hash) as totals,
cat,
ddate
from base
GROUP BY ddate,cat ORDER BY ddate ASC
Run a query to Download Data