arc
arc copied to clipboard
Cannot determine type of proposals being executed
Several schemes fire a ProposalExecuted event for more than one type of proposal, without indicating which proposal type is being executed.
For example, SchemeRegistrar has two types of proposals: one to add a scheme, one to remove. Since ProposalExecuted is fired for both, and there is no parameter to distinguish the type of proposal, it is not possible to get/watch execution events separately for either adding or removing schemes. Nor is it possible to know, given just the proposalId, what type of proposal has been executed.
So I would like to propose that we break ProposalExecuted into a separate event for each type of proposal. Thus SchemeRegistrar would have two events: AddSchemeExecuted and RemoveSchemeExecuted.
Similarly for UpgradeScheme and GlobalConstraintRegistrar.
Alternatives to this, in my order of preference:
- include the proposal type as a parameter to the existing
ProposalExecutedevent - (less efficient) don't remove proposals from the
proposalsmapping when they are executed
@orenyodfat I wonder if you could comment on this with questions and your preferred approach? Thanks.
I tend to option 1.