SubnetInfo
Composite 648 v393pallet_subtensor::rpc_info::subnet_info::SubnetInfo
About This Type
Structured type: SubnetInfo.
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 (18)
| # | Name | Type |
|---|---|---|
| 0 | netuid | Compact<u16> |
| 1 | rho | Compact<u16> |
| 2 | kappa | Compact<u16> |
| 3 | difficulty | Compact<u64> |
| 4 | immunity_period | Compact<u16> |
| 5 | max_allowed_validators | Compact<u16> |
| 6 | min_allowed_weights | Compact<u16> |
| 7 | max_weights_limit | Compact<u16> |
| 8 | scaling_law_power | Compact<u16> |
| 9 | subnetwork_n | Compact<u16> |
| 10 | max_allowed_uids | Compact<u16> |
| 11 | blocks_since_last_step | Compact<u64> |
| 12 | tempo | Compact<u16> |
| 13 | network_modality | Compact<u16> |
| 14 | network_connect | Vec<[u16; 2]> |
| 15 | emission_values | Compact<u64> |
| 16 | burn | Compact<u64> |
| 17 | owner | AccountId |
SCALE Encoding
- Rule
- 18 fields encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 18 fields = netuid: Compact<u16>, rho: Compact<u16>, kappa: Compact<u16>, difficulty: Compact<u64>, immunity_period: Compact<u16>, max_allowed_validators: Compact<u16>, min_allowed_weights: Compact<u16>, max_weights_limit: Compact<u16>, scaling_law_power: Compact<u16>, subnetwork_n: Compact<u16>, max_allowed_uids: Compact<u16>, blocks_since_last_step: Compact<u64>, tempo: Compact<u16>, network_modality: Compact<u16>, network_connect: Vec<[u16; 2]>, emission_values: Compact<u64>, burn: Compact<u64>, owner: AccountId
0x<field0><field1><field2><field3><field4><field5><field6><field7><field8><field9><field10><field11><field12><field13><field14><field15><field16><field17>field 0 netuid: Compact<u16>field 1 rho: Compact<u16>field 2 kappa: Compact<u16>field 3 difficulty: Compact<u64>field 4 immunity_period: Compact<u16>field 5 max_allowed_validators: Compact<u16>field 6 min_allowed_weights: Compact<u16>field 7 max_weights_limit: Compact<u16>field 8 scaling_law_power: Compact<u16>field 9 subnetwork_n: Compact<u16>field 10 max_allowed_uids: Compact<u16>field 11 blocks_since_last_step: Compact<u64>field 12 tempo: Compact<u16>field 13 network_modality: Compact<u16>field 14 network_connect: Vec<[u16; 2]>field 15 emission_values: Compact<u64>field 16 burn: Compact<u64>field 17 owner: AccountIdCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode SubnetInfo
const value = registry.createType("SubnetInfo", {
netuid: 0,
rho: 0,
kappa: 0,
difficulty: 0,
immunity_period: 0,
max_allowed_validators: 0,
min_allowed_weights: 0,
max_weights_limit: 0,
scaling_law_power: 0,
subnetwork_n: 0,
max_allowed_uids: 0,
blocks_since_last_step: 0,
tempo: 0,
network_modality: 0,
network_connect: 0,
emission_values: 0,
burn: 0,
owner: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
});
console.log("Hex:", value.toHex());Type Parameters
AccountId = AccountId
Referenced By (1)
Type Information
- Type ID
- 648
- Kind
- Composite
- Path
- pallet_subtensor::rpc_info::subnet_info::SubnetInfo
- Runtime
- v393