Vec<u8>
Sequence 14 v393About This Type
Boolean value: true or false.
Used for flags, toggles, and binary state in storage and call parameters.
Encoding: Fixed-width: 1 byte. 0x00 = false, 0x01 = true.
Common Uses
- • Feature flags
- • Success/failure indicators
- • Registration status
Sequence (Vec)
- Element Type
- u8
- SCALE Encoding
- Length-prefixed (Compact<u32> length followed by elements)
SCALE Encoding
- Rule
- Fixed 1 byte: 0x00 = false, 0x01 = true.
- Size
- 1 byte
Examples
true
0x0101 truefalse
0x0000 falseCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode a Vec<u8>
const vec = registry.createType("Vec<u8>", [1, 2, 3]);
console.log("Hex:", vec.toHex());Referenced By (100)
#17 DigestItem via PreRuntime#17 DigestItem via Consensus#17 DigestItem via Seal#17 DigestItem via Other#39 SubtensorModule::Event via SymbolUpdated.symbol#74 Ethereum::Event via Executed.extra_data#84 Log via data#97 Contracts::Event via ContractEmitted.data#106 System::Call via remark.remark#106 System::Call via set_code.code#106 System::Call via set_code_without_checks.code#106 System::Call via kill_prefix.prefix#106 System::Call via remark_with_event.remark#106 System::Call via apply_authorized_upgrade.code#108 (Vec<u8>, Vec<u8>) #108 (Vec<u8>, Vec<u8>) #109 Vec<Vec<u8>> #138 MultiAddress via Raw#143 SubtensorModule::Call via serve_axon_tls.certificate#143 SubtensorModule::Call via register.work
and 80 more...
Type Information
- Type ID
- 14
- Kind
- Sequence
- Runtime
- v393