rm hardcoded ref + rename recipient -> tx_to

This commit is contained in:
gregoriustanleyy 2025-02-19 22:10:47 +07:00
parent 1551cd2233
commit 559a82bcd3
3 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@ WITH pools_created AS (
CONCAT('0x', SUBSTR(topics[2] :: STRING, 27, 40)) AS token1,
CONCAT('0x', SUBSTR(segmented_data[1] :: STRING, 25, 40)) AS pool_address,
FROM
sei.silver_evm.logs
{{ ref('silver_evm__logs') }}
WHERE
contract_address = LOWER('0xA51136931fdd3875902618bF6B3abe38Ab2D703b') -- SailorSwapFactory
AND topics[0] :: STRING = '0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118' -- PairCreated

View File

@ -26,7 +26,7 @@ swaps_base AS (
l.origin_to_address,
l.contract_address,
CONCAT('0x', SUBSTR(topics[1] :: STRING, 27, 40)) AS sender,
CONCAT('0x', SUBSTR(topics[2] :: STRING, 27, 40)) AS recipient,
CONCAT('0x', SUBSTR(topics[2] :: STRING, 27, 40)) AS tx_to,
utils.udf_hex_to_int(
's2c',
regexp_substr_all(SUBSTR(DATA, 3, len(DATA)), '.{64}')[0] :: STRING
@ -65,7 +65,7 @@ SELECT
origin_to_address,
contract_address AS pool_address,
sender,
recipient,
tx_to,
token0,
token1,
amount0,

View File

@ -95,7 +95,7 @@ WHERE
origin_from_address,
origin_to_address,
pool_address AS contract_address,
recipient AS tx_to,
tx_to,
sender,
ABS(amount0) AS amount_in_unadj,
ABS(amount1) AS amount_out_unadj,