Cannot determine type of proposals being executed
- Dominant language
- JavaScript
- Stars
- 50
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
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:
1. include the proposal type as a parameter to the existing `ProposalExecuted` event
2. (less efficient) don't remove proposals from the `proposals` mapping when they are executed
Contributor guide
Assessment
This issue has not been assessed yet.