Skip to content

Commit

Permalink
fix: revert changes to match dune query
Browse files Browse the repository at this point in the history
  • Loading branch information
whalehunting committed Dec 1, 2024
1 parent 037b89d commit 783a864
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
token_sold_address,
(fee_payments.value / POWER(10, decimals)) * price AS fee_usd,
(fee_payments.value / POWER(10, decimals)) AS fee_token_amount,
'{{fee_token_symbol}}' AS fee_token_symbol,
{{ wbnb }} AS fee_token_address,
token_sold_symbol AS fee_token_symbol,
token_sold_address AS fee_token_address,
project,
version,
token_pair,
Expand All @@ -86,13 +86,13 @@
LEFT JOIN {{ source('erc20_bnb','evt_transfer') }} as fee_payments ON (
fee_payments.evt_tx_hash = tx_hash
AND fee_payments.evt_block_time = block_time
AND fee_payments.contract_address = {{ wbnb }}
AND fee_payments.contract_address = token_sold_address
AND "from" = router
AND to = {{vault}}
)
LEFT JOIN {{ source('prices', 'usd') }} AS fee_token_prices ON (
fee_token_prices.blockchain = 'bnb'
AND fee_token_prices.contract_address = {{ wbnb }}
AND fee_token_prices.contract_address = token_sold_address
AND date_trunc('minute', block_time) = minute
{% if is_incremental() %}
AND {{ incremental_predicate('minute') }}
Expand Down

0 comments on commit 783a864

Please sign in to comment.