{"eip":999,"title":"Restore Contract Code at 0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4","description":"This document proposes to restore the contract code of the WalletLibrary contract at 0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4 with a patched version. The contract was accidentally self-destructed and renders a significant amount of Ether inaccessible.","authors":["Afri Schoedon (@5chdn)"],"status":"Withdrawn","type":"Standards Track","category":"Core","created":"2018-04-04","discussionsTo":"https://ethereum-magicians.org/t/eip-999-restore-contract-code-at-0x863df6bfa4/130","repo":"EIPs","label":"EIP-999","officialUrl":"https://eips.ethereum.org/EIPS/eip-999","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-999.md","url":"https://eips.huatuo.xyz/eip-999/","tldr":{"en":"Proposed a one-time hard-fork state change to restore the self-destructed Parity WalletLibrary contract and unfreeze the multisig wallets that depended on it; it was Withdrawn.","ja":"自己破壊された Parity の WalletLibrary コントラクトを復元し、それに依存していたマルチシグウォレットの凍結を解除する、1 回限りのハードフォークによるステート変更を提案した。Withdrawn。","ko":"자폭(self-destruct)된 Parity WalletLibrary 컨트랙트를 복원하고 이에 의존하던 멀티시그 지갑의 동결을 풀기 위해 일회성 하드 포크 상태 변경을 제안했다. Withdrawn.","zh":"提议通过一次性的硬分叉状态变更，恢复已自毁的 Parity WalletLibrary 合约，解冻依赖它的多签钱包；该提案已 Withdrawn。"},"tags":["parity","multisig","hardfork","state-change","withdrawn"],"explainers":{"en":{"lang":"en","tldr":"Proposed a one-time hard-fork state change to restore the self-destructed Parity WalletLibrary contract and unfreeze the multisig wallets that depended on it; it was Withdrawn.","tags":["parity","multisig","hardfork","state-change","withdrawn"],"related":[6049,6780,4758],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-999/","markdown":"## What problem does it solve?\n\nParity's multi-signature wallets were deployed as small contracts. To save gas, each one used `DELEGATECALL` to send its logic to a single shared `WalletLibrary` contract at `0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4`. In November 2017, a user took ownership of the library contract itself, because it had never been initialized, and then called its `selfdestruct`. The library's code was erased.\n\nEvery wallet that depended on the library lost all of its logic, and the Ether and tokens they held became permanently inaccessible. Ethereum had no way to restore a self-destructed contract, and changing that rule in general was judged too risky.\n\n## How it works\n\nEIP-999 does not change any EVM rules. It proposes a **single, hard-coded state change** at a fork block. Constantinople was suggested:\n\n- Recreate the account at the library address with nonce `1`.\n- Give it the code of a **patched** `WalletLibrary` with the `selfdestruct` removed and the library owner initialized to `0x0`.\n- Set a handful of storage slots so the library itself is already initialized and cannot be taken over again.\n- Leave the account balance unchanged. No Ether is created or moved.\n\nTwo equivalent forms are given:\n\n- **999a** writes the full bytecode directly into the account.\n- **999b** copies the code hash of an already deployed, verifiable copy of the patched contract.\n\nOnce the library code exists again, every dependent wallet's `DELEGATECALL` works, and owners can move their funds as usual.\n\n## Sample code\n\nThe spec's state transition, as pseudocode (bytecode abbreviated):\n\n```python\nLIB = \"0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4\"\n\nif block.number == CNSTNTNPL_FORK_BLKNUM:\n    acct = state.get_or_create(LIB)\n    acct.nonce = 1\n    acct.code = PATCHED_WALLET_LIBRARY_BYTECODE   # 999a (or: set codehash, 999b)\n    acct.storage[0x00] = 1\n    acct.storage[0x01] = 1\n    acct.storage[0x04] = 0x44e1\n    acct.storage[0xa5baec7d...ae2d] = 1\n    # balance intentionally untouched\n```\n\n## Things to know\n\n- **This proposal was Withdrawn and never implemented.** An informal coin vote in 2018 showed most participants opposed it, and core developers did not include it in any fork. The funds remain frozen.\n- The debate was about precedent rather than code. Supporters saw it as fixing an obvious bug. Opponents argued that hand-editing state for specific parties would undermine immutability and invite future requests.\n- The underlying lessons were to initialize library and implementation contracts, and to avoid destructible code behind a `DELEGATECALL`. Upgradeable-proxy patterns adopted those lessons.\n- `SELFDESTRUCT` has since been sharply restricted. [EIP-6049](/eip-6049/) formally deprecated it, and [EIP-6780](/eip-6780/) (Dencun) limits its effect to contracts created in the same transaction. See also [EIP-4758](/eip-4758/) (Stagnant).\n"},"ja":{"lang":"ja","tldr":"自己破壊された Parity の WalletLibrary コントラクトを復元し、それに依存していたマルチシグウォレットの凍結を解除する、1 回限りのハードフォークによるステート変更を提案した。Withdrawn。","tags":["parity","multisig","hardfork","state-change","withdrawn"],"related":[6049,6780,4758],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-999/","markdown":"## 何を解決するのか\n\nParity のマルチシグウォレットは小さなコントラクトとしてデプロイされていました。ガスを節約するため、それぞれが `DELEGATECALL` を使ってロジックを、`0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4` にある共有の `WalletLibrary` コントラクトに委ねていました。2017 年 11 月、あるユーザーが、初期化されていなかったライブラリコントラクト自体の所有権を取得し、その `selfdestruct` を呼び出しました。ライブラリのコードは消去されました。\n\nそのライブラリに依存していたすべてのウォレットはロジックをすべて失い、保管していた Ether とトークンは恒久的にアクセスできなくなりました。Ethereum には自己破壊されたコントラクトを復元する手段がなく、そのルールを一般的に変更することは危険すぎると判断されました。\n\n## 仕組み\n\nEIP-999 は EVM のルールを一切変更しません。フォークのブロックで行う**ハードコードされた 1 回限りのステート変更**を提案しています。フォークには Constantinople が提案されました。\n\n- ライブラリのアドレスにアカウントを nonce `1` で再作成する。\n- `selfdestruct` を取り除き、ライブラリの所有者を `0x0` に初期化した、**修正済み**の `WalletLibrary` のコードを与える。\n- ライブラリ自体が初期化済みとなり、再び乗っ取られないよう、いくつかのストレージスロットを設定する。\n- アカウントの残高は変更しない。Ether は生成も移動もされない。\n\n同等の 2 つの形式が示されています。\n\n- **999a** は完全なバイトコードをアカウントに直接書き込みます。\n- **999b** は、すでにデプロイされ検証可能な、修正済みコントラクトのコピーのコードハッシュをコピーします。\n\nライブラリのコードが再び存在すれば、依存するすべてのウォレットの `DELEGATECALL` が動作し、所有者はこれまでどおり資金を動かせます。\n\n## サンプルコード\n\n仕様のステート遷移を疑似コードで示します（バイトコードは省略）:\n\n```python\nLIB = \"0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4\"\n\nif block.number == CNSTNTNPL_FORK_BLKNUM:\n    acct = state.get_or_create(LIB)\n    acct.nonce = 1\n    acct.code = PATCHED_WALLET_LIBRARY_BYTECODE   # 999a (or: set codehash, 999b)\n    acct.storage[0x00] = 1\n    acct.storage[0x01] = 1\n    acct.storage[0x04] = 0x44e1\n    acct.storage[0xa5baec7d...ae2d] = 1\n    # balance intentionally untouched\n```\n\n## 知っておくべきこと\n\n- **この提案は Withdrawn となり、実装されませんでした。** 2018 年の非公式なコイン投票では、参加者の大半が反対しており、コア開発者はどのフォークにも含めませんでした。資金は凍結されたままです。\n- 議論はコードではなく前例についてのものでした。賛成派は明白なバグの修正だと見ました。反対派は、特定の当事者のためにステートを手作業で編集することは不変性を損ない、将来の同様の要求を招くと主張しました。\n- 根本的な教訓は、ライブラリとインプリメンテーションのコントラクトを初期化すること、そして `DELEGATECALL` の先に破壊可能なコードを置かないことでした。アップグレード可能なプロキシのパターンは、これらの教訓を取り入れました。\n- `SELFDESTRUCT` はその後、大幅に制限されました。[EIP-6049](/eip-6049/) は正式にこれを非推奨とし、[EIP-6780](/eip-6780/)（Dencun）はその効果を同じトランザクション内で作成されたコントラクトに限定しています。[EIP-4758](/eip-4758/)（Stagnant）も参照してください。\n"},"ko":{"lang":"ko","tldr":"자폭(self-destruct)된 Parity WalletLibrary 컨트랙트를 복원하고 이에 의존하던 멀티시그 지갑의 동결을 풀기 위해 일회성 하드 포크 상태 변경을 제안했다. Withdrawn.","tags":["parity","multisig","hardfork","state-change","withdrawn"],"related":[6049,6780,4758],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-999/","markdown":"## 어떤 문제를 해결하나요?\n\nParity의 멀티시그 지갑은 작은 컨트랙트로 배포되었습니다. 가스를 아끼기 위해 각 지갑은 `DELEGATECALL`을 사용해 로직을 `0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4`에 있는 하나의 공유 `WalletLibrary` 컨트랙트로 넘겼습니다. 2017년 11월, 한 사용자가 초기화된 적이 없던 라이브러리 컨트랙트 자체의 소유권을 가져간 뒤 그 `selfdestruct`를 호출했습니다. 라이브러리의 코드는 지워졌습니다.\n\n그 라이브러리에 의존하던 모든 지갑은 로직을 전부 잃었고, 그 지갑들이 보유하던 이더와 토큰은 영구적으로 접근할 수 없게 되었습니다. 이더리움에는 자폭된 컨트랙트를 복원할 방법이 없었고, 이 규칙을 일반적으로 바꾸는 것은 너무 위험하다고 판단되었습니다.\n\n## 어떻게 동작하나요?\n\nEIP-999는 EVM 규칙을 전혀 바꾸지 않습니다. 포크 블록에서 **하드코딩된 단 한 번의 상태 변경**을 제안합니다. 포크로는 Constantinople이 제안되었습니다.\n\n- 라이브러리 주소에 nonce `1`로 계정을 다시 만듭니다.\n- `selfdestruct`를 제거하고 라이브러리 소유자를 `0x0`으로 초기화한 **패치된** `WalletLibrary`의 코드를 부여합니다.\n- 라이브러리 자체가 이미 초기화된 상태가 되어 다시 탈취될 수 없도록 몇 개의 스토리지 슬롯을 설정합니다.\n- 계정 잔액은 그대로 둡니다. 이더는 생성되거나 이동하지 않습니다.\n\n동등한 두 가지 형태가 제시됩니다.\n\n- **999a**는 전체 바이트코드를 계정에 직접 기록합니다.\n- **999b**는 이미 배포되어 검증 가능한 패치 컨트랙트 사본의 코드 해시를 복사합니다.\n\n라이브러리 코드가 다시 존재하게 되면 이에 의존하는 모든 지갑의 `DELEGATECALL`이 동작하고, 소유자들은 평소처럼 자금을 옮길 수 있습니다.\n\n## 샘플 코드\n\n명세의 상태 전이를 의사 코드로 나타냅니다(바이트코드는 생략):\n\n```python\nLIB = \"0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4\"\n\nif block.number == CNSTNTNPL_FORK_BLKNUM:\n    acct = state.get_or_create(LIB)\n    acct.nonce = 1\n    acct.code = PATCHED_WALLET_LIBRARY_BYTECODE   # 999a (or: set codehash, 999b)\n    acct.storage[0x00] = 1\n    acct.storage[0x01] = 1\n    acct.storage[0x04] = 0x44e1\n    acct.storage[0xa5baec7d...ae2d] = 1\n    # balance intentionally untouched\n```\n\n## 알아둘 점\n\n- **이 제안은 Withdrawn 상태이며 구현된 적이 없습니다.** 2018년의 비공식 코인 투표에서는 대다수 참가자가 반대했고, 코어 개발자들은 어떤 포크에도 이를 포함하지 않았습니다. 자금은 여전히 동결되어 있습니다.\n- 논쟁은 코드가 아니라 선례에 관한 것이었습니다. 찬성하는 쪽은 명백한 버그를 고치는 일로 보았습니다. 반대하는 쪽은 특정 당사자를 위해 상태를 손으로 편집하면 불변성이 훼손되고 앞으로도 같은 요청이 이어질 것이라고 주장했습니다.\n- 근본적인 교훈은 라이브러리와 구현 컨트랙트를 초기화하고, `DELEGATECALL` 뒤에 파괴 가능한 코드를 두지 않는 것이었습니다. 업그레이드 가능한 프록시 패턴이 이 교훈을 받아들였습니다.\n- `SELFDESTRUCT`는 이후 크게 제한되었습니다. [EIP-6049](/eip-6049/)는 이를 공식적으로 폐기 예정으로 했고, [EIP-6780](/eip-6780/)(Dencun)은 그 효과를 같은 트랜잭션에서 생성된 컨트랙트로 제한합니다. [EIP-4758](/eip-4758/)(Stagnant)도 참고하세요.\n"},"zh":{"lang":"zh","tldr":"提议通过一次性的硬分叉状态变更，恢复已自毁的 Parity WalletLibrary 合约，解冻依赖它的多签钱包；该提案已 Withdrawn。","tags":["parity","multisig","hardfork","state-change","withdrawn"],"related":[6049,6780,4758],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-999/","markdown":"## 它解决什么问题？\n\nParity 的多重签名钱包被部署为小型合约。为了节省 gas，每个钱包都用 `DELEGATECALL` 把逻辑交给位于 `0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4` 的同一个共享 `WalletLibrary` 合约。2017 年 11 月，一名用户取得了库合约本身的所有权（因为它从未被初始化），然后调用了它的 `selfdestruct`。库的代码被抹去。\n\n所有依赖该库的钱包都失去了全部逻辑，它们持有的以太币和代币从此永久无法访问。以太坊没有办法恢复已自毁的合约，而一般性地修改这条规则被认为风险太大。\n\n## 它如何运作\n\nEIP-999 不改变任何 EVM 规则。它提议在某个分叉区块进行**一次硬编码的状态变更**。建议的分叉是 Constantinople：\n\n- 在库地址上重新创建账户，nonce 为 `1`。\n- 赋予它**打过补丁**的 `WalletLibrary` 的代码，其中移除了 `selfdestruct`，库的所有者被初始化为 `0x0`。\n- 设置少量存储槽，使库本身已经处于初始化状态，不会再被接管。\n- 保持账户余额不变。不创造也不转移任何以太币。\n\n规范给出了两种等价的形式：\n\n- **999a** 把完整的字节码直接写入账户。\n- **999b** 复制一个已经部署、可验证的补丁合约副本的代码哈希。\n\n一旦库代码重新存在，所有依赖它的钱包的 `DELEGATECALL` 就能工作，所有者可以照常转移自己的资金。\n\n## 示例代码\n\n规范中的状态转换，以伪代码表示（字节码已省略）：\n\n```python\nLIB = \"0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4\"\n\nif block.number == CNSTNTNPL_FORK_BLKNUM:\n    acct = state.get_or_create(LIB)\n    acct.nonce = 1\n    acct.code = PATCHED_WALLET_LIBRARY_BYTECODE   # 999a (or: set codehash, 999b)\n    acct.storage[0x00] = 1\n    acct.storage[0x01] = 1\n    acct.storage[0x04] = 0x44e1\n    acct.storage[0xa5baec7d...ae2d] = 1\n    # balance intentionally untouched\n```\n\n## 需要注意\n\n- **该提案已 Withdrawn，从未实现。** 2018 年的一次非正式币投票显示大多数参与者反对，核心开发者也没有把它纳入任何分叉。这些资金仍然被冻结。\n- 争论的焦点是先例，而不是代码。支持者认为这是在修复一个明显的漏洞。反对者认为，为特定当事方手动编辑状态会破坏不可变性，并招致今后的类似请求。\n- 其根本教训是要初始化库合约和实现合约，并避免在 `DELEGATECALL` 背后放置可销毁的代码。可升级代理模式吸收了这些教训。\n- `SELFDESTRUCT` 此后被严格限制。[EIP-6049](/eip-6049/) 正式弃用了它，[EIP-6780](/eip-6780/)（Dencun）把它的效果限制在同一笔交易中创建的合约。另见 [EIP-4758](/eip-4758/)（Stagnant）。\n"}}}
