AccountInfo
Composite 3 v393frame_system::AccountInfo
About This Type
Unsigned 16-bit integer (0–65,535).
Used for network UIDs (netuid), neuron UIDs, and other medium-range identifiers in Subtensor.
Encoding: Fixed-width: always exactly 2 bytes, little-endian.
Common Uses
- • Subnet identifiers (netuid)
- • Neuron UIDs within a subnet
- • Pallet and error indices
Fields (5)
| # | Name | Type |
|---|---|---|
| 0 | nonce | u32 |
| 1 | consumers | u32 |
| 2 | providers | u32 |
| 3 | sufficients | u32 |
| 4 | data | AccountData |
SCALE Encoding
- Rule
- 5 fields encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 5 fields = nonce: u32, consumers: u32, providers: u32, sufficients: u32, data: AccountData
0x<field0><field1><field2><field3><field4>field 0 nonce: u32field 1 consumers: u32field 2 providers: u32field 3 sufficients: u32field 4 data: AccountDataCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode AccountInfo
const value = registry.createType("AccountInfo", {
nonce: 1000000,
consumers: 1000000,
providers: 1000000,
sufficients: 1000000,
data: 0
});
console.log("Hex:", value.toHex());Type Parameters
Nonce = u32
AccountData = AccountData
Type Information
- Type ID
- 3
- Kind
- Composite
- Path
- frame_system::AccountInfo
- Runtime
- v393