{"eip":7878,"title":"Bequeathable Contracts","description":"Inheritance of tokens after the owner's death","authors":["Wamith Mockbill (@wamith)"],"status":"Final","type":"Standards Track","category":"ERC","created":"2025-02-01","requires":[20,165,721,1155],"discussionsTo":"https://ethereum-magicians.org/t/new-erc-bequeathable-tokens-a-standard-to-allow-tokens-to-be-inherited-after-the-owners-death/22755","repo":"ERCs","label":"ERC-7878","officialUrl":"https://eips.ethereum.org/EIPS/eip-7878","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7878.md","url":"https://eips.huatuo.xyz/eip-7878/","tldr":{"en":"A standard interface that lets token holders write an on-chain \"Will\" naming executors, so their tokens can be passed to an heir after a waiting period once they die.","ja":"トークン保有者が執行者を指名するオンチェーンの「遺言」を書けるようにする標準インターフェース。保有者の死後、待機期間を経てトークンが相続人に渡される。","ko":"토큰 보유자가 집행자를 지정하는 온체인 \"유언\"을 쓸 수 있게 하는 표준 인터페이스. 보유자가 사망하면 대기 기간 후 토큰이 상속인에게 넘어간다.","zh":"一种标准接口，让代币持有者可以在链上写下指定执行人的\"遗嘱\"，这样持有者去世后，经过一段等待期，其代币即可转给继承人。"},"tags":["token","inheritance","nft","interface"],"explainers":{"en":{"lang":"en","tldr":"A standard interface that lets token holders write an on-chain \"Will\" naming executors, so their tokens can be passed to an heir after a waiting period once they die.","tags":["token","inheritance","nft","interface"],"related":[20,721,1155,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7878/","markdown":"## What problem does it solve?\n\nTokens, and NFTs representing real-world assets in particular, have no standard way to be inherited. If the owner dies without having shared their keys, the assets are simply lost; if they did share their keys, anyone holding them can move the assets at any time.\n\nERC-7878 defines a small \"Bequeathable\" interface that mirrors how a real-world Will works: the owner names executors in advance, an executor announces the death, a waiting period gives everyone time to object, and then the tokens move to the named heir. It can be added to [ERC-20](/eip-20/), [ERC-721](/eip-721/) or [ERC-1155](/eip-1155/) contracts without changing their core behaviour.\n\n## How it works\n\nThe interface has six functions and two events:\n\n| Function | Purpose |\n| --- | --- |\n| `setWill(executors, moratoriumTTL)` | Owner names one or more executors and a waiting period in seconds. Calling it again overwrites the previous Will. |\n| `getWill(owner)` | Lets the owner check what they set |\n| `announceObit(owner, inheritor)` | An executor starts the process and names the address that will receive the tokens. Emits `ObituaryStarted`. |\n| `cancelObit(owner)` | Any executor (or the owner, if still alive) cancels the process. Emits `ObituaryCancelled`. |\n| `getObit(owner)` | Returns the named inheritor and the time left; a negative value means the wait is over |\n| `bequeath(owner)` | After the waiting period, transfers the tokens to the inheritor |\n\nThe flow is:\n\n1. The owner calls `setWill` while alive.\n2. After death, one executor calls `announceObit`, naming the inheritor.\n3. The `moratoriumTTL` clock runs. During this window any executor can call `cancelObit`, for example if there is a dispute. The dispute can be settled off-chain and the process restarted later.\n4. Once the window has passed, `bequeath` moves the tokens.\n\nTo keep the interface simple, all tokens go to a single inheritor address. Splitting them among several heirs is that person's job afterwards.\n\n## Sample code\n\nThe interface as defined in the standard:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.0;\n\ninterface Bequeathable {\n    event ObituaryStarted(address indexed owner, address indexed inheritor);\n    event ObituaryCancelled(address indexed owner, address indexed cancelledBy);\n\n    function setWill(address[] memory executors, uint256 moratoriumTTL) external;\n    function getWill(address owner) external view returns (address[] memory executors, uint256 moratoriumTTL);\n    function announceObit(address owner, address inheritor) external;\n    function cancelObit(address owner) external;\n    function getObit(address owner) external view returns (address inheritor, int256 moratoriumTTL);\n    function bequeath(address owner) external;\n}\n```\n\nSetting up a Will with a 30-day waiting period (ethers v6):\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst token = new Contract(tokenAddress, [\n  \"function setWill(address[] executors, uint256 moratoriumTTL)\",\n  \"function getObit(address owner) view returns (address inheritor, int256 moratoriumTTL)\",\n], signer);\n\nawait (await token.setWill([lawyer, spouse], 30n * 24n * 60n * 60n)).wait();\n```\n\n## Things to know\n\n- The standard is marked Final.\n- It only defines the interface. Access control (who may call `announceObit`, `cancelObit` and `bequeath`) is left to the implementer and must be done carefully.\n- The authors recommend a waiting period of at least 30 days, especially for valuable tokens. It limits the damage if an executor's wallet is compromised and someone starts the process falsely.\n- Any single executor can both start and cancel the process, so choose executors you trust.\n- The contract cannot verify a death. It relies entirely on executors acting honestly, with the waiting period as the safety net.\n- Each token contract keeps its own Will, so an owner with many tokens must set one per contract.\n"},"ja":{"lang":"ja","tldr":"トークン保有者が執行者を指名するオンチェーンの「遺言」を書けるようにする標準インターフェース。保有者の死後、待機期間を経てトークンが相続人に渡される。","tags":["token","inheritance","nft","interface"],"related":[20,721,1155,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7878/","markdown":"## 何を解決するのか\n\nトークン、とくに現実世界の資産を表す NFT には、相続するための標準的な方法がありません。所有者が鍵を共有しないまま亡くなれば、資産は単に失われます。鍵を共有していた場合は、それを持つ誰もがいつでも資産を動かせてしまいます。\n\nERC-7878 は、現実世界の遺言の仕組みを映した小さな「Bequeathable」インターフェースを定義します。所有者があらかじめ執行者を指名し、執行者が死亡を通知し、全員が異議を唱えられるよう待機期間が置かれ、その後トークンが指名された相続人に移ります。[ERC-20](/eip-20/)、[ERC-721](/eip-721/)、[ERC-1155](/eip-1155/) のコントラクトに、その中核の挙動を変えずに追加できます。\n\n## 仕組み\n\nこのインターフェースには 6 つの関数と 2 つのイベントがあります。\n\n| 関数 | 役割 |\n| --- | --- |\n| `setWill(executors, moratoriumTTL)` | 所有者が 1 人以上の執行者と、秒単位の待機期間を指名します。再度呼び出すと以前の遺言を上書きします。 |\n| `getWill(owner)` | 所有者が設定した内容を確認できます |\n| `announceObit(owner, inheritor)` | 執行者がプロセスを開始し、トークンを受け取るアドレスを指名します。`ObituaryStarted` を emit します。 |\n| `cancelObit(owner)` | 任意の執行者（所有者がまだ生きていれば所有者）がプロセスをキャンセルします。`ObituaryCancelled` を emit します。 |\n| `getObit(owner)` | 指名された相続人と残り時間を返します。負の値は待機が終わったことを意味します |\n| `bequeath(owner)` | 待機期間の後、トークンを相続人に転送します |\n\n流れは次のとおりです。\n\n1. 所有者が生きているうちに `setWill` を呼び出します。\n2. 死後、執行者の 1 人が `announceObit` を呼び出し、相続人を指名します。\n3. `moratoriumTTL` のタイマーが進みます。この期間中、たとえば争いがある場合などに、どの執行者も `cancelObit` を呼び出せます。争いはオフチェーンで解決でき、後でプロセスを再開できます。\n4. 期間が過ぎると、`bequeath` がトークンを移動します。\n\nインターフェースを単純に保つため、すべてのトークンは単一の相続人アドレスに送られます。複数の相続人に分けるのは、その後その人の仕事です。\n\n## サンプルコード\n\n標準で定義されているインターフェース:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.0;\n\ninterface Bequeathable {\n    event ObituaryStarted(address indexed owner, address indexed inheritor);\n    event ObituaryCancelled(address indexed owner, address indexed cancelledBy);\n\n    function setWill(address[] memory executors, uint256 moratoriumTTL) external;\n    function getWill(address owner) external view returns (address[] memory executors, uint256 moratoriumTTL);\n    function announceObit(address owner, address inheritor) external;\n    function cancelObit(address owner) external;\n    function getObit(address owner) external view returns (address inheritor, int256 moratoriumTTL);\n    function bequeath(address owner) external;\n}\n```\n\n30 日間の待機期間付きで遺言を設定する例（ethers v6）:\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst token = new Contract(tokenAddress, [\n  \"function setWill(address[] executors, uint256 moratoriumTTL)\",\n  \"function getObit(address owner) view returns (address inheritor, int256 moratoriumTTL)\",\n], signer);\n\nawait (await token.setWill([lawyer, spouse], 30n * 24n * 60n * 60n)).wait();\n```\n\n## 知っておくべきこと\n\n- この標準は Final とされています。\n- 定義されているのはインターフェースだけです。アクセス制御（誰が `announceObit`、`cancelObit`、`bequeath` を呼び出せるか）は実装者に委ねられており、慎重に行う必要があります。\n- 著者らは、とくに価値の高いトークンについて、少なくとも 30 日の待機期間を推奨しています。執行者のウォレットが侵害されて誰かが偽ってプロセスを開始した場合の被害を抑えられるためです。\n- 単独の執行者が、プロセスの開始とキャンセルの両方を行えるため、信頼できる執行者を選んでください。\n- コントラクトは死亡を検証できません。執行者が誠実に行動することに完全に依存しており、待機期間がセーフティネットです。\n- 各トークンコントラクトがそれぞれ遺言を保持するため、多くのトークンを持つ所有者はコントラクトごとに 1 つ設定する必要があります。\n"},"ko":{"lang":"ko","tldr":"토큰 보유자가 집행자를 지정하는 온체인 \"유언\"을 쓸 수 있게 하는 표준 인터페이스. 보유자가 사망하면 대기 기간 후 토큰이 상속인에게 넘어간다.","tags":["token","inheritance","nft","interface"],"related":[20,721,1155,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7878/","markdown":"## 어떤 문제를 해결하나요?\n\n토큰, 특히 현실 세계 자산을 나타내는 NFT에는 상속을 위한 표준적인 방법이 없습니다. 소유자가 키를 공유하지 않은 채 사망하면 자산은 그냥 사라지고, 키를 공유했다면 그 키를 가진 누구나 언제든 자산을 옮길 수 있습니다.\n\nERC-7878은 현실 세계의 유언이 작동하는 방식을 본뜬 작은 \"Bequeathable\" 인터페이스를 정의합니다. 소유자가 미리 집행자를 지정하고, 집행자가 사망을 알리고, 모두가 이의를 제기할 시간을 주는 대기 기간이 지난 뒤, 토큰이 지정된 상속인에게 이동합니다. [ERC-20](/eip-20/), [ERC-721](/eip-721/), [ERC-1155](/eip-1155/) 컨트랙트에 핵심 동작을 바꾸지 않고 추가할 수 있습니다.\n\n## 어떻게 동작하나요?\n\n이 인터페이스에는 함수 6개와 이벤트 2개가 있습니다.\n\n| 함수 | 역할 |\n| --- | --- |\n| `setWill(executors, moratoriumTTL)` | 소유자가 집행자 한 명 이상과 초 단위 대기 기간을 지정합니다. 다시 호출하면 이전 유언을 덮어씁니다. |\n| `getWill(owner)` | 소유자가 설정한 내용을 확인할 수 있게 합니다 |\n| `announceObit(owner, inheritor)` | 집행자가 절차를 시작하고 토큰을 받을 주소를 지정합니다. `ObituaryStarted`를 emit합니다. |\n| `cancelObit(owner)` | 어떤 집행자든(또는 아직 살아 있다면 소유자가) 절차를 취소합니다. `ObituaryCancelled`를 emit합니다. |\n| `getObit(owner)` | 지정된 상속인과 남은 시간을 반환합니다. 음수 값은 대기가 끝났다는 뜻입니다 |\n| `bequeath(owner)` | 대기 기간이 지난 뒤 토큰을 상속인에게 전송합니다 |\n\n흐름은 다음과 같습니다.\n\n1. 소유자가 살아 있을 때 `setWill`을 호출합니다.\n2. 사망 후 집행자 한 명이 `announceObit`을 호출해 상속인을 지정합니다.\n3. `moratoriumTTL` 타이머가 흐릅니다. 이 기간 동안 분쟁이 있는 경우 등에 어떤 집행자든 `cancelObit`을 호출할 수 있습니다. 분쟁은 오프체인에서 해결하고 나중에 절차를 다시 시작할 수 있습니다.\n4. 기간이 지나면 `bequeath`가 토큰을 옮깁니다.\n\n인터페이스를 단순하게 유지하기 위해 모든 토큰은 하나의 상속인 주소로 갑니다. 여러 상속인에게 나누는 일은 이후 그 사람의 몫입니다.\n\n## 샘플 코드\n\n표준에 정의된 인터페이스:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.0;\n\ninterface Bequeathable {\n    event ObituaryStarted(address indexed owner, address indexed inheritor);\n    event ObituaryCancelled(address indexed owner, address indexed cancelledBy);\n\n    function setWill(address[] memory executors, uint256 moratoriumTTL) external;\n    function getWill(address owner) external view returns (address[] memory executors, uint256 moratoriumTTL);\n    function announceObit(address owner, address inheritor) external;\n    function cancelObit(address owner) external;\n    function getObit(address owner) external view returns (address inheritor, int256 moratoriumTTL);\n    function bequeath(address owner) external;\n}\n```\n\n30일 대기 기간으로 유언 설정하기(ethers v6):\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst token = new Contract(tokenAddress, [\n  \"function setWill(address[] executors, uint256 moratoriumTTL)\",\n  \"function getObit(address owner) view returns (address inheritor, int256 moratoriumTTL)\",\n], signer);\n\nawait (await token.setWill([lawyer, spouse], 30n * 24n * 60n * 60n)).wait();\n```\n\n## 알아둘 점\n\n- 이 표준은 Final로 표시되어 있습니다.\n- 인터페이스만 정의합니다. 접근 제어(누가 `announceObit`, `cancelObit`, `bequeath`를 호출할 수 있는지)는 구현자에게 맡겨져 있으며 신중하게 해야 합니다.\n- 저자들은 특히 가치가 큰 토큰에 대해 최소 30일의 대기 기간을 권장합니다. 집행자의 지갑이 탈취되어 누군가 거짓으로 절차를 시작하더라도 피해를 줄일 수 있습니다.\n- 집행자 한 명이 절차를 시작하는 것도 취소하는 것도 할 수 있으므로, 신뢰할 수 있는 집행자를 고르세요.\n- 컨트랙트는 사망을 검증할 수 없습니다. 집행자가 정직하게 행동하는 것에 전적으로 의존하며, 대기 기간이 안전망입니다.\n- 각 토큰 컨트랙트가 자기 유언을 따로 보관하므로, 토큰을 많이 가진 소유자는 컨트랙트마다 하나씩 설정해야 합니다.\n"},"zh":{"lang":"zh","tldr":"一种标准接口，让代币持有者可以在链上写下指定执行人的\"遗嘱\"，这样持有者去世后，经过一段等待期，其代币即可转给继承人。","tags":["token","inheritance","nft","interface"],"related":[20,721,1155,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7878/","markdown":"## 它解决什么问题？\n\n代币，尤其是代表现实世界资产的 NFT，没有标准的继承方式。如果所有者在没有分享密钥的情况下去世，资产就会直接丢失；如果他分享过密钥，持有密钥的任何人都可以随时转移这些资产。\n\nERC-7878 定义了一个小型的 \"Bequeathable\" 接口，仿照现实世界中遗嘱的运作方式：所有者提前指定执行人，由执行人宣告死亡，设置一段等待期让所有人有时间提出异议，然后代币转给指定的继承人。它可以添加到 [ERC-20](/eip-20/)、[ERC-721](/eip-721/) 或 [ERC-1155](/eip-1155/) 合约中，而不改变其核心行为。\n\n## 它如何运作\n\n该接口有六个函数和两个事件：\n\n| 函数 | 用途 |\n| --- | --- |\n| `setWill(executors, moratoriumTTL)` | 所有者指定一个或多个执行人以及以秒为单位的等待期。再次调用会覆盖之前的遗嘱。 |\n| `getWill(owner)` | 让所有者查看自己设置的内容 |\n| `announceObit(owner, inheritor)` | 执行人启动流程，并指定接收代币的地址。触发 `ObituaryStarted`。 |\n| `cancelObit(owner)` | 任何执行人（或仍然在世的所有者）取消该流程。触发 `ObituaryCancelled`。 |\n| `getObit(owner)` | 返回指定的继承人和剩余时间；负值表示等待已结束 |\n| `bequeath(owner)` | 等待期结束后，把代币转给继承人 |\n\n流程如下：\n\n1. 所有者在世时调用 `setWill`。\n2. 去世后，一位执行人调用 `announceObit`，指定继承人。\n3. `moratoriumTTL` 计时开始。在这段期间内，任何执行人都可以调用 `cancelObit`，例如出现争议时。争议可以在链下解决，之后再重新启动流程。\n4. 等待期结束后，`bequeath` 转移代币。\n\n为保持接口简单，所有代币都转给单一的继承人地址。在多个继承人之间分配，是此后该继承人自己的事。\n\n## 示例代码\n\n标准中定义的接口：\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.0;\n\ninterface Bequeathable {\n    event ObituaryStarted(address indexed owner, address indexed inheritor);\n    event ObituaryCancelled(address indexed owner, address indexed cancelledBy);\n\n    function setWill(address[] memory executors, uint256 moratoriumTTL) external;\n    function getWill(address owner) external view returns (address[] memory executors, uint256 moratoriumTTL);\n    function announceObit(address owner, address inheritor) external;\n    function cancelObit(address owner) external;\n    function getObit(address owner) external view returns (address inheritor, int256 moratoriumTTL);\n    function bequeath(address owner) external;\n}\n```\n\n设置一份等待期为 30 天的遗嘱（ethers v6）：\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst token = new Contract(tokenAddress, [\n  \"function setWill(address[] executors, uint256 moratoriumTTL)\",\n  \"function getObit(address owner) view returns (address inheritor, int256 moratoriumTTL)\",\n], signer);\n\nawait (await token.setWill([lawyer, spouse], 30n * 24n * 60n * 60n)).wait();\n```\n\n## 需要注意\n\n- 该标准被标记为 Final。\n- 它只定义接口。访问控制（谁可以调用 `announceObit`、`cancelObit` 和 `bequeath`）留给实现者，必须谨慎处理。\n- 作者建议等待期至少为 30 天，对价值较高的代币尤其如此。如果某位执行人的钱包被攻破而有人虚假地启动流程，等待期可以限制损失。\n- 任何单个执行人既可以启动也可以取消该流程，因此请选择你信任的执行人。\n- 合约无法验证死亡。它完全依赖执行人诚实行事，等待期是安全网。\n- 每个代币合约各自保存自己的遗嘱，因此拥有多种代币的所有者必须为每个合约各设置一份。\n"}}}
