- A well-known problem for cryptocurrency holders is that all funds are lost if the owner is incapacitated and has not shared his/her private key with anyone else.
- A smart contract that will send all of its balance to a pre-set address if the owner of that contract has not called a still_alive function on the contract in the last 10 blocks.
Design, write and deploy a deadman’s switch to goerli
The contract has a public function called check_alive() which can be called to check whether the owner is incapacitated, if conditions are met, the balance is transfered to the beneficiary.
![Screenshot 2023-09-16 at 11 12 24 PM](https://private-user-images.githubusercontent.com/97678842/268462984-30bb05c9-62ee-4912-b41f-e89daed2c611.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwNjQ3NTcsIm5iZiI6MTcyNTA2NDQ1NywicGF0aCI6Ii85NzY3ODg0Mi8yNjg0NjI5ODQtMzBiYjA1YzktNjJlZS00OTEyLWI0MWYtZTg5ZGFlZDJjNjExLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDAwMzQxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThhNmIzOWMzZWEyYjJmNWFiYjI2NmYxZThjM2Y1YTNjYjY0OTc3YzkzMzgzN2E3NGNmYWVlZjczZDJhOGZlODMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.RbgOsNuSDBDmbpwQqSis4D1x-Q_dPLBpFeFLrOgpKDU)