maybeyonashalo_new_money
Updated 2021-12-07
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 zapin_user as(
select
msg_value:sender::string as user
from terra.msgs
where
msg_value:contract::string = 'terra1g7jjjkt5uvkjeyhp8ecdz4e4hvtn83sud3tmh2'
and msg_value:execute_msg:zap_into_strategy is not null
),
lp_in_user as(
select
msg_value:sender::string as user
from terra.msgs
where
msg_value:execute_msg:send:contract = 'terra1g7jjjkt5uvkjeyhp8ecdz4e4hvtn83sud3tmh2'
and tx_status = 'SUCCEEDED'
),
apollo_users as (
select * from zapin_user
union all
select * from lp_in_user
),
zapin as(
select
block_timestamp,
tx_id,
chain_id,
event_attributes:"0_amount"/pow(10,6) as ust_zap,
event_attributes:"assets" as lp_assets,
event_attributes:"lp_token"::string as lp_token,
event_attributes:"share"/pow(10,6) as lp_recieved
from terra.msg_events
where
tx_status = 'SUCCEEDED'
and event_type = 'from_contract'
and event_attributes:"0_action" = 'zap_into_strategy'
and event_attributes:"0_contract_address" = 'terra1leadedadm2fguezmd4e445h6fe337yzq8n2dxf'
Run a query to Download Data