File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ import sys
2+ import bittensor as bt
3+ st = bt .subtensor (network = 'local' )
4+ print ("ss58 format:" ,st .substrate .ss58_format )
5+ print ("current block:" ,st .block )
6+
7+ coldkey = '5HHHHHzgLnYRvnKkHd45cRUDMHXTSwx7MjUzxBrKbY4JfZWn'
8+
9+ # dtao epoch is 4920350
10+
11+ b_pre = 4920340
12+ b_post = 4920360
13+
14+ n = 3
15+ if len (sys .argv )> 1 :
16+ n = int (sys .argv [1 ])
17+
18+ for i in range (n ):
19+ s0 = st .get_stake_for_coldkey (coldkey ,block = b_post + i )
20+ print (f'at block { b_post + i } : { s0 } ' )
21+ for i in range (n ):
22+ s1 = st .query_subtensor ("TotalColdkeyStake" ,b_pre + i ,[coldkey ]).value
23+ print (f'at block { b_pre + i } : { s1 } ' )
24+ for i in range (n ):
25+ s2 = st .get_stake_for_coldkey (coldkey ,block = b_post + i )
26+ print (f'at block { b_post + i } : { s2 } ' )
27+
28+
You can’t perform that action at this time.
0 commit comments