Skip to content

ID

Data

Return the input unchanged — the cheapest way to copy memory.

Address0x0000000000000000000000000000000000000004
NameID
Minimum gas15
Inputvariable
Outputsame as input
Available sinceFrontier

Input

OffsetLengthFieldDescription
0variabledataBytes to copy.

Output

A byte-for-byte copy of the input.

Gas

15 + 3 × ceil(len(input) / 32)

Failure behaviour

  • Cannot fail.

Calling it

Precompiles have no ABI and no function selector: the input is raw bytes at the exact offsets above. Call with staticcall.

// ID at 0x04
(bool ok, bytes memory out) = address(0x04).staticcall(input);
require(ok, "ID reverted");