ID
Data
Return the input unchanged — the cheapest way to copy memory.
| Address | 0x0000000000000000000000000000000000000004 |
|---|---|
| Name | ID |
| Minimum gas | 15 |
| Input | variable |
| Output | same as input |
| Available since | Frontier |
Input
| Offset | Length | Field | Description |
|---|---|---|---|
| 0 | variable | data | Bytes 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");