Skip to content

Commit c30c1bf

Browse files
committed
Added moving_price to DynamicInfo
1 parent dd35bfa commit c30c1bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bittensor/core/chain_data/dynamic_info.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from bittensor.core.chain_data.utils import decode_account_id
1111

1212
from bittensor.core.chain_data.subnet_identity import SubnetIdentity
13-
from bittensor.utils.balance import Balance
13+
from bittensor.utils.balance import Balance, fixed_to_float
1414

1515

1616
@dataclass
@@ -38,6 +38,7 @@ class DynamicInfo(InfoBase):
3838
network_registered_at: int
3939
subnet_volume: Balance
4040
subnet_identity: Optional[SubnetIdentity]
41+
moving_price: float
4142

4243
@classmethod
4344
def _from_dict(cls, decoded: dict) -> "DynamicInfo":
@@ -120,6 +121,7 @@ def _from_dict(cls, decoded: dict) -> "DynamicInfo":
120121
network_registered_at=int(decoded["network_registered_at"]),
121122
subnet_identity=subnet_identity,
122123
subnet_volume=subnet_volume,
124+
moving_price=fixed_to_float(decoded["moving_price"]),
123125
)
124126

125127
def tao_to_alpha(self, tao: Union[Balance, float, int]) -> Balance:

0 commit comments

Comments
 (0)