Keep the first four bytes of the canonical signature’s Keccak-256 digest.
LET’S PICTURE IT
A short action label is derived from a longer fingerprint, not assigned by the user-interface button.
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.
Hash exact signature text
For transfer(address,uint256), encode the canonical signature as text and calculate Keccak-256. Ethereum’s Keccak-256 differs from finalized SHA3-256. The choice of algorithm matters.
Take four bytes
The selector is the first eight hexadecimal digits after 0x, representing four bytes. The full digest remains thirty-two bytes; shortening it creates the possibility of collisions.
Prefix a standard function request
The selector precedes encoded arguments in ordinary function calldata. Return data and standalone ABI parameter encoding do not use this prefix automatically.
Verify locally
Hash the signature text in the Keccak tool and compare its first-four-byte output with the encoder’s transfer result. No signature database or chain call is required.
Follow the bytes
function transfer(address to, uint256 amount)
arguments: ["0x0000000000000000000000000000000000000001","100"]
selector: 0xa9059cbb
arguments begin at calldata byte 4
word 0 · argument offset 0 bytes
0x0000000000000000000000000000000000000000000000000000000000000001
word 1 · argument offset 32 bytes
0x0000000000000000000000000000000000000000000000000000000000000064