freemartianBolide BTC Table
Updated 2023-09-13
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
›
⌄
-- forked from Bolide ETH Table @ https://flipsidecrypto.xyz/edit/queries/bd0fba9d-1896-45d5-9d94-8385fce051fa
with btc_table as (
select
tx_hash,
block_timestamp,
decoded_log:from as actor,
decoded_log:value/pow(10,decimals) as amount,
symbol as token_symbol,
'Deposit' as action
from bsc.core.ez_decoded_event_logs l
inner join bsc.core.dim_contracts c on c.address = l.contract_address
where event_name = 'Transfer'
and contract_address = '0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c'
and origin_function_signature = '0x6e553f65'
and decoded_log:to = '0xed18f1ce58fed758c7937cc0b8be66cb02dc45c6'
and tx_status = 'SUCCESS'
and block_timestamp > '2022-08-01'
UNION
select
tx_hash,
block_timestamp,
decoded_log:to as actor,
decoded_log:value/pow(10,decimals) as amount,
symbol as token_symbol,
'withdraw' as action
from bsc.core.ez_decoded_event_logs l
inner join bsc.core.dim_contracts c on c.address = l.contract_address
where event_name = 'Transfer'
and contract_address = '0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c'
and origin_function_signature = '0x00f714ce'
and decoded_log:from in ('0xed18f1ce58fed758c7937cc0b8be66cb02dc45c6')
and tx_status = 'SUCCESS'
Run a query to Download Data