Turning a function call into bytes
An Ethereum wallet cannot transmit a human-readable instruction such as transfer directly to a contract. It uses the contract's ABI to encode the function and its arguments into transaction data. Under Solidity's standard encoding, the first four bytes identify the function: they come from the Keccak-256 hash of its canonical name and parameter types. Encoded arguments follow. Return types are excluded from this selector. Overloaded functions therefore need their complete input signatures, not just a shared name.
1 source for this section
What an ABI reveals
An ABI commonly arrives as JSON describing functions, constructors, events, and errors. Libraries use those descriptions to build calls and interpret returned data or logs. The encoding is not self-describing: without the expected schema, bytes alone do not reliably tell a reader which values were intended. A readable function name also does not establish what the implementation actually does. Treat a decoded request as an interface description, then examine the address, arguments, and relevant code before drawing conclusions about its effects.
1 source for this section
Proxies can change the implementation
For an upgradeable proxy, the address holding state can stay constant while the code receiving delegated calls changes. ERC-1967 standardizes storage locations for the implementation, beacon, and administrator so tools can discover that relationship. An ABI copied from an old implementation may no longer describe the current one. Record the chain, contract address, implementation address, and block used for an investigation. Because selectors have only four bytes, collisions are possible; matching a selector to a familiar name is supporting evidence rather than proof of contract identity.
1 source for this section
The source notesEvidence & further reading2 sources
- Solidity contract ABI specification Solidity contributors · Primary source · accessed 2026-09-22
- ERC-1967: Proxy storage slots Ethereum Improvement Proposals · Primary source · accessed 2026-09-22