Query editor
with stable_coin as (select 0xdAC17F958D2ee523a2206206994597C13D831ec7 as address, 'USDT' as name, 6 as decimalsUNION SELECT 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 as address, 'USDC' as name, 6 as decimalsUNION SELECT 0x6b175474e89094c44da98b954eedeac495271d0f as address, 'DAI' as name, 18 as decimalsUNION SELECT 0x4Fabb145d64652a948d72533023f6E7A623C7C53 as address, 'BUSD' as name, 18 as decimalsUNION SELECT 0x0000000000085d4780B73119b644AE5ecd22b376 as address, 'TUSD' as name, 18 as decimals),-- 转账的哈希,0U-- SELECT block_time,tx_hash,contract_address,topic1,topic2,bytearray_to_uint256(data) as datatx as (SELECT tx_hashfrom(SELECT tx_hash,contract_address,bytearray_to_uint256(bytearray_ltrim(data)) as datafrom ethereum.logswhere topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efand block_time>cast('2022-07-15 00:00' as TIMESTAMP)and length(data)=32)where data = cast(0 as uint256)group by tx_hashHAVING COUNT(1) >= 10),-- 排除:保留金额为0的交易small_tx as (SELECT tx_hashfrom(SELECT a.tx_hash,cast(sum(case when length(b.data)!=32 or bytearray_to_uint256(bytearray_ltrim(b.data))!=cast(0 as uint256) then 1 else 0 end) as double)/cast(COUNT(1) as double) as have_other_tokenfrom tx ajoin (select tx_hash,contract_address,datafrom ethereum.logswhere block_time>cast('2022-07-15 00:00' as TIMESTAMP)) bon a.tx_hash=b.tx_hashgroup by a.tx_hash)where have_other_token=0),-- 排除:log from地址一样的交易small_tx2 as (select a.tx_hashfrom small_tx ajoin (select distinct tx_hash,topic1from ethereum.logswhere block_time>cast('2022-07-15 00:00' as TIMESTAMP)) bon a.tx_hash=b.tx_hashgroup by a.tx_hashHAVING COUNT(1)>1)select * from small_tx2