Situation: users are adding new data to my smart contract storage. I want the token holders to do some censorship as a form of a DAO, for example, they can vote not to approve some data. Is there exists any kind of solution that I could integrate into my project?

Oct 18, 2020, 1:09 PM
If your contract is deployed already then its too late
Oct 18, 2020, 1:11 PM
no, it is still in development
Oct 18, 2020, 1:11 PM
What kind of data users are spamming into your smart contract?
Oct 18, 2020, 1:12 PM
I have an array of structs. Any user can call a function to push a new entry to this array. I want to apply some censhorship, so that DAO would be able to remove inappropriate entries
Oct 18, 2020, 1:14 PM
use roles.sol to create a role then a modifer to restrict access to addresses in an mapping(address => bool)
Oct 18, 2020, 1:18 PM
that's not exactly what I want. It is actually okay that everyone can call this function. I want DAO censorship just as a fallback in case someone uploads inappropriate content. DAO can vote to remove it.
Oct 18, 2020, 1:20 PM
same could be applied to a remove() function though
public add() function with a roles based remove() function
Oct 18, 2020, 1:21 PM
yes, I know that I can restrict calls to some functions. but what interests me is how to make it as a governance process. I mean let's suppose this function can be called by DAO but how do I collect enough votes to execute based on tokens balance
for example, if 25% of tokens are supporting this proposal, then invoke a remove() function
Oct 18, 2020, 1:24 PM

© 2024 Draquery.com All rights reserved.