mirror of
https://github.com/FlipsideCrypto/near-models.git
synced 2026-02-06 11:47:00 +00:00
fix data type
This commit is contained in:
parent
ccd1d1bdbb
commit
af43dffea2
3
.gitignore
vendored
3
.gitignore
vendored
@ -24,3 +24,6 @@ local*
|
|||||||
.cursorignore
|
.cursorignore
|
||||||
.cursorrules
|
.cursorrules
|
||||||
.cursor/mcp.json
|
.cursor/mcp.json
|
||||||
|
|
||||||
|
CLAUDE.local.md
|
||||||
|
__pycache__/
|
||||||
@ -149,7 +149,7 @@ swap_outcome AS (
|
|||||||
LOG,
|
LOG,
|
||||||
'.*Swapped (\\d+) (.*) for (\\d+) (.*)',
|
'.*Swapped (\\d+) (.*) for (\\d+) (.*)',
|
||||||
'\\1'
|
'\\1'
|
||||||
) :: INT AS amount_in_raw,
|
) :: NUMERIC(38,0) AS amount_in_raw,
|
||||||
REGEXP_REPLACE(
|
REGEXP_REPLACE(
|
||||||
LOG,
|
LOG,
|
||||||
'.*Swapped \\d+ (\\S+) for (\\d+) (.*)',
|
'.*Swapped \\d+ (\\S+) for (\\d+) (.*)',
|
||||||
@ -159,7 +159,7 @@ swap_outcome AS (
|
|||||||
LOG,
|
LOG,
|
||||||
'.*Swapped \\d+ \\S+ for (\\d+) (.*)',
|
'.*Swapped \\d+ \\S+ for (\\d+) (.*)',
|
||||||
'\\1'
|
'\\1'
|
||||||
) :: INT AS amount_out_raw,
|
) :: NUMERIC(38,0) AS amount_out_raw,
|
||||||
REGEXP_REPLACE(
|
REGEXP_REPLACE(
|
||||||
LOG,
|
LOG,
|
||||||
'.*Swapped \\d+ \\S+ for \\d+ (.*)',
|
'.*Swapped \\d+ \\S+ for \\d+ (.*)',
|
||||||
@ -187,9 +187,9 @@ rhea_swap_outcome AS (
|
|||||||
log_index ASC
|
log_index ASC
|
||||||
) - 1 AS swap_index, -- keeping this as fallback but Rhea logs typically contain single swap / receipt
|
) - 1 AS swap_index, -- keeping this as fallback but Rhea logs typically contain single swap / receipt
|
||||||
clean_log AS LOG,
|
clean_log AS LOG,
|
||||||
TRY_PARSE_JSON(clean_log):data[0]:amount_in::INT AS amount_in_raw,
|
TRY_PARSE_JSON(clean_log):data[0]:amount_in::NUMERIC(38,0) AS amount_in_raw,
|
||||||
TRY_PARSE_JSON(clean_log):data[0]:token_in::STRING AS token_in,
|
TRY_PARSE_JSON(clean_log):data[0]:token_in::STRING AS token_in,
|
||||||
TRY_PARSE_JSON(clean_log):data[0]:amount_out::INT AS amount_out_raw,
|
TRY_PARSE_JSON(clean_log):data[0]:amount_out::NUMERIC(38,0) AS amount_out_raw,
|
||||||
TRY_PARSE_JSON(clean_log):data[0]:token_out::STRING AS token_out,
|
TRY_PARSE_JSON(clean_log):data[0]:token_out::STRING AS token_out,
|
||||||
_partition_by_block_number,
|
_partition_by_block_number,
|
||||||
modified_timestamp,
|
modified_timestamp,
|
||||||
|
|||||||
@ -394,9 +394,9 @@ intents_mapped AS (
|
|||||||
account_id,
|
account_id,
|
||||||
referral,
|
referral,
|
||||||
ROW_NUMBER() OVER (PARTITION BY tx_hash ORDER BY intent_hash, receipt_id) - 1 AS swap_index,
|
ROW_NUMBER() OVER (PARTITION BY tx_hash ORDER BY intent_hash, receipt_id) - 1 AS swap_index,
|
||||||
amount_out_raw::STRING AS amount_out_raw,
|
amount_out_raw::NUMERIC(38,0) AS amount_out_raw,
|
||||||
token_out,
|
token_out,
|
||||||
amount_in_raw::STRING AS amount_in_raw,
|
amount_in_raw::NUMERIC(38,0) AS amount_in_raw,
|
||||||
token_in,
|
token_in,
|
||||||
swap_input_data,
|
swap_input_data,
|
||||||
log,
|
log,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user