Skip to content

Commit

Permalink
fix: flokibot spellbook missing trades (#7335)
Browse files Browse the repository at this point in the history
* chore: add openocean aggregator trades

* fix: fix table name

* fix: add missing sources

---------

Co-authored-by: 0xRob <[email protected]>
  • Loading branch information
whalehunting and 0xRobin authored Dec 16, 2024
1 parent 643d7b9 commit cec63b1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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', 'OpenOceanExchangeProxy_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
Expand Down
6 changes: 6 additions & 0 deletions sources/openocean/ethereum/openocean_ethereum_sources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2

sources:
- name: openocean_v2_ethereum
tables:
- name: OpenOceanExchangeProxy_evt_Swapped

0 comments on commit cec63b1

Please sign in to comment.