Skip to content
Dune Analytics

@tschubotz / Total USD value of ETH & ERC20s stored in Gnosis Safe stored in all Safe contracts

CounterTotal USD value of ETH & ERC20s stored in Gnosis Safe stored in all Safe contracts

Loading
 

About queries and results

Dune Analytics lets you explore, create, and share Ethereum analytics. You can find an endless amount of great queries and dashboards on Dune.

We have decoded Ethereum smart contract data so you can do powerful analysis with simple SQL queries and visualise the query results into beautiful graphs.

Dune Analytics is free for everyone forever. If you want extra features like private queries, export your results and more check out our Pro plan.

SQL query results

Loading
 

SQL query

1with safes as (
2    select
3    	et.from as address,
4    	et.block_time as creation_time
5    from ethereum.traces et 
6    where et.success = True
7        AND substring(et."input" for 4) in ('\x0ec78d9e', '\xa97ab18a', '\xb63e800d') -- setup methods of v0.1.0, v1.0.0, v1.1.0 (=v1.1.1=1.2.0)
8        AND et.call_type = 'delegatecall' -- the delegate call to the master copy is the Safe address
9        AND et."to" in (
10            '\x8942595A2dC5181Df0465AF0D7be08c8f23C93af', -- mastercopy address v0.1.0
11            '\xb6029ea3b2c51d09a50b53ca8012feeb05bda35a', -- v1.0.0
12            '\xae32496491b53841efb51829d6f886387708f99b', -- v1.1.0
13            '\x34cfac646f301356faa8b21e94227e3583fe3f5f', -- v1.1.1
14            '\x6851d6fdfafd08c0295c392436245e5bc78b0185'   -- v1.2.0
15        )
16),
17eth as (
18    SELECT sum(amount) as balance
19    FROM (
20        SELECT "from" AS address, -value AS amount
21         FROM ethereum.traces et
22         join safes s
23            on et."from" = s.address
24         AND success = TRUE
25         and value <> 0...