Legacy Contracts Created with Safe SDK
A Safe wallet is a multi-signature smart account management tool on Ethereum that allows users to manage their crypto assets. A predefined number of private keys is required to sign off on any transaction, so no single person can execute a transaction without the consent of others.
Safe SDK is a software development kit that enables developers to integrate the Gnosis Safe's secure, multi-signature wallet functionality into their own applications.
10102's Digital Inheritance uses the following smart contracts for wills created using a Safe wallet:
Table of contents
Execute a transaction using Safe wallet
Set Guard and Module in Safe wallet
Create a new Safe Wallet:
Navigate to Safe account at: https://app.safe.global/new-safe/create
Connect wallet and fill the name of your Safe wallet and the network that you want to use.
Set the list of signers and set the minimum signature number of the safe wallet (threshold)
Sign and execute to create a new Safe account
Execute a transaction using Safe wallet:
In order to execute a transaction using a Safe wallet, the co-signers will have to sign the transaction and meet the minimum number of signatures set by the Safe wallet's owner.
Navigate to Safe account at: https://app.safe.global, click on new transaction and navigate to Transaction Builder
Fill in the address and ABI of the smart contract that you want to execute.
Sign and execute transaction. Once the transaction is executed, last timestamp will be updated into the safe guard contract.
Set Guard and Module in Safe wallet:
User can optionally customize Guard and Module in their Safe account following these steps:
Navigate to Safe account at: https://app.safe.global. Click on New transaction and navigate to Transaction Builder. Next, fill in your Safe wallet address and use Implementation ABI
Select method: setGuard and fill the guard address in the parameter. Next, click Add new transaction
Select method: enableModule and fill the will address in the parameter. Next, click Add new transaction, then sign and execute transaction
Safe Wallet contract will emit the ChangeGuard event. Subgraph will listen and update guard.
Safe Wallet contract will emit the EnableModule event. Supgraph will listen and update module.
Create a Legacy Contract
Once a user create a new legacy contract, Safe Guard and Safe Module are created.
Safe Guard and the Safe Module is attached to the owner's Safe wallet. Last activity's timestamp of the contract owner is initialized into Safe Gguard.
The Router contract will emit WillCreated event. Subgraph will then listen and create a new entity.
Edit a Legacy Contract
Once the user edits the legacy contract, and after the co-signers of the Safe wallet sign and execute the transaction to edit the legacy contract, the contract is updated in Safe Module.
Router contract emit a new event for Subgraph to listen and update the contract with new information.
The last activity's timestamp is updated in Safe Guard.
Delete a Legacy Contract
From 10102's Digital Inheritance frontend, the owner can delete a legacy contract. After the co-signers of the Safe wallet sign and execute the transaction to delete the legacy contract, Safe Guard and Safe Module are removed from the owner's Safe wallet.
The owner can also delete a legacy contract through their Safe account at https://app.safe.global following these steps:
Click on New transaction and navigate to Transaction Builder. Next, fill in the Safe wallet address and use Implementation ABI.
Select method as setGuard and fill in the guard address: 0x0 into parameter. Next, click on Add new transaction.
Select method: DisableModule and fill the will address in the parameter. Next, click on Add new transaction, then sign and execute transaction
Safe Wallet contract will emit the ChangeGuard event. Subgraph will listen and update guard
Safe Wallet contract will emit the DisableModule event. Supgraph will listen and update the will status to deleted.
Activate a Legacy Contract
When a beneficiary check the legacy contract's status, a function checks whether the legacy contract can be activated. If not enough time (as specified by the will) has passed since the last outgoing transaction, the contract can’t be activated.
Once the specified time has elapsed, the legacy contract can be activated by one of the beneficiaries.
Multisig Legacy
When a Multisig Legacy Contract is activated, the listed beneficiaries will be added as new co-signers of the Safe wallet via the AddOwner transaction.
The minimum number of signatures required to execute a transaction in the Safe wallet is updated to the number set by the owner in the legacy contract via ChangeThreshold event.
Legacy contract will emit AddOwner event and ChangeThreshold event. Subgraph will listen and update the list of owners of the Safe wallet, the updated threshold (minimum number of signatures required) and the legacy contract's status to activated.
Transfer Legacy
When a Transfer Legacy Contract is activated, the amount of ETH and ERC-20 tokens in the Safe wallet will be transferred to the beneficiaries' addresses based on pre-defined allocations.
The legacy contract will emit a new event. Subgraph will listen and update the contract's status to activated.
Last updated
