Delayed recovery tool for ERC20, ERC721 and ERC1155 tokens. Smart contract is used as a will: deployer of contract allow tokens to SimpleWill that can be tranfered from deployer to beneficiary only after release time. Deployer should extend release time to prove his access to account. When release time is passed, anybody can call release functions to proceed wills logic.
-
Clone this repo
git clone https://github.com/DimaKush/SimpleWill cd SimpleWill
-
If you want to deploy on testnets, do the following.
Set our environment variables to a .env file. You can use the .env_example in this repo as a template, just fill in the values and rename it to '.env'.
-
Open the Brownie console. Starting the console launches a fresh Ganache instance in the background.
brownie console
Alternatively, to run on Goeri, set the network flag to goerli
brownie console --network goerli
-
Run the deployment script to deploy the project's smart contracts using Brownie console:
run("deploy_SimpleWill")
Or in terminal:
brownie run deploy_SimpleWill --network goerli
Replace
goerli
with the name of the network you wish you use. You may also wish to adjust Brownie's network settings. -
Interact with the smart contract using Brownie console:
# set new release time SimpleWill[-1].setNewReleaseTime(1661455347, {'from': accounts[0]}) # see workflow run('deploy_and_release_SimpleWill')
Configure settings at 'brownie-config.yaml'
To run the test suite:
brownie test
"Getting Started with Brownie"
Patrick Collins tutorial on youtube
Distributed under the MIT License