maybeyonasorbs_destiny_normal
Updated 2021-12-07
999
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 orb_events as (
select * --distinct to_label
from ethereum.udm_events
where contract_address = '0xff56cc6b1e6ded347aa0b7676c85ab0b3d08b0fa'
),
buy as (
select
block_id,block_timestamp,
tx_id,
origin_address as user,
amount/pow(10,18) as amount
from ethereum.udm_events
where
contract_address = '0xff56cc6b1e6ded347aa0b7676c85ab0b3d08b0fa'
and origin_function_name in (
'swapExactTokensForTokens',
'swapETHForExactTokens',
'swapExactETHForTokens',
'swapTokensForExactTokens',
'swap'
)
and event_type = 'erc20_transfer'
and origin_address = to_address
),
sell as (
select
block_id,block_timestamp,
tx_id,
origin_address as user,
amount/pow(10,18) as amount
from ethereum.udm_events
where
contract_address = '0xff56cc6b1e6ded347aa0b7676c85ab0b3d08b0fa'
and origin_function_name in (
'swapExactTokensForTokens',
'swapExactTokensForETHSupportingFeeOnTransferTokens',