SubnetInfov2
Composite 653 v393pallet_subtensor::rpc_info::subnet_info::SubnetInfov2
About This Type
Structured type: SubnetInfov2.
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 (19)
| # | 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_value | Compact<u64> |
| 16 | burn | Compact<u64> |
| 17 | owner | AccountId |
| 18 | identity | Option |
SCALE Encoding
- Rule
- 19 fields encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 19 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_value: Compact<u64>, burn: Compact<u64>, owner: AccountId, identity: Option
0x<field0><field1><field2><field3><field4><field5><field6><field7><field8><field9><field10><field11><field12><field13><field14><field15><field16><field17><field18>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_value: Compact<u64>field 16 burn: Compact<u64>field 17 owner: AccountIdfield 18 identity: OptionCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode SubnetInfov2
const value = registry.createType("SubnetInfov2", {
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_value: 0,
burn: 0,
owner: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
identity: 0
});
console.log("Hex:", value.toHex());Type Parameters
AccountId = AccountId
Referenced By (1)
Type Information
- Type ID
- 653
- Kind
- Composite
- Path
- pallet_subtensor::rpc_info::subnet_info::SubnetInfov2
- Runtime
- v393