Watchmeninstances - makers correct
Updated 2024-10-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
›
⌄
-- forked from instances - makers wrong @ https://flipsidecrypto.xyz/studio/queries/4e820421-5906-4323-832f-679485ea7e3d
-- forked from base sei products @ https://flipsidecrypto.xyz/studio/queries/a1356916-5e5f-4952-8390-1711fd4e3b16
with sei_products as (
with base as (
select livequery.live.udf_api('https://flipsidecrypto.xyz/api/queries/a1356916-5e5f-4952-8390-1711fd4e3b16/latest-run') as resp
)
SELECT
VALUE[0] as block_number
,VALUE[1] as block_timestamp
,VALUE[2] as tx_hash
,VALUE[3]:: STRING AS product_id
,VALUE[4] as product_type
,VALUE[5] as ticker_id
,VALUE[6] as symbol
,VALUE[7] as NAME
from base, lateral FLATTEN (input=> resp:data:result:rows)
),
logs AS (
SELECT
*
FROM
sei.core_evm.fact_event_logs
WHERE 1=1
AND block_timestamp>='2024-08-14'
AND topics [0]::STRING = '0x7c57459d6f4f0fb2fc5b1e298c8c0eb238422944964aa1e249eaa78747f0cca9'
AND contract_address = LOWER('0x56Ffa2fD437C3a718322ea701bEd40560745456e')
),
order_fill_decode_v2 AS (
SELECT
QueryRunArchived: QueryRun has been archived