{"eip":1352,"title":"Specify restricted address range for precompiles/system contracts","description":"Specify an Ethereum address range occupied by precompiles and future system contracts. Regular accounts and contracts cannot obtain such an address.","authors":["Alex Beregszaszi (@axic)"],"status":"Stagnant","type":"Standards Track","category":"Core","created":"2018-07-27","discussionsTo":"https://ethereum-magicians.org/t/eip-1352-specify-restricted-address-range-for-precompiles-system-contracts/1151","repo":"EIPs","label":"EIP-1352","officialUrl":"https://eips.ethereum.org/EIPS/eip-1352","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1352.md","url":"https://eips.huatuo.xyz/eip-1352/","tldr":{"en":"Reserves the addresses 0x0000…0000 to 0x0000…ffff for precompiles and system contracts, so protocol code can recognise them by range instead of maintaining lists of exceptions.","ja":"アドレス 0x0000…0000 から 0x0000…ffff までをプリコンパイルとシステムコントラクトのために予約し、プロトコルのコードが例外のリストを保守する代わりに範囲で認識できるようにする。","ko":"주소 0x0000…0000부터 0x0000…ffff까지를 프리컴파일과 시스템 컨트랙트용으로 예약하여, 프로토콜 코드가 예외 목록을 관리하는 대신 범위로 이들을 식별할 수 있게 한다.","zh":"把地址 0x0000…0000 到 0x0000…ffff 保留给预编译和系统合约，使协议代码可以按范围识别它们，而不必维护例外列表。"},"tags":["precompile","system-contract","address","evm","core"],"explainers":{"en":{"lang":"en","tldr":"Reserves the addresses 0x0000…0000 to 0x0000…ffff for precompiles and system contracts, so protocol code can recognise them by range instead of maintaining lists of exceptions.","tags":["precompile","system-contract","address","evm","core"],"related":[2046,1109,2929,4788,2935],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-1352/","markdown":"## What problem does it solve?\n\nPrecompiled contracts sit at tiny addresses such as `0x01` (ecrecover) and `0x02` (SHA-256). New precompiles and \"system contracts\" keep being proposed, and several features need to treat them specially, for example by charging less to call them.\n\nWithout a defined range, every such rule must list the special addresses one by one and be updated each time a new one is added. EIP-1352 proposes a simple convention: the first 65,536 addresses are reserved for the protocol.\n\n## How it works\n\nThe whole specification is one rule:\n\n\u003e The address range from `0x0000000000000000000000000000000000000000` to `0x000000000000000000000000000000000000ffff` is reserved for precompiles and system contracts.\n\n- Regular accounts and contracts are not supposed to be able to obtain these addresses.\n- No explicit checks are added. The chance of a key pair or a `CREATE` producing an address with 18 leading zero bytes is negligible, so the spec deliberately does not add validation to transaction signing or contract creation.\n- The spec notes that no contracts had been created at these addresses on mainnet, so reserving the range causes no compatibility problems.\n\nOther proposals could then say \"if the target is in the reserved range\" instead of naming addresses. [EIP-2046](/eip-2046/), for example, cites this EIP to define which `STATICCALL` targets get a discount.\n\n## Sample code\n\nA helper that applies the convention (illustrative; the range is not enforced by the protocol):\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\nlibrary ReservedRange {\n    uint160 internal constant MAX_RESERVED = 0xffff;\n\n    /// True if `a` falls in the EIP-1352 precompile / system-contract range.\n    function isReserved(address a) internal pure returns (bool) {\n        return uint160(a) \u003c= MAX_RESERVED;\n    }\n}\n```\n\nThe same check in TypeScript:\n\n```ts\nconst isReserved = (addr: string) =\u003e BigInt(addr) \u003c= 0xffffn;\n\nisReserved(\"0x0000000000000000000000000000000000000002\"); // true  (SHA-256 precompile)\nisReserved(\"0x0000000000000000000000000000000000010000\"); // false (0x10000, just past the range)\n```\n\n## Things to know\n\n- Status is **Stagnant**. The range was never formally adopted as a consensus rule.\n- Precompiles have in practice been added at low addresses inside this range. Several later system contracts, such as those from [EIP-4788](/eip-4788/) and [EIP-2935](/eip-2935/), were instead deployed at ordinary-looking addresses outside it.\n- [EIP-2929](/eip-2929/) solved the \"cheaper calls to precompiles\" problem differently, by treating all precompile addresses as always warm.\n- Do not rely on this range for security decisions in contracts. It is a convention, not something the EVM enforces.\n"},"ja":{"lang":"ja","tldr":"アドレス 0x0000…0000 から 0x0000…ffff までをプリコンパイルとシステムコントラクトのために予約し、プロトコルのコードが例外のリストを保守する代わりに範囲で認識できるようにする。","tags":["precompile","system-contract","address","evm","core"],"related":[2046,1109,2929,4788,2935],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-1352/","markdown":"## 何を解決するのか\n\nプリコンパイル済みコントラクトは、`0x01`（ecrecover）や `0x02`（SHA-256）のような小さなアドレスにあります。新しいプリコンパイルや「システムコントラクト」は提案され続けており、いくつかの機能はそれらを特別に扱う必要があります。たとえば、呼び出しの料金を安くするといった場合です。\n\n範囲が定義されていないと、そうしたルールはすべて特別なアドレスを 1 つずつ列挙しなければならず、新しいものが追加されるたびに更新が必要になります。EIP-1352 は単純な規約を提案します。最初の 65,536 個のアドレスをプロトコル用に予約するというものです。\n\n## 仕組み\n\n仕様全体がひとつのルールです。\n\n\u003e `0x0000000000000000000000000000000000000000` から `0x000000000000000000000000000000000000ffff` までのアドレス範囲は、プリコンパイルとシステムコントラクトのために予約されています。\n\n- 通常のアカウントやコントラクトは、これらのアドレスを取得できないものとされています。\n- 明示的なチェックは追加されません。鍵ペアや `CREATE` が先頭 18 バイトがゼロのアドレスを生成する確率は無視できるほど小さいため、仕様はトランザクション署名やコントラクト作成に検証を追加しないことを意図しています。\n- 仕様は、メインネットではこれらのアドレスにコントラクトが作成されたことはないと述べており、範囲を予約しても互換性の問題は生じません。\n\nそうすれば、他の提案はアドレスを名指しする代わりに「対象が予約範囲内であれば」と言えます。たとえば [EIP-2046](/eip-2046/) は、どの `STATICCALL` の対象に割引を適用するかを定義するためにこの EIP を引用しています。\n\n## サンプルコード\n\nこの規約を適用するヘルパー（説明用。この範囲はプロトコルによって強制されません）:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\nlibrary ReservedRange {\n    uint160 internal constant MAX_RESERVED = 0xffff;\n\n    /// True if `a` falls in the EIP-1352 precompile / system-contract range.\n    function isReserved(address a) internal pure returns (bool) {\n        return uint160(a) \u003c= MAX_RESERVED;\n    }\n}\n```\n\nTypeScript での同じチェック:\n\n```ts\nconst isReserved = (addr: string) =\u003e BigInt(addr) \u003c= 0xffffn;\n\nisReserved(\"0x0000000000000000000000000000000000000002\"); // true  (SHA-256 precompile)\nisReserved(\"0x0000000000000000000000000000000000010000\"); // false (0x10000, just past the range)\n```\n\n## 知っておくべきこと\n\n- ステータスは **Stagnant** です。この範囲がコンセンサスルールとして正式に採用されたことはありません。\n- 実際には、プリコンパイルはこの範囲内の低いアドレスに追加されてきました。[EIP-4788](/eip-4788/) や [EIP-2935](/eip-2935/) のような後のシステムコントラクトのいくつかは、代わりにこの範囲の外にある、ごく普通に見えるアドレスにデプロイされました。\n- [EIP-2929](/eip-2929/) は、「プリコンパイルへの呼び出しを安くする」という問題を別の方法で解決しました。すべてのプリコンパイルアドレスを常にウォームとして扱うというものです。\n- コントラクトのセキュリティ判断にこの範囲を頼らないでください。これは規約であり、EVM が強制するものではありません。\n"},"ko":{"lang":"ko","tldr":"주소 0x0000…0000부터 0x0000…ffff까지를 프리컴파일과 시스템 컨트랙트용으로 예약하여, 프로토콜 코드가 예외 목록을 관리하는 대신 범위로 이들을 식별할 수 있게 한다.","tags":["precompile","system-contract","address","evm","core"],"related":[2046,1109,2929,4788,2935],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-1352/","markdown":"## 어떤 문제를 해결하나요?\n\n프리컴파일 컨트랙트는 `0x01`(ecrecover)과 `0x02`(SHA-256) 같은 아주 작은 주소에 있습니다. 새로운 프리컴파일과 \"시스템 컨트랙트\"가 계속 제안되고 있고, 몇몇 기능은 이들을 특별하게 다뤄야 합니다. 예를 들어 호출 요금을 낮추는 경우입니다.\n\n정해진 범위가 없으면 이런 규칙마다 특수 주소를 하나하나 나열해야 하고, 새 주소가 추가될 때마다 갱신해야 합니다. EIP-1352는 간단한 관례를 제안합니다. 처음 65,536개 주소를 프로토콜용으로 예약하자는 것입니다.\n\n## 어떻게 동작하나요?\n\n명세 전체가 하나의 규칙입니다.\n\n\u003e `0x0000000000000000000000000000000000000000`부터 `0x000000000000000000000000000000000000ffff`까지의 주소 범위는 프리컴파일과 시스템 컨트랙트용으로 예약되어 있습니다.\n\n- 일반 계정과 컨트랙트는 이 주소를 얻을 수 없어야 합니다.\n- 명시적인 검사는 추가되지 않습니다. 키 쌍이나 `CREATE`가 앞쪽 18바이트가 0인 주소를 만들어 낼 확률은 무시할 수 있을 정도이므로, 명세는 트랜잭션 서명이나 컨트랙트 생성에 검증을 추가하지 않기로 의도했습니다.\n- 명세는 메인넷에서 이 주소들에 컨트랙트가 생성된 적이 없다고 밝히므로, 이 범위를 예약해도 호환성 문제는 생기지 않습니다.\n\n그러면 다른 제안들은 주소를 일일이 지정하는 대신 \"대상이 예약 범위 안에 있으면\"이라고 말할 수 있습니다. 예를 들어 [EIP-2046](/eip-2046/)은 어떤 `STATICCALL` 대상에 할인을 줄지 정의하기 위해 이 EIP를 인용합니다.\n\n## 샘플 코드\n\n이 관례를 적용하는 헬퍼(설명용이며 이 범위는 프로토콜이 강제하지 않음):\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\nlibrary ReservedRange {\n    uint160 internal constant MAX_RESERVED = 0xffff;\n\n    /// True if `a` falls in the EIP-1352 precompile / system-contract range.\n    function isReserved(address a) internal pure returns (bool) {\n        return uint160(a) \u003c= MAX_RESERVED;\n    }\n}\n```\n\nTypeScript로 작성한 같은 검사:\n\n```ts\nconst isReserved = (addr: string) =\u003e BigInt(addr) \u003c= 0xffffn;\n\nisReserved(\"0x0000000000000000000000000000000000000002\"); // true  (SHA-256 precompile)\nisReserved(\"0x0000000000000000000000000000000000010000\"); // false (0x10000, just past the range)\n```\n\n## 알아둘 점\n\n- 상태는 **Stagnant**입니다. 이 범위는 합의 규칙으로 공식 채택된 적이 없습니다.\n- 실제로 프리컴파일은 이 범위 안의 낮은 주소에 추가되어 왔습니다. [EIP-4788](/eip-4788/)과 [EIP-2935](/eip-2935/)의 시스템 컨트랙트처럼 이후의 몇몇 시스템 컨트랙트는 대신 이 범위 밖의 평범해 보이는 주소에 배포되었습니다.\n- [EIP-2929](/eip-2929/)는 \"프리컴파일 호출을 더 싸게\" 하는 문제를 다른 방식으로 해결했습니다. 모든 프리컴파일 주소를 항상 웜으로 취급하는 것입니다.\n- 컨트랙트의 보안 판단에 이 범위를 의존하지 마세요. 이것은 EVM이 강제하는 것이 아니라 관례입니다.\n"},"zh":{"lang":"zh","tldr":"把地址 0x0000…0000 到 0x0000…ffff 保留给预编译和系统合约，使协议代码可以按范围识别它们，而不必维护例外列表。","tags":["precompile","system-contract","address","evm","core"],"related":[2046,1109,2929,4788,2935],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-1352/","markdown":"## 它解决什么问题？\n\n预编译合约位于 `0x01`（ecrecover）和 `0x02`（SHA-256）这样的极小地址。新的预编译和“系统合约”不断被提出，而一些功能需要对它们作特殊处理，例如调用它们时收费更低。\n\n如果没有一个明确的范围，每条这样的规则都必须逐个列出这些特殊地址，并在每次新增时更新。EIP-1352 提出了一个简单的约定：前 65,536 个地址保留给协议使用。\n\n## 它如何运作\n\n整个规范就是一条规则：\n\n\u003e 从 `0x0000000000000000000000000000000000000000` 到 `0x000000000000000000000000000000000000ffff` 的地址范围保留给预编译和系统合约。\n\n- 普通账户和合约理应无法获得这些地址。\n- 不增加任何显式检查。密钥对或 `CREATE` 生成一个带有 18 个前导零字节的地址的概率可以忽略不计，所以规范有意不在交易签名或合约创建中增加验证。\n- 规范指出，主网上没有任何合约创建在这些地址上，因此保留该范围不会带来兼容性问题。\n\n其他提案于是可以说“如果目标在保留范围内”，而不必点名具体地址。例如 [EIP-2046](/eip-2046/) 就引用了这份 EIP 来定义哪些 `STATICCALL` 目标可享受折扣。\n\n## 示例代码\n\n应用这一约定的辅助函数（示意性的；协议并不强制该范围）：\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\nlibrary ReservedRange {\n    uint160 internal constant MAX_RESERVED = 0xffff;\n\n    /// True if `a` falls in the EIP-1352 precompile / system-contract range.\n    function isReserved(address a) internal pure returns (bool) {\n        return uint160(a) \u003c= MAX_RESERVED;\n    }\n}\n```\n\nTypeScript 中的同一检查：\n\n```ts\nconst isReserved = (addr: string) =\u003e BigInt(addr) \u003c= 0xffffn;\n\nisReserved(\"0x0000000000000000000000000000000000000002\"); // true  (SHA-256 precompile)\nisReserved(\"0x0000000000000000000000000000000000010000\"); // false (0x10000, just past the range)\n```\n\n## 需要注意\n\n- 状态为 **Stagnant**。该范围从未被正式采纳为共识规则。\n- 实际上，预编译一直被添加在该范围内的低地址上。后来的一些系统合约，例如来自 [EIP-4788](/eip-4788/) 和 [EIP-2935](/eip-2935/) 的那些，则部署在该范围之外、看起来普通的地址上。\n- [EIP-2929](/eip-2929/) 用另一种方式解决了“让预编译调用更便宜”的问题，即把所有预编译地址视为始终为热。\n- 不要在合约中依赖这个范围做安全决策。它只是一种约定，不是 EVM 强制执行的东西。\n"}},"requiredBy":[2003,2046,2666,5283]}
