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

sputnikdao-factory2 add function to delete the empty DAO (without proposals) #20

Open
AngelBlock opened this issue Jun 11, 2021 · 3 comments
Labels
C-discussion Category: Discussion, leading to research or enhancement C-Enhancement Category: An issue proposing an enhancement or a PR with one. C-Testing Unit testing / integration testing P-Low Priority: Low

Comments

@AngelBlock
Copy link
Contributor

Re: https://github.com/near-daos/sputnik-dao-contract/tree/main/sputnikdao-factory2

Looking for opinion.

Proposal: to add a factory function call to remove an empty DAO from the state (list), and refund the amount to the creator.

There are few DAOs which created with failed call (our of GAS for instance) or deleted off-contract by using full access key, to avoid clogging of DAO list.

@ilblackdragon
Copy link
Collaborator

v2 factory should not be creating DAOs with failed calls anymore.
The main problem with this kind of deletion is how to check that DAO is indeed empty. And also who to allow to do this.

Alternative, we can allow Genesis DAO to moderate the list for example, given that list is mostly just for convenience usage anyway.

If DAO needs to be deleted, it can be done now via SelfUpgrade proposal to a contract that would remove things.

@mikedotexe
Copy link
Contributor

Want to point out that you can also add a public key to a DAO, meaning a person can delete that account later.

near call $CONTRACT_ID create '{"name": "genesis", "public_key": "ed25519:CexEjoGcVgb1we3aAwo8o4nZ211p1rnUaoQydHTs9mLo", "args": "$ARGS"}' --accountId $CONTRACT_ID --amount 5 --gas 150000000000000

Perhaps this is something I can explore more later, as we might need to modify the state of the factory, adding a ping function or something to "refresh" them. Not sure of a great way to do this… My first thought would be to send 1 yoctoNEAR to the account we think should still exist and have a callback seeing if that failed.

@AngelBlock
Copy link
Contributor Author

Want to point out that you can also add a public key to a DAO, meaning a person can delete that account later.

near call $CONTRACT_ID create '{"name": "genesis", "public_key": "ed25519:CexEjoGcVgb1we3aAwo8o4nZ211p1rnUaoQydHTs9mLo", "args": "$ARGS"}' --accountId $CONTRACT_ID --amount 5 --gas 150000000000000

Perhaps this is something I can explore more later, as we might need to modify the state of the factory, adding a ping function or something to "refresh" them. Not sure of a great way to do this… My first thought would be to send 1 yoctoNEAR to the account we think should still exist and have a callback seeing if that failed.

This is one of the cases why I was proposing the DAO deletion mechanism. When DAO is deleted with full access key, it will still remain in the factory state as a reference, and will be returned by getter function, if this is not handled properly on UI it will break it.

@starpause starpause added this to the Release 3 milestone Dec 27, 2021
@starpause starpause removed this from the Release 3 milestone Jan 11, 2022
@TrevorJTClarke TrevorJTClarke added C-discussion Category: Discussion, leading to research or enhancement C-Enhancement Category: An issue proposing an enhancement or a PR with one. C-Testing Unit testing / integration testing P-Low Priority: Low 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 C-Enhancement Category: An issue proposing an enhancement or a PR with one. C-Testing Unit testing / integration testing P-Low Priority: Low
Projects
Status: No status
Development

No branches or pull requests

5 participants