Giter Club home page Giter Club logo

aragon-recovery-plugin's Introduction

Aragon Recovery Plugin

This plugin is designed to facilitate recovery processes within a decentralized autonomous organization (DAO) using the Aragon framework. The contract allows for the initiation of a recovery process, vetoing the recovery during a specified period, and finalizing the recovery by executing a set of predefined actions on the DAO.

Overview

The RecoveryPlugin contract extends the PluginCloneable contract from the Aragon framework and introduces recovery-related functionality. The key features of the contract include:

  • Recovery Initiation: Any user can initiate the recovery process by calling the startRecovery function.

  • Vetoing the Recovery: During a specified veto period, users with the VETO_RECOVERY_PERMISSION_ID are authorized to veto the recovery process, resetting the recovery if successful.

  • Setting Actions: After the veto period or if the veto is unsuccessful, users can set a series of actions to be executed on the DAO by calling the setActions function.

  • Finalizing the Recovery: Users can call the finalizeRecovery function to execute the set actions on the DAO after the veto period.

Contract Structure

The contract is structured as follows:

  • Initialization: The contract is initialized with a reference to the DAO, veto duration, and initial set of actions.

  • Recovery Start: The recovery process is initiated using the startRecovery function.

  • Vetoing the Recovery: Users with the appropriate permission can veto the recovery using the vetoRecovery function during the specified veto period.

  • Setting Actions: Users can set the actions to be executed during the recovery process using the setActions function.

  • Finalizing the Recovery: After the veto period, users can finalize the recovery by calling the finalizeRecovery function, which executes the predefined actions on the DAO.

Permissions

The contract relies on Aragon's permission system, and the following permissions are utilized:

  • VETO_RECOVERY_PERMISSION_ID: Permission required to veto the recovery process during the specified period.

  • UPDATE_ACTIONS_ID: Permission required to update the set of actions to be executed during the recovery process.

  • UPDATE_VETO_PERIOD_ID: Permission required to update the duration of the veto period.

Flowchart

flowchart LR
    Start --> startRecovery
    startRecovery --> startVetoPeriod
    startVetoPeriod{Is vetoed} -- Yes --> reset
    startVetoPeriod{Is vetoed} -- No --> executeActions
    executeActions --> Stop

License

This contract is licensed under the UNLICENSED license. See the LICENSE file for details.

Disclaimer

This contract is provided as-is without any warranties. Use it at your own risk, and thoroughly test it in a safe environment before deploying to a live network.

Feel free to contribute, report issues, or suggest improvements by creating an issue or pull request.

Happy coding!

aragon-recovery-plugin's People

Contributors

mathewmeconry avatar

Watchers

 avatar  avatar

Forkers

dashbaord202401

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.