Query editor
select get_href('https://basescan.org/tx/' || cast(t.tx_hash as varchar), 'BaseScan') as base_scan,s.symbol as slip_symbol,s.amount as slip_amount,s.price_usd as slip_token_price,coalesce(s.amount_usd, case when s.contract_address = maker_token and maker_token_amount !=0then s.amount*t.volume_usd/maker_token_amountwhen s.contract_address = taker_token and taker_token_amount !=0then s.amount*t.volume_usd/taker_token_amountelse null end) as slip_usd,1.00*coalesce(s.amount_usd, case when s.contract_address = maker_token and maker_token_amount !=0then s.amount*t.volume_usd/maker_token_amountwhen s.contract_address = taker_token and taker_token_amount !=0then s.amount*t.volume_usd/taker_token_amountelse null end)/t.volume_usd as slip_pct,s.contract_address,t.*from zeroex.api_fills_deduped tjoin tokens_base.transfers s on t.tx_hash = s.tx_hashwhere t.blockchain = 'base'-- test-- and t.tx_hash = 0xeccfea79892282b01672008f0841b39bbb16a66bfc41dc2e6af811ad8d71b628and t.tx_from = from_hex('{{taker}}')and (t.block_date between timestamp '{{start_date}}' and timestamp '{{end_date}}')and (t.block_month between date_trunc('month', timestamp '{{start_date}}') and date_trunc('month', timestamp '{{end_date}}'))-- and s.blockchain = 'base'and (s.block_date between timestamp '{{start_date}}' and timestamp '{{end_date}}')and (s.block_month between date_trunc('month', timestamp '{{start_date}}') and date_trunc('month', timestamp '{{end_date}}'))and s.to = 0xf5c4f3dc02c3fb9279495a8fef7b0741da956157 -- token transfer to pos sliporder by block_time desc-- from zeroex.api_fills_deduped -- 4.57764374794-- https://github.com/duneanalytics/spellbook/blob/main/dbt_subprojects/dex/models/_projects/zeroex/base/zeroex_base_api_fills_deduped.sql-- from zeroex.api_fills -- no result-- from zeroex.trades -- 4.57764374794-- https://github.com/duneanalytics/spellbook/blob/main/dbt_subprojects/dex/models/_projects/zeroex/base/zeroex_v2_base_trades.sql-- from zeroex_base.api_fills -- no result