siwakondevvault stake
Updated 2024-08-16
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 deposits AS (
SELECT
date_trunc('day', block_timestamp) as date,
sum(lp_value) as deposit_value
FROM
(
SELECT
block_timestamp,
livequery.utils.udf_hex_to_int(regexp_substr_all(SUBSTR(input, 11), '.{64}')[0] :: string) :: int / pow(10, 18) as lp_value
FROM
berachain.testnet.fact_traces
WHERE
from_address = '0x2e8410239bb4b099ee2d5683e3ef9d6f04e321cc'
AND left(input, 10) = '0xa694fc3a'
AND tx_succeeded = true
) subquery
GROUP BY
date_trunc('day', block_timestamp)
),
withdrawals AS (
SELECT
date_trunc('day', block_timestamp) as date,
sum(lp_value) as withdraw_value
FROM
(
SELECT
block_timestamp,
livequery.utils.udf_hex_to_int(regexp_substr_all(SUBSTR(input, 11), '.{64}')[0] :: string) :: int / pow(10, 18) as lp_value
FROM
berachain.testnet.fact_traces
WHERE
from_address = '0x2e8410239bb4b099ee2d5683e3ef9d6f04e321cc'
AND left(input, 10) = '0x2e1a7d4d'
AND tx_succeeded = true
) subquery
GROUP BY
QueryRunArchived: QueryRun has been archived