StakeInfo
Composite 704 v393pallet_subtensor::rpc_info::stake_info::StakeInfo
About This Type
Structured type: StakeInfo.
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 (9)
| # | Name | Type |
|---|---|---|
| 0 | hotkey | AccountId |
| 1 | coldkey | AccountId |
| 2 | netuid | Compact<u16> |
| 3 | stake | Compact<u64> |
| 4 | locked | Compact<u64> |
| 5 | emission | Compact<u64> |
| 6 | tao_emission | Compact<u64> |
| 7 | drain | Compact<u64> |
| 8 | is_registered | bool |
SCALE Encoding
- Rule
- 9 fields encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 9 fields = hotkey: AccountId, coldkey: AccountId, netuid: Compact<u16>, stake: Compact<u64>, locked: Compact<u64>, emission: Compact<u64>, tao_emission: Compact<u64>, drain: Compact<u64>, is_registered: bool
0x<field0><field1><field2><field3><field4><field5><field6><field7><field8>field 0 hotkey: AccountIdfield 1 coldkey: AccountIdfield 2 netuid: Compact<u16>field 3 stake: Compact<u64>field 4 locked: Compact<u64>field 5 emission: Compact<u64>field 6 tao_emission: Compact<u64>field 7 drain: Compact<u64>field 8 is_registered: boolCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode StakeInfo
const value = registry.createType("StakeInfo", {
hotkey: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
coldkey: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
netuid: 0,
stake: 0,
locked: 0,
emission: 0,
tao_emission: 0,
drain: 0,
is_registered: true
});
console.log("Hex:", value.toHex());Type Parameters
AccountId = AccountId
Referenced By (2)
Type Information
- Type ID
- 704
- Kind
- Composite
- Path
- pallet_subtensor::rpc_info::stake_info::StakeInfo
- Runtime
- v393