Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add additional aggregator fee wallets for flokibot #7343

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ with
(
to = {{ treasury_fee_wallet_1 }}
or to = {{ treasury_fee_wallet_2 }}
or to = {{ aggregator_fee_wallet_1 }}
or to = {{ buyback_fee_wallet_1 }}
)
and tx_success = true
Expand All @@ -56,20 +57,38 @@ with
where
(
varbinary_position(data, {{ aggregator_fee_wallet_1 }}) > 0
or varbinary_position(data, {{ treasury_fee_wallet_1 }}) > 0
or varbinary_position(data, {{ treasury_fee_wallet_2 }}) > 0
or varbinary_position(data, {{ buyback_fee_wallet_1 }}) > 0
)
and call_success
{% if is_incremental() %}
and {{ incremental_predicate('call_block_time') }}
{% 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_base', 'OpenOceanExchange_evt_Swapped') }}
where
referrer = {{ aggregator_fee_wallet_1 }}
or referrer = {{ treasury_fee_wallet_1 }}
or referrer = {{ treasury_fee_wallet_2 }}
or referrer = {{ buyback_fee_wallet_1 }}
{% 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
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ with
from {{ source('bnb', 'traces') }}
where
(
to = {{ treasury_fee_wallet_1 }}
to = {{ aggregator_fee_wallet_1 }}
or to = {{ treasury_fee_wallet_1 }}
or to = {{ treasury_fee_wallet_2 }}
or to = {{ treasury_fee_wallet_3 }}
or to = {{ buyback_fee_wallet_1 }}
)
and tx_success = true
Expand All @@ -58,8 +60,10 @@ with
where
(
varbinary_position(data, {{ aggregator_fee_wallet_1 }}) > 0
or varbinary_position(data, {{ treasury_fee_wallet_1 }}) > 0
or varbinary_position(data, {{ treasury_fee_wallet_2 }}) > 0
or varbinary_position(data, {{ treasury_fee_wallet_3 }}) > 0
or varbinary_position(data, {{ buyback_fee_wallet_1 }}) > 0
)
and call_success
{% if is_incremental() %}
Expand All @@ -71,7 +75,11 @@ with
select evt_block_time as block_time, evt_tx_hash as tx_hash
from {{ source('openocean_v2_bnb', 'OpenOceanExchange_evt_Swapped') }}
where
referrer = {{ treasury_fee_wallet_3 }}
referrer = {{ aggregator_fee_wallet_1 }}
OR referrer = {{ treasury_fee_wallet_1 }}
OR referrer = {{ treasury_fee_wallet_2 }}
OR referrer = {{ treasury_fee_wallet_3 }}
OR referrer = {{ buyback_fee_wallet_1 }}
{% if is_incremental() %}
and {{ incremental_predicate('evt_block_time') }}
{% else %} and evt_block_time >= timestamp '{{project_start_date}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ with
(
to = {{ treasury_fee_wallet_1 }}
or to = {{ treasury_fee_wallet_2 }}
or to = {{ aggregator_fee_wallet_1 }}
or to = {{ buyback_fee_wallet_1 }}
)
and tx_success = true
Expand All @@ -56,7 +57,9 @@ with
where
(
varbinary_position(data, {{ aggregator_fee_wallet_1 }}) > 0
or varbinary_position(data, {{ treasury_fee_wallet_1 }}) > 0
or varbinary_position(data, {{ treasury_fee_wallet_2 }}) > 0
or varbinary_position(data, {{ buyback_fee_wallet_1 }}) > 0
)
and call_success
{% if is_incremental() %}
Expand All @@ -68,7 +71,10 @@ with
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 }}
referrer = {{ treasury_fee_wallet_1 }}
or referrer = {{ treasury_fee_wallet_2 }}
or referrer = {{ aggregator_fee_wallet_1 }}
or referrer = {{ buyback_fee_wallet_1 }}
{% if is_incremental() %}
and {{ incremental_predicate('evt_block_time') }}
{% else %} and evt_block_time >= timestamp '{{project_start_date}}'
Expand Down
Loading