daostack / daostack/arc

Cannot determine type of proposals being executed

Open
#453 2 comments 0 reactions 0 assignees View on GitHub
enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.