eth_getCode
An Ethereum JSON-RPC interface method used to read the code at a specified address. It is a key on-chain inspection tool for determining whether an EOA has been delegated code.
Timeline (last 90 days)
Calling eth_getCode on any address: returning empty indicates an ordinary EOA, returning data beginning with 0xef0100 indicates it has been delegated, and the following 20 bytes are the delegation address; a delegated account can have a completely clean and very short transaction history.
eth_getCode returns 23 bytes of data beginning with 0xef0100 for an EIP-7702 delegated account (3-byte prefix + 20-byte delegation address).
The on-chain pre-check process for the EIP-7702 draining trap includes three steps: read the address code (eth_getCode), read the delegation contract code, and read the authorization tuple and verify the signer with ecrecover.
All Facts (3)
Calling eth_getCode on any address: returning empty indicates an ordinary EOA, returning data beginning with 0xef0100 indicates it has been delegated, and the following 20 bytes are the delegation address; a delegated account can have a completely clean and very short transaction history.
50%Unverifiedeth_getCode returns 23 bytes of data beginning with 0xef0100 for an EIP-7702 delegated account (3-byte prefix + 20-byte delegation address).
50%UnverifiedThe on-chain pre-check process for the EIP-7702 draining trap includes three steps: read the address code (eth_getCode), read the delegation contract code, and read the authorization tuple and verify the signer with ecrecover.
50%