H160
Composite 49 v393primitive_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 (26)
#39 SubtensorModule::Event via EvmKeyAssociated.evm_key#74 Ethereum::Event via Executed.from#74 Ethereum::Event via Executed.to#83 EVM::Event via Created.address#83 EVM::Event via CreatedFailed.address#83 EVM::Event via Executed.address#83 EVM::Event via ExecutedFailed.address#84 Log via address#143 SubtensorModule::Call via associate_evm_key.evm_key#162 RawOrigin via EthereumTransaction#332 TransactionAction via Call#337 AccessListItem via address#342 AuthorizationListItem via address#344 EVM::Call via withdraw.address#344 EVM::Call via call.source#344 EVM::Call via call.target#344 EVM::Call via create.source#344 EVM::Call via create2.source#347 (H160, Vec<H256>) #348 Vec<H160>
and 6 more...
Type Information
- Type ID
- 49
- Kind
- Composite
- Path
- primitive_types::H160
- Runtime
- v393