Closed dkent600 closed 6 years ago
GenesisProtocol.organizations tells nothing about the creator of the proposal. Though you can have the organisation the proposal belong to via the events.
@orenyodfat
GenesisProtocol.organizations
returns the avatar for proposals created by schemes. This is what we want. Is there any reason not to make this public?
because it is not needed .
I think you are saying that applications can fetch an event on the proposal and obtain the avatar from the event arguments. It would seem a lot more performant for the application to make organizations
public, and trivial to implement in infra. Is there a reason not to expose this bit of implementation?
GenesisProtocol.organizations
should be public. We should be able to discover the creator of a proposal given the proposal's organizationId.Suppose I have a proposalId. I can obtain the proposal struct which gives me the organizationId. But I still don't know what the creator (currently typically the avatar) is. Arc.js already has a function called
getProposalCreator
that callsgetProposalOrganization
which now returns an organizationId hash rather than the organization address. It needs to be able to return the address of the creator. Arc.js will now have a separate function calledgetProposalsOrganizationId
that can return the organizationId.