DynamicInfo
Composite 662 v393pallet_subtensor::rpc_info::dynamic_info::DynamicInfo
About This Type
Structured type: DynamicInfo.
A struct-like type where each field is encoded in declaration order.
Encoding: Fields encoded consecutively in declaration order, no field names or separators.
Fields (21)
| # | Name | Type |
|---|---|---|
| 0 | netuid | Compact<u16> |
| 1 | owner_hotkey | AccountId |
| 2 | owner_coldkey | AccountId |
| 3 | subnet_name | Vec<Compact<u8>> |
| 4 | token_symbol | Vec<Compact<u8>> |
| 5 | tempo | Compact<u16> |
| 6 | last_step | Compact<u64> |
| 7 | blocks_since_last_step | Compact<u64> |
| 8 | emission | Compact<u64> |
| 9 | alpha_in | Compact<u64> |
| 10 | alpha_out | Compact<u64> |
| 11 | tao_in | Compact<u64> |
| 12 | alpha_out_emission | Compact<u64> |
| 13 | alpha_in_emission | Compact<u64> |
| 14 | tao_in_emission | Compact<u64> |
| 15 | pending_alpha_emission | Compact<u64> |
| 16 | pending_root_emission | Compact<u64> |
| 17 | subnet_volume | Compact<u128> |
| 18 | network_registered_at | Compact<u64> |
| 19 | subnet_identity | Option |
| 20 | moving_price | FixedI128 |
SCALE Encoding
- Rule
- 21 fields encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 21 fields = netuid: Compact<u16>, owner_hotkey: AccountId, owner_coldkey: AccountId, subnet_name: Vec<Compact<u8>>, token_symbol: Vec<Compact<u8>>, tempo: Compact<u16>, last_step: Compact<u64>, blocks_since_last_step: Compact<u64>, emission: Compact<u64>, alpha_in: Compact<u64>, alpha_out: Compact<u64>, tao_in: Compact<u64>, alpha_out_emission: Compact<u64>, alpha_in_emission: Compact<u64>, tao_in_emission: Compact<u64>, pending_alpha_emission: Compact<u64>, pending_root_emission: Compact<u64>, subnet_volume: Compact<u128>, network_registered_at: Compact<u64>, subnet_identity: Option, moving_price: FixedI128
0x<field0><field1><field2><field3><field4><field5><field6><field7><field8><field9><field10><field11><field12><field13><field14><field15><field16><field17><field18><field19><field20>field 0 netuid: Compact<u16>field 1 owner_hotkey: AccountIdfield 2 owner_coldkey: AccountIdfield 3 subnet_name: Vec<Compact<u8>>field 4 token_symbol: Vec<Compact<u8>>field 5 tempo: Compact<u16>field 6 last_step: Compact<u64>field 7 blocks_since_last_step: Compact<u64>field 8 emission: Compact<u64>field 9 alpha_in: Compact<u64>field 10 alpha_out: Compact<u64>field 11 tao_in: Compact<u64>field 12 alpha_out_emission: Compact<u64>field 13 alpha_in_emission: Compact<u64>field 14 tao_in_emission: Compact<u64>field 15 pending_alpha_emission: Compact<u64>field 16 pending_root_emission: Compact<u64>field 17 subnet_volume: Compact<u128>field 18 network_registered_at: Compact<u64>field 19 subnet_identity: Optionfield 20 moving_price: FixedI128Code Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode DynamicInfo
const value = registry.createType("DynamicInfo", {
netuid: 0,
owner_hotkey: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
owner_coldkey: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
subnet_name: 0,
token_symbol: 0,
tempo: 0,
last_step: 0,
blocks_since_last_step: 0,
emission: 0,
alpha_in: 0,
alpha_out: 0,
tao_in: 0,
alpha_out_emission: 0,
alpha_in_emission: 0,
tao_in_emission: 0,
pending_alpha_emission: 0,
pending_root_emission: 0,
subnet_volume: 0,
network_registered_at: 0,
subnet_identity: 0,
moving_price: 0
});
console.log("Hex:", value.toHex());Type Parameters
AccountId = AccountId
Referenced By (1)
Type Information
- Type ID
- 662
- Kind
- Composite
- Path
- pallet_subtensor::rpc_info::dynamic_info::DynamicInfo
- Runtime
- v393