kaibladeGrant Payout Stats
Updated 2023-03-19
999
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 to_dao AS
(SELECT *
FROM near.core.fact_transactions
WHERE tx_receiver = 'marketing.sputnik-dao.near'
AND block_timestamp::date BETWEEN '{{Start_Date}}' AND '{{End_Date}}'),
dao_tx AS
(SELECT event.block_id, event.tx_hash, event.block_timestamp, event.method_name,
tx.tx_receiver, tx.tx_signer, event.deposit/1e24 AS deposit, PARSE_JSON(event.args) AS args, tx.tx_status
FROM near.core.fact_actions_events_function_call event
JOIN to_dao tx
ON event.tx_hash = tx.tx_hash
ORDER BY block_timestamp DESC),
act_proposals1 AS
(SELECT tx_hash, block_timestamp,
tx_signer, args, args:action AS action, args:id AS proposal_id, tx_status
FROM dao_tx
WHERE method_name = 'act_proposal'
ORDER BY block_timestamp DESC),
act_proposals_receipts AS
(SELECT *
FROM near.core.fact_receipts
WHERE receiver_id = 'marketing.sputnik-dao.near'
AND block_timestamp::date BETWEEN '{{Start_Date}}' AND '{{End_Date}}'
AND tx_hash NOT IN (SELECT tx_hash FROM act_proposals1)
AND LEN(status_value:SuccessValue) = 0),
extra_act_proposals AS
(SELECT tx_hash, block_timestamp, actions:predecessor_id AS tx_signer, parse_json(try_base64_decode_string(actions:receipt.Action.actions[0].FunctionCall.args)) AS args,
args:action AS action, args:id AS proposal_id, 'Success' AS tx_status
FROM act_proposals_receipts),
act_proposals AS
Run a query to Download Data