AI WaifuInvestor Leaderboard
Updated 2024-05-08
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 usdb_flows as (
select
block_timestamp,
tx_hash,
contract_address,
concat ('0x', substr(topics[1], 27, 40)) :: string as from_address,
concat ('0x', substr(topics[2], 27, 40)) :: string as to_address,
livequery.utils.udf_hex_to_int(SUBSTR(data, 3, 64)) / power (10, 18) as amt
from blast.core.fact_event_logs
where topics[0]::string = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' -- signifies token transfers
and contract_address = '0x4300000000000000000000000000000000000003'
and data != '0x'
and (from_address = '0xd78b925cde1a4ff99da2e14a9aa03b36a97d8563' or to_address = '0xd78b925cde1a4ff99da2e14a9aa03b36a97d8563')
and tx_hash != '0x33d0afb5ade657e1af0cb61e68c1833a8024c84f012d92a94e65e8900910510b' -- remove the deployer wallet
),
wallet_contribution as (
select address, sum (ttl) as net_flow
FROM (
SELECT
to_address as address, -amt as ttl
FROM usdb_flows
WHERE from_address = '0xd78b925cde1a4ff99da2e14a9aa03b36a97d8563'
UNION ALL
SELECT
from_address as address, amt as ttl
FROM usdb_flows
WHERE to_address = '0xd78b925cde1a4ff99da2e14a9aa03b36a97d8563'
)
group by address
),
total_raised as (
QueryRunArchived: QueryRun has been archived