-
Notifications
You must be signed in to change notification settings - Fork 81
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
ctindogaru
wants to merge
22
commits into
near-daos:main
Choose a base branch
from
ctindogaru:auto-kill-time
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ctindogaru
force-pushed
the
auto-kill-time
branch
from
November 24, 2021 19:59
8165282
to
58a98e9
Compare
@ilblackdragon this is just a draft, but let me know if this is what you want! The |
ctindogaru
force-pushed
the
auto-kill-time
branch
from
November 25, 2021 16:11
58fa740
to
6bf2260
Compare
Added unit tests + simulation tests. This PR is ready to be reviewed. @mikedotexe @ilblackdragon |
ctindogaru
force-pushed
the
auto-kill-time
branch
from
November 26, 2021 08:06
8413587
to
b50d89a
Compare
ctindogaru
force-pushed
the
auto-kill-time
branch
from
November 26, 2021 08:41
726047c
to
e66863c
Compare
This PR includes the changes in #68 |
ctindogaru
force-pushed
the
auto-kill-time
branch
from
December 8, 2021 12:35
4c7df05
to
d29c061
Compare
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 andfunds_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.