siwakondevvdhoney mint
Updated 2024-08-26
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 daily_vdmint AS (
SELECT
date_trunc('day', block_timestamp) AS date,
SUM(vdhoney_mint) AS total_vdhoney_mint
FROM
(
SELECT
block_timestamp,
tx_succeeded,
tx_hash,
from_address,
to_address,
trace_index,
input,
output,
LEFT(input, 10) AS function_sig,
regexp_substr_all(SUBSTR(input, 11), '.{64}') AS segmented,
'0x' || SUBSTR(segmented [2] :: string, 25) AS segmented_2,
livequery.utils.udf_hex_to_int(segmented [2] :: string) AS wei_value,
-- livequery.utils.udf_hex_to_int(segmented [1] :: string) :: bigint AS wei_value,
wei_value / POW(10, 18) AS vdhoney_mint
FROM
berachain.testnet.fact_traces
WHERE
-- tx_hash = '0x5930124f7861d88bb4fba58454d3e3bcae4e9d93c227025008d0ae65e499ad2c'
from_address = '0x0bf0eb9ae016a624e2149d4c5f47fd9276285c82'
AND to_address = '0x1339503343be5626b40ee3aee12a4df50aa4c0b9'
AND function_sig = '0x27f100f4'
AND tx_succeeded = TRUE
) subquery
GROUP BY
date_trunc('day', block_timestamp)
)
SELECT
date,
total_vdhoney_mint,
QueryRunArchived: QueryRun has been archived