Skip to content

Delayed recovery tool for ERC20, ERC721 and ERC1155 tokens.

License

Notifications You must be signed in to change notification settings

DimaKush/SimpleWill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Will contract

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.

Installation

  1. Install Brownie.

  2. Clone this repo

    git clone https://github.com/DimaKush/SimpleWill
    cd SimpleWill
    
  3. 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'.

Usage

  1. 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
  2. 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.

  3. 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')

Configuring

Configure settings at 'brownie-config.yaml'

Testing

To run the test suite:

brownie test

Resources

Brownie documentation

"Getting Started with Brownie"

Patrick Collins tutorial on youtube

Brownie Mixes

OpenZeppelin docs

License

Distributed under the MIT License