From d434e3603724c179eea404faa82b4affaba61618 Mon Sep 17 00:00:00 2001 From: Atris Date: Tue, 30 Jul 2024 21:09:51 +0200 Subject: [PATCH] fix: rename swap to dex_swap --- crates/bin/pindexer/src/dex/dex.sql | 2 +- crates/bin/pindexer/src/dex/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bin/pindexer/src/dex/dex.sql b/crates/bin/pindexer/src/dex/dex.sql index 9413adffdb..0596934685 100644 --- a/crates/bin/pindexer/src/dex/dex.sql +++ b/crates/bin/pindexer/src/dex/dex.sql @@ -117,7 +117,7 @@ CREATE TABLE IF NOT EXISTS dex_lp_execution ( ); --- Represents instances where swap executions happened. -CREATE TABLE IF NOT EXISTS swap +CREATE TABLE IF NOT EXISTS dex_swap ( height BIGINT PRIMARY KEY, input Value, diff --git a/crates/bin/pindexer/src/dex/mod.rs b/crates/bin/pindexer/src/dex/mod.rs index 4eaed47d8f..725f9c25f3 100644 --- a/crates/bin/pindexer/src/dex/mod.rs +++ b/crates/bin/pindexer/src/dex/mod.rs @@ -370,7 +370,7 @@ impl Event { } trace_end = Some(id); } - sqlx::query(r#"INSERT INTO swap VALUES ($1, (CAST($2 AS Amount), $3), + sqlx::query(r#"INSERT INTO dex_swap VALUES ($1, (CAST($2 AS Amount), $3), (CAST($4 AS AMOUNT), $5), $6, $7, $8, $9, CAST($10 AS AMOUNT), CAST($11 AS AMOUNT), CAST($12 AS AMOUNT), CAST($13 AS AMOUNT), CAST($14 AS AMOUNT), CAST($15 AS AMOUNT),;"#) .bind(i64::try_from(*height)?)