Skip to content

Commit f13cf80

Browse files
committed
calculate alpha 2 tao exchange rate
1 parent 8d891dd commit f13cf80

File tree

1 file changed

+4
-4
lines changed
  • scraper_service/shovel_alpha_to_tao

1 file changed

+4
-4
lines changed

scraper_service/shovel_alpha_to_tao/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,19 @@ def do_process_block(self, n):
5959

6060
# Process each subnet
6161
for netuid in networks:
62-
subnet_tao = float(str(substrate.query(
62+
subnet_tao = substrate.query(
6363
'SubtensorModule',
6464
'SubnetTAO',
6565
[netuid],
6666
block_hash=block_hash
67-
).value).replace(',', '')) / 1e9
67+
).value / 1e9
6868

69-
subnet_alpha_in = float(str(substrate.query(
69+
subnet_alpha_in = substrate.query(
7070
'SubtensorModule',
7171
'SubnetAlphaIn',
7272
[netuid],
7373
block_hash=block_hash
74-
).value).replace(',', '')) / 1e9
74+
).value / 1e9
7575

7676
# Calculate exchange rate (TAO per Alpha)
7777
alpha_to_tao = subnet_tao / subnet_alpha_in if subnet_alpha_in > 0 else 0

0 commit comments

Comments
 (0)