binhachonCross-chain Anchor - Sample transaction
Updated 2022-03-27
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 tx_id as (
select tx_id from terra.msgs
where block_timestamp::date > '2022-03-01' --tx_id = 'F808E26CA0D243AC5E997949EA0861B0209EBEA4E41516CB738B1E3ADB1FD8AB'
and msg_value:contract::string = 'terra1pw4qm09m256m3wz25n4whnuqck7rcn6wvvjzyj'
and msg_value:execute_msg:process_anchor_message is not null
and tx_status = 'SUCCEEDED'
)
select
event_attributes:"1_action" as action,
tx_id,
-- event_attributes,
row_number() over (partition by action order by tx_id) as rank
from terra.msg_events
where tx_id in (select tx_id from tx_id)
and event_type = 'from_contract'
qualify rank = 1
-- ,
-- xAnchor_earn_deposit as (
-- select
-- select
-- distinct block_timestamp,
-- tx_id,
-- event_attributes:"1_amount" as aUST_deposit_amount
-- from terra.msg_events
-- where block_timestamp::date > '2022-03-01'
-- and tx_id in (select tx_id from tx_id)
-- and event_type = 'from_contract'
-- and event_attributes:"1_action" = 'deposit_stable'
-- -- and event_attributes:"1_contract_address"::string = 'terra1hzh9vpxhsk8253se0vv5jj6etdvxu3nv8z07zu'
-- and aUST_deposit_amount is not null
-- ),
-- xAnchor_earn_withdraw as (
-- select
-- distinct block_timestamp,
-- tx_id,
-- event_attributes:"5_amount" as aUST_withdraw_amount
Run a query to Download Data