Skip to content
Dune Analytics

@johaya / Fork of (#6394) Omen Trade Total Log

SQL query results

Loading
 

SQL query

1WITH b as 
2
3(WITH a as (SELECT 
4e.contract_address as market,
5e.to as market_proxy_contract,
6e.value
7FROM erc20."ERC20_evt_Transfer" e
8WHERE e.from = '\x89023DEb1d9a9a62fF3A5ca8F23Be8d87A576220'
9AND e.contract_address != '\xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
10AND e.contract_address != '\x1A5F9352Af8aF974bFC03399e3767DF6370d82e4'
11AND e.contract_address != '\x6b175474e89094c44da98b954eedeac495271d0f'
12AND e.contract_address != '\xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
13AND e.contract_address != '\x6810e776880c02933d47db1b9fc05908e5386b96'
14-- Add any other future markets that have other tokens like chai cdai et cetera
15) 
16
17SELECT 
18DISTINCT (t.evt_tx_hash),
19x.from as user,
20t.from as market_address,
21a.market_proxy_contract,
22-- x.to as checkingadd1,
23-- j.from as check2,
24-- j.to as check3,
25-- CASE ...