Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add self-destruct functionality to the DAO #63

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

ctindogaru
Copy link
Collaborator

@ctindogaru ctindogaru commented Nov 24, 2021

The self-destruct is triggered if the DAO is inactive for too long.

This PR tries to address #39

After this PR gets merged, we should register the following job to croncat:
near call cron.in.testnet create_task '{"contract_id": "sputnik_dao_factory.in.testnet","function_id": "check_daos_activity","cadence": "0 0 * * * *","recurring": true,"deposit": 0,"gas": 30000000000000}' --accountId funds_account.testnet --amount 10
We made the assumption that sputnik_dao_factory.in.testnet is the account where the sputnik factory is deployed and funds_account.testnet is the account that pays for the gas fees necessary to run the cron job each time.

This cron job will run each day at 00:00 and it will check for all the inactive DAOs. If inactive DAO is fund, the funds locked in the DAO (except the funds used for storage) are transferred to the dedicated account.

@ctindogaru
Copy link
Collaborator Author

@mikedotexe

@ctindogaru
Copy link
Collaborator Author

@ilblackdragon this is just a draft, but let me know if this is what you want! The TBD in the code needs your attention in particular.

@ctindogaru
Copy link
Collaborator Author

Added unit tests + simulation tests. This PR is ready to be reviewed. @mikedotexe @ilblackdragon

@ctindogaru
Copy link
Collaborator Author

This PR includes the changes in #68

@TrevorJTClarke TrevorJTClarke added C-discussion Category: Discussion, leading to research or enhancement T-OutOfScope Type: Out of scope of core design, requires different approach labels Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-discussion Category: Discussion, leading to research or enhancement T-OutOfScope Type: Out of scope of core design, requires different approach
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants