{"eip":6,"title":"Renaming SUICIDE opcode","description":"The solution proposed in this EIP is to change the name of the SUICIDE opcode in Ethereum programming languages with SELFDESTRUCT.","authors":["Hudson Jameson \u003chudson@hudsonjameson.com\u003e"],"status":"Final","type":"Standards Track","category":"Interface","created":"2015-11-22","repo":"EIPs","label":"EIP-6","officialUrl":"https://eips.ethereum.org/EIPS/eip-6","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-6.md","url":"https://eips.huatuo.xyz/eip-6/","tldr":{"en":"Renamed the EVM's SUICIDE opcode to SELFDESTRUCT in Ethereum's programming languages, a purely cosmetic change made out of respect for people affected by suicide and depression.","ja":"EVM の SUICIDE オペコードを、Ethereum のプログラミング言語上で SELFDESTRUCT に改名した提案。自殺やうつ病に影響を受けた人々への配慮から行われた、純粋に見た目だけの変更。","ko":"EVM의 SUICIDE 오피코드를 이더리움 프로그래밍 언어에서 SELFDESTRUCT로 바꾼 제안. 자살과 우울증의 영향을 받은 사람들을 배려해 이루어진, 순전히 이름만 바꾼 변경이다.","zh":"在以太坊的编程语言中，将 EVM 的 SUICIDE 操作码更名为 SELFDESTRUCT。这是一次纯粹外观上的改动，出于对受自杀和抑郁影响者的尊重。"},"tags":["evm","opcode","naming","selfdestruct"],"explainers":{"en":{"lang":"en","tldr":"Renamed the EVM's SUICIDE opcode to SELFDESTRUCT in Ethereum's programming languages, a purely cosmetic change made out of respect for people affected by suicide and depression.","tags":["evm","opcode","naming","selfdestruct"],"related":[6049,6780,4758],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-6/","markdown":"## What problem does it solve?\n\nThe EVM has an instruction (opcode `0xff`) that deletes a contract and sends its remaining ether to a chosen address. In Ethereum's early days it was called `SUICIDE`, and Solidity and Serpent exposed it under that name.\n\nEIP-6 argues that the word is needlessly painful for developers who live with depression or have lost someone to suicide. A security audit by Least Authority had also recommended a less loaded name such as \"self-destruct\". Since Ethereum was young, renaming early was cheap.\n\n## How it works\n\nThe change is at the language and tooling level, not in consensus:\n\n- The opcode byte stays `0xff`, with the same gas cost and behavior. Nothing on-chain changes.\n- `SELFDESTRUCT` was added to Solidity and Serpent as an **alias** of `SUICIDE`, rather than replacing it outright, so existing source code kept compiling.\n- Documentation, disassemblers and clients gradually adopted the new name.\n\nBecause only the human-readable name changed, no hard fork was needed. This is why the EIP is in the \"Interface\" category rather than \"Core\".\n\n## Sample code\n\nModern Solidity only knows `selfdestruct`. The old `suicide` alias was removed from the language long ago.\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract Closable {\n    address payable public owner = payable(msg.sender);\n\n    function close() external {\n        require(msg.sender == owner, \"not owner\");\n        // Opcode 0xff, once called SUICIDE.\n        // Since EIP-6780 this only sends the ether unless the contract\n        // was created in the same transaction.\n        selfdestruct(owner);\n    }\n}\n```\n\nIn a disassembly you will now see:\n\n```\nPUSH20 0x...owner\nSELFDESTRUCT   // 0xff\n```\n\n## Things to know\n\n- This proposal is Final, and it is one of the earliest EIPs. It changed names only: bytecode written before and after is identical.\n- The opcode itself was later weakened. [EIP-6049](/eip-6049/) formally deprecated `SELFDESTRUCT`, and [EIP-6780](/eip-6780/) limited it so that it no longer deletes code or storage, except when called in the same transaction that created the contract. [EIP-4758](/eip-4758/) proposed to deactivate it fully, but it is Stagnant.\n- Do not design new contracts around `selfdestruct` to \"reset\" or upgrade a contract. Use an upgradeable proxy or a migration pattern instead.\n"},"ja":{"lang":"ja","tldr":"EVM の SUICIDE オペコードを、Ethereum のプログラミング言語上で SELFDESTRUCT に改名した提案。自殺やうつ病に影響を受けた人々への配慮から行われた、純粋に見た目だけの変更。","tags":["evm","opcode","naming","selfdestruct"],"related":[6049,6780,4758],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-6/","markdown":"## 何を解決するのか\n\nEVM には、コントラクトを削除し、残りの ether を指定したアドレスに送る命令（オペコード `0xff`）があります。Ethereum の初期にはこれが `SUICIDE` と呼ばれ、Solidity や Serpent もこの名前で公開していました。\n\nEIP-6 は、うつ病を抱えて生きている開発者や、自殺で大切な人を亡くした開発者にとって、この言葉は不必要につらいものだと主張しています。また Least Authority によるセキュリティ監査でも、「self-destruct」のようにより刺激の少ない名前が推奨されていました。Ethereum がまだ若い時期だったため、早めの改名は低コストで済みました。\n\n## 仕組み\n\n変更はコンセンサスではなく、言語とツールのレベルで行われます。\n\n- オペコードのバイトは `0xff` のままで、ガスコストと動作も同じです。オンチェーンでは何も変わりません。\n- `SELFDESTRUCT` は `SUICIDE` を完全に置き換えるのではなく、その**エイリアス**として Solidity と Serpent に追加されたため、既存のソースコードは引き続きコンパイルできました。\n- ドキュメント、逆アセンブラ、クライアントも徐々に新しい名前を採用しました。\n\n変わったのは人間が読む名前だけなので、ハードフォークは不要でした。そのためこの EIP は「Core」ではなく「Interface」カテゴリに分類されています。\n\n## サンプルコード\n\n現在の Solidity は `selfdestruct` しか認識しません。古い `suicide` エイリアスは、ずっと前に言語から削除されています。\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract Closable {\n    address payable public owner = payable(msg.sender);\n\n    function close() external {\n        require(msg.sender == owner, \"not owner\");\n        // オペコード 0xff。かつては SUICIDE と呼ばれていました。\n        // EIP-6780 以降、コントラクトが同じトランザクションで作成された場合を除き、\n        // ether を送るだけになります。\n        selfdestruct(owner);\n    }\n}\n```\n\n逆アセンブルすると、現在は次のように表示されます。\n\n```\nPUSH20 0x...owner\nSELFDESTRUCT   // 0xff\n```\n\n## 知っておくべきこと\n\n- この提案は Final で、最も初期の EIP の 1 つです。変更したのは名前だけで、改名の前後に書かれたバイトコードは同一です。\n- オペコード自体は後に弱められました。[EIP-6049](/eip-6049/) は `SELFDESTRUCT` を正式に非推奨とし、[EIP-6780](/eip-6780/) は、コントラクトを作成した同じトランザクション内で呼び出された場合を除き、コードやストレージを削除しないよう制限しました。[EIP-4758](/eip-4758/) は完全に無効化することを提案しましたが、Stagnant です。\n- コントラクトを「リセット」したりアップグレードしたりするために、`selfdestruct` を前提にして新しいコントラクトを設計しないでください。代わりにアップグレード可能なプロキシやマイグレーションパターンを使ってください。\n"},"ko":{"lang":"ko","tldr":"EVM의 SUICIDE 오피코드를 이더리움 프로그래밍 언어에서 SELFDESTRUCT로 바꾼 제안. 자살과 우울증의 영향을 받은 사람들을 배려해 이루어진, 순전히 이름만 바꾼 변경이다.","tags":["evm","opcode","naming","selfdestruct"],"related":[6049,6780,4758],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-6/","markdown":"## 어떤 문제를 해결하나요?\n\nEVM에는 컨트랙트를 삭제하고 남은 ether를 지정한 주소로 보내는 명령(오피코드 `0xff`)이 있습니다. 이더리움 초기에는 이것을 `SUICIDE`라고 불렀고, Solidity와 Serpent도 이 이름으로 제공했습니다.\n\nEIP-6은 우울증을 안고 살아가거나 자살로 소중한 사람을 잃은 개발자에게 이 단어가 불필요하게 고통스럽다고 주장합니다. Least Authority의 보안 감사에서도 \"self-destruct\"처럼 덜 자극적인 이름을 권장한 바 있습니다. 이더리움이 아직 젊었기 때문에 일찍 이름을 바꾸는 비용은 적었습니다.\n\n## 어떻게 동작하나요?\n\n변경은 합의(consensus)가 아니라 언어와 도구 수준에서 이루어집니다.\n\n- 오피코드 바이트는 `0xff` 그대로이고, 가스 비용과 동작도 같습니다. 온체인에서는 아무것도 바뀌지 않습니다.\n- `SELFDESTRUCT`는 `SUICIDE`를 완전히 대체하는 것이 아니라 그 **별칭(alias)**으로 Solidity와 Serpent에 추가되었기 때문에, 기존 소스 코드는 계속 컴파일되었습니다.\n- 문서, 디스어셈블러, 클라이언트도 점차 새 이름을 채택했습니다.\n\n사람이 읽는 이름만 바뀌었으므로 하드포크는 필요하지 않았습니다. 그래서 이 EIP는 \"Core\"가 아니라 \"Interface\" 카테고리에 속합니다.\n\n## 샘플 코드\n\n현대 Solidity는 `selfdestruct`만 인식합니다. 예전의 `suicide` 별칭은 오래전에 언어에서 제거되었습니다.\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract Closable {\n    address payable public owner = payable(msg.sender);\n\n    function close() external {\n        require(msg.sender == owner, \"not owner\");\n        // 오피코드 0xff. 예전에는 SUICIDE라고 불렀습니다.\n        // EIP-6780 이후에는 컨트랙트가 같은 트랜잭션에서 생성된 경우가 아니면\n        // ether만 전송합니다.\n        selfdestruct(owner);\n    }\n}\n```\n\n디스어셈블리에서는 이제 다음과 같이 보입니다.\n\n```\nPUSH20 0x...owner\nSELFDESTRUCT   // 0xff\n```\n\n## 알아둘 점\n\n- 이 제안은 Final 상태이며 가장 초기의 EIP 중 하나입니다. 이름만 바꿨기 때문에, 변경 전후에 작성된 바이트코드는 동일합니다.\n- 오피코드 자체는 이후 약화되었습니다. [EIP-6049](/eip-6049/)는 `SELFDESTRUCT`를 공식적으로 사용 중단(deprecated)했고, [EIP-6780](/eip-6780/)은 컨트랙트를 생성한 같은 트랜잭션에서 호출하는 경우를 제외하고는 코드나 스토리지를 더 이상 삭제하지 않도록 제한했습니다. [EIP-4758](/eip-4758/)은 완전히 비활성화하자고 제안했지만 Stagnant 상태입니다.\n- 컨트랙트를 \"리셋\"하거나 업그레이드하려고 `selfdestruct`를 중심으로 새 컨트랙트를 설계하지 마세요. 대신 업그레이드 가능한 프록시나 마이그레이션 패턴을 사용하세요.\n"},"zh":{"lang":"zh","tldr":"在以太坊的编程语言中，将 EVM 的 SUICIDE 操作码更名为 SELFDESTRUCT。这是一次纯粹外观上的改动，出于对受自杀和抑郁影响者的尊重。","tags":["evm","opcode","naming","selfdestruct"],"related":[6049,6780,4758],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-6/","markdown":"## 它解决什么问题？\n\nEVM 有一条指令（操作码 `0xff`），可以删除合约，并把其剩余的 ether 发送到指定地址。在以太坊早期，它叫 `SUICIDE`，Solidity 和 Serpent 也以这个名字公开它。\n\nEIP-6 认为，对于与抑郁症共处或因自杀失去亲友的开发者来说，这个词带来了不必要的痛苦。Least Authority 的一次安全审计也曾建议改用刺激性更小的名字，例如\"self-destruct\"。由于当时以太坊还很年轻，尽早更名的成本很低。\n\n## 它如何运作\n\n这项改动发生在语言和工具层面，而不在共识层面：\n\n- 操作码字节仍为 `0xff`，gas 成本和行为不变。链上没有任何变化。\n- `SELFDESTRUCT` 是作为 `SUICIDE` 的**别名**加入 Solidity 和 Serpent 的，而不是直接替换，因此已有的源代码仍可编译。\n- 文档、反汇编器和客户端逐步采用了新名称。\n\n由于只改变了人类可读的名称，因此无需硬分叉。这也是该 EIP 属于\"Interface\"类别而非\"Core\"类别的原因。\n\n## 示例代码\n\n现代 Solidity 只认识 `selfdestruct`。旧的 `suicide` 别名早已从语言中移除。\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract Closable {\n    address payable public owner = payable(msg.sender);\n\n    function close() external {\n        require(msg.sender == owner, \"not owner\");\n        // 操作码 0xff，曾经叫 SUICIDE。\n        // 自 EIP-6780 起，除非合约在同一笔交易中创建，\n        // 否则它只会发送 ether。\n        selfdestruct(owner);\n    }\n}\n```\n\n现在在反汇编结果中你会看到：\n\n```\nPUSH20 0x...owner\nSELFDESTRUCT   // 0xff\n```\n\n## 需要注意\n\n- 该提案为 Final 状态，是最早的 EIP 之一。它只改了名称：更名前后编写的字节码完全相同。\n- 该操作码本身后来被削弱。[EIP-6049](/eip-6049/) 正式弃用了 `SELFDESTRUCT`，[EIP-6780](/eip-6780/) 对其加以限制，使其不再删除代码或存储，除非在创建该合约的同一笔交易中调用。[EIP-4758](/eip-4758/) 提议将其完全停用，但处于 Stagnant 状态。\n- 不要围绕 `selfdestruct` 来设计新合约，用它来\"重置\"或升级合约。请改用可升级代理或迁移模式。\n"}},"requiredBy":[7877]}
