# Function selectors: the first four bytes of a contract call

A conventional Ethereum ABI function selector is the first four bytes of the Keccak-256 hash of the canonical function signature, such as its name and parameter types. It helps a contract dispatch a call. It is only 32 bits, so different signatures can collide; a selector lookup alone cannot establish the intended behavior.

Evidence: [Contract ABI Specification](https://docs.soliditylang.org/en/v0.8.30/abi-spec.html)

Canonical: https://degreesofsatoshi.com/encyclopedia/function-selectors/
Published: 2026-10-02
Substantively modified: 2026-10-02
Independently verified by an automated reviewer: 2026-10-02T18:12:41.505Z
Data current through: 2026-10-02

AI-assisted research and drafting with a separate automated source-verification pass; no external expert or named human review is implied.

## Key facts

- **Size:** An ABI function selector is four bytes. ([Contract ABI Specification](https://docs.soliditylang.org/en/v0.8.30/abi-spec.html))
- **Signature:** The canonical signature includes parameter types, not parameter names. ([Contract ABI Specification](https://docs.soliditylang.org/en/v0.8.30/abi-spec.html))
- **Returns:** Return types are not part of the function selector. ([Contract ABI Specification](https://docs.soliditylang.org/en/v0.8.30/abi-spec.html))

## Types matter, argument values do not

The signature transfer(address,uint256) describes a method name and types. A particular recipient and amount belong in the arguments that follow the selector. Overloaded functions with different parameter types have different canonical signatures, though collisions remain possible.

Canonical type spelling matters: ABI hashing uses the canonical form, such as uint256 rather than an informal shorthand.

Evidence: [Contract ABI Specification](https://docs.soliditylang.org/en/v0.8.30/abi-spec.html)

## The destination decides what the bytes do

A contract may dispatch on the selector, use a fallback path or delegate execution through a proxy. A method-name database provides a possible interpretation, not proof that the destination implements that method honestly.

Pair the selector with the correct code, ABI and proxy implementation. Familiar names can be implemented with unfamiliar behavior.

Evidence: [Contract ABI Specification](https://docs.soliditylang.org/en/v0.8.30/abi-spec.html); [Proxy contracts](https://docs.openzeppelin.com/contracts/5.x/api/proxy)

## A short identifier cannot be globally unique

Four bytes provide a finite identifier space. Different function signatures can map to the same selector, so a decoder may have several candidates.

A wallet should not use a human-readable method label as its only authorization check. The actual target, arguments and resulting permissions remain material.

Evidence: [Contract ABI Specification](https://docs.soliditylang.org/en/v0.8.30/abi-spec.html)

## Questions

### Do parameter names change a function selector?

No. The canonical signature uses the function name and parameter types. Renaming a parameter without changing its type does not change that signature.

Evidence: [Contract ABI Specification](https://docs.soliditylang.org/en/v0.8.30/abi-spec.html)

## Claims and scope

### function-selectors-quick-answer

A conventional Ethereum ABI function selector is the first four bytes of the Keccak-256 hash of the canonical function signature, such as its name and parameter types. It helps a contract dispatch a call. It is only 32 bits, so different signatures can collide; a selector lookup alone cannot establish the intended behavior.

Scope: {"collection":"ethereum","dataAsOf":"2026-10-02","blockHeight":null}

### function-selectors-fact-size

Size: An ABI function selector is four bytes.

Scope: {"collection":"ethereum","dataAsOf":"2026-10-02","blockHeight":null}

### function-selectors-fact-signature

Signature: The canonical signature includes parameter types, not parameter names.

Scope: {"collection":"ethereum","dataAsOf":"2026-10-02","blockHeight":null}

### function-selectors-fact-returns

Returns: Return types are not part of the function selector.

Scope: {"collection":"ethereum","dataAsOf":"2026-10-02","blockHeight":null}

## Sources

- [Contract ABI Specification](https://docs.soliditylang.org/en/v0.8.30/abi-spec.html) — Solidity contributors. ABI encoding, selectors, event topics and event data. Locator: Function Selector; Argument Encoding; Events; Errors; JSON. Retrieved: 2026-10-02T17:03:42.824Z.
- [Proxy contracts](https://docs.openzeppelin.com/contracts/5.x/api/proxy) — OpenZeppelin. Proxy implementation slots, delegated execution and upgrade authority. Locator: TransparentUpgradeableProxy; UUPSUpgradeable; ERC1967Proxy. Retrieved: 2026-10-02T17:03:43.024Z.

## Revision history

- 2026-10-02: First publication after primary-source research and independent automated verification.

## Cite this entry

Degrees of Satoshi editorial project. “Function selectors: the first four bytes of a contract call.” Published 2026-10-02; updated 2026-10-02. https://degreesofsatoshi.com/encyclopedia/function-selectors/
