{"id":47885780,"url":"https://github.com/blockful/deadman-switch-safe","last_synced_at":"2026-04-04T02:16:06.097Z","repository":{"id":341298543,"uuid":"1169682271","full_name":"blockful/deadman-switch-safe","owner":"blockful","description":"Dead man's switch module for Safe. Transfers ownership to an heir after prolonged inactivity.","archived":false,"fork":false,"pushed_at":"2026-03-01T03:32:37.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-01T03:34:02.448Z","etag":null,"topics":["dead-man-switch","ethereum","foundry","gnosis-safe","safe","smart-contracts","solidity"],"latest_commit_sha":null,"homepage":null,"language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blockful.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-01T03:30:42.000Z","updated_at":"2026-03-01T03:32:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/blockful/deadman-switch-safe","commit_stats":null,"previous_names":["blockful/deadman-switch-safe"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/blockful/deadman-switch-safe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockful%2Fdeadman-switch-safe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockful%2Fdeadman-switch-safe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockful%2Fdeadman-switch-safe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockful%2Fdeadman-switch-safe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blockful","download_url":"https://codeload.github.com/blockful/deadman-switch-safe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockful%2Fdeadman-switch-safe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31384925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T01:22:39.193Z","status":"online","status_checked_at":"2026-04-04T02:00:07.569Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dead-man-switch","ethereum","foundry","gnosis-safe","safe","smart-contracts","solidity"],"created_at":"2026-04-04T02:16:03.337Z","updated_at":"2026-04-04T02:16:06.079Z","avatar_url":"https://github.com/blockful.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dead Man's Switch for Safe\n\nDesignate an heir for your [Safe](https://safe.global). If the Safe owners stop signing transactions for a configurable period, the heir can claim full ownership.\n\n```\n  Safe owners sign transactions as usual\n        (proof of life / check-in)\n                    |\n                    v\n       +------------------------+\n       |     DeadManSwitch      |\n       |    (module + guard)    |\n       +------------------------+\n       |  checkAfterExecution() |-----\u003e resets inactivity timer\n       +------------------------+\n                    |\n                    | delay passes with no activity\n                    v\n       +------------------------+\n       |  heir: triggerTakeover |\n       +------------------------+\n                    |\n                    v\n       Safe now has 1 owner: heir\n       (threshold = 1, module paused)\n```\n\n## How It Works\n\nA single contract acts as both a Safe **module** and **guard**:\n\n- **Guard** -- `checkAfterExecution` resets the timer after every `execTransaction` call. Only direct Safe transactions reset the timer -- calls from other modules (`execTransactionFromModule`) bypass the guard and do **not** count as activity.\n- **Module** -- `triggerTakeover` uses `execTransactionFromModule` to remove all existing owners and make the heir the sole owner.\n- **Manual check-in** -- Safe owners can call `ping()` via a Safe transaction to reset the timer without performing any other action. Useful if other modules are enabled whose activity won't be detected by the guard.\n\nDeployed as **ERC-1167 minimal proxies** via `DeadManSwitchFactory` for cheap, deterministic per-Safe clones.\n\n## Setup\n\nAfter deploying a clone through the factory, execute **2 Safe transactions**:\n\n```\nsafe.enableModule(deadManSwitch)\nsafe.setGuard(deadManSwitch)\n```\n\n## Build \u0026 Test\n\n```bash\nforge build\nforge test -vvv\nforge test -vvv --fork-url $RPC_URL   # fork tests against mainnet Safe\n```\n\n## Deployment\n\n```bash\n# 1. Deploy factory (once per network)\nforge script script/DeployFactory.s.sol --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast\n\n# 2. Create clone for your Safe\nFACTORY_ADDRESS=0x... SAFE_ADDRESS=0x... HEIR_ADDRESS=0x... DELAY_SECONDS=2592000 \\\n  forge script script/DeployDeadManSwitch.s.sol --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockful%2Fdeadman-switch-safe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockful%2Fdeadman-switch-safe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockful%2Fdeadman-switch-safe/lists"}