arc
arc copied to clipboard
add method that returns the organizationId given the avatar address
Two GenesisProtocol methods require an organizationId as an argument: threshold and getBoostedProposalsCount. However, the only way to obtain the organizationId is via getProposalOrganization which requires a proposalId. There should be a higher-level way to obtain the organizationId for a scheme.
The application should not be required to know how to compute the organizationId itself -- this would be extra unnecessary work for every application, extra documentation/training for Arc, and would cause duplication of internal contract logic that should be kept encapsulated within the contract.
It seems that if functions like threshold and getBoostedProposalsCount are now to be scoped to the organizationId, which is itself scoped to each scheme that is using the GP, then each scheme should expose a method that returns the organizationId.
Thus I propose that each proposal-generating scheme in Arc provide a method that returns the organizationId associated with it, given an avatar address as a singe argument.
This new method would be a part of IntVoteInterface and would be implemented in infra by GenesisProtocol and AbsoluteVote.
It should and can be done on the client side.
I would agree that the client should compute the id if the client were responsible for creating the id, but it isn't, AV and GP are. Why do you think the client "should" be responsible, given the arguments I've made to the contrary above?