0xKoficontract code
Updated 2024-04-05
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
›
⌄
WITH raw AS (
SELECT
BLOCK_TIMESTAMP as time,
DECODED_LOG:sender as account_proxy_contract,
DECODED_LOG:factory as factory_contract,
ROW_NUMBER() OVER (PARTITION BY DECODED_LOG:factory ORDER BY BLOCK_TIMESTAMP DESC) as rn
FROM ethereum.core.ez_decoded_event_logs
WHERE CONTRACT_ADDRESS IN ('0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789', '0x0000000071727de22e5e9d8baf0edac6f37da032')
AND EVENT_NAME = 'AccountDeployed'
AND BLOCK_TIMESTAMP > '2024-03-01'
),
proxies AS(
SELECT
account_proxy_contract,
factory_contract
FROM raw
WHERE rn = 1
)
SELECT
factory_contract,
account_proxy_contract,
ethereum_mainnet.udf_rpc('eth_getCode', [account_proxy_contract,'latest']) as proxy_code,
length(ethereum_mainnet.udf_rpc('eth_getCode', [account_proxy_contract,'latest']))/2 - 2 as proxy_size_bytes
FROM proxies
-- select
-- length(ethereum_mainnet.udf_rpc('eth_getCode',
-- ['0x806bb30863389a36ae9cfb49431a3ff238d89b94','latest']
-- ))/2 - 2;
QueryRunArchived: QueryRun has been archived