maybeyonasstader_lunax_flow
Updated 2021-12-18Copy 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
35
36
›
⌄
with
sell as (
select
block_timestamp,
tx_id,
event_attributes:from::string as user,
(event_attributes:offer_amount/pow(10,6)) as amt
from terra.msg_events
where tx_status='SUCCEEDED'
and event_type = 'from_contract'
and event_attributes:offer_asset = 'terra17y9qkl8dfkeg4py7n0g5407emqnemc3yqk5rup'
),
unstake as (
select
block_timestamp,
tx_id,
msg_value:sender::string as user,
(msg_value:execute_msg:send:amount::string/pow(10,6)) as amt
from terra.msgs
where tx_status = 'SUCCEEDED'
and msg_value:contract = 'terra17y9qkl8dfkeg4py7n0g5407emqnemc3yqk5rup'
and msg_value:execute_msg:send:contract = 'terra1xacqx447msqp46qmv8k2sq6v5jh9fdj37az898'
),
add_lp as (
select
block_timestamp,
tx_id,
msg_value:sender::string as user,
(msg_value:execute_msg:increase_allowance:amount/pow(10,6)) as amt
from terra.msgs
where
tx_status ='SUCCEEDED'
and msg_value:contract::string = 'terra17y9qkl8dfkeg4py7n0g5407emqnemc3yqk5rup'
and msg_value:execute_msg:increase_allowance:spender::string = 'terra1zrzy688j8g6446jzd88vzjzqtywh6xavww92hy'
),
events as (
Run a query to Download Data