binhachonTracer Voters - Number of stakers
Updated 2022-02-26
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
›
⌄
with TCR_staking_transactions as (
select
block_timestamp,
from_address as address,
amount
from ethereum.udm_events
where block_timestamp::date > '2021-01-01' --TCR creation date is Jan 6th 2021
and origin_function_signature = '0x61f129ad' --stake
and contract_address = '0x9c4a4204b79dd291d6b6571c5be8bbcd0622f050'
and to_address = '0xa84918f3280d488eb3369cb713ec53ce386b6cba' --staking contract
and event_type = 'erc20_transfer'
union all
select
block_timestamp,
to_address as address,
-amount as amount
from ethereum.udm_events
where block_timestamp::date > '2021-01-01' --TCR creation date is Jan 6th 2021
and origin_function_signature = '0xdee4dea0' --withdraw
and contract_address = '0x9c4a4204b79dd291d6b6571c5be8bbcd0622f050'
and from_address = '0xa84918f3280d488eb3369cb713ec53ce386b6cba' --staking contract
and event_type = 'erc20_transfer'
),
TCR_staking_balance as (
select
address,
sum(amount) as staking_amount
from TCR_staking_transactions
group by address
),
tTCR_transactions as (
select
block_timestamp,
from_address as address,
amount
from ethereum.udm_events
Run a query to Download Data