Skip to content

Commit

Permalink
zereox - base- update token price priority list (#5583)
Browse files Browse the repository at this point in the history
* initial Socialtokens view

* Rename socialTokens to socialtokens.sql

* Addded new tokens to list

* Update socialtokens.sql

* rmv social tokens file

* add zeroex to dex_aggregator.trades

* remove old branches

* reset profiles.yml

* remove

* save

* schema

* undo trnsfesr changes

* update base token priority list

* reivse case statement
  • Loading branch information
RantumBits authored Mar 13, 2024
1 parent 4388614 commit 5b1d0ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/zeroex/base/zeroex_base_api_fills.sql
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ SELECT
max(affiliate_address) over (partition by all_tx.tx_hash) as affiliate_address,
swap_flag,
matcha_limit_order_flag,
CASE WHEN maker_token IN (0x04068da6c83afcfa0e13ba15a6696662335d5b75,0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83,0x74b23882a30290451a17c44f4f05243b6b58c76d,0x049d68029688eabf473097a2fc38ef61633a3c7a,0x82f0b8b456c1a451378467398982d4834b6829c1, 0x321162cd933e2be498cd2267a90534a804051b11)
CASE WHEN maker_token IN (0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca,0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22,0xeb466342c4d449bc9f53a865d5cb90586f405215 )
THEN (all_tx.maker_token_amount_raw / pow(10, mp.decimals)) * mp.price
WHEN taker_token IN (0x04068da6c83afcfa0e13ba15a6696662335d5b75,0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83,0x74b23882a30290451a17c44f4f05243b6b58c76d,0x049d68029688eabf473097a2fc38ef61633a3c7a,0x82f0b8b456c1a451378467398982d4834b6829c1, 0x321162cd933e2be498cd2267a90534a804051b11)
WHEN taker_token IN (0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca,0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22,0xeb466342c4d449bc9f53a865d5cb90586f405215,0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca )
THEN (all_tx.taker_token_amount_raw / pow(10, tp.decimals)) * tp.price
ELSE COALESCE((all_tx.maker_token_amount_raw / pow(10, mp.decimals)) * mp.price, (all_tx.taker_token_amount_raw / pow(10, tp.decimals)) * tp.price)
END AS volume_usd,
Expand Down

0 comments on commit 5b1d0ce

Please sign in to comment.