CUBE3tx_with_value_and_token
Updated 2024-09-28
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
WITH token_1_transfers AS (
-- Get all transfers where token_list_1 tokens are involved
SELECT
tx_hash,
from_address,
to_address,
amount,
contract_address
FROM
ethereum.core.ez_token_transfers
WHERE
contract_address IN (
'0xa5a88aa6c3cad2aae740710c60d2c3552740284e',
'0xc9d12738111ec6610217c5ba4bdf2cc61a8f69bb',
'0x55886ef598fc4143699c85b9abf55ed08487a3ae'
) -- list of deployed fake tokens in last month
-- removed: 0x6c58c086a000adaf0e522f6dbacd2c64c1f21b4a
),
token_2_or_native_transfers AS (
-- Get all transfers where token_list_2 tokens or native tokens are involved
SELECT
tx_hash,
from_address,
to_address,
amount,
contract_address
FROM
ethereum.core.ez_token_transfers
WHERE
contract_address IN ('0xdac17f958d2ee523a2206206994597c13d831ec7') -- replace with your tokens from token_list_2
)
-- Join the two results on transaction hash to find transactions involving both sets of tokens
SELECT DISTINCT
t1.tx_hash,
t1.from_address,
QueryRunArchived: QueryRun has been archived