From 2151cb51a7d055c6b59186d02b5c95cd0285b547 Mon Sep 17 00:00:00 2001 From: whalehunting <143016036+whalehunting@users.noreply.github.com> Date: Sun, 15 Dec 2024 00:25:08 +0100 Subject: [PATCH 1/3] chore: add openocean aggregator trades --- .../ethereum/flokibot_ethereum_bot_trades.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dbt_subprojects/dex/models/bot_trades/flokibot/ethereum/flokibot_ethereum_bot_trades.sql b/dbt_subprojects/dex/models/bot_trades/flokibot/ethereum/flokibot_ethereum_bot_trades.sql index d8991b7cbfd..122ae33ec12 100644 --- a/dbt_subprojects/dex/models/bot_trades/flokibot/ethereum/flokibot_ethereum_bot_trades.sql +++ b/dbt_subprojects/dex/models/bot_trades/flokibot/ethereum/flokibot_ethereum_bot_trades.sql @@ -64,12 +64,25 @@ with {% else %} and call_block_time >= timestamp '{{project_start_date}}' {% endif %} ), + openocean_aggregator_trades as ( + select evt_block_time as block_time, evt_tx_hash as tx_hash + from {{ source('openocean_v2_ethereum', 'OpenOceanExchange_evt_Swapped') }} + where + referrer = {{ treasury_fee_wallet_2 }} + {% if is_incremental() %} + and {{ incremental_predicate('evt_block_time') }} + {% else %} and evt_block_time >= timestamp '{{project_start_date}}' + {% endif %} + ), trade_transactions as ( select block_time, address, null as tx_hash from bot_contracts union all select block_time, null as address, tx_hash from oneinch_aggregator_trades + union all + select block_time, null as address, tx_hash + from openocean_aggregator_trades ), bot_trades as ( select From aad2ee52aed8144db18aa25c44d7cdd40ac1e097 Mon Sep 17 00:00:00 2001 From: whalehunting <143016036+whalehunting@users.noreply.github.com> Date: Sun, 15 Dec 2024 00:26:16 +0100 Subject: [PATCH 2/3] fix: fix table name --- .../flokibot/ethereum/flokibot_ethereum_bot_trades.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt_subprojects/dex/models/bot_trades/flokibot/ethereum/flokibot_ethereum_bot_trades.sql b/dbt_subprojects/dex/models/bot_trades/flokibot/ethereum/flokibot_ethereum_bot_trades.sql index 122ae33ec12..767d546a6c9 100644 --- a/dbt_subprojects/dex/models/bot_trades/flokibot/ethereum/flokibot_ethereum_bot_trades.sql +++ b/dbt_subprojects/dex/models/bot_trades/flokibot/ethereum/flokibot_ethereum_bot_trades.sql @@ -66,7 +66,7 @@ with ), openocean_aggregator_trades as ( select evt_block_time as block_time, evt_tx_hash as tx_hash - from {{ source('openocean_v2_ethereum', 'OpenOceanExchange_evt_Swapped') }} + from {{ source('openocean_v2_ethereum', 'OpenOceanExchangeProxy_evt_Swapped') }} where referrer = {{ treasury_fee_wallet_2 }} {% if is_incremental() %} From 6eb49a9a619e8ef344b5896cd1545793bb74731b Mon Sep 17 00:00:00 2001 From: whalehunting <143016036+whalehunting@users.noreply.github.com> Date: Sun, 15 Dec 2024 00:43:25 +0100 Subject: [PATCH 3/3] fix: add missing sources --- sources/openocean/ethereum/openocean_ethereum_sources.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sources/openocean/ethereum/openocean_ethereum_sources.yml diff --git a/sources/openocean/ethereum/openocean_ethereum_sources.yml b/sources/openocean/ethereum/openocean_ethereum_sources.yml new file mode 100644 index 00000000000..7058039ffd1 --- /dev/null +++ b/sources/openocean/ethereum/openocean_ethereum_sources.yml @@ -0,0 +1,6 @@ +version: 2 + +sources: + - name: openocean_v2_ethereum + tables: + - name: OpenOceanExchangeProxy_evt_Swapped