excl limit orders

This commit is contained in:
Jack Forgash 2025-08-12 17:04:29 -04:00
parent ca3befce2b
commit 5fe9b46c6f
3 changed files with 14 additions and 9 deletions

View File

@ -1,4 +0,0 @@
---
alwaysApply: true
---
Retrieve @CLAUDE.md for project overview

View File

@ -15,6 +15,7 @@ WITH base_swaps AS (
block_timestamp,
tx_digest,
event_index,
event_module,
platform_address,
pool_address,
amount_in_raw,
@ -44,6 +45,7 @@ WITH base_swaps AS (
block_timestamp,
tx_digest,
event_index,
event_module,
platform_address,
pool_address,
amount_in_raw,

View File

@ -38,6 +38,7 @@ WITH core_events AS (
AND
{% endif %}
(
-- primary swap resources for this model
event_resource ILIKE '%swap%'
OR event_resource IN (
'Swap',
@ -51,20 +52,26 @@ WITH core_events AS (
OR event_resource ILIKE '%sell%'
)
-- exclude modules that require special handling
AND event_resource NOT IN (
'RepayFlashSwapEvent'
'RepayFlashSwapEvent',
'ScallopSwapEvent',
'OrderFilled',
'OrderInfo'
)
-- exclude dex modules that require special handling
AND transaction_module NOT IN (
'aftermath',
'scallop',
'steamm_cpmm'
'scallop'
)
AND transaction_module NOT ILIKE '%steamm%'
-- exclude limit orders from base model
AND event_module NOT IN ('settle')
-- limit to 30 days for dev
AND block_timestamp >= sysdate() - interval '30 days'
),
core_transactions AS (
SELECT
tx_digest,