The same name can identify different input-type signatures.
LET’S PICTURE IT
Two service forms can share a heading while requiring different kinds of fields.
SEE IT FOR YOURSELF
Build a transfer call from typed fieldsStep 1 / 4
The standard transfer interface takes an address and a raw integer amount. This diagram uses address one and amount one hundred.
The standard transfer interface takes an address and a raw integer amount. This diagram uses address one and amount one hundred.Keccak-256 of the canonical signature supplies the first four bytes. The transfer selector is a9059cbb.An address is twenty bytes. Standard ABI encoding adds twelve zero bytes on the left to fill one thirty-two-byte word.The integer one hundred is hex 64, left-padded in word one. Selector plus two words produces sixty-eight bytes of standard calldata.
Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.
Parameter types distinguish overloads
foo(uint256) and foo(address) have different canonical signatures. Their selectors are derived from those different strings, even though the function name is shared.
Outputs do not provide this distinction
A return-type-only change is not a standard selector-overload mechanism. Mutability and parameter names also do not belong in the selector signature.
Choose the exact declaration
A tool needs enough information to select the intended overload. Passing a value that resembles several types is not a reliable substitute for specifying the interface.
Short hashes can still collide
Different canonical signatures normally produce different selectors, but four bytes cannot guarantee uniqueness over every possible signature. Overload reasoning and collision awareness are separate concerns.
Follow the bytes
function foo(uint256 value)
arguments: ["7"]
selector: 0x2fbebd38
arguments begin at calldata byte 4
word 0 · argument offset 0 bytes
0x0000000000000000000000000000000000000000000000000000000000000007
Compare this selector with foo(address) in the hash tool.