Closed n13 closed 2 years ago
@n13 hello, in dao.seeds the voice scopes are defined inside the contract as constants.
There is a vector of scopes, the functions: updatevoice
, decayvoice
, delegate
, undelegate
, changetrust
and in general all the voice methods use that vector of voice scopes, so we would only have to add "cats" to that vector and it will work as the rest of scopes.
I am not quite sure a table is needed in this case (instead of a vector in the contract), I mean a table would allow you to add scopes without having to recompile the contract, but adding a new proposal type would require to recompile the contract anyways. Well maybe if the voice scopes vector becomes so big then a table would be better.
In the case of removal, it would be the same.
The problem is that for both cases, the changes will take effect in the next cycle, or better saying, they will take effect the next time updatevoice
is called:
updatevoice
will create itupdatevoice
won't update it anymore but currently it won't explicitly remove it from the usersSo I think another action to delete a scope from the voice table for all the users has to be added to ensure the old scope being removed completely.
Hello @n13, I just need some confirmation:
Hello @n13, I just need some confirmation:
- Would you like the vector of scopes change for a table?
No, I think hard coded list is fine! Agree with you.
- When you add the scope "cats", is it ok if the contract gives the scope to the users in the next period? or better to see the change immediately
Next period is OK.
Depending... if it's super easy to add to this period it would be cooler - but I am unsure there is going to be a real world use case for this. Maybe we can have an action that "enables" a voice scope meaning it checks if that voice scope exists, and if it doesn't it goes and creates it and populates it with voice value.
The question I have is, does that require a lot of new code? If so then let's not do it. But if we already have a helper method to populate votes mid cycle then we could di that.
Anyway - if it takes more effort, then let's say for now, just wait for the next period. I think that's fine.
I have a feeling it would add quite a bit of complexity to figure out depreciation etc.
- I would need to add another function to erase the remaining of the erased voice scope, is that ok?
Yes, that sounds like a very good idea.
Use case
Use case 2
Just want to make sure that this is easily possible.