Selector (SelectorType) is a branded 4-byte Uint8Array (length === 4) representing the first 4 bytes of keccak256(canonicalSignature) used to dispatch EVM contract calls and identify custom revert errors.
Quick Start
Selector from @tevm/voltaire.
Layout & Constant
API Reference
Edge Cases
fromSignaturehashes the string verbatim: use canonical Solidity types without spaces or names (uint256, notuint;transfer(address,uint256), nottransfer(address to, uint256 amount)).fromandfromHexthrowInvalidLengthErrorwhen byte length is not4.
Related
- ABI — Full calldata encoding, decoding, and
hasSelectorCollisions - ABI Fundamentals — Canonical signature rules
- Bytes — General fixed-width byte types (
Bytes4)

