samGLP price for redeems
Updated 2022-08-15Copy 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 asset_transferred as
(select
block_timestamp,
tx_hash,
origin_from_address,
contract_address as denom_swapped_for_glp,
event_inputs:value as amount_swapped_for_glp
from avalanche.core.fact_event_logs
where 1 = 1
-- and tx_hash = '0x62356b24c21a9049d9198484a79685ac0d00e783835dc790c844692919c71d21'
and event_inputs:from = origin_from_address
and event_inputs:to = '0x9ab2de34a33fb459b538c43f251eb825645e8595' -- gmx vault to manage assets
and event_name = 'Transfer'
and origin_function_signature = '0x364e2311'
),
usd_gambit_transfers as (
select
tx_hash,
event_inputs:value /1e18 as usd_price_of_asset_swapped_to_glp
from avalanche.core.fact_event_logs
where 1 = 1
--and tx_hash = '0x62356b24c21a9049d9198484a79685ac0d00e783835dc790c844692919c71d21'
and event_inputs:from = '0x0000000000000000000000000000000000000000'
and event_inputs:to = '0xe1ae4d4b06a5fe1fc288f6b4cd72f9f8323b107f' -- address to receive USD Gambit
and event_name = 'Transfer'
and contract_address = '0xc0253c3cc6aa5ab407b5795a04c28fb063273894' -- USD gambit
),
glp_transfers as (
select
tx_hash,
event_inputs:value /1e18 as amount_of_glp_minted
from avalanche.core.fact_event_logs
where 1 = 1
-- and tx_hash = '0x62356b24c21a9049d9198484a79685ac0d00e783835dc790c844692919c71d21'
Run a query to Download Data