SELECT
DISTINCT a.CONTRACT_ADDRESS
FROM
ethereum.core.dim_contract_abis as a ,
ethereum.core.fact_event_logs as b
WHERE
a.CONTRACT_ADDRESS = '0x' || substring(b.topics [2], 27, 67)
and b.CONTRACT_ADDRESS = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
and b.TOPICS [0] = '0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925'
and a.bytecode like '%d505accf%'
AND a.bytecode not like '%095ea7b3%'
and a.bytecode not like '%e8e33700%'