mirror of
https://github.com/FlipsideCrypto/near-models.git
synced 2026-02-06 11:26:52 +00:00
fix swap->Swap
This commit is contained in:
parent
cd92e0ae24
commit
0bf9e213bb
@ -29,19 +29,20 @@ WITH swap_logs AS (
|
||||
WHERE
|
||||
receipt_succeeded
|
||||
AND clean_log LIKE 'Swapped%'
|
||||
AND receiver_id NOT LIKE '%dragon_bot.near' {% if var("MANUAL_FIX") %}
|
||||
AND receiver_id NOT LIKE '%dragon_bot.near'
|
||||
{% if var("MANUAL_FIX") %}
|
||||
AND {{ partition_load_manual('no_buffer') }}
|
||||
{% else %}
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(_modified_timestamp)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if is_incremental() %}
|
||||
AND _modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(_modified_timestamp)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
),
|
||||
receipts AS (
|
||||
SELECT
|
||||
@ -61,19 +62,20 @@ receipts AS (
|
||||
receipt_object_id
|
||||
FROM
|
||||
swap_logs
|
||||
) {% if var("MANUAL_FIX") %}
|
||||
)
|
||||
{% if var("MANUAL_FIX") %}
|
||||
AND {{ partition_load_manual('no_buffer') }}
|
||||
{% else %}
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(_modified_timestamp)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if is_incremental() %}
|
||||
AND _modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(_modified_timestamp)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
),
|
||||
swap_outcome AS (
|
||||
SELECT
|
||||
@ -161,7 +163,7 @@ parse_actions AS (
|
||||
-- for multi-swaps, there is (often) one action with an array of input dicts that correspond with the swap index
|
||||
decoded_action :msg,
|
||||
-- Swap must be capitalized! Autoformat may change to "swap"
|
||||
decoded_action :operation: swap,
|
||||
decoded_action :operation :Swap,
|
||||
decoded_action
|
||||
)
|
||||
) :actions [swap_index],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user