Sandeshvotes
Updated 2023-05-26Copy Reference Fork
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
›
⌄
-- select
-- block_timestamp,
-- tx_hash,
-- tx_receiver as dao,
-- tx_signer as voter,
-- tx:"actions"[0]:"FunctionCall":"method_name" as act,
-- -- try_base64_decode_string(tx:"actions"[0]:"FunctionCall":"args") as arg,
-- parse_json(try_base64_decode_string(tx:"actions"[0]:"FunctionCall":"args") ):"id" as proposal_id,
-- parse_json(try_base64_decode_string(tx:"actions"[0]:"FunctionCall":"args") ):"action" as vote,
-- tx:"receipt"[2]:"outcome":"executor_id" as proposer
-- from near.core.fact_transactions
-- where 1=1
-- -- and tx_hash='DWezs13GBTgud1oBmkC3eKrHMufhoWMGwYMBFKsgqqTL'
-- and tx_status='Success'
-- and act='act_proposal'
-- and dao='marketing.sputnik-dao.near'
-- -- and PROPOSAL_ID = '551'
select
block_timestamp,
tx_hash,
RECEIVER_ID as dao,
ACTIONS:"predecessor_id" as voter,
parse_json(ACTIONS:"receipt":"Action":"actions")[0]:"FunctionCall":"method_name" as act,
parse_json(try_base64_decode_string(parse_json(ACTIONS:"receipt":"Action":"actions")[0]:"FunctionCall":"args")):"id" as proposal_id,
parse_json(try_base64_decode_string(parse_json(ACTIONS:"receipt":"Action":"actions")[0]:"FunctionCall":"args")):"action" as vote,
'-' as proposer
from near.core.fact_receipts
where 1=1
-- and tx_hash = 'JALXfYuPtsicggzBWiPUv8YqjY8SnncCvuZaZtA43SSP'
-- and proposal_id='501'
and RECEIVER_ID='marketing.sputnik-dao.near'
and act='act_proposal'
Run a query to Download Data