vendettaNear => Ethereum (Past Month) copy
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
›
⌄
-- forked from c83e2227-228d-48fb-8e6c-1ee3c92a8550
with bridge_ERC20_from_near_to_ethereum as (
select
block_timestamp,
tx_hash::string as tx_hash, (parse_json(trim(args))):amount as asset_amount,
(parse_json(args)):recipient as eth_address
from near.core.fact_actions_events_function_call
where action_name = 'FunctionCall'
and method_name = 'withdraw' -- ERC20 tokens
and args::string like '{"%'
and (parse_json(trim(args))):amount::string is not null
and (parse_json(trim(args))):recipient::string is not null
)
, bridge_NEAR_from_near_to_ethereum as (
select
block_timestamp,
tx_hash::string as tx_hash,
deposit as asset_amount,
(parse_json(args)):eth_recipient as eth_address
from near.core.fact_actions_events_function_call
where action_name = 'FunctionCall'
and method_name = 'migrate_to_ethereum' -- NEAR
and args::string like '{"%'
and (parse_json(args)):eth_recipient is not null
)
, bridge_all_from_near_to_ethereum as (
select * from bridge_ERC20_from_near_to_ethereum
union all
select * from bridge_NEAR_from_near_to_ethereum
)
, join_with_txs as (
select
block_timestamp,
tx_hash, asset_amount, eth_address, TX_RECEIVER as contract_in_near, TX_SIGNER as sender_near_address,
case
Run a query to Download Data