SubnetState
Composite 678 v393pallet_subtensor::rpc_info::show_subnet::SubnetState
About This Type
Structured type: SubnetState.
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 | hotkeys | Vec<AccountId> |
| 2 | coldkeys | Vec<AccountId> |
| 3 | active | Vec<bool> |
| 4 | validator_permit | Vec<bool> |
| 5 | pruning_score | Vec<Compact<u16>> |
| 6 | last_update | Vec<Compact<u64>> |
| 7 | emission | Vec<Compact<u64>> |
| 8 | dividends | Vec<Compact<u16>> |
| 9 | incentives | Vec<Compact<u16>> |
| 10 | consensus | Vec<Compact<u16>> |
| 11 | trust | Vec<Compact<u16>> |
| 12 | rank | Vec<Compact<u16>> |
| 13 | block_at_registration | Vec<Compact<u64>> |
| 14 | alpha_stake | Vec<Compact<u64>> |
| 15 | tao_stake | Vec<Compact<u64>> |
| 16 | total_stake | Vec<Compact<u64>> |
| 17 | emission_history | Vec<Vec<Compact<u64>>> |
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>, hotkeys: Vec<AccountId>, coldkeys: Vec<AccountId>, active: Vec<bool>, validator_permit: Vec<bool>, pruning_score: Vec<Compact<u16>>, last_update: Vec<Compact<u64>>, emission: Vec<Compact<u64>>, dividends: Vec<Compact<u16>>, incentives: Vec<Compact<u16>>, consensus: Vec<Compact<u16>>, trust: Vec<Compact<u16>>, rank: Vec<Compact<u16>>, block_at_registration: Vec<Compact<u64>>, alpha_stake: Vec<Compact<u64>>, tao_stake: Vec<Compact<u64>>, total_stake: Vec<Compact<u64>>, emission_history: Vec<Vec<Compact<u64>>>
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 hotkeys: Vec<AccountId>field 2 coldkeys: Vec<AccountId>field 3 active: Vec<bool>field 4 validator_permit: Vec<bool>field 5 pruning_score: Vec<Compact<u16>>field 6 last_update: Vec<Compact<u64>>field 7 emission: Vec<Compact<u64>>field 8 dividends: Vec<Compact<u16>>field 9 incentives: Vec<Compact<u16>>field 10 consensus: Vec<Compact<u16>>field 11 trust: Vec<Compact<u16>>field 12 rank: Vec<Compact<u16>>field 13 block_at_registration: Vec<Compact<u64>>field 14 alpha_stake: Vec<Compact<u64>>field 15 tao_stake: Vec<Compact<u64>>field 16 total_stake: Vec<Compact<u64>>field 17 emission_history: Vec<Vec<Compact<u64>>>Code Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode SubnetState
const value = registry.createType("SubnetState", {
netuid: 0,
hotkeys: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
coldkeys: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
active: 0,
validator_permit: 0,
pruning_score: 0,
last_update: 0,
emission: 0,
dividends: 0,
incentives: 0,
consensus: 0,
trust: 0,
rank: 0,
block_at_registration: 0,
alpha_stake: 0,
tao_stake: 0,
total_stake: 0,
emission_history: 0
});
console.log("Hex:", value.toHex());Type Parameters
AccountId = AccountId
Referenced By (1)
Type Information
- Type ID
- 678
- Kind
- Composite
- Path
- pallet_subtensor::rpc_info::show_subnet::SubnetState
- Runtime
- v393