H160
Composite 49 v411primitive_types::H160
About This Type
160-bit hash (20 bytes), used as an Ethereum-compatible address.
Enables Ethereum-style addressing for cross-chain compatibility. Displayed as 0x-prefixed hex (e.g., 0x1234...abcd).
Encoding: Fixed-width: always exactly 20 bytes, no length prefix.
Fields (1)
| # | Name | Type |
|---|---|---|
| 0 | (unnamed) | [u8; 20] |
SCALE Encoding
- Rule
- 1 field encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 1 field = ?: [u8; 20]
0x<field0>field 0 field0: [u8; 20]Code Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode H160
const value = registry.createType("H160", {
field: 0
});
console.log("Hex:", value.toHex());Referenced By (25)
#39 SubtensorModule::Event via EvmKeyAssociated.evm_key#85 Ethereum::Event via Executed.from#85 Ethereum::Event via Executed.to#94 EVM::Event via Created.address#94 EVM::Event via CreatedFailed.address#94 EVM::Event via Executed.address#94 EVM::Event via ExecutedFailed.address#95 Log via address#230 (H160, u64) #234 SubtensorModule::Call via associate_evm_key.evm_key#401 TransactionAction via Call#406 AccessListItem via address#411 AuthorizationListItem via address#413 EVM::Call via withdraw.address#413 EVM::Call via call.source#413 EVM::Call via call.target#413 EVM::Call via create.source#413 EVM::Call via create2.source#416 (H160, Vec<H256>) #417 Vec<H160>
and 5 more...
Type Information
- Type ID
- 49
- Kind
- Composite
- Path
- primitive_types::H160
- Runtime
- v411