KaskoazulBridge Transfers with direction timeseries Bridge Net Value
Updated 2022-11-24
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 app_calls as (
SELECT tx_group_id,
tx_sender as app_caller,
count(1) as number_calls
FROM algorand.core.ez_transaction_application_call
WHERE block_timestamp > CURRENT_DATE - {{days}}
AND app_id = 842126029
GROUP BY 1,2
),
-- token_bridge app id (Portal in Algoexplorer)
-- https://github.com/wormhole-foundation/wormhole/blob/dev.v2/sdk/js/src/utils/consts.ts
--algorand: {
-- core: "842125965",
-- token_bridge: "842126029",
-- nft_bridge: undefined,
transactions_raw as (
SELECT tr.block_timestamp,
tr.tx_group_id,
tr.tx_id,
tr.inner_tx,
tr.tx_sender,
tr.asset_receiver,
ac.app_caller,
case ac.app_caller
when tr.asset_receiver then 'bridge_in'
else 'bridge_out'
end as direction,
ac.number_calls,
tr.fee,
tr.asset_id,
tr.asset_name,
tr.asset_amount / pow(10,tr.decimals) as amount,
amount * ps.price_usd as amount_usd,
tr.tx_message
FROM algorand.core.ez_transaction_asset_transfer tr
Run a query to Download Data